Skip to content

Commit d0417a7

Browse files
authored
gh-404: Update to 3.15.0rc2 and revert hack (#406)
1 parent 083cc93 commit d0417a7

4 files changed

Lines changed: 8 additions & 33 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ jobs:
4343
- name: Set up NuGet
4444
uses: nuget/setup-nuget@b26b823c478ee115be5c9403e62c90b0bf943843 # v3.1.0
4545

46-
- name: Set up Python 3.15.0rc1
46+
- name: Set up Python 3.15.0rc2
4747
run: |
48-
nuget install python -Version 3.15.0-rc1 -x -o .
48+
nuget install python -Version 3.15.0-rc2 -x -o .
4949
$py = Get-Item python\tools
5050
Write-Host "Adding $py to PATH"
5151
"$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append
5252
working-directory: ${{ runner.temp }}
5353

54-
- name: Check Python version is 3.15.0rc1
54+
- name: Check Python version is 3.15.0rc2
5555
run: >
5656
python -c "import sys;
5757
print(sys.version);
5858
print(sys.executable);
59-
sys.exit(0 if sys.version_info[:5] == (3, 15, 0, 'candidate', 1) else 1)"
59+
sys.exit(0 if sys.version_info[:5] == (3, 15, 0, 'candidate', 2) else 1)"
6060
6161
- name: Install build dependencies
6262
run: python -m pip install "pymsbuild==1.2.2"

ci/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,19 @@ stages:
9898
displayName: 'Install Nuget'
9999

100100
- powershell: |
101-
nuget install python -Version 3.15.0-rc1 -x -noninteractive -o host_python
101+
nuget install python -Version 3.15.0-rc2 -x -noninteractive -o host_python
102102
$py = Get-Item host_python\python\tools
103103
Write-Host "Adding $py to PATH"
104104
Write-Host "##vso[task.prependpath]$py"
105-
displayName: Set up Python 3.15.0rc1
105+
displayName: Set up Python 3.15.0rc2
106106
workingDirectory: $(Build.BinariesDirectory)
107107
108108
- powershell: >
109109
python -c "import sys;
110110
print(sys.version);
111111
print(sys.executable);
112-
sys.exit(0 if sys.version_info[:5] == (3, 15, 0, 'candidate', 1) else 1)"
113-
displayName: Check Python version is 3.15.0rc1
112+
sys.exit(0 if sys.version_info[:5] == (3, 15, 0, 'candidate', 2) else 1)"
113+
displayName: Check Python version is 3.15.0rc2
114114
115115
- powershell: |
116116
python -m pip install "pymsbuild==1.2.2"

src/manage/__init__.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
################################################################################
2-
# HACK: Work around gh-148750 in 3.15
3-
# In short, encodings is now partially frozen, which means its submodules can
4-
# only be loaded if they are also frozen or if they are in their default
5-
# location relative to the executable. For embedded runtimes, this is not true,
6-
# so we need to patch the __path__ to point at our expected location.
7-
# This code is very fragile and should not be reused.
8-
import sys
9-
import encodings
10-
for p in sys.path:
11-
if p.endswith(".zip"):
12-
encodings.__path__[:] = [f"{p}\\encodings"]
13-
break
14-
################################################################################
15-
161
from .exceptions import (
172
ArgumentError,
183
AutomaticInstallDisabledError,

tests/conftest.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@
2020
_native.coinitialize()
2121

2222

23-
################################################################################
24-
# HACK: Work around gh-148750 in 3.15
25-
import encodings
26-
_orig_encodings_path = encodings.__path__[:]
27-
import manage
28-
# Importing manage has changed this value because of our hack
29-
encodings.__path__[:] = _orig_encodings_path
30-
################################################################################
31-
32-
3323
# Importing in order carefully to ensure the variables we override are handled
3424
# correctly by submodules.
3525
import manage

0 commit comments

Comments
 (0)