From a798f258d086b3ba794a35ed5ba64f25b7436050 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sat, 6 Nov 2021 07:12:14 -0400 Subject: [PATCH 1/5] Move types job into test job --- .github/workflows/main.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e58eba1..d68ab517 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,21 +20,6 @@ jobs: - 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: @@ -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 @@ -71,7 +58,7 @@ jobs: 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: From b234ebd766817836161418e9574b703a96d52734 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sat, 6 Nov 2021 07:14:01 -0400 Subject: [PATCH 2/5] Add Python 3.10 support --- .github/workflows/main.yml | 2 +- docs/contributing.rst | 6 +++--- setup.cfg | 1 + tox.ini | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d68ab517..f81dd9d2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: test: strategy: matrix: - python: [3.6, 3.7, 3.8, 3.9] + python: [3.6, 3.7, 3.8, 3.9, 3.10] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: diff --git a/docs/contributing.rst b/docs/contributing.rst index e208cfd8..8a7f7df5 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -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: diff --git a/setup.cfg b/setup.cfg index dc949f20..412eb84b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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] diff --git a/tox.ini b/tox.ini index 08eb5e2b..12ec03ec 100644 --- a/tox.ini +++ b/tox.ini @@ -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] From 6884a19d55ba3f6226679879467d864be303ca62 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sat, 6 Nov 2021 07:22:26 -0400 Subject: [PATCH 3/5] Use strings for python-version --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f81dd9d2..652bc224 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ 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 @@ -23,7 +23,7 @@ jobs: test: strategy: matrix: - python: [3.6, 3.7, 3.8, 3.9, 3.10] + python: ['3.6', '3.7', '3.8', '3.9', '3.10'] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: @@ -51,7 +51,7 @@ 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 @@ -65,7 +65,7 @@ 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: Release From 0a456e12aae5e57dd46e03942a15a7c670c7b392 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sat, 6 Nov 2021 11:14:28 -0400 Subject: [PATCH 4/5] Reformat workflow --- .github/workflows/main.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 652bc224..e3a919c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,17 +4,16 @@ on: push: pull_request: schedule: - - cron: '0 0 * * *' # daily + - cron: "0 0 * * *" # daily jobs: - lint: 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: Run linting @@ -23,8 +22,16 @@ jobs: test: strategy: matrix: - python: ['3.6', '3.7', '3.8', '3.9', '3.10'] - platform: [ubuntu-latest, macos-latest, windows-latest] + python: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" + platform: + - ubuntu-latest + - macos-latest + - windows-latest runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 @@ -51,21 +58,24 @@ 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, 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 From a36edb5580279199155746a6700205e12f501c97 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sat, 6 Nov 2021 11:52:29 -0400 Subject: [PATCH 5/5] Add changelog entry --- changelog/827.feature.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/827.feature.rst diff --git a/changelog/827.feature.rst b/changelog/827.feature.rst new file mode 100644 index 00000000..d1e7f795 --- /dev/null +++ b/changelog/827.feature.rst @@ -0,0 +1 @@ +Add support for Python 3.10.