Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/python-spanner
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.55.0
Choose a base ref
...
head repository: googleapis/python-spanner
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.56.0
Choose a head ref
  • 8 commits
  • 81 files changed
  • 8 contributors

Commits on Jun 4, 2025

  1. Configuration menu
    Copy the full SHA
    f9fd347 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2025

  1. feat: Add support for multiplexed sessions (#1383)

    * Update `SessionOptions` to support `GOOGLE_CLOUD_SPANNER_FORCE_DISABLE_MULTIPLEXED_SESSIONS` and add unit tests.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Remove handling of `MethodNotImplemented` exception from `DatabaseSessionManager` and add unit tests.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Update `Connection` to use multiplexed sessions, add unit tests.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * cleanup: Rename `beforeNextRetry` to `before_next_retry`.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * cleanup: Fix a few unrelated typos.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add ingest of precommit tokens to `_SnapshotBase` and update attributes and tests.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Deprecate `StreamedResultSet._source` (redundant as transaction ID is set via `_restart_on_unavailable`)
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Move `_session_options` from `Database` to `Client` so that multiplexed are disabled for _all_ databases.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Deprecate `SessionCheckout` and update `Database.run_in_transaction` to not use it.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Deprecate `Database.session()` and minor cleanup.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Update `BatchSnapshot` to use database session manager.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Move `Batch` and `Transaction` attributes from class attributes to instance attributes.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Update pools so they don't use deprecated `database.session()`
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Update session to remove class attributes, add TODOs, and make `Session._transaction` default to None. Plus add some `Optional` typing hints.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Move begin transaction logic from `Snapshot` to `_SnapshotBase` and update unit tests.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Remove begin transaction logic from `Transaction`, move to base class, update tests.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add logic for beginning mutations-only transactions.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Cleanup and improve consistency of state checks, add `raises` documentation.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Cleanup documentation for `Batch.commit`, some minor cleanup.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add logic for retrying commits if precommit token returned.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Remove `GOOGLE_CLOUD_SPANNER_FORCE_DISABLE_MULTIPLEXED_SESSIONS` and update tests.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Cleanup `TestDatabaseSessionManager` so that it doesn't depend on environment variable values.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add type hints for `SessionOptions` and `DatabaseSessionManager`.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Fix `test_observability_options`
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Update `_builders` to use mock scoped credentials.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add helpers for mock scoped credentials for testing.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Fix failing `test_batch_insert_then_read`.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Fix failing `test_transaction_read_and_insert_then_rollback`.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add test helper for multiplexed env vars.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add unit tests for begin transaction base class, simplify `_SnapshotBase` tests, remove redundant tests.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Attempt to fix `test_transaction_read_and_insert_then_rollback` and add `build_request_id` helper method, fix `test_snapshot` and `test_transaction` failures.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add test for log when new session created by maintenance thread.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add additional multiplexed unit tests for `_SnapshotBase`.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Cleanup `Transaction` by extracting some constants for next step.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add additional `Transaction` tests for new multiplexed behaviour.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Fix linter
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Remove unnecessary TODO
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Remove unnecessary constants.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Remove support for disabling the use of multiplexed sessions due to runtime failures.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Make deprecation comments a bit more clear.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add some more type hints.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    ---------
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    currantw authored Jun 10, 2025
    Configuration menu
    Copy the full SHA
    21f5028 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2025

  1. perf: Skip gRPC trailers for StreamingRead & ExecuteStreamingSql (#1385)

    * perf: Skip gRPC trailers for StreamingRead & ExecuteStreamingSql
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * add mockspanner tests
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * Fix None issue
    
    * Optimize imports
    
    * optimize imports
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * Remove setup
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * Remove .python-version
    
    ---------
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    sakthivelmanii and gcf-owl-bot[bot] authored Jun 16, 2025
    Configuration menu
    Copy the full SHA
    cb25de4 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2025

  1. feat: Add support for multiplexed sessions - read/write (#1389)

    * feat: Multiplexed sessions - Support multiplexed sessions for read/write transactions.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Remove `Session._transaction` attribute, since each session may not correspond to multiple transactions.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Refactor logic for creating transaction selector to base class.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Add retry logic to run_in_transaction with previous transaction ID.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Remove unnecessary divider comments
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    * feat: Multiplexed sessions - Only populate previous transaction ID for transactions with multiplexed session.
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    
    ---------
    
    Signed-off-by: Taylor Curran <taylor.curran@improving.com>
    Co-authored-by: rahul2393 <irahul@google.com>
    currantw and rahul2393 authored Jun 18, 2025
    Configuration menu
    Copy the full SHA
    ce3f230 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2025

  1. tests: update default runtime used for tests (#1391)

    * tests: update default runtime used for tests
    
    * set default python runtime used for tests to 3.12
    
    * Use python 3.10 for blacken nox session, which is the latest version available in the python post processor
    
    * update sync-repo-settings.yaml
    
    * install setuptools for lint_setup_py
    
    * remove unit 3.7/3.8 in default nox session
    
    * update python runtime in system tests to 3.12
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * remove obsolete config
    
    * set python 3.12 as runtime for system test
    
    * exclude cpp for python 3.11+
    
    ---------
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    parthea and gcf-owl-bot[bot] authored Jul 3, 2025
    Configuration menu
    Copy the full SHA
    f81fbd5 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2025

  1. feat: default enable multiplex session for all operations unless expl…

    …icitly set to false (#1394)
    
    * feat: enable multiplex session for all operations unless explicitly set to false
    
    * fix tests
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * rename job name
    
    * fux emulator systest
    
    * update python version for emulator tests
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * fix test
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * fix test
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * fix systests
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * skip dbapi test which depends on session delete
    
    * revert timestamp changes
    
    * revert timestamp changes
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * more fixes
    
    * fix regular session systests
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * expect precommit token only when session is multiplexed.
    
    * pin emulator version to make multiplex session with emulator pass
    
    ---------
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    rahul2393 and gcf-owl-bot[bot] authored Jul 24, 2025
    Configuration menu
    Copy the full SHA
    651ca9c View commit details
    Browse the repository at this point in the history
  2. feat(spanner): add new change_stream.proto (#1382)

    * build: ensure there's only a single service config file for the Spanner Admin Instances API
    
    PiperOrigin-RevId: 763646865
    
    Source-Link: googleapis/googleapis@0a4ce50
    
    Source-Link: googleapis/googleapis-gen@88e6355
    Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODhlNjM1NTE5NTk0ZTFhMTU5YTFmODExZDE0OTU4YzU1Y2ZhOGE4NSJ9
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * feat(spanner): add new change_stream.proto
    
    PiperOrigin-RevId: 766241102
    
    Source-Link: googleapis/googleapis@2bea1fc
    
    Source-Link: googleapis/googleapis-gen@f429e2a
    Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjQyOWUyYTg2NDkyZmUzNzc1NDA3OWZmMDIzNmNiYWMzYmUxYmZiYSJ9
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    ---------
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    Co-authored-by: Sakthivel Subramanian <179120858+sakthivelmanii@users.noreply.github.com>
    Co-authored-by: Anthonios Partheniou <partheniou@google.com>
    4 people authored Jul 24, 2025
    Configuration menu
    Copy the full SHA
    ca6255e View commit details
    Browse the repository at this point in the history
  3. chore(main): release 3.56.0 (#1386)

    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored Jul 24, 2025
    Configuration menu
    Copy the full SHA
    aaaff2a View commit details
    Browse the repository at this point in the history
Loading