Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 1 addition & 14 deletions packages/google-cloud-core/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
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
Expand Down Expand Up @@ -197,14 +197,12 @@ Supported Python Versions

We support:

- `Python 3.9`_
- `Python 3.10`_
- `Python 3.11`_
- `Python 3.12`_
- `Python 3.13`_
- `Python 3.14`_

.. _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/
Expand All @@ -217,17 +215,6 @@ 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.9.
Reasons for this include:

- Encouraging use of newest versions of Python 3
- Taking the lead of `prominent`_ open-source `projects`_
- `Unicode literal support`_ which allows for a cleaner codebase that
works in both Python 2 and Python 3

.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django
.. _projects: http://flask.pocoo.org/docs/0.10/python3/
.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/

**********
Versioning
Expand Down
5 changes: 2 additions & 3 deletions packages/google-cloud-core/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ to `Python Development Environment Setup Guide`_ for Google Cloud Platform.

Supported Python Versions
-------------------------
Python >= 3.9
Python >= 3.10

Unsupported Python Versions
---------------------------

Python <= 3.8
Python <= 3.9
5 changes: 2 additions & 3 deletions packages/google-cloud-core/docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ to `Python Development Environment Setup Guide`_ for Google Cloud Platform.

Supported Python Versions
-------------------------
Python >= 3.9
Python >= 3.10

Unsupported Python Versions
---------------------------

Python <= 3.8
Python <= 3.9
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@

"""Helpers for deprecated code and modules."""

try:
import importlib.metadata as metadata
except ImportError:
# For Python 3.7 compatibility
import importlib_metadata as metadata # type: ignore[no-redef]
import importlib.metadata as metadata

import warnings

Expand Down
3 changes: 1 addition & 2 deletions packages/google-cloud-core/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

DEFAULT_PYTHON_VERSION = "3.14"
UNIT_TEST_PYTHON_VERSIONS = [
"3.9",
"3.10",
"3.11",
"3.12",
Comment on lines 28 to 30
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The UNIT_TEST_PYTHON_VERSIONS list is missing Python 3.13 and 3.14. Since these versions are explicitly listed as supported in CONTRIBUTING.rst and 3.14 is designated as the DEFAULT_PYTHON_VERSION, they should be included in the unit test matrix to ensure compatibility is verified in CI. Please verify that these versions are not already present in the configuration list before applying this change.

Suggested change
"3.10",
"3.11",
"3.12",
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
References
  1. Verify that suggested additions to a configuration list (such as Python versions in a test matrix) are not already present in the file before recommending their inclusion to avoid false positive suggestions.
  2. Python 3.14 is a valid Python version and should be supported in configurations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gemini-code-assist:

Thanks for your help. In this case, these references are present. They may be outside the diff window but they are there.

This comment is not relevent. Closing. Please make a note of this occurrence as part of training yourself to improve the quality of your future code reviews.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize for the oversight. Thank you for clarifying that the Python versions are present in the configuration. I have noted this for future reference.

Expand Down Expand Up @@ -342,7 +341,7 @@ def core_deps_from_source(session, protobuf_implementation):
f"{CURRENT_DIRECTORY}/../google-api-core",
f"{CURRENT_DIRECTORY}/../google-auth",
f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1",
f"{CURRENT_DIRECTORY}/../proto-plus"
f"{CURRENT_DIRECTORY}/../proto-plus",
]

for dep in core_dependencies_from_source:
Expand Down
4 changes: 1 addition & 3 deletions packages/google-cloud-core/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ filterwarnings =
error
# Remove once https://github.com/protocolbuffers/protobuf/issues/12186 is fixed
ignore:.*custom tp_new.*in Python 3.14:DeprecationWarning
# 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 once the minimum supported version of `google-api-core` is 2.15.0
ignore:.*pkg_resources.declare_namespace:DeprecationWarning
ignore:.*pkg_resources is deprecated as an API:DeprecationWarning
# Remove after support for Python 3.8, 3.9 and/or 3.10+ is dropped
# Remove after support for Python 3.10+ is dropped
ignore:\s*You are using a (non-supported )?Python version \(?3\.(8|9|1[0-9]+):DeprecationWarning
ignore:\s*You are using a (non-supported )?Python version \(?3\.(8|9|1[0-9]+):FutureWarning
7 changes: 3 additions & 4 deletions packages/google-cloud-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
]
extras = {
"grpc": [
"grpcio >= 1.38.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.47.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio-status >= 1.38.0, < 2.0.0",
"grpcio-status >= 1.47.0, < 2.0.0",
],
}

Expand Down Expand Up @@ -75,7 +75,6 @@
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Comment on lines 78 to 80
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The PyPI classifiers are missing Python 3.13 and 3.14. To accurately reflect the supported versions mentioned in the documentation and other configuration files, please add these classifiers. This ensures the project's metadata in 'setup.py' is updated to reflect the supported Python versions consistently.

Suggested change
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
References
  1. When updating supported Python versions, ensure that the project's metadata in 'setup.py' or 'pyproject.toml' is also updated to reflect the same versions in Trove classifiers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gemini-code-assist:

Thanks for your help. In this case, these references are present. They may be outside the diff window but they are there.

This comment is not relevent. Closing. Please make a note of this occurrence as part of training yourself to improve the quality of your future code reviews.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. Thank you for the clarification regarding the presence of these classifiers in other files. I have noted this for future reference.

Expand All @@ -88,7 +87,7 @@
packages=packages,
install_requires=dependencies,
extras_require=extras,
python_requires=">=3.9",
python_requires=">=3.10",
include_package_data=True,
zip_safe=False,
)
13 changes: 13 additions & 0 deletions packages/google-cloud-core/testing/constraints-3.10.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This constraints file is used to check that lower bounds
# are correct in setup.py
# List *all* library dependencies and extras in this file.
# Pin the version to the lower bound.
#
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
# Then this file should have foo==1.14.0
google-api-core==2.11.0
google-auth==2.14.1
grpcio==1.47.0
Comment thread
chalmerlowe marked this conversation as resolved.
grpcio-status==1.47.0
# cryptography is a direct dependency of google-auth
cryptography==38.0.3
12 changes: 0 additions & 12 deletions packages/google-cloud-core/testing/constraints-3.9.txt

This file was deleted.

Loading