diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc37ec6..8c43788 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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" diff --git a/ci/release.yml b/ci/release.yml index 0f1160c..db73e11 100644 --- a/ci/release.yml +++ b/ci/release.yml @@ -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" diff --git a/src/manage/__init__.py b/src/manage/__init__.py index 5fa7c7e..1bda624 100644 --- a/src/manage/__init__.py +++ b/src/manage/__init__.py @@ -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, diff --git a/tests/conftest.py b/tests/conftest.py index a32da9e..189129a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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