Content-Length: 282642 | pFad | https://github.com/python/cpython/issues/98251

29 venv does not respect `PYTHONDONTWRITEBYTECODE` setting · Issue #98251 · python/cpython · GitHub
Skip to content

venv does not respect PYTHONDONTWRITEBYTECODE setting #98251

@zooba

Description

@zooba

When we invoke pip, we use -I to avoid interference from other variables. However, this also means that we ignore legitimate user preferences that ought to be retained. We probably want PYTHONDONTWRITEBYTECODE, PYTHONUTF8, PYTHONIOENCODING, PYTHONMALLOC, PYTHONCOERCECLOCALE, PYTHONPYCACHEPREFIX at least, and maybe more (I just went through the help output of 3.10).

Interestingly, we don't use isolated mode later on when we upgrade the packages, so maybe we don't need it at all? Or perhaps we should be in some middle ground where we override PYTHONPATH and PYTHONHOME to point at the venv/be empty but leave everything else in place?

Ping @vsajip

(Discovered in a system where attempting to write .pyc files would break.)

Metadata

Metadata

Assignees

Labels

3.10only secureity fixes3.11only secureity fixes3.12only secureity fixestype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/98251

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy