Skip to content

Commit 032a24e

Browse files
authored
feat: switch to python 3.9 (#4780)
Minimum Python version is now 3.9.18. https://www.python.org/downloads/release/python-3918/ --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
1 parent c3c4b50 commit 032a24e

File tree

12 files changed

+43
-63
lines changed

12 files changed

+43
-63
lines changed

.github/workflows/gh-pages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
cache: 'pip'
2626
cache-dependency-path: 'gh-pages/requirements-dev.txt'
27-
python-version: '3.8'
27+
python-version: '3.9'
2828
- name: Install Dependencies
2929
run: |-
3030
python3 -m venv ${{ runner.temp }}/venv

.github/workflows/main.yml

+13-20
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ jobs:
4343
with:
4444
cache: yarn
4545
node-version: 'lts/*'
46-
- name: Set up Python 3.8
46+
- name: Set up Python 3.9
4747
uses: actions/setup-python@v5
4848
with:
49-
python-version: '3.8'
49+
python-version: '3.9'
5050
cache: pip
5151
- name: Install python3-venv
5252
run: sudo apt install -y python3-venv
@@ -125,10 +125,10 @@ jobs:
125125
with:
126126
cache: yarn
127127
node-version: 'lts/*'
128-
- name: Set up Python 3.8
128+
- name: Set up Python 3.9
129129
uses: actions/setup-python@v5
130130
with:
131-
python-version: '3.8'
131+
python-version: '3.9'
132132
cache: pip
133133
- name: Install python3-venv
134134
run: sudo apt install -y python3-venv
@@ -191,7 +191,7 @@ jobs:
191191
java: ['8']
192192
node: ['18'] # EOL 2025-04-30
193193
os: [ubuntu-latest]
194-
python: ['3.8']
194+
python: ['3.9']
195195
# Add specific combinations to be tested against (to restrict cardinality)
196196
include:
197197
# Test using Windows
@@ -201,69 +201,62 @@ jobs:
201201
go: '1.18'
202202
java: '8'
203203
node: '18'
204-
python: '3.8'
204+
python: '3.9'
205205
# Test using macOS
206206
- title: 'macOS'
207207
os: macos-latest
208208
dotnet: '6.0.x'
209209
go: '1.18'
210210
java: '8'
211211
node: '18'
212-
python: '3.8'
212+
python: '3.9'
213213
# Test alternate Nodes
214214
- title: 'Node 18'
215215
java: '8'
216216
dotnet: '6.0.x'
217217
go: '1.18'
218218
node: '18' # EOL 2025-04-30
219219
os: ubuntu-latest
220-
python: '3.8'
220+
python: '3.9'
221221
- title: 'Node 20'
222222
java: '8'
223223
dotnet: '6.0.x'
224224
go: '1.18'
225225
node: '20' # EOL 2026-04-30
226226
os: ubuntu-latest
227-
python: '3.8'
227+
python: '3.9'
228228
- title: 'Node 22'
229229
java: '8'
230230
dotnet: '6.0.x'
231231
go: '1.18'
232232
node: '22' # EOL 2027-04-30
233233
os: ubuntu-latest
234-
python: '3.8'
234+
python: '3.9'
235235
# Test alternate .NETs
236236
- title: '.NET 7.0'
237237
java: '8'
238238
dotnet: '7.0.x'
239239
go: '1.18'
240240
node: '18'
241241
os: ubuntu-latest
242-
python: '3.8'
242+
python: '3.9'
243243
# Test alternate Gos
244244
- title: 'Go 1.19'
245245
java: '8'
246246
dotnet: '6.0.x'
247247
go: '1.19'
248248
node: '18'
249249
os: ubuntu-latest
250-
python: '3.8'
250+
python: '3.9'
251251
# Test alternate Javas
252252
- title: 'Java 11'
253253
java: '11'
254254
dotnet: '6.0.x'
255255
go: '1.18'
256256
node: '18'
257257
os: ubuntu-latest
258-
python: '3.8'
258+
python: '3.9'
259259
# Test alternate Pythons
260-
- title: 'Python 3.8'
261-
python: '3.8'
262-
dotnet: '6.0.x'
263-
go: '1.18'
264-
java: '8'
265-
node: '18'
266-
os: ubuntu-latest
267260
- title: 'Python 3.9'
268261
python: '3.9'
269262
dotnet: '6.0.x'

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ in your development environment.
3333
- [`maven >= 3.0.5`](https://maven.apache.org)
3434
- [.NET `6.0`] or later
3535
- *Recommended:* [`mono >= 6`](https://www.mono-project.com)
36-
- [Python `3.8.10`] or later
36+
- [Python `3.9.18`] or later
3737
- [`pip`](https://pip.pypa.io/en/stable/installing/)
3838
- [`setuptools >= 38.6.0`](https://pypi.org/project/setuptools/)
3939
- [`wheel`](https://pypi.org/project/wheel/)
@@ -45,7 +45,7 @@ in your development environment.
4545
[Oracle's OpenJDK8]: http://openjdk.java.net/install/
4646
[Amazon Corretto 8]: https://aws.amazon.com/corretto/
4747
[.NET `6.0`]: https://www.microsoft.com/net/download
48-
[Python `3.8.10`]: https://www.python.org/downloads/release/python-3810/
48+
[Python `3.9.18`]: https://www.python.org/downloads/release/python-3918/
4949
[Go]: https://go.dev/dl/
5050

5151
## Getting Started

gh-pages/content/user-guides/language-support/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ in significant re-engineering effort:
6969
- How are dependencies modeled? If [semantic versioning] is not the norm, what is the strategy to correctly represent
7070
semantic version ranges?
7171
- What are the toolchain and platform requirements?
72-
- For example, **Java** requires an OpenJDK 8 distribution and `maven`, **Python** requires `python` 3.8 or above,
72+
- For example, **Java** requires an OpenJDK 8 distribution and `maven`, **Python** requires `python` 3.9 or above,
7373
etc...
7474

7575
## Code Generation

gh-pages/content/user-guides/lib-author/configuration/targets/python.md

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ The `python` target requires two configuration entries:
1616
- Additionally, the following `Programming Language ::` classifiers are already set (more could be added by the user
1717
if relevant):
1818
- `Programming Language :: Python :: 3 :: Only`
19-
- `Programming Language :: Python :: 3.8`
2019
- `Programming Language :: Python :: 3.9`
2120
- `Programming Language :: Python :: 3.10`
2221
- `Programming Language :: Python :: 3.11`

gh-pages/content/user-guides/lib-author/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ to produce releasable artifacts.
1919
| .NET | .NET ≥ 6.0 |
2020
| Go | Go ≥ 1.18 |
2121
| Java | JDK ≥ 8 _and_ Maven ≥ 3.6 |
22-
| Python | Python ≥ 3.8 |
22+
| Python | Python ≥ 3.9 |
2323

2424
## :octicons-desktop-download-24: Download Locations
2525

packages/@jsii/python-runtime/pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ requires = ["setuptools~=62.2", "wheel~=0.37"]
33
build-backend = 'setuptools.build_meta'
44

55
[tool.black]
6-
target-version = ['py38', 'py39', 'py310', 'py311']
6+
target-version = ['py39', 'py310', 'py311']
77
include = '\.pyi?$'
88
exclude = '\.(git|mypy_cache|env)'
99

1010
[tool.mypy]
1111
ignore_missing_imports = true
1212

1313
[tool.pyright]
14-
pythonVersion = "3.8"
14+
pythonVersion = "3.9"
1515
venv = ".env"
1616
venvPath = "."

packages/@jsii/python-runtime/setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@
3939
"python-dateutil",
4040
"typing_extensions>=3.8,<5.0",
4141
],
42-
python_requires="~=3.8",
42+
python_requires="~=3.9",
4343
classifiers=[
4444
"Development Status :: 5 - Production/Stable",
4545
"Intended Audience :: Developers",
4646
"License :: OSI Approved :: Apache Software License",
4747
"Programming Language :: JavaScript",
4848
"Programming Language :: Python :: 3 :: Only",
49-
"Programming Language :: Python :: 3.8",
5049
"Programming Language :: Python :: 3.9",
5150
"Programming Language :: Python :: 3.10",
5251
"Programming Language :: Python :: 3.11",

packages/jsii-pacmak/lib/targets/python.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -2164,7 +2164,7 @@ class Package {
21642164
package_dir: { '': 'src' },
21652165
packages: modules.map((m) => m.pythonName),
21662166
package_data: packageData,
2167-
python_requires: '~=3.8',
2167+
python_requires: '~=3.9',
21682168
install_requires: [
21692169
`jsii${toPythonVersionRange(`^${VERSION}`)}`,
21702170
'publication>=0.0.3',
@@ -2178,7 +2178,6 @@ class Package {
21782178
'Operating System :: OS Independent',
21792179
'Programming Language :: JavaScript',
21802180
'Programming Language :: Python :: 3 :: Only',
2181-
'Programming Language :: Python :: 3.8',
21822181
'Programming Language :: Python :: 3.9',
21832182
'Programming Language :: Python :: 3.10',
21842183
'Programming Language :: Python :: 3.11',
@@ -2300,7 +2299,7 @@ class Package {
23002299
code.line();
23012300
code.line('[tool.pyright]');
23022301
code.line('defineConstant = { DEBUG = true }');
2303-
code.line('pythonVersion = "3.8"');
2302+
code.line('pythonVersion = "3.9"');
23042303
code.line('pythonPlatform = "All"');
23052304
code.line('reportSelfClsParameterName = false');
23062305
code.closeFile('pyproject.toml');

packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap

+4-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap

+8-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)