GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PYTHON_FOR_REGEN only works with Python 3.10 or newer · Issue #104487 · python/cpython

PYTHON_FOR_REGEN only works with Python 3.10 or newer #104487

New issue
Copy link
New issue
Copy link
Closed
#104488
Closed
PYTHON_FOR_REGEN only works with Python 3.10 or newer#104487
#104488
Copy link
Labels
buildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@erlend-aasland
erlend-aasland
opened on May 14, 2023
Issue body actions

On current main, PYTHON_FOR_REGEN only works with Python 3.10 or newer.

Previously, we've tried to maintain backwards compatibility with older Python versions in our build system. Last time we adjusted PYTHON_FOR_REGEN (gh-98988), we deliberately did not bump the minimal version requirements; our configure checks for Python 3.11 through Python 3.6.

While working on gh-104050, a discussion about version requirements came up, and we found out that on main, make clinic only works when PYTHON_FOR_REGEN is Python 3.10 or newer. Also, the newly introduced "generate cases script" uses pattern matching and uses newly introduced typing features. Per now, PYTHON_FOR_REGEN must be 3.10 or newer.

There are two solution to this:

  1. bump the PYTHON_FOR_REGEN version requirements to 3.10 in configure
  2. amend the problematic build scripts, so older Python versions are still supported

Personally, I think I'm leaning towards the former. Apparently no core dev, triager or other contributor has noticed this issue until now. No buildbot has failed (we don't test the minimum required version; perhaps we should). OTOH, I understand that it makes stuff like bootstrapping slightly more cumbersome.

Anyway, we should probably at least bump the version requirement from Python 3.6 to 3.8.

Linked PRs

  • gh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 #104488
Reacted by Jelle Zijlstra and Alex Waygood

Activity

  1. erlend-aasland
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    buildThe build process and cross-buildThe build process and cross-build
    on May 14, 2023
  2. erlend-aasland commented on May 14, 2023

    @erlend-aasland
    erlend-aasland
    on May 14, 2023
    ContributorAuthor
    More actions

    cc. @AlexWaygood, @JelleZijlstra, @hugovk

  3. AlexWaygood commented on May 14, 2023

    @AlexWaygood
    AlexWaygood
    on May 14, 2023
    Member
    More actions

    (FWIW, this issue was originally highlighted by running mypy on Tools/clinic with --python-version=3.8, which pointed out that clinic.py currently makes regular use of types.NoneType, a symbol that's new in Python 3.10.)

  4. erlend-aasland commented on May 14, 2023

    @erlend-aasland
    erlend-aasland
    on May 14, 2023
    ContributorAuthor
    More actions

    cc. @gvanrossum and @iritkatriel for Tools/cases_generator/

  5. erlend-aasland commented on May 14, 2023

    @erlend-aasland
    erlend-aasland
    on May 14, 2023
    ContributorAuthor
    More actions

    Related:

    • CI: "Tests / Check if generated files are up to date" failed #99016
    • gh-99016: Make build scripts compatible with Python 3.8 #99017
  6. erlend-aasland
    added a commit that references this issue on May 14, 2023

    pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.8

    b84cb0e
  7. gvanrossum commented on May 15, 2023

    @gvanrossum
    gvanrossum
    on May 15, 2023
    Member
    More actions

    I’m reluctant to have to dumb down the cases generator to 3.8. Can we please just bump the required version to 3.10? As you say there isn’t much need for earlier versions, apparently.

    Reacted by Alex Waygood and Erlend E. Aasland
    Reacted by Erlend E. Aasland
  8. erlend-aasland commented on May 15, 2023

    @erlend-aasland
    erlend-aasland
    on May 15, 2023
    ContributorAuthor
    More actions

    I've updated my PR with Python 3.10 as the minimum version, and I also included Python 3.12 in the list.

  9. sobolevn commented on May 15, 2023

    @sobolevn
    sobolevn
    on May 15, 2023
    Member
    More actions

    I also agree with bumping minimal version to 3.10 (as I said in the original issue).
    I cannot imagine real-life use-cases when you need to compile the most recent Python version from source, but at the same time you don't have an access to at least 3.10

    Plus, this makes writting code much more pleasant due to new typing + syntax features.

    @erlend-aasland thanks for raising this! 👍

  10. erlend-aasland commented on May 15, 2023

    @erlend-aasland
    erlend-aasland
    on May 15, 2023
    ContributorAuthor
    More actions

    I cannot imagine real-life use-cases when you need to compile the most recent Python version from source, but at the same time you don't have an access to at least 3.10

    Bootstrapping Python on a new platform.

    Come to think of it, you probably won't use PYTHON_FOR_REGEN when building from a clean check-out anyways. You'd only need it for regenerating stuff you touched, and in that case, you can point PYTHON_FOR_REGEN to for example ./python.exe in the build dir.

  11. erlend-aasland
    linked a pull request that will close this issuegh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 #104488on May 15, 2023
  12. erlend-aasland
    added a commit that references this issue on May 15, 2023

    gh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (#104488)

    146106a
  13. erlend-aasland commented on May 15, 2023

    @erlend-aasland
    erlend-aasland
    on May 15, 2023
    ContributorAuthor
    More actions

    Resolved with:

    • gh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 #104488
  14. erlend-aasland
    closed this as completedon May 15, 2023
  15. carljm
    added 2 commits that reference this issue on May 15, 2023

    Merge branch 'main' into supermon

    343867a

    Merge branch 'main' into cached_property_docs

    452d9f5
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

    buildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.