Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ jobs:
- name: Set up NuGet
uses: nuget/setup-nuget@b26b823c478ee115be5c9403e62c90b0bf943843 # v3.1.0

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

- name: Check Python version is 3.15.0rc1
- name: Check Python version is 3.15.0rc2
run: >
python -c "import sys;
print(sys.version);
print(sys.executable);
sys.exit(0 if sys.version_info[:5] == (3, 15, 0, 'candidate', 1) else 1)"
sys.exit(0 if sys.version_info[:5] == (3, 15, 0, 'candidate', 2) else 1)"

- name: Install build dependencies
run: python -m pip install "pymsbuild==1.2.2"
Expand Down
8 changes: 4 additions & 4 deletions ci/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@ stages:
displayName: 'Install Nuget'

- powershell: |
nuget install python -Version 3.15.0-rc1 -x -noninteractive -o host_python
nuget install python -Version 3.15.0-rc2 -x -noninteractive -o host_python
$py = Get-Item host_python\python\tools
Write-Host "Adding $py to PATH"
Write-Host "##vso[task.prependpath]$py"
displayName: Set up Python 3.15.0rc1
displayName: Set up Python 3.15.0rc2
workingDirectory: $(Build.BinariesDirectory)

- powershell: >
python -c "import sys;
print(sys.version);
print(sys.executable);
sys.exit(0 if sys.version_info[:5] == (3, 15, 0, 'candidate', 1) else 1)"
displayName: Check Python version is 3.15.0rc1
sys.exit(0 if sys.version_info[:5] == (3, 15, 0, 'candidate', 2) else 1)"
displayName: Check Python version is 3.15.0rc2

- powershell: |
python -m pip install "pymsbuild==1.2.2"
Expand Down
15 changes: 0 additions & 15 deletions src/manage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
################################################################################
# HACK: Work around gh-148750 in 3.15
# In short, encodings is now partially frozen, which means its submodules can
# only be loaded if they are also frozen or if they are in their default
# location relative to the executable. For embedded runtimes, this is not true,
# so we need to patch the __path__ to point at our expected location.
# This code is very fragile and should not be reused.
import sys
import encodings
for p in sys.path:
if p.endswith(".zip"):
encodings.__path__[:] = [f"{p}\\encodings"]
break
################################################################################

from .exceptions import (
ArgumentError,
AutomaticInstallDisabledError,
Expand Down
10 changes: 0 additions & 10 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@
_native.coinitialize()


################################################################################
# HACK: Work around gh-148750 in 3.15
import encodings
_orig_encodings_path = encodings.__path__[:]
import manage
# Importing manage has changed this value because of our hack
encodings.__path__[:] = _orig_encodings_path
################################################################################


# Importing in order carefully to ensure the variables we override are handled
# correctly by submodules.
import manage
Expand Down