From 848d22aa280a08f519a25b47cb234183f7411da9 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 06:09:21 -0400 Subject: [PATCH 01/11] updates post-processing --- .../client-post-processing/firestore-integration.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.librarian/generator-input/client-post-processing/firestore-integration.yaml b/.librarian/generator-input/client-post-processing/firestore-integration.yaml index f46638e81393..a9d33aed57b5 100644 --- a/.librarian/generator-input/client-post-processing/firestore-integration.yaml +++ b/.librarian/generator-input/client-post-processing/firestore-integration.yaml @@ -644,4 +644,3 @@ replacements: firestore_v1/transforms firestore_v1/types count: 1 - From e895e2b49da68adf7f48bd5eb24cc52c02c13ee0 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 06:10:06 -0400 Subject: [PATCH 02/11] updates contributing.rst file (handwritten file) --- .../google-cloud-firestore/CONTRIBUTING.rst | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-firestore/CONTRIBUTING.rst b/packages/google-cloud-firestore/CONTRIBUTING.rst index 97f7ba773f69..4995bd65471e 100644 --- a/packages/google-cloud-firestore/CONTRIBUTING.rst +++ b/packages/google-cloud-firestore/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows. + 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -143,13 +143,7 @@ Running System Tests $ nox -s system # Run a single system test - $ nox -s system-3.7 -- -k - - - .. note:: - - System tests are only configured to run under Python 3.7. - For expediency, we do not run them in older versions of Python 3. + $ nox -s system-3.14 -- -k This alone will not run the tests. You'll need to change some local auth settings and change some configuration in your project to @@ -205,11 +199,11 @@ configure them just like the System Tests. # Run all tests in a folder $ cd samples/snippets - $ nox -s py-3.8 + $ nox -s py-3.10 # Run a single sample test $ cd samples/snippets - $ nox -s py-3.8 -- -k + $ nox -s py-3.10 -- -k ******************************************** Note About ``README`` as it pertains to PyPI @@ -231,18 +225,12 @@ Supported Python Versions We support: -- `Python 3.7`_ -- `Python 3.8`_ -- `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ - `Python 3.12`_ - `Python 3.13`_ - `Python 3.14`_ -.. _Python 3.7: https://docs.python.org/3.7/ -.. _Python 3.8: https://docs.python.org/3.8/ -.. _Python 3.9: https://docs.python.org/3.9/ .. _Python 3.10: https://docs.python.org/3.10/ .. _Python 3.11: https://docs.python.org/3.11/ .. _Python 3.12: https://docs.python.org/3.12/ @@ -255,7 +243,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/google-cloud-python/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.7. +We also explicitly decided to support Python 3 beginning with version 3.10. Reasons for this include: - Encouraging use of newest versions of Python 3 From 4a607b1106ca41db7a380f25c7edbb7de84eb05d Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 06:10:47 -0400 Subject: [PATCH 03/11] updates pytest.ini config to catch opentelemetry warning --- packages/google-cloud-firestore/pytest.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-firestore/pytest.ini b/packages/google-cloud-firestore/pytest.ini index 7cd904eccb1b..f895b60c3f63 100644 --- a/packages/google-cloud-firestore/pytest.ini +++ b/packages/google-cloud-firestore/pytest.ini @@ -14,8 +14,6 @@ filterwarnings = ignore:datetime.datetime.utcnow\(\) is deprecated:DeprecationWarning # Remove warning once https://github.com/grpc/grpc/issues/35974 is fixed ignore:unclosed:ResourceWarning - # Remove after support for Python 3.7 is dropped - ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning # Remove warning once https://github.com/googleapis/gapic-generator-python/issues/1939 is fixed ignore:get_mtls_endpoint_and_cert_source is deprecated.:DeprecationWarning # Remove once credential file support is removed @@ -25,3 +23,6 @@ filterwarnings = ignore:.*\'asyncio.get_event_loop_policy\' is deprecated.*:DeprecationWarning ignore:.*Please upgrade to the latest Python version.*:FutureWarning ignore:(?s).*using a Python version.*past its end of life.*:FutureWarning + # Remove once opentelemetry stops triggering SelectableGroups DeprecationWarning on Python 3.11+ + ignore:.*SelectableGroups dict interface is deprecated.*:DeprecationWarning + From 5c0f62ab1f4674c7f05a42a61867975c8190b270 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 06:11:16 -0400 Subject: [PATCH 04/11] updates constraints files --- packages/google-cloud-firestore/testing/constraints-3.10.txt | 1 + packages/google-cloud-firestore/testing/constraints-3.13.txt | 1 + packages/google-cloud-firestore/testing/constraints-3.14.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/google-cloud-firestore/testing/constraints-3.10.txt b/packages/google-cloud-firestore/testing/constraints-3.10.txt index bac7ba85b4ee..a521ceeb8088 100644 --- a/packages/google-cloud-firestore/testing/constraints-3.10.txt +++ b/packages/google-cloud-firestore/testing/constraints-3.10.txt @@ -9,3 +9,4 @@ google-auth==2.14.1 grpcio==1.44.0 proto-plus==1.22.3 protobuf==4.25.8 +google-cloud-core==2.0.0 diff --git a/packages/google-cloud-firestore/testing/constraints-3.13.txt b/packages/google-cloud-firestore/testing/constraints-3.13.txt index 1e93c60e50aa..19dd81c5d4cd 100644 --- a/packages/google-cloud-firestore/testing/constraints-3.13.txt +++ b/packages/google-cloud-firestore/testing/constraints-3.13.txt @@ -10,3 +10,4 @@ google-auth>=2 grpcio>=1 proto-plus>=1 protobuf>=6 +google-cloud-core>=2 diff --git a/packages/google-cloud-firestore/testing/constraints-3.14.txt b/packages/google-cloud-firestore/testing/constraints-3.14.txt index 1e93c60e50aa..19dd81c5d4cd 100644 --- a/packages/google-cloud-firestore/testing/constraints-3.14.txt +++ b/packages/google-cloud-firestore/testing/constraints-3.14.txt @@ -10,3 +10,4 @@ google-auth>=2 grpcio>=1 proto-plus>=1 protobuf>=6 +google-cloud-core>=2 From 864ede2e3b13f3976344676ffd9f9329b1444f92 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 06:27:56 -0400 Subject: [PATCH 05/11] updates constraints-3.10.txt post-processing --- .../client-post-processing/firestore-integration.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.librarian/generator-input/client-post-processing/firestore-integration.yaml b/.librarian/generator-input/client-post-processing/firestore-integration.yaml index a9d33aed57b5..ee5ce529846a 100644 --- a/.librarian/generator-input/client-post-processing/firestore-integration.yaml +++ b/.librarian/generator-input/client-post-processing/firestore-integration.yaml @@ -644,3 +644,14 @@ replacements: firestore_v1/transforms firestore_v1/types count: 1 + - paths: [ + "packages/google-cloud-firestore/testing/constraints-3.10.txt", + ] + before: | + "google-auth==2.14.1", + \ "grpcio==1.44.0", + after: | + "google-auth==2.14.1", + "google-cloud-core==2.0.0", + "grpcio==1.44.0", + count: 1 \ No newline at end of file From e19f4f52c770957fa470f3d3bade1fc411f69ab6 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 06:35:48 -0400 Subject: [PATCH 06/11] updates post-processing --- .../client-post-processing/firestore-integration.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/firestore-integration.yaml b/.librarian/generator-input/client-post-processing/firestore-integration.yaml index ee5ce529846a..5c59808ba365 100644 --- a/.librarian/generator-input/client-post-processing/firestore-integration.yaml +++ b/.librarian/generator-input/client-post-processing/firestore-integration.yaml @@ -648,10 +648,10 @@ replacements: "packages/google-cloud-firestore/testing/constraints-3.10.txt", ] before: | - "google-auth==2.14.1", - \ "grpcio==1.44.0", + google-auth==2.14.1, + \ grpcio==1.44.0, after: | - "google-auth==2.14.1", - "google-cloud-core==2.0.0", - "grpcio==1.44.0", + google-auth==2.14.1, + google-cloud-core==2.0.0, + grpcio==1.44.0, count: 1 \ No newline at end of file From a25d01650e49909837dc1500af1b32ab98e75a5f Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 06:49:49 -0400 Subject: [PATCH 07/11] updates post-processing for constraints-3.10.txt --- .../client-post-processing/firestore-integration.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/firestore-integration.yaml b/.librarian/generator-input/client-post-processing/firestore-integration.yaml index 5c59808ba365..301718341cea 100644 --- a/.librarian/generator-input/client-post-processing/firestore-integration.yaml +++ b/.librarian/generator-input/client-post-processing/firestore-integration.yaml @@ -648,10 +648,10 @@ replacements: "packages/google-cloud-firestore/testing/constraints-3.10.txt", ] before: | - google-auth==2.14.1, - \ grpcio==1.44.0, + google-auth==2.14.1 + grpcio==1.44.0 after: | - google-auth==2.14.1, - google-cloud-core==2.0.0, - grpcio==1.44.0, + google-auth==2.14.1 + google-cloud-core==2.0.0 + grpcio==1.44.0 count: 1 \ No newline at end of file From 6c20e62f0956bf35d6c86537ad31e1c21f96d6c9 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 06:59:27 -0400 Subject: [PATCH 08/11] updates post-processing for constraints-3.13.txt, etc --- .../firestore-integration.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.librarian/generator-input/client-post-processing/firestore-integration.yaml b/.librarian/generator-input/client-post-processing/firestore-integration.yaml index 301718341cea..63026eb9b40e 100644 --- a/.librarian/generator-input/client-post-processing/firestore-integration.yaml +++ b/.librarian/generator-input/client-post-processing/firestore-integration.yaml @@ -654,4 +654,16 @@ replacements: google-auth==2.14.1 google-cloud-core==2.0.0 grpcio==1.44.0 + count: 1 + - paths: [ + "packages/google-cloud-firestore/testing/constraints-3.13.txt", + "packages/google-cloud-firestore/testing/constraints-3.14.txt", + ] + before: | + google-auth>=2 + grpcio>=1 + after: | + google-auth>=2 + google-cloud-core>=2 + grpcio>=1 count: 1 \ No newline at end of file From 23c4a714333ac99d05f802ee91ee26e84c3a9713 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 07:01:58 -0400 Subject: [PATCH 09/11] updates post-processing count --- .../client-post-processing/firestore-integration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.librarian/generator-input/client-post-processing/firestore-integration.yaml b/.librarian/generator-input/client-post-processing/firestore-integration.yaml index 63026eb9b40e..7ce7ddb64a94 100644 --- a/.librarian/generator-input/client-post-processing/firestore-integration.yaml +++ b/.librarian/generator-input/client-post-processing/firestore-integration.yaml @@ -666,4 +666,4 @@ replacements: google-auth>=2 google-cloud-core>=2 grpcio>=1 - count: 1 \ No newline at end of file + count: 2 \ No newline at end of file From c5f96591181efe27d5367e9c7c7bfead6947d2d4 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 07:08:03 -0400 Subject: [PATCH 10/11] adds generated content --- packages/google-cloud-firestore/README.rst | 5 +++-- packages/google-cloud-firestore/docs/README.rst | 5 +++-- packages/google-cloud-firestore/testing/constraints-3.10.txt | 2 +- packages/google-cloud-firestore/testing/constraints-3.13.txt | 2 +- packages/google-cloud-firestore/testing/constraints-3.14.txt | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-firestore/README.rst b/packages/google-cloud-firestore/README.rst index 268d11a10e16..b8d6c07fa7a8 100644 --- a/packages/google-cloud-firestore/README.rst +++ b/packages/google-cloud-firestore/README.rst @@ -62,14 +62,15 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.9, including 3.14 +Python >= 3.10, including 3.14 .. _active: https://devguide.python.org/devcycle/#in-development-main-branch .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Python <= 3.8 +Python <= 3.9 + If you are using an `end-of-life`_ version of Python, we recommend that you update as soon as possible to an actively supported version. diff --git a/packages/google-cloud-firestore/docs/README.rst b/packages/google-cloud-firestore/docs/README.rst index 268d11a10e16..b8d6c07fa7a8 100644 --- a/packages/google-cloud-firestore/docs/README.rst +++ b/packages/google-cloud-firestore/docs/README.rst @@ -62,14 +62,15 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.9, including 3.14 +Python >= 3.10, including 3.14 .. _active: https://devguide.python.org/devcycle/#in-development-main-branch .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Python <= 3.8 +Python <= 3.9 + If you are using an `end-of-life`_ version of Python, we recommend that you update as soon as possible to an actively supported version. diff --git a/packages/google-cloud-firestore/testing/constraints-3.10.txt b/packages/google-cloud-firestore/testing/constraints-3.10.txt index a521ceeb8088..19668da5f6e4 100644 --- a/packages/google-cloud-firestore/testing/constraints-3.10.txt +++ b/packages/google-cloud-firestore/testing/constraints-3.10.txt @@ -6,7 +6,7 @@ # then this file should have google-cloud-foo==1.14.0 google-api-core==2.17.1 google-auth==2.14.1 +google-cloud-core==2.0.0 grpcio==1.44.0 proto-plus==1.22.3 protobuf==4.25.8 -google-cloud-core==2.0.0 diff --git a/packages/google-cloud-firestore/testing/constraints-3.13.txt b/packages/google-cloud-firestore/testing/constraints-3.13.txt index 19dd81c5d4cd..950e42205315 100644 --- a/packages/google-cloud-firestore/testing/constraints-3.13.txt +++ b/packages/google-cloud-firestore/testing/constraints-3.13.txt @@ -7,7 +7,7 @@ # Then this file should have google-cloud-foo>=1 google-api-core>=2 google-auth>=2 +google-cloud-core>=2 grpcio>=1 proto-plus>=1 protobuf>=6 -google-cloud-core>=2 diff --git a/packages/google-cloud-firestore/testing/constraints-3.14.txt b/packages/google-cloud-firestore/testing/constraints-3.14.txt index 19dd81c5d4cd..950e42205315 100644 --- a/packages/google-cloud-firestore/testing/constraints-3.14.txt +++ b/packages/google-cloud-firestore/testing/constraints-3.14.txt @@ -7,7 +7,7 @@ # Then this file should have google-cloud-foo>=1 google-api-core>=2 google-auth>=2 +google-cloud-core>=2 grpcio>=1 proto-plus>=1 protobuf>=6 -google-cloud-core>=2 From 1179d3b74992956eee1a953498d55587bf72fcfc Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Tue, 26 May 2026 09:58:04 -0400 Subject: [PATCH 11/11] test(firestore): Update pipeline explain options explain mode tests for live backend compatibility --- .../tests/system/test_system.py | 18 ++++++++----- .../tests/system/test_system_async.py | 26 ++++++++++++------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/packages/google-cloud-firestore/tests/system/test_system.py b/packages/google-cloud-firestore/tests/system/test_system.py index 350daa4a5bc5..0827c372149d 100644 --- a/packages/google-cloud-firestore/tests/system/test_system.py +++ b/packages/google-cloud-firestore/tests/system/test_system.py @@ -1671,10 +1671,13 @@ def test_query_stream_or_get_w_explain_options_analyze_false( @pytest.mark.parametrize("method", ["execute", "stream"]) @pytest.mark.parametrize("database", [FIRESTORE_ENTERPRISE_DB], indirect=True) def test_pipeline_explain_options_explain_mode(database, method, query_docs): - """Explain currently not supported by backend. Expect error""" from google.cloud.firestore_v1.query_profile import ( + ExplainStats, PipelineExplainOptions, ) + from google.cloud.firestore_v1.types.explain_stats import ( + ExplainStats as ExplainStats_pb, + ) collection, _, _ = query_docs client = collection._client @@ -1685,11 +1688,14 @@ def test_pipeline_explain_options_explain_mode(database, method, query_docs): method_under_test = getattr(pipeline, method) explain_options = PipelineExplainOptions(mode="explain") - # for now, expect error on explain mode - with pytest.raises(InvalidArgument) as e: - results = method_under_test(explain_options=explain_options) - list(results) - assert "Explain execution mode is not supported" in str(e) + results = method_under_test(explain_options=explain_options) + results_list = list(results) + assert len(results_list) == 0 + + # Verify explain_stats. + explain_stats = results.explain_stats + assert isinstance(explain_stats, ExplainStats) + assert isinstance(explain_stats.get_raw(), ExplainStats_pb) @pytest.mark.skipif( diff --git a/packages/google-cloud-firestore/tests/system/test_system_async.py b/packages/google-cloud-firestore/tests/system/test_system_async.py index 3a7959830425..34c7eb6d8164 100644 --- a/packages/google-cloud-firestore/tests/system/test_system_async.py +++ b/packages/google-cloud-firestore/tests/system/test_system_async.py @@ -1593,12 +1593,13 @@ async def test_query_stream_or_get_w_explain_options_analyze_false( @pytest.mark.parametrize("method", ["execute", "stream"]) @pytest.mark.parametrize("database", [FIRESTORE_ENTERPRISE_DB], indirect=True) async def test_pipeline_explain_options_explain_mode(database, method, query_docs): - """Explain currently not supported by backend. Expect error""" - from google.api_core.exceptions import InvalidArgument - from google.cloud.firestore_v1.query_profile import ( + ExplainStats, PipelineExplainOptions, ) + from google.cloud.firestore_v1.types.explain_stats import ( + ExplainStats as ExplainStats_pb, + ) collection, _, _ = query_docs client = collection._client @@ -1608,14 +1609,19 @@ async def test_pipeline_explain_options_explain_mode(database, method, query_doc method_under_test = getattr(pipeline, method) explain_options = PipelineExplainOptions(mode="explain") - with pytest.raises(InvalidArgument) as e: - if method == "stream": - results = method_under_test(explain_options=explain_options) - _ = [i async for i in results] - else: - await method_under_test(explain_options=explain_options) + if method == "execute": + results = await method_under_test(explain_options=explain_options) + results_list = list(results) + else: + results = method_under_test(explain_options=explain_options) + results_list = [item async for item in results] + + assert len(results_list) == 0 - assert "Explain execution mode is not supported" in str(e.value) + # Verify explain_stats. + explain_stats = results.explain_stats + assert isinstance(explain_stats, ExplainStats) + assert isinstance(explain_stats.get_raw(), ExplainStats_pb) @pytest.mark.skipif(