Skip to content

Commit 808f83a

Browse files
Copilotedvilme
andauthored
Bump minimum Python version from 3.9 to 3.10 (#381)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edvilme <5952839+edvilme@users.noreply.github.com> Co-authored-by: Eduardo Villalpando Mello <eduardovil@microsoft.com>
1 parent d1104be commit 808f83a

File tree

13 files changed

+66
-28
lines changed

13 files changed

+66
-28
lines changed

.github/actions/build-vsix/action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ inputs:
55
node_version:
66
description: 'Version of Node to install'
77
required: true
8+
python_version:
9+
description: 'Version of Python to install'
10+
required: true
811

912
runs:
1013
using: 'composite'
@@ -15,11 +18,11 @@ runs:
1518
node-version: ${{ inputs.node_version }}
1619
cache: 'npm'
1720

18-
# Minimum supported version is Python 3.9
19-
- name: Use Python 3.9
21+
# Minimum supported version is Python 3.10
22+
- name: Use Python ${{ inputs.python_version }}
2023
uses: actions/setup-python@v5
2124
with:
22-
python-version: '3.9'
25+
python-version: ${{ inputs.python_version }}
2326

2427
- name: Pip cache
2528
uses: actions/cache@v4

.github/actions/lint/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ inputs:
55
node_version:
66
description: 'Version of Node to install'
77
required: true
8+
python_version:
9+
description: 'Version of Python to install'
10+
required: true
811

912
runs:
1013
using: 'composite'
@@ -27,10 +30,10 @@ runs:
2730
run: npm run format-check
2831
shell: bash
2932

30-
- name: Install Python
33+
- name: Install Python ${{ inputs.python_version }}
3134
uses: actions/setup-python@v5
3235
with:
33-
python-version: '3.x'
36+
python-version: ${{ inputs.python_version }}
3437

3538
- name: Pip cache
3639
uses: actions/cache@v4

.github/workflows/pr-check.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
env:
77
NODE_VERSION: 22.17.0
8+
PYTHON_VERSION: '3.10'
89
TEST_RESULTS_DIRECTORY: .
910
# Force a path with spaces to test extension works in these scenarios
1011
special-working-directory: './testingDir'
@@ -22,6 +23,7 @@ jobs:
2223
uses: ./.github/actions/build-vsix
2324
with:
2425
node_version: ${{ env.NODE_VERSION}}
26+
python_version: ${{ env.PYTHON_VERSION }}
2527

2628
lint:
2729
name: Lint
@@ -34,6 +36,7 @@ jobs:
3436
uses: ./.github/actions/lint
3537
with:
3638
node_version: ${{ env.NODE_VERSION }}
39+
python_version: ${{ env.PYTHON_VERSION }}
3740

3841
tests:
3942
name: Tests
@@ -45,19 +48,19 @@ jobs:
4548
fail-fast: false
4649
matrix:
4750
os: [ubuntu-latest, windows-latest]
48-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
51+
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
4952

5053
steps:
5154
- name: Checkout
5255
uses: actions/checkout@v4
5356
with:
5457
path: ${{ env.special-working-directory-relative }}
5558

56-
# Install bundled libs using 3.9 even though you test it on other versions.
57-
- name: Use Python 3.9
59+
# Install bundled libs using env.PYTHON_VERSION even though you test it on other versions.
60+
- name: Use Python ${{ env.PYTHON_VERSION }}
5861
uses: actions/setup-python@v5
5962
with:
60-
python-version: '3.9'
63+
python-version: ${{ env.PYTHON_VERSION }}
6164

6265
- name: Update pip, install wheel and nox
6366
run: python -m pip install -U pip wheel nox
@@ -68,7 +71,7 @@ jobs:
6871
run: python -m nox --session install_bundled_libs
6972
shell: bash
7073

71-
# Now that the bundle is installed to target using python 3.9
74+
# Now that the bundle is installed to target using env.PYTHON_VERSION
7275
# switch back the python we want to test with
7376
- name: Use Python ${{ matrix.python }}
7477
uses: actions/setup-python@v5

.github/workflows/push-check.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
env:
1212
NODE_VERSION: 22.17.0
13+
PYTHON_VERSION: '3.10'
1314
TEST_RESULTS_DIRECTORY: .
1415
# Force a path with spaces to test extension works in these scenarios
1516
special-working-directory: './testingDir'
@@ -27,6 +28,7 @@ jobs:
2728
uses: ./.github/actions/build-vsix
2829
with:
2930
node_version: ${{ env.NODE_VERSION}}
31+
python_version: ${{ env.PYTHON_VERSION }}
3032

3133
lint:
3234
name: Lint
@@ -39,6 +41,7 @@ jobs:
3941
uses: ./.github/actions/lint
4042
with:
4143
node_version: ${{ env.NODE_VERSION }}
44+
python_version: ${{ env.PYTHON_VERSION }}
4245

4346
tests:
4447
name: Tests
@@ -50,19 +53,19 @@ jobs:
5053
fail-fast: false
5154
matrix:
5255
os: [ubuntu-latest, windows-latest]
53-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
56+
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
5457

5558
steps:
5659
- name: Checkout
5760
uses: actions/checkout@v4
5861
with:
5962
path: ${{ env.special-working-directory-relative }}
6063

61-
# Install bundled libs using 3.9 even though you test it on other versions.
62-
- name: Use Python 3.9
64+
# Install bundled libs using env.PYTHON_VERSION even though you test it on other versions.
65+
- name: Use Python ${{ env.PYTHON_VERSION }}
6366
uses: actions/setup-python@v5
6467
with:
65-
python-version: '3.9'
68+
python-version: ${{ env.PYTHON_VERSION }}
6669

6770
- name: Update pip, install wheel and nox
6871
run: python -m pip install -U pip wheel nox
@@ -73,7 +76,7 @@ jobs:
7376
run: python -m nox --session install_bundled_libs
7477
shell: bash
7578

76-
# Now that the bundle is installed to target using python 3.9
79+
# Now that the bundle is installed to target using env.PYTHON_VERSION
7780
# switch back the python we want to test with
7881
- name: Use Python ${{ matrix.python }}
7982
uses: actions/setup-python@v5

build/azure-devdiv-pipeline.pre-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ variables:
2121
value: VSCode-flake8
2222
- name: VsixName
2323
value: flake8.vsix
24+
- name: NodeVersion
25+
value: '22.17.0'
26+
- name: PythonVersion
27+
value: '3.10'
2428
- name: AZURE_ARTIFACTS_FEED
2529
value: 'https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/Pylance_PublicPackages/npm/registry/'
2630
parameters:
@@ -75,13 +79,13 @@ extends:
7579

7680
- task: NodeTool@0
7781
inputs:
78-
versionSpec: '22.17.0'
82+
versionSpec: $(NodeVersion)
7983
checkLatest: true
8084
displayName: Select Node 22 LTS
8185

8286
- task: UsePythonVersion@0
8387
inputs:
84-
versionSpec: '3.9' # note Install Python dependencies step below relies on Python 3.9
88+
versionSpec: $(PythonVersion) # note Install Python dependencies step below relies on Python 3.10
8589
addToPath: true
8690
architecture: 'x64'
8791
displayName: Select Python version

build/azure-devdiv-pipeline.stable.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ variables:
1515
value: VSCode-flake8
1616
- name: VsixName
1717
value: flake8.vsix
18+
- name: NodeVersion
19+
value: '22.17.0'
20+
- name: PythonVersion
21+
value: '3.10'
1822

1923
parameters:
2024
- name: publishExtension
@@ -61,12 +65,12 @@ extends:
6165
steps:
6266
- task: NodeTool@0
6367
inputs:
64-
versionSpec: '22.17.0'
68+
versionSpec: $(NodeVersion)
6569
checkLatest: true
6670
displayName: Select Node 22 LTS
6771
- task: UsePythonVersion@0
6872
inputs:
69-
versionSpec: '3.9' # note Install Python dependencies step below relies on Python 3.9
73+
versionSpec: $(PythonVersion) # note Install Python dependencies step below relies on Python 3.10
7074
addToPath: true
7175
architecture: 'x64'
7276
displayName: Select Python version

build/azure-pipeline.pre-release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ resources:
1818
ref: main
1919
endpoint: Monaco
2020

21+
variables:
22+
- name: NodeVersion
23+
value: '22.17.0'
24+
- name: PythonVersion
25+
value: '3.10'
26+
2127
parameters:
2228
- name: publishExtension
2329
displayName: 🚀 Publish Extension
@@ -32,12 +38,12 @@ extends:
3238
buildSteps:
3339
- task: NodeTool@0
3440
inputs:
35-
versionSpec: '22.17.0'
41+
versionSpec: $(NodeVersion)
3642
displayName: Select Node version
3743

3844
- task: UsePythonVersion@0
3945
inputs:
40-
versionSpec: '3.9'
46+
versionSpec: $(PythonVersion)
4147
addToPath: true
4248
architecture: 'x64'
4349
displayName: Select Python version

build/azure-pipeline.stable.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ resources:
1414
ref: main
1515
endpoint: Monaco
1616

17+
variables:
18+
- name: NodeVersion
19+
value: '22.17.0'
20+
- name: PythonVersion
21+
value: '3.10'
22+
1723
parameters:
1824
- name: publishExtension
1925
displayName: 🚀 Publish Extension
@@ -28,12 +34,12 @@ extends:
2834
buildSteps:
2935
- task: NodeTool@0
3036
inputs:
31-
versionSpec: '22.17.0'
37+
versionSpec: $(NodeVersion)
3238
displayName: Select Node version
3339

3440
- task: UsePythonVersion@0
3541
inputs:
36-
versionSpec: '3.9'
42+
versionSpec: $(PythonVersion)
3743
addToPath: true
3844
architecture: 'x64'
3945
displayName: Select Python version

noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ def _setup_template_environment(session: nox.Session) -> None:
104104
_install_bundle(session)
105105

106106

107-
@nox.session(python="3.9")
107+
@nox.session(python="3.10")
108108
def install_bundled_libs(session):
109109
"""Installs the libraries that will be bundled with the extension."""
110110
session.install("wheel")
111111
_install_bundle(session)
112112

113113

114-
@nox.session(python="3.9")
114+
@nox.session(python="3.10")
115115
def setup(session: nox.Session) -> None:
116116
"""Sets up the extension for development."""
117117
_setup_template_environment(session)

requirements.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ cattrs==25.3.0 \
1313
# via
1414
# lsprotocol
1515
# pygls
16+
exceptiongroup==1.3.1 \
17+
--hash=sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219 \
18+
--hash=sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598
19+
# via cattrs
1620
flake8==7.3.0 \
1721
--hash=sha256:b9696257b9ce8beb888cdbe31cf885c90d31928fe202be0889a7cdafad32f01e \
1822
--hash=sha256:fe044858146b9fc69b551a4b490d69cf960fcb78ad1edcb84e7fbb1b4a8e3872
@@ -44,4 +48,6 @@ pygls==2.0.1 \
4448
typing-extensions==4.15.0 \
4549
--hash=sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466 \
4650
--hash=sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548
47-
# via cattrs
51+
# via
52+
# cattrs
53+
# exceptiongroup

0 commit comments

Comments
 (0)