Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
562 commits
Select commit Hold shift + click to select a range
964dc8c
Merge branch 'tests-create-unique-instance-per-worker'
odeke-em Apr 6, 2020
7f1263a
.kokoro: make continuous use only 1 worker + gofmt
odeke-em Apr 7, 2020
1097281
add Django version compatibility check (#416)
timgraham Apr 7, 2020
89c874f
django: allow changing nullability of fields with db_index=True (#415)
timgraham Apr 7, 2020
7eeb172
ci: add migrations tests (#399)
timgraham Apr 7, 2020
a21f866
django: add system check error for DecimalField (#400)
timgraham Apr 7, 2020
9b54d19
django: fix (i)contains, (i)startswith, and (i)endswith lookups with …
timgraham Apr 7, 2020
e807fcd
parallelize_tests: evenly spread tests per P if len(apps) <= MAXPROCS
odeke-em Apr 7, 2020
9e0de3b
fix django-spanner install when django and/or google-cloud aren't ins…
timgraham Apr 7, 2020
1ae221a
README: add more instructions for Django test suite
odeke-em Apr 8, 2020
1bb33ba
parallelize_tests: return error for missing PROJECT_ID in env
odeke-em Apr 8, 2020
4ac2dc3
README: fix some links + crow overview.png
odeke-em Apr 8, 2020
7a9ba6d
django_tests: enable modeladmin
odeke-em Apr 8, 2020
5affb83
parallelize_tests: report when an instance is being deleted
odeke-em Apr 9, 2020
4cd7d7f
parallelize_tests: use looked up region
odeke-em Apr 12, 2020
7c9d9f1
django: fix (i)contains, (i)startswith, and (i)endswith lookups with …
timgraham Apr 13, 2020
20faffd
django: make iendswith case-insensitive
timgraham Apr 13, 2020
456e66e
django: fix regex lookup with F expression crash
timgraham Apr 13, 2020
4ee18d8
django: fix lookup crash with multiple target fields
timgraham Apr 14, 2020
dd98246
ci: skip test_readonly_root only on Kokoro (#434)
timgraham Apr 17, 2020
c3ee286
ci: disable continuous build (#435)
timgraham Apr 17, 2020
8dd266b
ci: add back migration_test_data_persistence skip (#437)
timgraham Apr 20, 2020
bd3b879
ci: use all workers for presubmit check (#431)
timgraham Apr 21, 2020
fccdacc
ci: add remaining Django test apps
timgraham Mar 17, 2020
49387d2
django: fix pattern lookups with bilateral transform
timgraham Apr 23, 2020
4b5a791
README, examples: add django_spanner as first entry into INSTALLED_APPS
odeke-em Apr 18, 2020
3f5cd07
django: remove unused DatabaseWrapper.data_types_check_constraints (#…
timgraham Apr 25, 2020
0039ae3
docs: move test suite information to CONTRIBUTING.md (#442)
timgraham Apr 25, 2020
56a0896
reorganize limitations in README
timgraham Apr 16, 2020
83d16ad
document 'Computations that yield FLOAT64 values can't be assigned to…
timgraham Apr 21, 2020
6187b41
document 'Addition with null values crash' limitation
timgraham Apr 24, 2020
f3919e3
document that Meta.order_with_respect_to isn't supported
timgraham Apr 24, 2020
9ae9127
document that transaction management isn't supported
timgraham Apr 25, 2020
07e2ad9
document that CHECK constraints aren't supported
timgraham Apr 26, 2020
9d5acd8
document schema migrations limitations
timgraham Apr 26, 2020
33ded7a
document that random QuerySet ordering isn't supported
timgraham Apr 26, 2020
92b6d99
ci: reduce number of workers for presubmit check (#447)
timgraham Apr 29, 2020
05f3fb9
django: remove SchemaEditor.quote_value() TODO (#445)
timgraham Apr 29, 2020
510dd78
document that DurationField arithmetic doesn't work with dates
timgraham Apr 29, 2020
8073d07
docs: minor fixes to README.md (#448)
skuruppu May 12, 2020
725ef61
chore: declare version as separate variable (#450)
busunkim96 May 13, 2020
8616d53
chore: configure renovate (#443)
renovate-bot May 14, 2020
250d38f
chore: add release please config (#452)
busunkim96 May 18, 2020
7a9a578
fix: update pypi package name (#454)
skuruppu May 26, 2020
88cac98
feat: [WIP] The first stage of `nox` implementation (#468)
mf2199 Aug 25, 2020
b46fd45
feat: refactor connect() function, cover it with unit tests (#462)
Aug 27, 2020
cedb26a
feat: Stage 2 of `nox` implementation - adding `docs` target (#473)
mf2199 Aug 29, 2020
90b019f
fix: Fix black, isort compatibility (#469)
c24t Aug 31, 2020
9374a9f
feat: Stage 3-4 of `nox` implementation - adding auto-format targets …
mf2199 Aug 31, 2020
71a782b
feat: Stage 5 of `nox` implementation - adding coverage targets (#479)
mf2199 Aug 31, 2020
fcfcef4
feat: cursor must detect if the parent connection is closed (#463)
Sep 1, 2020
dea7cb9
feat: Stage 6 of `nox` implementation - enabling system tests (#480)
mf2199 Sep 8, 2020
73b10d3
chore: Code refactoring to follow common Google API scheme - Stage I …
mf2199 Sep 14, 2020
ec0622b
fix: Change release script package name (#489)
c24t Sep 15, 2020
4a8c428
fix: Update README for alpha release (#503)
c24t Sep 15, 2020
5dad3a2
fix: Update version to 2.2.0a1 (#506)
c24t Sep 15, 2020
bb2fbac
chore: release 2.2.0a1 (#505)
release-please[bot] Sep 15, 2020
a8d75ff
fix: s/installation/installation/ (#509)
c24t Sep 15, 2020
61bfd33
fix: Fix license classifier (#507)
c24t Sep 16, 2020
2bae03f
fix: s/useage/usage/ (#511)
c24t Sep 16, 2020
5e00036
refactor: erase strip_backticks() helper (#504)
Sep 16, 2020
04bad36
refactor: update classify_stmt() helper and cover it with unit tests …
Sep 16, 2020
9c86f62
refactor: smalle changes in parse_utils (#513)
Sep 18, 2020
62d06a5
chore: add default CODEOWNERS (#519)
busunkim96 Sep 24, 2020
a760457
fix: Replace repo name with pkg name (#508)
c24t Sep 29, 2020
eef1960
chore: release 2.2.0a1 (#512)
release-please[bot] Sep 29, 2020
771439a
docs: add a querying example into the main readme (#515)
Sep 29, 2020
e838d93
refactor: update and document Cursor.executemany() method, add unit t…
Sep 30, 2020
b250f7f
refactor: rename `Column` class into `ColumnInfo`, refactor it and co…
Oct 1, 2020
669bac4
fix: permanently broken date & time unit tests on Windows (#524)
tina80lvl Oct 2, 2020
130f5d8
feat: Implementing DB-API types according to the PEP-0249 specificati…
mf2199 Oct 4, 2020
f6d59c1
docs: verify and comment the DB API exceptions (#522)
Oct 6, 2020
daae3f3
refactor: update expect() parse function (#525)
Oct 7, 2020
ff97dce
refactor: refactor Connection() class and cover it with unit tests (#…
Oct 7, 2020
0a0b9c1
refactor: update parse functions, add unit tests (#533)
Oct 9, 2020
416121f
test: run system tests against emulator (#536)
Oct 14, 2020
2ef61d1
refactor: typo fix (#538)
AlisskaPie Oct 21, 2020
8defa17
feat: support transactions management (#535)
Oct 22, 2020
8be467d
chore: unit test coverage and additional refactoring for `spanner_dba…
mf2199 Oct 26, 2020
7ff2f52
feat: clear session pool on connection close (#543)
Nov 4, 2020
407f164
chore: rephrasing `DatabaseClient.runshell()` exception (#546)
mf2199 Nov 5, 2020
45a44a4
fix: Use "any" default role in sphinx (#550)
c24t Nov 12, 2020
5aa4fdb
feat: Add dummy WHERE clause to certain statements (#516)
Nov 18, 2020
435e69e
fix: Fix package name in README (#556)
AlisskaPie Nov 24, 2020
959b477
refactor!: Update python-spanner dep, drop py 3.5 (#557)
c24t Nov 25, 2020
1f82f72
refactor!: erase dbapi directory and all the related tests (#554)
Nov 25, 2020
2be6a52
chore: Bump google-cloud-spanner to 2.1.0 (#560)
c24t Dec 7, 2020
ca7aec3
Docs: updated `README.rst` file (#563)
mf2199 Dec 15, 2020
094f190
chore: Add missing py3.8 classifier (#567)
c24t Dec 15, 2020
a5a11a4
docs: Update docstrings for `django_spanner` (#564)
mf2199 Dec 16, 2020
8f8bdc6
fix: DatabaseWrapper method impl and potential bugfix (#545)
mf2199 Dec 17, 2020
f6694f8
test: use parallel workflows to run Django tests (#569)
Jan 28, 2021
541789c
fix: fix healthchecks app tutorial (#574)
HemangChothani Jan 29, 2021
03b8fc5
fix: fix from-scratch tutorial (#573)
HemangChothani Jan 29, 2021
0522b09
fix: override django autocommit to spanner (#583)
HemangChothani Jan 29, 2021
37801b1
test: don't use special branch in build (#585)
Jan 29, 2021
c689c2e
fix: add description for transaction autocommit (#587)
HemangChothani Jan 29, 2021
68b7f98
fix: add project env in readme file (#586)
HemangChothani Jan 29, 2021
7106518
fix: fix typo in README (#575)
HemangChothani Jan 29, 2021
17f6bb1
chore: add constraints file (#572)
busunkim96 Jan 29, 2021
b9d7476
fix: Bump version ahead of lateset release (#571)
c24t Jan 29, 2021
0c42652
chore: release 2.2.1b0 (#588)
release-please[bot] Jan 29, 2021
20b717a
fix: Remove old quickstart instructions link (#593)
HemangChothani Feb 1, 2021
3c9b968
refactor: Erase excess code in build scripts (#591)
Feb 1, 2021
ad80750
fix: Bump version number after 2.2.1b0 release (#596)
c24t Feb 2, 2021
0af0c12
fix: Replace, fast-forward Django CI branch (#598)
c24t Feb 4, 2021
8a6bdfc
chore: README updates (#599)
c24t Feb 4, 2021
a826594
chore: Add contributing section to README (#600)
c24t Feb 4, 2021
a3aa13f
chore: Remove README note about Variance/StdDev (#601)
c24t Feb 4, 2021
3ab492f
test: Remove golang test runner (#592)
Feb 5, 2021
4dab626
chore: add a Code of Conduct (#604)
JustinBeckwith Apr 1, 2021
6f3aaa8
fix: lint_setup_py was failing in Kokoro is now fixed (#607)
vi3k6i5 Apr 7, 2021
8e824f3
fix: Remove un necessary file from code base (#608)
vi3k6i5 Apr 21, 2021
a7331b8
feat: move migrations test modules to run against different emulator …
vi3k6i5 Apr 26, 2021
cf7f68f
feat: update workflow files to uniformly distribute the test modules …
vi3k6i5 Apr 28, 2021
fc28816
feat: update docs and nox file to compile it (#610)
vi3k6i5 Apr 28, 2021
11e3ef8
chore: add SECURITY.md (#616)
google-cloud-policy-bot[bot] May 5, 2021
507e207
ci: removes nox run on all kokoro workers and moves it to github acti…
vi3k6i5 May 10, 2021
8e43770
fix: Update links in comments to use googleapis repo (#622)
c24t May 12, 2021
11fc186
feat: added unit test with coverage of 68% (#611)
vi3k6i5 May 17, 2021
e244a37
feat: add decimal/numeric support (#620)
vi3k6i5 May 19, 2021
6f28ef3
ci: add build for docfx and refactor settings for unit tests (#626)
vi3k6i5 May 19, 2021
37a19bb
fix: iexact lookup with Transform expression crash issue when RHS is …
vi3k6i5 May 20, 2021
1cd5ce6
fix: correct test case for sql_flush for multiple delete table comman…
vi3k6i5 May 20, 2021
3d6d107
ci: add system tests (#623)
vi3k6i5 May 20, 2021
18ef71d
test: add unit test for functions (#635)
vi3k6i5 May 25, 2021
fec5456
test: add system test for decimal numeric support (#630)
vi3k6i5 May 25, 2021
6ca094b
test: add unit test for schema (#637)
vi3k6i5 May 26, 2021
5c2bf2c
test: add unit test for introspection (#636)
vi3k6i5 May 26, 2021
74dcd66
refactor: update coverage score in nox file and cleanup imports in te…
vi3k6i5 May 26, 2021
6599dcd
fix: remove delete of instance if it already exists, as it might be i…
vi3k6i5 May 31, 2021
3b5f0b6
test: duplicate table error class fix (#639)
vi3k6i5 May 31, 2021
e3ebdb5
fix: remove error msg check from test_decimal_precision_limit (#646)
vi3k6i5 Jun 15, 2021
b2f966c
fix: remove error msg check from test_decimal_precision_limit for non…
vi3k6i5 Jun 15, 2021
deaff17
docs: add docs build kokoro config for django spanner (#644)
vi3k6i5 Jun 17, 2021
116d320
feat: Add support for open telemetry (#633)
vi3k6i5 Jun 17, 2021
f5ae316
fix: correct import path (#649)
vi3k6i5 Jun 17, 2021
b6b5ec3
chore: release 2.2.1b1 (#651)
release-please[bot] Jun 17, 2021
b19525a
fix: bump version number after 2.2.1b1 release (#652)
vi3k6i5 Jun 23, 2021
bd8bffd
feat: Add open telemetry trace in schema and related unit tests (#648)
vi3k6i5 Jun 25, 2021
9af9bf8
docs: Adding documentation for GA (#665)
asthamohta Jun 28, 2021
4aaab48
tests: Add tests back that were removed in PR #652 (#664)
vi3k6i5 Jun 28, 2021
35035ed
fix: updated assets to have text background so it works with dark mod…
vi3k6i5 Jul 2, 2021
d65b121
fix: updated assets to have text background so it works with dark mod…
vi3k6i5 Jul 9, 2021
6596bb6
chore: fix release build (#659)
busunkim96 Jul 22, 2021
369c189
feat: Added support for check constraint (#679)
vi3k6i5 Jul 23, 2021
624faee
docs: update docs to show decimal field support and check constraints…
vi3k6i5 Jul 26, 2021
b52a402
test: Performance Testing (#675)
asthamohta Jul 27, 2021
f4546ba
chore: release 2.2.1b2 (#687)
release-please[bot] Jul 28, 2021
9659090
fix: Bump version number after 2.2.1b2 release (#688)
vi3k6i5 Jul 29, 2021
598e1ed
chor: Update repo to say beta release instead of alpha (#691)
vi3k6i5 Jul 30, 2021
4f8c5af
chore: release 2.2.1b3 (#694)
release-please[bot] Jul 30, 2021
601fdd3
fix: Bump version number after 2.2.1b3 release (#696)
vi3k6i5 Aug 3, 2021
ef27c30
docs: lint fix for samples (#697)
vi3k6i5 Aug 6, 2021
8057fab
Docs: fix changelog link and sample examples. (#700)
vi3k6i5 Aug 19, 2021
13eeff6
docs: update dbapi location in overview asset file (#702)
vi3k6i5 Aug 21, 2021
1d89fb5
chore: migrate to main branch (#706)
dandhlee Sep 2, 2021
0e5c87a
chore: relocate owl bot post processor (#712)
SurferJeffAtGoogle Sep 21, 2021
4de10a7
build: use trampoline_v2 for python samples and allow custom dockerfi…
gcf-owl-bot[bot] Oct 7, 2021
cba475e
chor: add samples 3.10 config (#719)
vi3k6i5 Oct 8, 2021
cbb3a2f
feat: merge django 2.2 and django 3.2 branches into 1 branch (#717)
vi3k6i5 Oct 9, 2021
d8364a4
feat: enable support for `get_key_columns` and cleanup tests with unk…
vi3k6i5 Oct 13, 2021
2a065f0
refactor: change 'from' to upper case for a SQL command (#722)
vi3k6i5 Oct 21, 2021
2762790
chore: release 2.2.1b4 (#725)
release-please[bot] Oct 26, 2021
f0ce83d
docs: update limitations about json query support and django version …
vi3k6i5 Oct 26, 2021
a68262c
docs: typo fixes in readme (#732)
vi3k6i5 Oct 28, 2021
d739a8d
chore: GA release for django spanner library (#731)
vi3k6i5 Oct 28, 2021
0487cde
chore: release 3.0.0 (#735)
release-please[bot] Oct 29, 2021
f652579
chore(python): Block pushing non-cloud libraries to Cloud RAD (#727)
gcf-owl-bot[bot] Nov 9, 2021
8582297
fix: downgrade google-cloud-spanner to v 3.11.1 (#747)
vi3k6i5 Dec 28, 2021
f6a9e1f
chore: auto-assign issues to new Spanner owner (#743)
skuruppu Dec 28, 2021
d25f3b0
chore: add api_shortname to repo-metadata.json (#745)
parthea Dec 28, 2021
5f9008a
Update Healthchecks instructions (#738)
cuu508 Jan 3, 2022
e36cab7
chore(python): update release.sh to use keystore (#753)
gcf-owl-bot[bot] Jan 14, 2022
94bef2a
chore(deps): update dependency google-cloud-spanner to v3.13.0 (#755)
vi3k6i5 Feb 7, 2022
fc36a79
chore(main): release 3.0.1 (#754)
release-please[bot] Feb 7, 2022
908213b
chore: add custom sync repo settings (#757)
parthea Feb 28, 2022
d291ad4
docs: Add limitations docs on spanner features not supported by spann…
vi3k6i5 Feb 28, 2022
9d25a80
chore(deps): update actions/setup-python action to v3 (#760)
renovate-bot Mar 16, 2022
56a4cbf
chore(python): use black==22.3.0 (#762)
gcf-owl-bot[bot] Mar 30, 2022
287e969
chore(python): use ubuntu 22.04 in docs image (#765)
gcf-owl-bot[bot] Apr 21, 2022
f57aa2f
chore: change repo maintainer (#766)
ansh0l Jul 7, 2022
fee61f3
chore: use stable django versions for tests hosted on python-spanner-…
ansh0l Jul 18, 2022
55bee8c
fix: override AutoField default value only for Spanner (#780)
IlyaFaer Jul 20, 2022
63276d0
chore(deps): update actions/setup-python action to v4 (#770)
renovate-bot Jul 20, 2022
48de2e3
chore: use fast forwarded Django fork (#782)
IlyaFaer Aug 8, 2022
acce0b1
chore(main): release 3.0.2 (#759)
release-please[bot] Aug 18, 2022
5980f56
chore: remove 'pip install' statements from python_library templates …
gcf-owl-bot[bot] Aug 26, 2022
a968272
chore(deps): update actions/checkout action to v3 (#789)
renovate-bot Aug 26, 2022
52e4d8e
chore: update dependency distlib (#790)
gcf-owl-bot[bot] Aug 29, 2022
17c6a7e
ci(python): fix path to requirements.txt in release script (#792)
gcf-owl-bot[bot] Sep 1, 2022
914e3f8
chore(python): update .kokoro/requirements.txt (#793)
gcf-owl-bot[bot] Sep 2, 2022
5a4cc7c
chore(python): exclude setup.py in renovate config (#794)
gcf-owl-bot[bot] Sep 2, 2022
bcc03a9
ci: Propagate env vars to sudo invocations. (#795)
msuozzo Sep 12, 2022
d7107bd
chore: update dependency protobuf >= 3.20.2 (#800)
gcf-owl-bot[bot] Sep 29, 2022
71d805f
feat: support foreign keys (#802)
IlyaFaer Nov 10, 2022
4f7d908
chore(python): update release script dependencies (#806)
gcf-owl-bot[bot] Nov 29, 2022
8765889
docs: fix changelog header to consistent size (#767)
dandhlee Nov 29, 2022
b609d55
build(deps): bump certifi from 2022.9.24 to 2022.12.7 in /synthtool/g…
gcf-owl-bot[bot] Dec 8, 2022
1e29bf5
test: add foreign key tests (#807)
IlyaFaer Dec 20, 2022
83fd724
test: drop Python 3.6 tests (#811)
IlyaFaer Jan 5, 2023
2422587
build(deps): bump cryptography from 38.0.3 to 39.0.1 in /synthtool/gc…
gcf-owl-bot[bot] Feb 8, 2023
52f7ba8
chore(python): upgrade gcp-releasetool in .kokoro [autoapprove] (#816)
gcf-owl-bot[bot] Feb 27, 2023
cc5b2c0
chore(deps): Update nox in .kokoro/requirements.in [autoapprove] (#817)
gcf-owl-bot[bot] Mar 16, 2023
d296ba7
build(deps): bump requests from 2.28.1 to 2.31.0 in /synthtool/gcp/te…
gcf-owl-bot[bot] May 25, 2023
5435d61
build(deps): bump cryptography from 39.0.1 to 41.0.0 in /synthtool/gc…
gcf-owl-bot[bot] Jun 3, 2023
3e5103a
chore: store artifacts in placer (#823)
gcf-owl-bot[bot] Jun 29, 2023
070db91
build(deps): [autoapprove] bump cryptography from 41.0.0 to 41.0.2 (#…
gcf-owl-bot[bot] Jul 17, 2023
cb92053
build(deps): [autoapprove] bump pygments from 2.13.0 to 2.15.0 (#827)
gcf-owl-bot[bot] Jul 21, 2023
a44f4ef
build(deps): [autoapprove] bump certifi from 2022.12.7 to 2023.7.22 (…
gcf-owl-bot[bot] Jul 26, 2023
e1e655c
build: [autoapprove] bump cryptography from 41.0.2 to 41.0.3 (#831)
gcf-owl-bot[bot] Aug 3, 2023
8fbee89
chore: [autoapprove] bump cryptography from 41.0.3 to 41.0.4 (#834)
gcf-owl-bot[bot] Oct 7, 2023
d303b47
chore: [autoapprove] Update `black` and `isort` to latest versions (#…
gcf-owl-bot[bot] Oct 10, 2023
5760524
chore: rename rst files to avoid conflict with service names (#840)
gcf-owl-bot[bot] Oct 30, 2023
cec8cfe
chore: update docfx minimum Python version (#841)
dandhlee Nov 3, 2023
350deed
chore: bump urllib3 from 1.26.12 to 1.26.18 (#842)
gcf-owl-bot[bot] Nov 15, 2023
50ddc89
chore: bump cryptography from 41.0.5 to 41.0.6 in /synthtool/gcp/temp…
gcf-owl-bot[bot] Jan 8, 2024
c8aafbb
chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /.kokoro (#852)
gcf-owl-bot[bot] Jan 22, 2024
f2202fe
build(deps): bump cryptography from 42.0.2 to 42.0.4 in .kokoro (#859)
gcf-owl-bot[bot] Mar 6, 2024
5ab8f55
task: new assignee for issues (#857)
asthamohta Mar 6, 2024
59dd054
chore(python): update dependencies in /.kokoro (#861)
gcf-owl-bot[bot] Mar 22, 2024
22d8287
chore: Add support for named schema (#858)
ankiaga Mar 25, 2024
b281d06
chore(python): bump idna from 3.4 to 3.7 in .kokoro (#866)
gcf-owl-bot[bot] Apr 12, 2024
3718165
chore(deps): update all dependencies (#848)
renovate-bot Apr 17, 2024
f014025
fix: Dummy change to trigger a release PR (#874)
ankiaga Apr 18, 2024
a069512
chore: Changes for release please (#880)
ankiaga Apr 23, 2024
f144e92
chore(main): release 3.1.0 (#881)
release-please[bot] Apr 23, 2024
77fddcb
feat!: Support Django 4.2 (#865)
ankiaga Apr 25, 2024
948115e
chore(main): release 4.0.0 (#882)
release-please[bot] Apr 30, 2024
733869e
fix: Fixing README.rst to fix release failure. (#885)
ankiaga May 7, 2024
e21ee4c
chore(main): release 4.0.1 (#886)
release-please[bot] May 7, 2024
b38b385
chore(python): Update the python version in docs presubmit to use 3.1…
gcf-owl-bot[bot] Jan 3, 2025
b1fb83c
chore(python): exclude .github/workflows/unittest.yml in renovate con…
gcf-owl-bot[bot] Jan 14, 2025
e07c364
chore(python): conditionally load credentials in .kokoro/build.sh (#924)
gcf-owl-bot[bot] Mar 3, 2025
97b40a4
chore: remove unused files (#925)
parthea Mar 10, 2025
537022e
build: only run unit tests during Kokoro builds (#929)
olavloite Jun 3, 2025
8dc5f4d
test: add mockserver tests (#928)
olavloite Jun 3, 2025
cbb920a
fix: add option to disable client-side pk generation (#930)
olavloite Jun 4, 2025
4bf6bfb
fix: move version module to django_spanner.version (#844)
parthea Jun 4, 2025
521c059
fix: Update Django Official Link to drop 2.2 and support 4.2 (#903)
mitsuo0114 Jun 4, 2025
b64d353
docs: document how to enable/disable random PK generation (#933)
olavloite Jun 5, 2025
a16360a
chore(main): release 4.0.2 (#932)
release-please[bot] Jun 10, 2025
bb90626
chore(librarian): onboard to librarian (#940)
parthea Nov 13, 2025
06ad9d8
chore: replace old spanner teams with spanner-team (#957)
suztomo Feb 19, 2026
eba8899
Merge remote-tracking branch 'remote.googleapis/python-spanner-django…
parthea Mar 6, 2026
a980d04
Trigger owlbot post-processor
parthea Mar 6, 2026
a956ac4
build: django-google-spanner migration: adjust owlbot-related files
parthea Mar 6, 2026
53aa121
chore: delete unused directories and files
chalmerlowe Mar 6, 2026
46ee244
chore: update repo URLs and references and check for Ruff
chalmerlowe Mar 6, 2026
35db0fe
chore: updates librarian state.yaml with library id and metadata
chalmerlowe Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .librarian/state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ libraries:
preserve_regex: []
remove_regex: []
tag_format: '{id}-v{version}'
- id: django-google-spanner
version: 4.0.2
last_generated_commit: ""
apis: []
source_roots:
- packages/django-google-spanner
preserve_regex: []
remove_regex: []
tag_format: '{id}-v{version}'
- id: google-ads-admanager
version: 0.8.0
last_generated_commit: effe5c4fa816021e724ca856d5640f2e55b14a8b
Expand Down
23 changes: 23 additions & 0 deletions packages/django-google-spanner/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#
# Copyright 2020 Google LLC
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd

[run]
branch = True

[report]
fail_under = 100
show_missing = True
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
# Ignore debug-only repr
def __repr__
# Ignore abstract methods
raise NotImplementedError
omit =
*/site-packages/*.py
14 changes: 14 additions & 0 deletions packages/django-google-spanner/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "django-google-spanner",
"name_pretty": "Cloud Spanner Django",
"product_documentation": "https://cloud.google.com/spanner/docs/",
"client_documentation": "https://googleapis.dev/python/django-google-spanner/latest",
"issue_tracker": "https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open",
"release_level": "stable",
"language": "python",
"library_type": "INTEGRATION",
"repo": "googleapis/google-cloud-python",
"distribution_name": "django-google-spanner",
"requires_billing": true,
"api_shortname": "django-google-spanner"
}
312 changes: 312 additions & 0 deletions packages/django-google-spanner/CHANGELOG.md

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions packages/django-google-spanner/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# How to Contribute

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.

## Code reviews

All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.

## Community Guidelines

This project follows [Google's Open Source Community
Guidelines](https://opensource.google/conduct/).
27 changes: 27 additions & 0 deletions packages/django-google-spanner/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright 2020 Google LLC

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
288 changes: 288 additions & 0 deletions packages/django-google-spanner/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
Cloud Spanner support for Django
================================

|GA| |pypi| |versions|

`Cloud Spanner`_ is the world's first fully managed relational database service
to offer both strong consistency and horizontal scalability for
mission-critical online transaction processing (OLTP) applications. With Cloud
Spanner you enjoy all the traditional benefits of a relational database; but
unlike any other relational database service, Cloud Spanner scales horizontally
to hundreds or thousands of servers to handle the biggest transactional
workloads.


- `Client Library Documentation`_
- `Product Documentation`_

.. |GA| image:: https://img.shields.io/badge/support-GA-gold.svg
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability
.. |pypi| image:: https://img.shields.io/pypi/v/django-google-spanner.svg
:target: https://pypi.org/project/django-google-spanner/
.. |versions| image:: https://img.shields.io/pypi/pyversions/django-google-spanner.svg
:target: https://pypi.org/project/django-google-spanner/
.. _Cloud Spanner: https://cloud.google.com/spanner/
.. _Client Library Documentation: https://googleapis.dev/python/django-google-spanner/latest/index.html
.. _Product Documentation: https://cloud.google.com/spanner/docs

Quick Start
-----------

In order to use this library, you first need to go through the following steps:

1. `Select or create a Cloud Platform project.`_
2. `Enable billing for your project.`_
3. `Enable the Google Cloud Spanner API.`_
4. `Setup Authentication.`_

.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
.. _Enable the Google Cloud Spanner API.: https://cloud.google.com/spanner
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html

This package provides a `3rd-party database backend
<https://docs.djangoproject.com/en/4.2/ref/databases/#using-a-3rd-party-database-backend>`__
for using `Cloud Spanner <https://cloud.google.com/spanner>`__ with the `Django
ORM <https://docs.djangoproject.com/en/4.2/topics/db/>`__. It uses the `Cloud
Spanner Python client library <https://github.com/googleapis/python-spanner>`__
under the hood.

Installation
------------

Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
create isolated Python and Django environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.

With `virtualenv`_, it's possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.

.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/


Supported versions
~~~~~~~~~~~~~~~~~~

The library supports `Django 3.2
<https://docs.djangoproject.com/en/3.2/>`_, and `Django 4.2
<https://docs.djangoproject.com/en/4.2/>`_.
Both versions are long-term support (LTS) releases for the
`Django project<https://www.djangoproject.com/download/#supported-versions>_`.
The minimum required Python version is 3.6.

.. code:: shell

pip3 install django==3.2


Installing the package
~~~~~~~~~~~~~~~~~~~~~~

To install from PyPI:

.. code:: shell

pip3 install django-google-spanner


To install from source:

.. code:: shell

git clone git@github.com:googleapis/google-cloud-python.git
cd python-spanner-django
pip3 install -e .


Creating a Cloud Spanner instance and database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you don't already have a Cloud Spanner database, or want to start from
scratch for a new Django application, you can `create a new instance
<https://cloud.google.com/spanner/docs/getting-started/python#create_an_instance>`__
and `database
<https://cloud.google.com/spanner/docs/getting-started/python#create_a_database>`__
using the Google Cloud SDK:

.. code:: shell

gcloud spanner instances create $INSTANCE --config=regional-us-central1 --description="New Django Instance" --nodes=1
gcloud spanner databases create $DB --instance $INSTANCE


Configuring ``settings.py``
~~~~~~~~~~~~~~~~~~~~~~~~~~~

This package provides a Django application named ``django_spanner``. To use the
Cloud Spanner database backend, the application needs to installed and
configured:

- Add ``django_spanner`` as the first entry in ``INSTALLED_APPS``:

.. code:: python

INSTALLED_APPS = [
'django_spanner',
...
]

- Edit the ``DATABASES`` setting to point to an existing Cloud Spanner database:

.. code:: python

DATABASES = {
'default': {
'ENGINE': 'django_spanner',
'PROJECT': '$PROJECT',
'INSTANCE': '$INSTANCE',
'NAME': '$DATABASE',
}
}

Configuring primary key generation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The Spanner Django engine by default uses random int64 values that are generated
by the client as primary key values. This default is applied to all databases that are
configured, including databases that use a different engine than Spanner. You can
disable this behavior with the RANDOM_ID_GENERATION_ENABLED setting:

.. code:: python

DATABASES = {
'default': {
'ENGINE': 'django_spanner',
'PROJECT': '$PROJECT',
'INSTANCE': '$INSTANCE',
'NAME': '$DATABASE',
'RANDOM_ID_GENERATION_ENABLED': false,
}
}



Transaction support in autocommit mode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Django version 4.2 and higher by default supports transactions in autocommit mode.
A transaction is automatically started if you define an
[atomic block](https://docs.djangoproject.com/en/4.2/topics/db/transactions/#controlling-transactions-explicitly).

Django version 3.2 and earlier did not support transactions in autocommit mode with Spanner.
You can enable transactions in autocommit mode with Spanner with the
`ALLOW_TRANSACTIONS_IN_AUTO_COMMIT` configuration option.

- To enable transactions in autocommit mode in V3.2, set the flag `ALLOW_TRANSACTIONS_IN_AUTO_COMMIT` to True in your settings.py file.
- To disable transactions in autocommit mode in V4.2, set the flag `ALLOW_TRANSACTIONS_IN_AUTO_COMMIT` to False in your settings.py file.


Set credentials and project environment variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You'll need to download a service account JSON key file and point to it using an environment variable:

.. code:: shell

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/keyfile.json
export GOOGLE_CLOUD_PROJECT=gcloud_project


Apply the migrations
~~~~~~~~~~~~~~~~~~~~

Please run:

.. code:: shell

$ python3 manage.py migrate

That'll take a while to run. After this you should be able to see the tables and indexes created in your Cloud Spanner console.


Create a Django admin user
~~~~~~~~~~~~~~~~~~~~~~~~~~~
First you’ll need to create a user who can login to the admin site. Run the following command:

.. code:: shell

$ python3 manage.py createsuperuser

which will then produce a prompt which will allow you to create your super user

.. code:: shell

Username: admin
Email address: admin@example.com
Password: **********
Password (again): **********
Superuser created successfully.


Login as admin
~~~~~~~~~~~~~~
Now, run the server

.. code:: shell

python3 manage.py runserver

Then visit http://127.0.0.1:8000/admin/

Create and register your first model
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please follow the guides in https://docs.djangoproject.com/en/4.2/intro/tutorial02/#creating-models
to create and register the model to the Django’s automatically-generated admin site.

How it works
------------

Overall design
~~~~~~~~~~~~~~

.. figure:: https://raw.githubusercontent.com/googleapis/google-cloud-python/main/assets/overview.png
:alt: "Overall Design"

Internals
~~~~~~~~~

.. figure:: https://raw.githubusercontent.com/googleapis/google-cloud-python/main/assets/internals.png
:alt: "Internals"


Executing a query
~~~~~~~~~~~~~~~~~

Here is an example of how to add a row for Model Author, save it and later query it using Django

.. code:: shell

>>> author_kent = Author( first_name="Arthur", last_name="Kent", rating=Decimal("4.1"),)
>>> author_kent.save()
>>> qs1 = Author.objects.all().values("first_name", "last_name")


How to contribute
~~~~~~~~~~~~~~~~~

Contributions to this library are always welcome and highly encouraged.

See `CONTRIBUTING <https://github.com/googleapis/google-cloud-python/blob/main/CONTRIBUTING.md>`_ for more information on how to get started.

Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms. See the `Code
of Conduct <https://github.com/googleapis/google-cloud-python/blob/main/CODE_OF_CONDUCT.md>`_ for more information.


Limitations
~~~~~~~~~~~

Spanner has certain limitations of its own. The full set of limitations is documented
`here <https://cloud.google.com/spanner/quotas#schema_limits>`__.
It is recommended that you go through that list.

Django spanner has a set of limitations as well, which you can find
`here <https://github.com/googleapis/google-cloud-python/blob/main/docs/limitations.rst>`__.

Features from spanner that are not supported in Django-spanner are listed
`here <https://github.com/googleapis/google-cloud-python/blob/main/docs/limitations-spanner.rst>`__.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading