Skip to content

Commit 1515086

Browse files
committed
Drop support for python 3.9. It's old enough.
- Bump minimum Python version to 3.10 - Remove Python 3.9 from test matrix - Adjust GitHub Actions workflow for consistency
1 parent 88f4c79 commit 1515086

File tree

2 files changed

+57
-58
lines changed

2 files changed

+57
-58
lines changed

.github/workflows/pypi_release.yml

+56-56
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
push:
77
tags:
88
# Only run this workflow for tags that start with 'v.' (release tags)
9-
- 'v*'
9+
- "v*"
1010

1111
jobs:
1212
test:
@@ -16,48 +16,48 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [macos-latest, ubuntu-latest]
19-
python-version: ["3.9", "3.10", "3.11", "3.12"]
19+
python-version: ["3.10", "3.11", "3.12"]
2020

2121
runs-on: ${{ matrix.os }}
2222
name: Test with Python ${{ matrix.python-version }} on ${{ matrix.os }}
2323

2424
steps:
25-
- name: Checkout Code
26-
uses: actions/checkout@v4
25+
- name: Checkout Code
26+
uses: actions/checkout@v4
2727

28-
- name: Setup Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v5
30-
with:
31-
python-version: ${{ matrix.python-version }}
32-
cache: pip
28+
- name: Setup Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
cache: pip
3333

34-
- name: Install dependencies
35-
run: |
36-
python -m pip install --upgrade pip
37-
pip install -r requirements/requirements-test.txt
38-
pip install wheel
39-
# Install setuptools for Python 3.12 and above
40-
if [[ "$(python -c 'import sys; print(sys.version_info >= (3, 12))')" == "True" ]]; then
41-
pip install setuptools
42-
fi
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install -r requirements/requirements-test.txt
38+
pip install wheel
39+
# Install setuptools for Python 3.12 and above
40+
if [[ "$(python -c 'import sys; print(sys.version_info >= (3, 12))')" == "True" ]]; then
41+
pip install setuptools
42+
fi
4343
44-
- name: Build and install aicodebot
45-
run: |
46-
python setup.py sdist bdist_wheel
47-
pip install dist/*.whl
44+
- name: Build and install aicodebot
45+
run: |
46+
python setup.py sdist bdist_wheel
47+
pip install dist/*.whl
4848
49-
- name: Test
50-
run: |
51-
aicodebot -V
52-
# Python 3.9 testing fails because of an issue with vcrpy
53-
# https://github.com/kevin1024/vcrpy/issues/688
54-
if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
55-
echo "Skipping tests for Python 3.9, running alignment instead"
56-
aicodebot configure
57-
aicodebot alignment
58-
else
59-
pytest --record-mode=new_episodes
60-
fi
49+
- name: Test
50+
run: |
51+
aicodebot -V
52+
# Python 3.9 testing fails because of an issue with vcrpy
53+
# https://github.com/kevin1024/vcrpy/issues/688
54+
if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
55+
echo "Skipping tests for Python 3.9, running alignment instead"
56+
aicodebot configure
57+
aicodebot alignment
58+
else
59+
pytest --record-mode=new_episodes
60+
fi
6161
6262
pypi_release:
6363
needs: test
@@ -68,29 +68,29 @@ jobs:
6868
contents: write
6969

7070
steps:
71-
- name: Checkout Code
72-
uses: actions/checkout@v4
71+
- name: Checkout Code
72+
uses: actions/checkout@v4
7373

74-
- name: Setup Python
75-
uses: actions/setup-python@v5
76-
with:
77-
python-version: 3.12
78-
cache: pip
74+
- name: Setup Python
75+
uses: actions/setup-python@v5
76+
with:
77+
python-version: 3.12
78+
cache: pip
7979

80-
- name: Build the package
81-
run: |
82-
pip install wheel twine setuptools
83-
python setup.py sdist bdist_wheel
80+
- name: Build the package
81+
run: |
82+
pip install wheel twine setuptools
83+
python setup.py sdist bdist_wheel
8484
85-
- name: Publish to PyPi
86-
env:
87-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
88-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
89-
run: |
90-
twine check dist/*
91-
twine upload dist/*
85+
- name: Publish to PyPi
86+
env:
87+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
88+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
89+
run: |
90+
twine check dist/*
91+
twine upload dist/*
9292
93-
- name: Create GitHub Release
94-
uses: ncipollo/release-action@v1
95-
with:
96-
generateReleaseNotes: true
93+
- name: Create GitHub Release
94+
uses: ncipollo/release-action@v1
95+
with:
96+
generateReleaseNotes: true

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name="aicodebot",
15-
python_requires=">=3.9",
15+
python_requires=">=3.10",
1616
version=version,
1717
url="https://github.com/gorillamania/AICodeBot",
1818
author="Nick Sullivan",
@@ -32,7 +32,6 @@
3232
"Intended Audience :: Developers",
3333
"License :: OSI Approved :: GNU Affero General Public License v3",
3434
"Programming Language :: Python :: 3",
35-
"Programming Language :: Python :: 3.9",
3635
"Programming Language :: Python :: 3.10",
3736
"Programming Language :: Python :: 3.11",
3837
"Programming Language :: Python :: 3.12",

0 commit comments

Comments
 (0)