Skip to content

Commit 30a1a11

Browse files
authored
Merge pull request #305 from microsoft/upgrade3.9
chore: update Python minimum to 3.9
2 parents 0251d01 + 2eb7cea commit 30a1a11

File tree

14 files changed

+43
-47
lines changed

14 files changed

+43
-47
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ runs:
1515
node-version: ${{ inputs.node_version }}
1616
cache: 'npm'
1717

18-
# Minimum supported version is Python 3.8
19-
- name: Use Python 3.8
18+
# Minimum supported version is Python 3.9
19+
- name: Use Python 3.9
2020
uses: actions/setup-python@v2
2121
with:
22-
python-version: '3.8'
22+
python-version: '3.9'
2323

2424
- name: Pip cache
25-
uses: actions/cache@v2
25+
uses: actions/cache@v3
2626
with:
2727
path: ~/.cache/pip
2828
key: ${{ runner.os }}-pip-build-vsix-${{ hashFiles('**/requirements.txt') }}

.github/actions/lint/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ runs:
3333
python-version: '3.x'
3434

3535
- name: Pip cache
36-
uses: actions/cache@v2
36+
uses: actions/cache@v3
3737
with:
3838
path: ~/.cache/pip
3939
key: ${{ runner.os }}-pip-lint-${{ hashFiles('**/requirements.txt') }}

.github/workflows/pr-check.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
os: [ubuntu-latest, windows-latest]
48-
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
48+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
4949

5050
steps:
5151
- name: Checkout
5252
uses: actions/checkout@v3
5353
with:
5454
path: ${{ env.special-working-directory-relative }}
5555

56-
# Install bundled libs using 3.8 even though you test it on other versions.
57-
- name: Use Python 3.8
56+
# Install bundled libs using 3.9 even though you test it on other versions.
57+
- name: Use Python 3.9
5858
uses: actions/setup-python@v5
5959
with:
60-
python-version: '3.8'
60+
python-version: '3.9'
6161

6262
- name: Update pip, install wheel and nox
6363
run: python -m pip install -U pip wheel nox
@@ -68,7 +68,7 @@ jobs:
6868
run: python -m nox --session install_bundled_libs
6969
shell: bash
7070

71-
# Now that the bundle is installed to target using python 3.8
71+
# Now that the bundle is installed to target using python 3.9
7272
# switch back the python we want to test with
7373
- name: Use Python ${{ matrix.python }}
7474
uses: actions/setup-python@v5

.github/workflows/push-check.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ jobs:
5050
fail-fast: false
5151
matrix:
5252
os: [ubuntu-latest, windows-latest]
53-
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
53+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
5454

5555
steps:
5656
- name: Checkout
5757
uses: actions/checkout@v3
5858
with:
5959
path: ${{ env.special-working-directory-relative }}
6060

61-
# Install bundled libs using python 3.8 even though you test it on other versions.
62-
- name: Use Python 3.8
61+
# Install bundled libs using python 3.9 even though you test it on other versions.
62+
- name: Use Python 3.9
6363
uses: actions/setup-python@v5
6464
with:
65-
python-version: '3.8'
65+
python-version: '3.9'
6666

6767
- name: Update pip, install wheel and nox
6868
run: python -m pip install -U pip wheel nox
@@ -73,7 +73,7 @@ jobs:
7373
run: python -m nox --session install_bundled_libs
7474
shell: bash
7575

76-
# Now that the bundle is installed to target using python 3.8
76+
# Now that the bundle is installed to target using python 3.9
7777
# switch back the python we want to test with
7878
- name: Use Python ${{ matrix.python }}
7979
uses: actions/setup-python@v5

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Formatter extension for Visual Studio Code using autopep8
22

3-
A Visual Studio Code extension with support for the autopep8 formatter. The extension ships with `autopep8=2.3.1`.
3+
A Visual Studio Code extension with support for the autopep8 formatter. The extension ships with `autopep8=2.3.2`.
44

5-
> Note: The minimum supported version of autopep8 is `1.7.0`. If you have any issues with formatting with autopep8, please report it to [this issue tracker](https://github.com/hhatto/autopep8/issues) as this extension is just a wrapper around autopep8.
5+
> Note: The minimum supported version of autopep8 is `2.3.2`. If you have any issues with formatting with autopep8, please report it to [this issue tracker](https://github.com/hhatto/autopep8/issues) as this extension is just a wrapper around autopep8.
66
77
This extension supports for all [actively supported versions](https://devguide.python.org/#status-of-python-branches) of the Python language.
88

build/azure-pipeline.pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extends:
3737

3838
- task: UsePythonVersion@0
3939
inputs:
40-
versionSpec: '3.8'
40+
versionSpec: '3.9'
4141
addToPath: true
4242
architecture: 'x64'
4343
displayName: Select Python version

build/azure-pipeline.stable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extends:
3333

3434
- task: UsePythonVersion@0
3535
inputs:
36-
versionSpec: '3.8'
36+
versionSpec: '3.9'
3737
addToPath: true
3838
architecture: 'x64'
3939
displayName: Select Python version

bundled/tool/lsp_utils.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,15 @@ def _run_module(
152152
with redirect_io("stderr", str_error):
153153
try:
154154
import autopep8
155+
155156
importlib.reload(autopep8)
156157
except:
157-
str_error.write("Mitigation for `autopep8` issue failed: https://github.com/hhatto/autopep8/issues/625")
158-
str_error.write(f"Error reloading autopep8: {traceback.format_exc()}\n")
158+
str_error.write(
159+
"Mitigation for `autopep8` issue failed: https://github.com/hhatto/autopep8/issues/625"
160+
)
161+
str_error.write(
162+
f"Error reloading autopep8: {traceback.format_exc()}\n"
163+
)
159164
if use_stdin and source is not None:
160165
str_input = CustomIO("<stdin>", encoding="utf-8", newline="\n")
161166
with redirect_io("stdin", str_input):

noxfile.py

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

100100

101-
@nox.session(python="3.8")
101+
@nox.session(python="3.9")
102102
def install_bundled_libs(session):
103103
"""Installs the libraries that will be bundled with the extension."""
104104
session.install("wheel")
105105
_install_bundle(session)
106106

107107

108-
@nox.session(python="3.8")
108+
@nox.session(python="3.9")
109109
def setup(session: nox.Session) -> None:
110110
"""Sets up the extension for development."""
111111
_setup_template_environment(session)

requirements.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# This file is used to generate requirements.txt.
22
# To update requirements.txt, run the following commands.
3-
# Use Python 3.8 when creating the environment or using pip-tools
4-
# 1) python -m pip install pip-tools
5-
# 2) pip-compile --generate-hashes --upgrade ./requirements.in
6-
3+
# Use `uv` with Python 3.9 when creating the environment.
4+
#
5+
# Run following command:
6+
# uv pip compile --generate-hashes --upgrade -o ./requirements.txt ./requirements.in
77
pygls
88
packaging
99
autopep8

0 commit comments

Comments
 (0)