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 — -X frozen_modules=on|off should be configurable with environment variable · Issue #98697 · python/cpython

-X frozen_modules=on|off should be configurable with environment variable #98697

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
-X frozen_modules=on|off should be configurable with environment variable#98697
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

Description

@virtuald
virtuald
opened on Oct 26, 2022
Issue body actions

Feature or enhancement

-X frozen_modules=on|off should be configurable with environment variable

Pitch

The crossenv project provides the ability to generate virtualenvs that are customized to allow very simple cross-compilation, by mixing pieces of a host-native python and the right configuration variables from a cross-compiled python. Python 3.11 broke it in a few ways, but in particular the way that it injects its hooks is by overriding the contents of site.py, which is now included in a frozen module by default. To allow the patching to continue working, we have to add the -X option to the python command line each time it starts. This is doable, but it would be much simpler if we could just set an environment variable to disable the frozen modules.

Many other -X options are configurable through an environment variable, it seems like this one should too. Maybe PYUSEFROZENMODULES=0|1?

Note: yes, crossenv does a lot of dirty tricks to do its work, but I've tried several cross-compilation approaches and it's the easiest I've used by far.

Previous discussion

No prior discussion, seems like a small enough feature that is an easy yes/no?

Activity

  1. virtuald
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Oct 26, 2022
  2. kumaraditya303 commented on Oct 26, 2022

    @kumaraditya303
    kumaraditya303
    on Oct 26, 2022
    Contributor
    More actions

    It's too late to add this to 3.11 as this is new feature and 3.11 is final now.

    cc @gvanrossum @ericsnowcurrently

  3. kumaraditya303
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Oct 26, 2022
  4. gvanrossum commented on Oct 27, 2022

    @gvanrossum
    gvanrossum
    on Oct 27, 2022
    Member
    More actions

    If you submit a PR that references this issue we could add this to 3.12; alas, for 3.11 it's too late, as Kumar says. I don't have the bandwidth to do anything myself.

  5. virtuald
    closed this as completedon Feb 12, 2023
  6. terryjreedy
    closed this as not plannedon Feb 12, 2023
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

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

    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.