-
Notifications
You must be signed in to change notification settings - Fork 10
Add Python 3.14 support and remove Python <3.8 compatibility code #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,24 +7,25 @@ jobs: | |||||||||||||||||||||
| strategy: | ||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||
| os: [ ubuntu-latest, macos-latest ] | ||||||||||||||||||||||
| python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.10'] | ||||||||||||||||||||||
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', 'pypy3.10', 'pypy3.11'] | ||||||||||||||||||||||
| tarantool: ['1.10', '2', '3'] | ||||||||||||||||||||||
| exclude: | ||||||||||||||||||||||
| - os: macos-latest | ||||||||||||||||||||||
| tarantool: '1.10' | ||||||||||||||||||||||
| - os: macos-latest | ||||||||||||||||||||||
| tarantool: '2' | ||||||||||||||||||||||
| - os: macos-latest | ||||||||||||||||||||||
| python-version: '3.7' | ||||||||||||||||||||||
| - python-version: 'pypy3.10' | ||||||||||||||||||||||
| tarantool: '1.10' | ||||||||||||||||||||||
| - python-version: 'pypy3.11' | ||||||||||||||||||||||
| tarantool: '1.10' | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| steps: | ||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| submodules: recursive | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Set up Python ${{ matrix.python-version }} | ||||||||||||||||||||||
| uses: actions/setup-python@v5 | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
|
|
@@ -40,24 +41,41 @@ jobs: | |||||||||||||||||||||
| if: matrix.os == 'macos-latest' | ||||||||||||||||||||||
| run: brew install tarantool | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Install uv | ||||||||||||||||||||||
| uses: astral-sh/setup-uv@v4 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||
| run: | | ||||||||||||||||||||||
| python -m pip install --upgrade pip setuptools wheel coveralls | ||||||||||||||||||||||
| run: uv sync --extra test | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Run ruff check | ||||||||||||||||||||||
| run: uv run ruff check . | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Run ruff format check | ||||||||||||||||||||||
| run: uv run ruff format --check . | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Run tests | ||||||||||||||||||||||
| run: | | ||||||||||||||||||||||
| if [[ "$RUNNER_OS" == "Linux" && ${{ matrix.python-version }} == "3.12" && ${{ matrix.tarantool }} == "3" ]]; then | ||||||||||||||||||||||
| make build && make test | ||||||||||||||||||||||
| make clean && make debug && make coverage | ||||||||||||||||||||||
| # coveralls | ||||||||||||||||||||||
| else | ||||||||||||||||||||||
| make build && make lint && make quicktest | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
| run: uv run pytest . | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Run tests with uvloop | ||||||||||||||||||||||
| if: "!contains(matrix.python-version, 'pypy')" | ||||||||||||||||||||||
| env: | ||||||||||||||||||||||
| USE_UVLOOP: "1" | ||||||||||||||||||||||
| run: uv run pytest . | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Run coverage tests | ||||||||||||||||||||||
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14' && matrix.tarantool == '3' | ||||||||||||||||||||||
| env: | ||||||||||||||||||||||
| ASYNCTNT_DEBUG: "1" | ||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}" | ||||||||||||||||||||||
|
||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coverage test condition has changed from Python 3.12 to Python 3.14. Since Python 3.14 is newly added and might not be fully stable yet (especially the free-threaded build), consider whether coverage should still be tested on a more stable Python version like 3.12 or 3.13. This ensures consistent coverage reporting even if 3.14 has compatibility issues.
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14' && matrix.tarantool == '3' | |
| env: | |
| ASYNCTNT_DEBUG: "1" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}" | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' && matrix.tarantool == '3' | |
| env: | |
| ASYNCTNT_DEBUG: "1" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build-wheels job is now triggered on every push, whereas previously it was restricted to tag pushes only (via the if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') condition). This means wheel builds will run unnecessarily on every commit, consuming CI resources. Consider restoring the condition to only build wheels when pushing tags.
| name: Build wheels on ${{ matrix.os }} | |
| name: Build wheels on ${{ matrix.os }} | |
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,67 +1,62 @@ | ||
| .PHONY: clean build local debug annotate dist docs style mypy ruff style-check lint test quicktest coverage | ||
|
|
||
| PYTHON?=python | ||
|
|
||
| all: local | ||
|
|
||
| clean: | ||
| pip uninstall -y asynctnt | ||
| rm -rf asynctnt/*.c asynctnt/*.h asynctnt/*.cpp | ||
| rm -rf asynctnt/*.so asynctnt/*.html | ||
| rm -rf asynctnt/iproto/*.c asynctnt/iproto/*.h | ||
| rm -rf asynctnt/iproto/*.so asynctnt/iproto/*.html asynctnt/iproto/requests/*.html | ||
| rm -rf build *.egg-info .eggs dist | ||
| find . -name '__pycache__' | xargs rm -rf | ||
| rm -rf htmlcov | ||
| rm -rf __tnt* | ||
| rm -rf tests/__tnt* | ||
|
|
||
|
|
||
| build: | ||
| $(PYTHON) -m pip install -e '.[test,docs]' | ||
| uv pip install -e '.[test,docs]' | ||
|
|
||
| local: | ||
| $(PYTHON) -m pip install -e . | ||
|
|
||
| uv pip install -e . | ||
|
|
||
| debug: clean | ||
| ASYNCTNT_DEBUG=1 $(PYTHON) -m pip install -e '.[test]' | ||
|
|
||
| ASYNCTNT_DEBUG=1 uv pip install -e '.[test]' | ||
|
|
||
| annotate: | ||
| cython -3 -a asynctnt/iproto/protocol.pyx | ||
|
|
||
| dist: | ||
| $(PYTHON) -m build . | ||
|
|
||
| docs: build | ||
| $(MAKE) -C docs html | ||
| lint: style-check ruff | ||
|
|
||
| style: | ||
| $(PYTHON) -m black . | ||
| $(PYTHON) -m isort . | ||
| uv run --active ruff format . | ||
| uv run --active ruff check --select I,F401 --fix . | ||
|
|
||
| mypy: | ||
| $(PYTHON) -m mypy --enable-error-code ignore-without-code . | ||
| style-check: | ||
| uv run --active ruff format --check . | ||
|
|
||
| ruff: | ||
| $(PYTHON) -m ruff check . | ||
|
|
||
| style-check: | ||
| $(PYTHON) -m black --check --diff . | ||
| $(PYTHON) -m isort --check --diff . | ||
| uv run --active ruff check . | ||
|
|
||
| lint: style-check ruff | ||
| mypy: | ||
| uv run --active mypy --enable-error-code ignore-without-code . | ||
|
|
||
| test: lint | ||
| PYTHONASYNCIODEBUG=1 $(PYTHON) -m pytest | ||
| $(PYTHON) -m pytest | ||
| USE_UVLOOP=1 $(PYTHON) -m pytest | ||
| test: | ||
| PYTHONASYNCIODEBUG=1 uv run --active pytest | ||
| uv run --active pytest | ||
| USE_UVLOOP=1 uv run --active pytest | ||
|
|
||
| quicktest: | ||
| $(PYTHON) -m pytest | ||
| uv run --active pytest | ||
|
|
||
| coverage: | ||
| $(PYTHON) -m pytest --cov | ||
| ./scripts/run_until_success.sh $(PYTHON) -m coverage report -m | ||
| ./scripts/run_until_success.sh $(PYTHON) -m coverage html | ||
| uv run --active pytest --cov | ||
| ./scripts/run_until_success.sh uv run --active coverage report -m | ||
| ./scripts/run_until_success.sh uv run --active coverage html | ||
|
|
||
| dist: | ||
| uv pip install build | ||
| uv run --active python -m build . | ||
|
|
||
| docs: build | ||
| $(MAKE) -C docs html | ||
|
|
||
| clean: | ||
| uv pip uninstall asynctnt | ||
| rm -rf asynctnt/*.c asynctnt/*.h asynctnt/*.cpp | ||
| rm -rf asynctnt/*.so asynctnt/*.html | ||
| rm -rf asynctnt/iproto/*.c asynctnt/iproto/*.h | ||
| rm -rf asynctnt/iproto/*.so asynctnt/iproto/*.html asynctnt/iproto/requests/*.html | ||
| rm -rf build *.egg-info .eggs dist | ||
| find . -name '__pycache__' | xargs rm -rf | ||
| rm -rf htmlcov | ||
| rm -rf __tnt* | ||
| rm -rf tests/__tnt* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,4 +18,4 @@ | |
| TarantoolTuple, | ||
| ) | ||
|
|
||
| __version__ = "2.4.0" | ||
| __version__ = "2.5.0" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GitHub Actions workflow uses 'uv sync --extra test' but the Makefile uses 'uv pip install -e' commands. These are different approaches - 'uv sync' expects a uv.lock file (which is in .gitignore), while 'uv pip install' works like pip. This inconsistency could lead to different dependency resolution between CI and local development. Consider either adding uv.lock to version control if you want reproducible builds, or use 'uv pip install' consistently in both places.