Skip to content

Commit adf12a3

Browse files
hbq1MctxDev
authored andcommitted
Drop support for python<3.9.
PiperOrigin-RevId: 584861096
1 parent 663455f commit adf12a3

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
python-version: ["3.7", "3.8", "3.9"]
16+
python-version: ["3.10", "3.11", "3.12"]
1717
os: [ubuntu-latest]
1818

1919
steps:
20-
- uses: "actions/checkout@v2"
21-
- uses: "actions/setup-python@v1"
20+
- uses: "actions/checkout@v4"
21+
- uses: "actions/setup-python@v4"
2222
with:
2323
python-version: "${{ matrix.python-version }}"
2424
- name: Run CI tests

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def _parse_requirements(path):
5858
tests_require=_parse_requirements(
5959
os.path.join(_CURRENT_DIR, 'requirements', 'requirements-test.txt')),
6060
zip_safe=False, # Required for full installation.
61-
python_requires='>=3.7',
61+
python_requires='>=3.9',
6262
classifiers=[
6363
'Development Status :: 4 - Beta',
6464
'Intended Audience :: Science/Research',

test.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ python --version
2525

2626
# Install dependencies.
2727
pip install --upgrade pip setuptools wheel
28-
pip install flake8 pytest-xdist pytype pylint pylint-exit
28+
pip install flake8 pytest-xdist pylint pylint-exit
2929
pip install -r requirements/requirements.txt
3030
pip install -r requirements/requirements-test.txt
3131

@@ -46,7 +46,13 @@ pip wheel --verbose --no-deps --no-clean dist/mctx*.tar.gz
4646
pip install mctx*.whl
4747

4848
# Check types with pytype.
49-
pytype `find mctx/_src/ -name "*py" | xargs` -k
49+
# Note: pytype does not support 3.12 as of 23.11.23
50+
# See https://github.com/google/pytype/issues/1308
51+
if [ `python -c 'import sys; print(sys.version_info.minor)'` -lt 12 ];
52+
then
53+
pip install pytype
54+
pytype `find mctx/_src/ -name "*py" | xargs` -k
55+
fi;
5056

5157
# Run tests using pytest.
5258
# Change directory to avoid importing the package from repo root.

0 commit comments

Comments
 (0)