Skip to content
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

Add support for Python 3.10 #827

Merged
merged 5 commits into from
Nov 6, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 7 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,16 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.8'
- name: Install dependencies
run: python -m pip install tox
- name: Run linting
run: python -m tox -e lint

types:
strategy:
matrix:
python: [3.6, 3.7, 3.8, 3.9]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: python -m pip install tox
- name: Run type-checking
run: python -m tox -e types

test:
strategy:
matrix:
python: [3.6, 3.7, 3.8, 3.9]
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
Copy link
Member

Choose a reason for hiding this comment

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

I've started storing these changes line by line (example) as I've found it makes the diffs easier to read. Same for platform.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Done in 0a456e1.

platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -48,6 +33,8 @@ jobs:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: python -m pip install tox
- name: Run type-checking
run: python -m tox -e types
- name: Run tests
run: python -m tox -e py -- --cov-report xml
- uses: codecov/codecov-action@v1
Expand All @@ -64,21 +51,21 @@ jobs:
- uses: actions/setup-python@v2
with:
# Mininum supported Python version
python-version: 3.6
python-version: '3.6'
- name: Install dependencies
run: python -m pip install tox
- name: Build docs
run: python -m tox -e docs

release:
needs: [lint, types, test, docs]
needs: [lint, test, docs]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.8'
- name: Install dependencies
run: python -m pip install tox
- name: Release
Expand Down
6 changes: 3 additions & 3 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ To pass options to ``pytest``, e.g. the name of a test, run:

tox -e py -- tests/test_upload.py::test_exception_for_http_status

Twine is continuously tested against Python 3.6, 3.7, 3.8, and 3.9 using
Twine is continuously tested against supported versions of Python using
`GitHub Actions`_. To run the tests against a specific version, e.g. Python
3.6, you will need it installed on your machine. Then, run:
3.8, you will need it installed on your machine. Then, run:

.. code-block:: bash

tox -e py36
tox -e py38

To run the "integration" tests of uploading to real package indexes, run:

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: Implementation :: CPython

[options]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 3.3
envlist = lint,types,py{36,37,38,39},integration,docs
envlist = lint,types,py{36,37,38,39,310},integration,docs
isolated_build = True

[testenv]
Expand Down