Skip to content

Commit 91b2c11

Browse files
authored
Drop Python 3.7 support (#21962)
Drop Python 3.7 support, and replace with Python 3.8 Resolves: #21532 /vscode-python/requirements.txt generated same hash even when running: ```pip-compile --generate-hashes requirements.in``` from the Python3.8 virtual environment. - Same result with pythonFiles/jedilsp_requirements/requirements.txt when running: ```pip-compile --generate-hashes pythonFiles/jedilsp_requirements/requirements.in```
1 parent d9a2318 commit 91b2c11

File tree

18 files changed

+23
-23
lines changed

18 files changed

+23
-23
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ runs:
2222
cache: 'npm'
2323

2424
# Jedi LS depends on dataclasses which is not in the stdlib in Python 3.7.
25-
- name: Use Python 3.7 for JediLSP
25+
- name: Use Python 3.8 for JediLSP
2626
uses: actions/setup-python@v4
2727
with:
28-
python-version: 3.7
28+
python-version: 3.8
2929
cache: 'pip'
3030
cache-dependency-path: |
3131
requirements.txt

build/azure-pipeline.pre-release.yml

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

3939
- task: UsePythonVersion@0
4040
inputs:
41-
versionSpec: '3.7'
41+
versionSpec: '3.8'
4242
addToPath: true
4343
architecture: 'x64'
4444
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.7'
36+
versionSpec: '3.8'
3737
addToPath: true
3838
architecture: 'x64'
3939
displayName: Select Python version

build/ci/conda_env_1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: conda_env_1
22
dependencies:
3-
- python=3.7
3+
- python=3.8
44
- pip

pythonFiles/jedilsp_requirements/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is used to generate requirements.txt.
22
# To update requirements.txt, run the following commands.
3-
# Use Python 3.7 when creating the environment or using pip-tools
3+
# Use Python 3.8 when creating the environment or using pip-tools
44
# 1) pip install pip-tools
55
# 2) pip-compile --generate-hashes --upgrade pythonFiles\jedilsp_requirements\requirements.in
66

pythonFiles/jedilsp_requirements/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.7
2+
# This file is autogenerated by pip-compile with Python 3.8
33
# by the following command:
44
#
55
# pip-compile --generate-hashes 'pythonFiles\jedilsp_requirements\requirements.in'

pythonFiles/tests/test_data/missing-deps.data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.7
2+
# This file is autogenerated by pip-compile with Python 3.8
33
# by the following command:
44
#
55
# pip-compile --generate-hashes --resolver=backtracking requirements-test.in

pythonFiles/tests/test_data/no-missing-deps.data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.7
2+
# This file is autogenerated by pip-compile with Python 3.8
33
# by the following command:
44
#
55
# pip-compile --generate-hashes --resolver=backtracking requirements-test.in

pythonFiles/tests/test_data/pyproject-missing-deps.data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ build-backend = "flit_core.buildapi"
55
[project]
66
name = "something"
77
version = "2023.0.0"
8-
requires-python = ">=3.7"
8+
requires-python = ">=3.8"
99
dependencies = ["pytest==7.3.1", "flake8-csv"]

pythonFiles/tests/test_data/pyproject-no-missing-deps.data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ build-backend = "flit_core.buildapi"
55
[project]
66
name = "something"
77
version = "2023.0.0"
8-
requires-python = ">=3.7"
8+
requires-python = ">=3.8"
99
dependencies = [jedi-language-server"]

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.7
2+
# This file is autogenerated by pip-compile with Python 3.8
33
# by the following command:
44
#
55
# pip-compile --generate-hashes requirements.in

scripts/onCreateCommand.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
1212
source ~/.bashrc
1313

1414
# Install Python via pyenv .
15-
pyenv install 3.7:latest 3.8:latest 3.9:latest 3.10:latest 3.11:latest
15+
pyenv install 3.8:latest 3.9:latest 3.10:latest 3.11:latest
1616

17-
# Set default Python version to 3.7 .
18-
pyenv global 3.7.17
17+
# Set default Python version to 3.8 .
18+
pyenv global 3.8.18
1919

2020
npm ci
2121

2222
# Create Virutal environment.
23-
pyenv exec python3.7 -m venv .venv
23+
pyenv exec python3.8 -m venv .venv
2424

2525
# Activate Virtual environment.
2626
source /workspaces/vscode-python/.venv/bin/activate

src/client/pythonEnvironments/creation/provider/condaUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export async function getCondaBaseEnv(): Promise<string | undefined> {
3939
}
4040

4141
export async function pickPythonVersion(token?: CancellationToken): Promise<string | undefined> {
42-
const items: QuickPickItem[] = ['3.10', '3.11', '3.9', '3.8', '3.7'].map((v) => ({
42+
const items: QuickPickItem[] = ['3.10', '3.11', '3.9', '3.8'].map((v) => ({
4343
label: v === RECOMMENDED_CONDA_PYTHON ? `${Octicons.Star} Python` : 'Python',
4444
description: v,
4545
}));

src/test/pythonEnvironments/common/envlayouts/pipenv/project1/CustomPipfileName

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ verify_ssl = true
88
[packages]
99

1010
[requires]
11-
python_version = "3.7"
11+
python_version = "3.8"

src/test/pythonEnvironments/common/envlayouts/pipenv/project2/Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ verify_ssl = true
88
[packages]
99

1010
[requires]
11-
python_version = "3.7"
11+
python_version = "3.8"

src/test/pythonEnvironments/common/envlayouts/pipenv/project3/Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ verify_ssl = true
88
[packages]
99

1010
[requires]
11-
python_version = "3.7"
11+
python_version = "3.8"

src/test/pythonEnvironments/common/envlayouts/workspace/folder1/Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ verify_ssl = true
88
[packages]
99

1010
[requires]
11-
python_version = "3.7"
11+
python_version = "3.8"

src/test/pythonEnvironments/creation/installedPackagesDiagnostics.unit.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function getPyProjectTomlFile(): typemoq.IMock<TextDocument> {
6262
.setup((p) => p.getText(typemoq.It.isAny()))
6363
.returns(
6464
() =>
65-
'[build-system]\nrequires = ["flit_core >=3.2,<4"]\nbuild-backend = "flit_core.buildapi"\n\n[project]\nname = "something"\nversion = "2023.0.0"\nrequires-python = ">=3.7"\ndependencies = ["attrs>=21.3.0", "flake8-csv"]\n ',
65+
'[build-system]\nrequires = ["flit_core >=3.2,<4"]\nbuild-backend = "flit_core.buildapi"\n\n[project]\nname = "something"\nversion = "2023.0.0"\nrequires-python = ">=3.8"\ndependencies = ["attrs>=21.3.0", "flake8-csv"]\n ',
6666
);
6767
return someFile;
6868
}
@@ -76,7 +76,7 @@ function getSomeTomlFile(): typemoq.IMock<TextDocument> {
7676
.setup((p) => p.getText(typemoq.It.isAny()))
7777
.returns(
7878
() =>
79-
'[build-system]\nrequires = ["flit_core >=3.2,<4"]\nbuild-backend = "flit_core.buildapi"\n\n[something]\nname = "something"\nversion = "2023.0.0"\nrequires-python = ">=3.7"\ndependencies = ["attrs>=21.3.0", "flake8-csv"]\n ',
79+
'[build-system]\nrequires = ["flit_core >=3.2,<4"]\nbuild-backend = "flit_core.buildapi"\n\n[something]\nname = "something"\nversion = "2023.0.0"\nrequires-python = ">=3.8"\ndependencies = ["attrs>=21.3.0", "flake8-csv"]\n ',
8080
);
8181
return someFile;
8282
}

0 commit comments

Comments
 (0)