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

Update Supported Python versions to 3.10, 3.11, and 3.12 #669

Merged
merged 4 commits into from
Oct 6, 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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ body:
description: "Note: Bug fixes are only supported on these Python versions."
multiple: true
options:
- Python 3.9
- Python 3.10
- Python 3.11
- Python 3.12
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/VariableProducer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
value: ${{ jobs.produce.outputs.node-versions }}

env:
pythonversions: "['3.11', '3.10', '3.9']" # Keep Python Versions in descending order
pythonversions: "['3.12', '3.11', '3.10']" # Keep Python Versions in descending order
nodeversions: "['19']"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/templates/basic-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steps:

- task: UsePythonVersion@0
inputs:
versionSpec: '3.10.x'
versionSpec: '3.12.x'
architecture: 'x64'

- script: pip install --upgrade -e .[dev]
Expand Down
17 changes: 12 additions & 5 deletions docs/contributor/python_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ release (3.9, 3.10, etc).
Each individual step will be a different section below and be associated with a
specific file that must be updated.

### setup.py
### pyproject.toml

This file is responsible for the release process to pypi. We want to make sure
we keep the required python version for our pypi releases up to date.
Within `setuptools.setup()` locate the line `python_requires = "XXX"` and
update it to the next version.
we keep the required version for our pypi releases up to date. Update
`requires-python` to the minimum required python.

We typically support the last three minor versions; barring any special
exceptions, if the newest minor version is 3.11, then overall, we will
support 3.9, 3.10, and 3.11. Therefore you should update the line to
`python_requires = ">=3.9.0"`.
`python-requires = ">=3.9.0"`.

Additionally, we must update the classifiers section to show the three
supported python versions:
Expand All @@ -33,6 +32,14 @@ classifiers=[
]
```

### bug_report.yml

Update the supported python versions in the entry with `id: py_version`

### VariableProducer.yml

Update `pythonversions` to the support versions

### tests.integration/azure-pipelines/windows-robot-integration-test.yml

Since we support the last three minor versions of python, we want to ensure
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dynamic = ["version"]
description = "Python tools supporting UEFI EDK2 firmware development"
readme = {file = "readme.md", content-type = "text/markdown"}
license = {file = "LICENSE"}
requires-python = ">=3.10"
dependencies = [
"edk2-pytool-library>=0.16.1",
"pyyaml>=6.0.0",
Expand All @@ -18,6 +19,7 @@ dependencies = [
"openpyxl>=3.1.2",
"XlsxWriter>=3.0.9",
"pywin32>=305; sys_platform=='win32'",
"setuptools>=68.2.2",
]

classifiers = [
Expand All @@ -26,9 +28,9 @@ classifiers = [
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
]

[project.urls]
Expand Down
48 changes: 24 additions & 24 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ coverage of those unit tests. We require 100% unit test success

| Host Type | Toolchain | Project | Integration Tests |
| :------------------ | :--------- | :--------- | :---------------- |
| Windows Server 2019 | Python 3.9 | Edk2 | [![ewt1]][_it] |
| Windows Server 2019 | Python 3.10 | Edk2 | [![ewt2]][_it] |
| Windows Server 2019 | Python 3.11 | Edk2 | [![ewt3]][_it] |
| Linux Ubuntu 20.04 | Python 3.9 | Edk2 | [![eut1]][_i359] |
| Linux Ubuntu 20.04 | Python 3.10 | Edk2 | [![eut2]][_it] |
| Linux Ubuntu 20.04 | Python 3.11 | Edk2 | [![eut3]][_it] |
| Windows Server 2022 | Python 3.9 | Project Mu | [![mwt1]][_it] |
| Windows Server 2022 | Python 3.10 | Project Mu | [![mwt2]][_it] |
| Windows Server 2022 | Python 3.11 | Project Mu | [![mwt3]][_it] |
| Linux Ubuntu 22.04 | Python 3.9 | Project Mu | [![mut1]][_i359] |
| Linux Ubuntu 22.04 | Python 3.10 | Project Mu | [![mut2]][_it] |
| Linux Ubuntu 22.04 | Python 3.11 | Project Mu | [![mut3]][_it] |
| Windows Server 2019 | Python 3.10 | Edk2 | [![ewt1]][_it] |
| Windows Server 2019 | Python 3.11 | Edk2 | [![ewt2]][_it] |
| Windows Server 2019 | Python 3.12 | Edk2 | [![ewt3]][_it] |
| Linux Ubuntu 20.04 | Python 3.10 | Edk2 | [![eut1]][_i359] |
| Linux Ubuntu 20.04 | Python 3.11 | Edk2 | [![eut2]][_it] |
| Linux Ubuntu 20.04 | Python 3.12 | Edk2 | [![eut3]][_it] |
| Windows Server 2022 | Python 3.10 | Project Mu | [![mwt1]][_it] |
| Windows Server 2022 | Python 3.11 | Project Mu | [![mwt2]][_it] |
| Windows Server 2022 | Python 3.12 | Project Mu | [![mwt3]][_it] |
| Linux Ubuntu 22.04 | Python 3.10 | Project Mu | [![mut1]][_i359] |
| Linux Ubuntu 22.04 | Python 3.11 | Project Mu | [![mut2]][_it] |
| Linux Ubuntu 22.04 | Python 3.12 | Project Mu | [![mut3]][_it] |

### Current Release

Expand Down Expand Up @@ -173,18 +173,18 @@ contributing to the edk2-pytool-extensions repository.

[_it]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_build?definitionId=52&_a=summary&repositoryFilter=2&branchFilter=14
[_i359]: https://github.com/tianocore/edk2-pytool-extensions/issues/359
[ewt1]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Windows_Python39
[ewt2]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Windows_Python310
[ewt3]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Windows_Python311
[ewt1]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Windows_Python310
[ewt2]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Windows_Python311
[ewt3]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Windows_Python312

[eut1]: https://img.shields.io/github/issues/detail/label/tianocore/edk2-pytool-extensions/359?color=orange&label=issue%20359
[eut2]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Ubuntu_Python310
[eut3]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Ubuntu_Python311
[eut1]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Ubuntu_Python310
[eut2]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Ubuntu_Python311
[eut3]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=Edk2_Ubuntu_Python312

[mwt1]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Windows_Python39
[mwt2]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Windows_Python310
[mwt3]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Windows_Python311
[mwt1]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Windows_Python310
[mwt2]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Windows_Python311
[mwt3]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Windows_Python312

[mut1]: https://img.shields.io/github/issues/detail/label/tianocore/edk2-pytool-extensions/359?color=orange&label=issue%20359
[mut2]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Ubuntu_Python310
[mut3]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Ubuntu_Python311
[mut1]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Ubuntu_Python310
[mut2]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Ubuntu_Python311
[mut3]: https://dev.azure.com/tianocore/edk2-pytool-extensions/_apis/build/status/Integration%20Tests?branchName=master&configuration=ProjectMu_Ubuntu_Python312
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
parameters:
- name: PythonVersionList
type: object
default: ['3.9', '3.10', '3.11']
default: ['3.10', '3.11', '3.12']

jobs:
- job:
Expand Down Expand Up @@ -73,9 +73,6 @@ jobs:
- script: python -m robot.run -v TEST_OUTPUT_BASE:$(Build.BinariesDirectory) -v TOOL_CHAIN_TAG:$(ToolChain) -d report --xunit xunittestresults.xml --include $(Tag) -L TRACE .
displayName: 'Run Robot Tests'
workingDirectory: "tests.integration"
condition: not(and(eq(variables.PythonVersion, '3.9'), contains(variables.Image, 'ubuntu')))
# Above conditional is a temp workaround for known ubuntu python 3.9 Tar file bug
# https://bugzilla.tianocore.org/show_bug.cgi?id=3891

# Copy the build logs to the artifact staging directory
- task: CopyFiles@2
Expand All @@ -88,10 +85,7 @@ jobs:
output.xml
report.html
flattenFolders: true
# condition: succeededOrFailed()
condition: and(succeededOrFailed(), not(and(eq(variables.PythonVersion, '3.9'), contains(variables.Image, 'ubuntu'))))
# Above conditional is a temp workaround for known ubuntu python 3.9 Tar file bug
# https://bugzilla.tianocore.org/show_bug.cgi?id=3891
condition: succeededOrFailed()

# Publish build artifacts to Azure Artifacts/TFS or a file share
- task: PublishBuildArtifacts@1
Expand Down
Loading