Skip to content

OS-specific frozen modules are built, even on other OSes. #89436

Open

Description

@ericsnowcurrently
BPO 45273
Nosy @gvanrossum, @ericsnowcurrently, @zooba
PRs
  • bpo-45850: Implement deep-freeze on Windows #29648
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/ericsnowcurrently'
    closed_at = None
    created_at = <Date 2021-09-23.17:31:45.907>
    labels = ['interpreter-core', 'type-bug', '3.11']
    title = 'OS-specific frozen modules are built, even on other OSes.'
    updated_at = <Date 2021-11-20.00:28:14.846>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2021-11-20.00:28:14.846>
    actor = 'gvanrossum'
    assignee = 'eric.snow'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2021-09-23.17:31:45.907>
    creator = 'eric.snow'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45273
    keywords = ['patch']
    message_count = 2.0
    messages = ['402514', '402515']
    nosy_count = 3.0
    nosy_names = ['gvanrossum', 'eric.snow', 'steve.dower']
    pr_nums = ['29648']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45273'
    versions = ['Python 3.11']

    Activity

    1. ericsnowcurrently commented on Sep 23, 2021

      @ericsnowcurrently
      MemberAuthor

      The list of frozen modules in Python/frozen.c is generated by Tools/scripts/freeze_modules.py. Currently we freeze both posixpath and ntpath, even though for startup we only need one of the two (depending on the OS). In this case both modules are available on all platforms (and only os.path differs), so we might be okay to leave both frozen. The cost isn't high.

      However, we may need to accommodate freezing a module only on a subset of supported OSes:

      • if the extra cost (to the size of the executable) is too high
      • if there's an OS-specific module that is only available on that OS

      In that case, we'd need to generate the appropriate ifdefs in Python/frozen.c. We can't just exclude the module during generation since frozen.c is committed to the repo.

    2. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      type-bugAn unexpected behavior, bug, or error
      3.11only security fixes
      on Sep 23, 2021
    3. ericsnowcurrently commented on Sep 23, 2021

      @ericsnowcurrently
      MemberAuthor

      FYI, currently os.path is also frozen and *is* OS-specific. However, that's a separate matter. See bpo-45272.

    4. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Labels

    3.11only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions