Skip to content

Commit 80a27ac

Browse files
feat: Add support for Python 3.9 across all backends (#1574)
* Add official support for Python 3.9 and add Python 3.9 to CI - Required PR #1001 to get Python 3.9 support of TensorFlow and TensorFlow Probability * Add Python 3.9 support to PyPI metadata * Update GitHub Actions workflows to use Python 3.9 - .github/workflows/release_tests.yml will be updated after pyhf v0.6.3 is released * Update Dockerfile to use python:3.9-slim-bullseye as base image
1 parent 5247c16 commit 80a27ac

File tree

10 files changed

+23
-20
lines changed

10 files changed

+23
-20
lines changed

.github/workflows/ci.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest, macos-latest]
18-
python-version: [3.7, 3.8]
18+
python-version: [3.7, 3.8, 3.9]
1919
exclude:
2020
- os: macos-latest
2121
python-version: 3.7
22+
- os: macos-latest
23+
python-version: 3.8
2224

2325
steps:
2426
- uses: actions/checkout@v2
@@ -37,7 +39,7 @@ jobs:
3739
run: |
3840
python -m pytest -r sx --ignore tests/benchmarks/ --ignore tests/contrib --ignore tests/test_notebooks.py
3941
- name: Report core project coverage with Codecov
40-
if: github.event_name == 'push' && matrix.python-version == 3.8 && matrix.os == 'ubuntu-latest'
42+
if: github.event_name == 'push' && matrix.python-version == 3.9 && matrix.os == 'ubuntu-latest'
4143
uses: codecov/codecov-action@v1
4244
with:
4345
token: ${{ secrets.CODECOV_TOKEN }}
@@ -47,13 +49,13 @@ jobs:
4749
run: |
4850
python -m pytest -r sx tests/contrib --mpl --mpl-baseline-path tests/contrib/baseline
4951
- name: Report contrib coverage with Codecov
50-
if: github.event_name == 'push' && matrix.python-version == 3.8 && matrix.os == 'ubuntu-latest'
52+
if: github.event_name == 'push' && matrix.python-version == 3.9 && matrix.os == 'ubuntu-latest'
5153
uses: codecov/codecov-action@v1
5254
with:
5355
token: ${{ secrets.CODECOV_TOKEN }}
5456
file: ./coverage.xml
5557
flags: contrib
5658
- name: Run benchmarks
57-
if: github.event_name == 'schedule' && matrix.python-version == 3.8
59+
if: github.event_name == 'schedule' && matrix.python-version == 3.9
5860
run: |
5961
python -m pytest -r sx --benchmark-sort=mean tests/benchmarks/test_benchmark.py

.github/workflows/dependencies-head.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest]
16-
python-version: [3.8]
16+
python-version: [3.9]
1717

1818
steps:
1919
- uses: actions/checkout@v2
@@ -43,7 +43,7 @@ jobs:
4343
strategy:
4444
matrix:
4545
os: [ubuntu-latest]
46-
python-version: [3.8]
46+
python-version: [3.9]
4747

4848
steps:
4949
- uses: actions/checkout@v2
@@ -69,7 +69,7 @@ jobs:
6969
strategy:
7070
matrix:
7171
os: [ubuntu-latest]
72-
python-version: [3.8]
72+
python-version: [3.9]
7373

7474
steps:
7575
- uses: actions/checkout@v2
@@ -94,7 +94,7 @@ jobs:
9494
strategy:
9595
matrix:
9696
os: [ubuntu-latest]
97-
python-version: [3.8]
97+
python-version: [3.9]
9898

9999
steps:
100100
- uses: actions/checkout@v2

.github/workflows/docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: [3.8]
16+
python-version: [3.9]
1717

1818
steps:
1919
- uses: actions/checkout@v2
2020
with:
2121
fetch-depth: 0
22-
- name: Set up Python 3.8
22+
- name: Set up Python 3.9
2323
uses: actions/setup-python@v2
2424
with:
2525
python-version: ${{ matrix.python-version }}

.github/workflows/lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Set up Python 3.8
15+
- name: Set up Python 3.9
1616
uses: actions/setup-python@v2
1717
with:
18-
python-version: 3.8
18+
python-version: 3.9
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip setuptools wheel

.github/workflows/notebooks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: [3.8]
15+
python-version: [3.9]
1616

1717
steps:
1818
- uses: actions/checkout@v2
19-
- name: Set up Python 3.8
19+
- name: Set up Python 3.9
2020
uses: actions/setup-python@v2
2121
with:
2222
python-version: ${{ matrix.python-version }}

.github/workflows/publish-package.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121

22-
- name: Set up Python 3.8
22+
- name: Set up Python 3.9
2323
uses: actions/setup-python@v2
2424
with:
25-
python-version: 3.8
25+
python-version: 3.9
2626

2727
- name: Install python-build, check-manifest, and twine
2828
run: |

.github/workflows/tag.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ jobs:
5858
run: |
5959
git merge --squash "origin/${GITHUB_HEAD_REF}"
6060
git commit -m "${PR_TITLE} (#${PR_NUMBER})"
61-
- name: Set up Python 3.8
61+
- name: Set up Python 3.9
6262
uses: actions/setup-python@v2
6363
with:
64-
python-version: 3.8
64+
python-version: 3.9
6565
- name: Install bump2version
6666
run: |
6767
python -m pip install --upgrade pip setuptools wheel

codemeta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,5 @@
129129
"keywords": "physics fitting numpy scipy tensorflow pytorch jax",
130130
"developmentStatus": "4 - Beta",
131131
"applicationCategory": "Scientific/Engineering, Scientific/Engineering :: Physics",
132-
"programmingLanguage": "Python 3, Python 3.7, Python 3.8, Python Implementation CPython"
132+
"programmingLanguage": "Python 3, Python 3.7, Python 3.8, Python 3.9, Python Implementation CPython"
133133
}

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG BASE_IMAGE=python:3.8-slim-bullseye
1+
ARG BASE_IMAGE=python:3.9-slim-bullseye
22
# hadolint ignore=DL3006
33
FROM ${BASE_IMAGE} as base
44

setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ classifiers =
2424
Programming Language :: Python :: 3 :: Only
2525
Programming Language :: Python :: 3.7
2626
Programming Language :: Python :: 3.8
27+
Programming Language :: Python :: 3.9
2728
Programming Language :: Python :: Implementation :: CPython
2829

2930
[options]

0 commit comments

Comments
 (0)