Skip to content

Need use python 3.9 or higher to compile CPython on Windows #94280

Closed

Description

@znsoooo

Environment:

  • CPython versions tested on: Python 3.12 (hash: c57a1c7 and many before, including alpha beta released version)
  • Operating system and architecture: Win 10 / 64 bit

Use command:

PCbuild\build.bat -e -d

Show log:

...
Using py -3.8 (found 3.8 with py.exe)
...
  _freeze_module.vcxproj -> H:\github\repos\cpython\PCbuild\win32\_freeze_module_d.exe
  Traceback (most recent call last):
    File "H:\github\repos\cpython\Tools\scripts\deepfreeze.py", line 445, in <module>
      def generate(args: list[str], output: TextIO) -> None:
  TypeError: 'type' object is not subscriptable
...

list[str] is an unsupported syntax before PY39, so build with PY38 will throw an error here.
If I make compatibility editing here, it will also generate errors in other places.
I think limiting the build to a higher version Python is a more appropriate option.

Activity

  1. added
    type-bug
    on Jun 25, 2022
  2. added a commit that references this issue on Jun 27, 2022
  3. added 2 commits that reference this issue on Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions