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
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tags: ['v*'] # push events to matching v*, i.e. v1.0, v20.15.10

env:
PYTHON_DEFAULT_VERSION: "3.12"
PYTHON_DEFAULT_VERSION: "3.14"
UV_VERSION: "0.8.24"

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [master]

env:
PYTHON_DEFAULT_VERSION: "3.12"
PYTHON_DEFAULT_VERSION: "3.14"
UV_VERSION: "0.8.24"

jobs:
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9", "pypy3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.9", "pypy3.10"]
extras: [ "" ]
exclude:
- os: "macos-latest"
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In order to make it easier to contribute, core developers of this project:
* maintain Continuous Integration (by using GitHub Actions) that:
* runs all sorts of linters
* checks if the Python distribution can be built
* runs all tests on a matrix of 6 versions of Python (including pypy) and 3 operating systems
* runs all tests on a matrix of 8 versions of Python (including pypy) and 3 operating systems
(Linux, Mac OS X and Windows)
* checks if the documentation can be built properly
* maintain other Continuous Integration tools (coverage tracker)
Expand Down Expand Up @@ -63,7 +63,7 @@ With `nox`, you can run different sessions (default are `lint` and `test`):

* `format` -> Format the code.
* `lint` -> Run linters.
* `test` (`test-3.7`, `test-3.8`, `test-3.9`, `test-3.10`) -> Run test suite.
* `test` (`test-3.9`, `test-3.10`, `test-3.11`, `test-3.12`, `test-3.13`, `test-3.14`, `test-pypy3.9`, `test-pypy3.10`) -> Run test suite.
* `cover` -> Perform coverage analysis.
* `build` -> Build the distribution.
* `doc` -> Build the documentation.
Expand All @@ -73,7 +73,7 @@ For example:

$ nox -s format
nox > Running session format
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/format
nox > Creating virtual environment (virtualenv) using python3.14 in .nox/format
...

$ nox -s format
Expand All @@ -85,15 +85,15 @@ For example:
nox > Running session format
...

Sessions `test` ,`unit`, and `integration` can run on many Python versions, 3.7-3.10 by default.
Sessions `test` ,`unit`, and `integration` can run on many Python versions, 3.9-3.14 (+ pypy3.9 and pypy3.10) by default.

Sessions other than `test` use the last given Python version, 3.10 by default.
Sessions other than `test` use the last CPython version from `NOX_PYTHONS`, 3.14 by default.

You can change it:

export NOX_PYTHONS=3.7,3.8
export NOX_PYTHONS=3.12,3.14

With the above setting, session `test` will run on Python 3.7 and 3.8, and all other sessions on Python 3.8.
With the above setting, session `test` will run on Python 3.12 and 3.14, and all other sessions on Python 3.14.

Given Python interpreters should be installed in the operating system or via [pyenv](https://github.com/pyenv/pyenv).

Expand Down
1 change: 1 addition & 0 deletions changelog.d/+python314.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Declare official support for Python 3.14 and include it in the CI test matrix.
4 changes: 3 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,6 @@
]

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}

coverage_statistics_to_report = False
18 changes: 9 additions & 9 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ We encourage outside contributors to perform changes on our codebase. Many such

* runs all sorts of linters
* checks if the Python distribution can be built
* runs all tests on a matrix of 6 versions of Python (including pypy) and 3 operating systems (Linux, Mac OS X and Windows)
* runs all tests on a matrix of 8 versions of Python (including pypy) and 3 operating systems (Linux, Mac OS X and Windows)
* checks if the documentation can be built properly

* maintain other Continuous Integration tools (coverage tracker)

You'll need to have `nox <https://github.com/theacodes/nox>`_ installed:
You'll need to have `nox <https://github.com/theacodes/nox>`_ and `uv <https://docs.astral.sh/uv/>`_ installed:

* ``pip install nox``
* ``pip install nox uv``

With ``nox``, you can run different sessions (default are ``lint`` and ``test``):

* ``format`` -> Format the code.
* ``lint`` -> Run linters.
* ``test`` (``test-3.7``, ``test-3.8``, ``test-3.9``, ``test-3.10``) -> Run test suite.
* ``test`` (``test-3.9``, ``test-3.10``, ``test-3.11``, ``test-3.12``, ``test-3.13``, ``test-3.14``, ``test-pypy3.9``, ``test-pypy3.10``) -> Run test suite.
* ``cover`` -> Perform coverage analysis.
* ``build`` -> Build the distribution.
* ``deploy`` -> Deploy the distribution to the PyPi.
Expand All @@ -44,7 +44,7 @@ For example::

$ nox -s format
nox > Running session format
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/format
nox > Creating virtual environment (virtualenv) using python3.14 in .nox/format
...

$ nox -s format
Expand All @@ -56,15 +56,15 @@ For example::
nox > Running session format
...

Sessions ``test``, ``unit``, and ``integration`` can run on many Python versions, 3.7-3.10 by default.
Sessions ``test``, ``unit``, and ``integration`` can run on many Python versions, 3.9-3.14 (+ pypy3.9 and pypy3.10) by default.

Sessions other than ``test`` use the last given Python version, 3.10 by default.
Sessions other than ``test`` use the last CPython version from ``NOX_PYTHONS``, 3.14 by default.

You can change it::

export NOX_PYTHONS=3.7,3.8
export NOX_PYTHONS=3.12,3.14

With the above setting, session ``test`` will run on Python 3.7 and 3.8, and all other sessions on Python 3.8.
With the above setting, session ``test`` will run on Python 3.12 and 3.14, and all other sessions on Python 3.14.

Given Python interpreters should be installed in the operating system or via `pyenv <https://github.com/pyenv/pyenv>`_.

Expand Down
12 changes: 8 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'3.11',
'3.12',
'3.13',
'3.14',
]
if NOX_PYTHONS is None
else NOX_PYTHONS.split(',')
Expand All @@ -52,12 +53,15 @@ def _detect_python_nox_id() -> str:
PYTHON_VERSIONS = [_detect_python_nox_id()]
print(f'CI job mode; using provided interpreter only; PYTHON_VERSIONS={PYTHON_VERSIONS!r}')

PYTHON_DEFAULT_VERSION = PYTHON_VERSIONS[-2] if len(PYTHON_VERSIONS) > 1 else PYTHON_VERSIONS[0]
PYTHON_DEFAULT_VERSION = next(
(version for version in reversed(PYTHON_VERSIONS) if not version.lower().startswith('pypy')),
PYTHON_VERSIONS[-1],
)

PY_PATHS = ['b2sdk', 'test', 'noxfile.py']

nox.options.default_venv_backend = 'uv'
nox.options.reuse_existing_virtualenvs = False
nox.options.reuse_existing_virtualenvs = True
nox.options.sessions = [
'lint',
'test',
Expand Down Expand Up @@ -225,8 +229,8 @@ def doc_cover(session):
session.run('cat', report_file, external=True)

with open('build/coverage/python.txt') as fd:
# If there is no undocumented files, the report should have only 2 lines (header)
if sum(1 for _ in fd) != 2:
# If there is no undocumented files, the report should have only 3 lines (header)
if sum(1 for _ in fd) != 3:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There were changes in the sphinx report format in recent versions

session.error('sphinx coverage has failed')


Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"annotated_types>=0.5.0",
Expand Down Expand Up @@ -71,7 +72,7 @@ release = [
]
doc = [
"sadisplay>=0.4.9",
"sphinx>=5.3.0, <6",
"sphinx>=7.4.7, <8",
"sphinx-autobuild>=2021.3.14",
"sphinx-rtd-theme>=2.0.0",
"sphinx-autodoc-typehints>=1.23.0",
Expand Down
15 changes: 8 additions & 7 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading