← 输入框|github.com|刷新
Skip to content

PyConfig #2631

Open
Open

Description

@filmor

3.7 has been obsolete for a while, with 3.8 onwards we can use https://peps.python.org/pep-0587/ to set the startup configuration, allowing (finally) for proper configuration of venvs.

From 3.14, we could even use the PyInitConfig mechanism from PEP741, which gives us full control over the initialization. For now, we'll just hardcode the offsets, similar to how we store the offsets in the PyHEAPTYPE struct :/

Activity

  1. filmor commented on Oct 24, 2025

    @filmor
    MemberAuthor

    I think we might skip this and go directly for the Python 3.14 mechanism which does not require us to keep offsets into structs (yay!). For versions before 3.15, setting ProgramName should do the trick and we might be able to simplify things. My idea is to derive it (and also the runtime DLL) automatically from "normal" venvs that set VIRTUAL_ENV.

  2. filmor commented on Dec 6, 2025

    @filmor
    MemberAuthor

    PyPreConfig is separate from this, should be implemented as well.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions