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
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
strategy:
matrix:
python-version: ["3.10"]
toxenv: [black, flake8, mypy]
toxenv: [black, ruff, mypy]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -34,7 +34,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.9"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
optional-deps: [true]
with-libs: [true]
include:
Expand Down Expand Up @@ -66,24 +66,24 @@ jobs:
- name: Remove xz
if: runner.os == 'Linux' && !matrix.optional-deps
run: while which xz; do sudo rm $(which xz); done
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install tox
- name: Test
run: tox -e py
run: tox run -e ${{ matrix.python-version }}
if: matrix.with-libs
- name: Test without python-isal and python-zlib-ng
run: tox -e no-libs
run: tox run -e no-libs
if: true && !matrix.with-libs
- name: Test with zstandard
if: matrix.with-zstandard
run: tox -e zstd
run: tox run -e zstd
- name: Upload coverage report
uses: codecov/codecov-action@v3

Expand All @@ -93,11 +93,11 @@ jobs:
needs: [lint, test]
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0 # required for setuptools_scm
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Make distributions
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Changelog
development version
~~~~~~~~~~~~~~~~~~~

* Dropped support for Python 3.8
* Dropped support for Python 3.8 and 3.9
* Started supporting Python 3.13

v2.0.2 (2024-06-12)
Expand Down
11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3"
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dynamic = ["version"]
dependencies = [
'isal>=1.6.1; platform.machine == "x86_64" or platform.machine == "AMD64" or platform.machine == "aarch64"',
Expand All @@ -34,3 +34,12 @@ write_to = "src/xopen/_version.py"

[tool.pytest.ini_options]
addopts = "--strict-markers"

[tool.coverage.run]
branch = true

[tool.coverage.report]
exclude_also = [
"def __repr__",
"@overload",
]
6 changes: 0 additions & 6 deletions src/xopen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@

try:
import fcntl

# fcntl.F_SETPIPE_SZ will be available in python 3.10.
# https://github.com/python/cpython/pull/21921
# If not available: set it to the correct value for known platforms.
if not hasattr(fcntl, "F_SETPIPE_SZ") and sys.platform == "linux":
setattr(fcntl, "F_SETPIPE_SZ", 1031)
except ImportError:
fcntl = None # type: ignore

Expand Down
55 changes: 0 additions & 55 deletions tox.ini

This file was deleted.

43 changes: 43 additions & 0 deletions tox.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
env_list = ["black", "ruff", "mypy", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]

[env_run_base]
default_base_python = "3.10"
deps = [
"pytest",
"pytest-timeout",
"coverage",
]
set_env = { PYTHONDEVMODE = "1", PYTHONWARNDEFAULTENCODING = "1" }
commands = [
["coverage", "run", "--source=xopen,tests", "-m", "pytest", "-v", "--doctest-modules", "tests"],
["coverage", "report"],
["coverage", "xml"],
["coverage", "html"],
]

[env.zstd]
deps = [
"{[env_run_base]deps}",
"zstandard",
]

[env.no-libs]
deps = ["{[env_run_base]deps}", "pip"]
commands = [
["{env_python}", "-m", "pip", "uninstall", "-y", "isal", "zlib-ng"],
{ replace = "ref", of = ["env_run_base", "commands"], extend = true },
]

[env.black]
deps = ["black==22.3.0"]
skip_install = true
commands = [["black", "--check", "src/", "tests/"]]

[env.ruff]
deps = ["ruff"]
commands = [["ruff", "check", "src/", "tests/"]]
skip_install = true

[env.mypy]
deps = ["mypy"]
commands = [["mypy", "src/"]]
Loading