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.12 #5789

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11]
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11, 3.12.0]
fail-fast: false

steps:
Expand All @@ -58,6 +58,8 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install setuptools on Python 3.12
run: python3 -c 'import setuptools' || python3 -m pip install setuptools
clebergnu marked this conversation as resolved.
Show resolved Hide resolved
- name: Avocado smokecheck
run: make smokecheck

Expand All @@ -69,7 +71,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11]
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11, 3.12.0]
fail-fast: false

steps:
Expand All @@ -86,6 +88,8 @@ jobs:
run: python -V --version
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Install setuptools on Python 3.12
run: python3 -c 'import setuptools' || python3 -m pip install setuptools
- name: Installing Avocado in develop mode
run: python3 setup.py develop --user
- name: Avocado version
Expand Down Expand Up @@ -179,7 +183,7 @@ jobs:

strategy:
matrix:
python-version: [3.9, 3.10.0, 3.11]
python-version: [3.9, 3.10.0, 3.11, 3.12.0]

steps:
- run: echo "Job triggered by a ${{ github.event_name }} event on branch is ${{ github.ref }} in repository is ${{ github.repository }}, runner on ${{ runner.os }}"
Expand All @@ -191,6 +195,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -V --version
- name: Install setuptools on Python 3.12
run: python -c 'import setuptools' || python -m pip install setuptools
- name: Install avocado
run: python setup.py develop --user
- name: Show avocado help
Expand All @@ -208,7 +214,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11]
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11, 3.12.0]
fail-fast: false

steps:
Expand All @@ -217,6 +223,8 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install setuptools on Python 3.12
run: python3 -c 'import setuptools' || python3 -m pip install setuptools
- name: Build tarballs and wheels
run: make -f Makefile.gh build-wheel check-wheel
- name: Save tarballs and wheels as artifacts
Expand All @@ -233,7 +241,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11]
python-version: [3.7, 3.8, 3.9, 3.10.0, 3.11, 3.12.0]
fail-fast: false

steps:
Expand All @@ -242,6 +250,8 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install setuptools on Python 3.12
run: python3 -c 'import setuptools' || python3 -m pip install setuptools
- name: Build eggs
run: make -f Makefile.gh build-egg
- name: Save eggs as artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
needs: release
strategy:
matrix:
python-version: [3.7.15, 3.8.16, 3.9.16, 3.10.9, 3.11.1]
python-version: [3.7.15, 3.8.16, 3.9.16, 3.10.9, 3.11.1, 3.12.0]
fail-fast: false

steps:
Expand Down
11 changes: 11 additions & 0 deletions contrib/scripts/avocado-fetch-eggs.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ def main():
url = get_egg_url(python_version=version)
asset = Asset(url, cache_dirs=CACHE_DIRS)
asset.fetch()
# for version 3.12, it'll only be available after 103.0 is released
# TODO: remove after 103.0 is released
clebergnu marked this conversation as resolved.
Show resolved Hide resolved
url = get_egg_url(python_version="3.12")
try:
asset = Asset(url, cache_dirs=CACHE_DIRS)
asset.fetch()
except OSError:
LOG.warning(
"Failed to fetch eggs for Python 3.12: these will only "
"be available after the release of Avocado 103.0"
)
return True


Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ pycdlib==1.13.0
netifaces==0.11.0

# For tests that validate the produced XUnit output
xmlschema==1.7.0
xmlschema==1.7.0; python_version < '3.12'
xmlschema==2.5.0; python_version >= '3.12'

# For building the manpage
docutils==0.17.1
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ def run(self):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
packages=find_packages(exclude=("selftests*",)),
include_package_data=True,
Expand Down