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
1 change: 1 addition & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ branchProtectionRules:
- 'unit (3.11)'
- 'unit (3.12)'
- 'unit (3.13)'
- 'unit (3.14)'
- 'cover'
permissionRules:
- team: actools-python
Expand Down
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.10"
- 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.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
python: ['3.7', '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.10"
- name: Install coverage
run: |
python -m pip install --upgrade setuptools pip wheel
Expand Down
7 changes: 6 additions & 1 deletion .kokoro/presubmit/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "NOX_SESSION"
value: "blacken mypy check_lower_bounds"
}
15 changes: 8 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@
# Error if a python version is missing
nox.options.error_on_missing_interpreters = True

DEFAULT_PYTHON_VERSION = "3.10"
BLACK_VERSION = "black==23.7.0"
BLACK_PATHS = ["test_utils", "setup.py"]
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()


@nox.session(python="3.8")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint(session):
"""Run linters.

Expand All @@ -57,7 +58,7 @@ def lint(session):
session.run("flake8", *BLACK_PATHS)


@nox.session(python="3.8")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def blacken(session):
"""Run black.

Expand All @@ -70,14 +71,14 @@ def blacken(session):
)


@nox.session(python="3.8")
@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.run("python", "setup.py", "check", "--restructuredtext", "--strict")


@nox.session(python="3.8")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def mypy(session):
"""Verify type hints are mypy compatible."""
session.install("-e", ".")
Expand All @@ -89,7 +90,7 @@ def mypy(session):
session.run("mypy", "test_utils/", "tests/")


@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"])
def unit(session):
constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
Expand Down Expand Up @@ -119,7 +120,7 @@ def unit(session):
)


@nox.session(python="3.8")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def check_lower_bounds(session):
"""Check lower bounds in setup.py are reflected in constraints file"""
session.install(".")
Expand All @@ -133,7 +134,7 @@ def check_lower_bounds(session):
)


@nox.session(python="3.8")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def update_lower_bounds(session):
"""Update lower bounds in constraints.txt to match setup.py"""
session.install(".")
Expand Down
7 changes: 6 additions & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
templated_files = common.py_library(cov_level=78)
templated_files = common.py_library(
cov_level=78,
unit_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"],
default_python_version="3.10",
)
s.move(
templated_files,
excludes=[
Expand All @@ -37,6 +41,7 @@
"renovate.json", # no bundle, ignore test resources
".github/workflows/docs.yml", # no docs to publish
"README.rst",
".kokoro/presubmit/presubmit.cfg", # Manually managed
],
)

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"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
Empty file added testing/constraints-3.14.txt
Empty file.
2 changes: 1 addition & 1 deletion testing/constraints-3.7.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
click==7.0.0
google-auth==0.4.0
importlib-metadata==1.0.0
importlib_metadata==1.0.0
packaging==19.0