| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,30 +33,30 @@ jobs: | |||
| 33 | 33 | } | |
| 34 | 34 | shell: powershell | |
| 35 | 35 | ||
| 36 | - #- name: Set up Python 3.14 | ||
| 36 | + #- name: Set up Python 3.15 | ||
| 37 | 37 | # uses: actions/setup-python@v5 | |
| 38 | 38 | # with: | |
| 39 | - # python-version: 3.14-dev | ||
| 39 | + # python-version: 3.15-dev | ||
| 40 | 40 | ||
| 41 | 41 | # We move faster than GitHub's Python runtimes, so use NuGet instead | |
| 42 | 42 | # One day we can use ourselves to download Python, but not yet... | |
| 43 | 43 | - name: Set up NuGet | |
| 44 | 44 | uses: nuget/setup-nuget@b26b823c478ee115be5c9403e62c90b0bf943843 # v3.1.0 | |
| 45 | 45 | ||
| 46 | - - name: Set up Python 3.14.6 | ||
| 46 | + - name: Set up Python 3.15.0rc1 | ||
| 47 | 47 | run: | | |
| 48 | - nuget install python -Version 3.14.6 -x -o . | ||
| 48 | + nuget install python -Version 3.15.0-rc1 -x -o . | ||
| 49 | 49 | $py = Get-Item python\tools | |
| 50 | 50 | Write-Host "Adding $py to PATH" | |
| 51 | 51 | "$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append | |
| 52 | 52 | working-directory: ${{ runner.temp }} | |
| 53 | 53 | ||
| 54 | - - name: Check Python version is 3.14.6 | ||
| 54 | + - name: Check Python version is 3.15.0rc1 | ||
| 55 | 55 | run: > | |
| 56 | 56 | python -c "import sys; | |
| 57 | 57 | print(sys.version); | |
| 58 | 58 | print(sys.executable); | |
| 59 | - sys.exit(0 if sys.version_info[:5] == (3, 14, 6, 'final', 0) else 1)" | ||
| 59 | + sys.exit(0 if sys.version_info[:5] == (3, 15, 0, 'candidate', 1) else 1)" | ||
| 60 | 60 | ||
| 61 | 61 | - name: Install build dependencies | |
| 62 | 62 | run: python -m pip install "pymsbuild==1.2.2" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,11 @@ | |||
| 6 | 6 | ||
| 7 | 7 | DLL_NAME = "python{0.major}{0.minor}".format(sys.version_info) | |
| 8 | 8 | VER_NUM = "{0.major}.{0.minor}.{0.micro}".format(sys.version_info) | |
| 9 | - EMBED_URL = f"https://www.python.org/ftp/python/{VER_NUM}/python-{VER_NUM}-embed-amd64.zip" | ||
| 9 | + if sys.version_info.releaselevel == "candidate": | ||
| 10 | + VER_NUM_RC = f"rc{sys.version_info.serial}" | ||
| 11 | + else: | ||
| 12 | + VER_NUM_RC = "" | ||
| 13 | + EMBED_URL = f"https://www.python.org/ftp/python/{VER_NUM}/python-{VER_NUM}{VER_NUM_RC}-embed-amd64.zip" | ||
| 10 | 14 | ||
| 11 | 15 | def can_embed(tag): | |
| 12 | 16 | """Return False if tag doesn't match DLL_NAME and EMBED_URL. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -95,19 +95,19 @@ stages: | |||
| 95 | 95 | displayName: 'Install Nuget' | |
| 96 | 96 | ||
| 97 | 97 | - powershell: | | |
| 98 | - nuget install python -Version 3.14.6 -x -noninteractive -o host_python | ||
| 98 | + nuget install python -Version 3.15.0-rc1 -x -noninteractive -o host_python | ||
| 99 | 99 | $py = Get-Item host_python\python\tools | |
| 100 | 100 | Write-Host "Adding $py to PATH" | |
| 101 | 101 | Write-Host "##vso[task.prependpath]$py" | |
| 102 | - displayName: Set up Python 3.14.6 | ||
| 102 | + displayName: Set up Python 3.15.0rc1 | ||
| 103 | 103 | workingDirectory: $(Build.BinariesDirectory) | |
| 104 | 104 | ||
| 105 | 105 | - powershell: > | |
| 106 | 106 | python -c "import sys; | |
| 107 | 107 | print(sys.version); | |
| 108 | 108 | print(sys.executable); | |
| 109 | - sys.exit(0 if sys.version_info[:5] == (3, 14, 6, 'final', 0) else 1)" | ||
| 110 | - displayName: Check Python version is 3.14.6 | ||
| 109 | + sys.exit(0 if sys.version_info[:5] == (3, 15, 0, 'candidate', 1) else 1)" | ||
| 110 | + displayName: Check Python version is 3.15.0rc1 | ||
| 111 | 111 | ||
| 112 | 112 | - powershell: | | |
| 113 | 113 | python -m pip install "pymsbuild==1.2.2" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,18 @@ | |||
| 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 | + | ||
| 1 | 16 | from .exceptions import ( | |
| 2 | 17 | ArgumentError, | |
| 3 | 18 | AutomaticInstallDisabledError, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -472,10 +472,9 @@ def __init__(self, args, root=None): | |||
| 472 | 472 | ||
| 473 | 473 | if not self.default_platform: | |
| 474 | 474 | from _native import get_processor_architecture | |
| 475 | - LOGGER.debug("Get CPU architecture, its prefix is %s", get_processor_architecture()) | ||
| 475 | + self.default_platform = get_processor_architecture() | ||
| 476 | + LOGGER.debug("Default to current CPU architecture: %s", self.default_platform) | ||
| 476 | 477 | ||
| 477 | - # Currently, we always default to -64. | ||
| 478 | - self.default_platform = "-64" | ||
| 479 | 478 | ||
| 480 | 479 | # If our command has any config, load them to override anything that | |
| 481 | 480 | # wasn't set on the command line. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -413,9 +413,9 @@ def first_run(cmd): | |||
| 413 | 413 | LOGGER.print("!Y!The global shortcuts directory is not " | |
| 414 | 414 | "configured.!W!", level=logging.WARN) | |
| 415 | 415 | LOGGER.print("\nConfiguring this enables commands like " | |
| 416 | - "!B!python3.14.exe!W! to run from your terminal, " | ||
| 416 | + "!B!python3.15.exe!W! to run from your terminal, " | ||
| 417 | 417 | "but is not needed for the !B!python!W! or !B!py!W! " | |
| 418 | - "commands (for example, !B!py -V:3.14!W!).", | ||
| 418 | + "commands (for example, !B!py -V:3.15!W!).", | ||
| 419 | 419 | wrap=True) | |
| 420 | 420 | LOGGER.print("\nWe can add the directory (!B!%s!W!) to PATH now, " | |
| 421 | 421 | "but you will need to restart your terminal to use " | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,16 @@ | |||
| 20 | 20 | _native.coinitialize() | |
| 21 | 21 | ||
| 22 | 22 | ||
| 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 | + | ||
| 23 | 33 | # Importing in order carefully to ensure the variables we override are handled | |
| 24 | 34 | # correctly by submodules. | |
| 25 | 35 | import manage | |
| Back | FazBrowse Home | New Git URL |
0 commit comments