Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:5581906b957284864632cde4e9c51d1cc66b0094990b27e689132fe5cd036046
# created: 2025-03-05
digest: sha256:4a9e5d44b98e8672e2037ee22bc6b4f8e844a2d75fcb78ea8a4b38510112abc6
# created: 2025-10-07
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.13"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.13"
- name: Install coverage
run: |
python -m pip install --upgrade setuptools pip wheel
Expand Down
12 changes: 8 additions & 4 deletions 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.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows.
3.8, 3.9, 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 @@ -72,7 +72,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.

- To run a single unit test::

$ nox -s unit-3.12 -- -k <name of test>
$ nox -s unit-3.14 -- -k <name of test>


.. note::
Expand Down Expand Up @@ -143,12 +143,12 @@ Running System Tests
$ nox -s system

# Run a single system test
$ nox -s system-3.12 -- -k <name of test>
$ nox -s system-3.14 -- -k <name of test>


.. note::

System tests are only configured to run under Python 3.8, 3.9, 3.10, 3.11 and 3.12.
System tests are only configured to run under Python 3.9 and 3.14.
For expediency, we do not run them in older versions of Python 3.

This alone will not run the tests. You'll need to change some local
Expand Down Expand Up @@ -226,12 +226,16 @@ We support:
- `Python 3.10`_
- `Python 3.11`_
- `Python 3.12`_
- `Python 3.13`_
- `Python 3.14`_

.. _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/
.. _Python 3.13: https://docs.python.org/3.13/
.. _Python 3.14: https://docs.python.org/3.14/


Supported versions can be found in our ``noxfile.py`` `config`_.
Expand Down
41 changes: 32 additions & 9 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,17 @@
ISORT_VERSION = "isort==5.11.0"
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"

UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12"]
DEFAULT_PYTHON_VERSION = "3.13"

UNIT_TEST_PYTHON_VERSIONS: List[str] = [
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
"asyncmock",
Expand All @@ -48,7 +56,7 @@
UNIT_TEST_EXTRAS: List[str] = []
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12"]
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.14"]
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
"mock",
"pytest",
Expand All @@ -63,7 +71,12 @@
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()

nox.options.sessions = [
"unit",
"unit-3.9",
"unit-3.10",
"unit-3.11",
"unit-3.12",
"unit-3.13",
"unit-3.14",
"system",
"cover",
"lint",
Expand Down Expand Up @@ -127,7 +140,7 @@ def format(session):
@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.install("docutils", "pygments")
session.install("docutils", "pygments", "setuptools")
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")


Expand Down Expand Up @@ -167,7 +180,12 @@ def install_unittest_dependencies(session, *constraints):
def unit(session, protobuf_implementation):
# Install all test dependencies, then install this package in-place.

if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

constraints_path = str(
Expand Down Expand Up @@ -367,15 +385,20 @@ def docfx(session):
)


@nox.session(python="3.12")
@nox.session(python="3.14")
@nox.parametrize(
"protobuf_implementation",
["python", "upb", "cpp"],
)
def prerelease_deps(session, protobuf_implementation):
"""Run all tests with prerelease versions of dependencies installed."""

if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

# Install all dependencies
Expand Down
5 changes: 3 additions & 2 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
# Add templated files
# ----------------------------------------------------------------------------
templated_files = common.py_library(
unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12"],
system_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12"],
unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"],
system_test_python_versions=["3.9", "3.14"],
default_python_version="3.13",
cov_level=99,
intersphinx_dependencies={
"pandas": "https://pandas.pydata.org/pandas-docs/stable/"
Expand Down
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ filterwarnings =
ignore:.*pkg_resources is deprecated as an API:DeprecationWarning
# Remove once the minimum supported Python runtime of this library is Python 3.9
ignore:The python-bigquery library will stop supporting Python 3.7 and Python 3.8:PendingDeprecationWarning
# This error is expected for python versions that approach EOL
ignore:.*Please upgrade to the latest Python version.*:FutureWarning
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
install_requires=(
"google-api-core>=2.15.0, <3.0.0",
"pandas[performance,gcp]>=2.0.0, <3.0.0",
"pyarrow>=15.0.0, <16.0.0",
"pyarrow>=15.0.0, <23.0.0",
"tabulate>=0.9.0, <1.0.0",
"proto-plus>=1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version>='3.13'",
Expand All @@ -64,11 +64,11 @@
"google-cloud-documentai>=2.29.2, <4.0.0",
"google-cloud-storage>=1.31.0, <4.0.0",
"google-cloud-vision>=2.7.0, <4.0.0",
"numpy>=1.23.5, <2.0.0",
"numpy>=1.23.5, <3.0.0",
"intervaltree>=3.0.0",
"pikepdf>=8.0.0, <9.0.0",
"pikepdf>=8.0.0, <11.0.0",
"immutabledict>=2.0.0, <5.0.0",
"Pillow>=10.0.0, <11.0.0",
"Pillow>=10.0.0, <12.0.0",
"Jinja2>=3.1.0, <4.0.0",
),
python_requires=">=3.8",
Expand All @@ -81,6 +81,8 @@
"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",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
],
Expand Down
12 changes: 12 additions & 0 deletions testing/constraints-3.13.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-api-core
pandas
proto-plus
grpc-google-iam-v1
google-cloud-bigquery
google-cloud-documentai
google-cloud-storage
numpy
pikepdf
13 changes: 13 additions & 0 deletions testing/constraints-3.14.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-api-core
pandas
proto-plus
grpc-google-iam-v1
google-cloud-bigquery
google-cloud-documentai
google-cloud-storage
numpy
pikepdf
numba>=0.63.0b1
Loading