Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows registry path not ignored with -E option #53147

Closed
flashk mannequin opened this issue Jun 5, 2010 · 10 comments
Closed

Windows registry path not ignored with -E option #53147

flashk mannequin opened this issue Jun 5, 2010 · 10 comments
Labels
3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@flashk
Copy link
Mannequin

flashk mannequin commented Jun 5, 2010

BPO 8901
Nosy @ncoghlan, @pitrou, @benjaminp, @merwok, @ericsnowcurrently, @zooba, @ZackerySpytz
PRs
  • bpo-8901: Windows registry path not ignored with the -E option #18169
  • Files
  • IgnoreWindowsRegistry_27.patch: Patch for 2.7
  • IgnoreWindowsRegistry_32.patch: Patch for 3.2
  • 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 = None
    closed_at = None
    created_at = <Date 2010-06-05.02:39:23.706>
    labels = ['interpreter-core', 'type-bug', '3.9']
    title = 'Windows registry path not ignored with -E option'
    updated_at = <Date 2020-03-30.16:06:33.221>
    user = 'https://bugs.python.org/flashk'

    bugs.python.org fields:

    activity = <Date 2020-03-30.16:06:33.221>
    actor = 'steve.dower'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2010-06-05.02:39:23.706>
    creator = 'flashk'
    dependencies = []
    files = ['17558', '17559']
    hgrepos = []
    issue_num = 8901
    keywords = ['patch', 'needs review']
    message_count = 8.0
    messages = ['107121', '107244', '108468', '216183', '216189', '365212', '365328', '365329']
    nosy_count = 9.0
    nosy_names = ['jpe', 'ncoghlan', 'pitrou', 'benjamin.peterson', 'eric.araujo', 'flashk', 'eric.snow', 'steve.dower', 'ZackerySpytz']
    pr_nums = ['18169']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'commit review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue8901'
    versions = ['Python 3.9']

    @flashk
    Copy link
    Mannequin Author

    flashk mannequin commented Jun 5, 2010

    Hi,

    I noticed that Python still uses the Windows registry to initialize sys.path, when the -E option is used.

    From my understanding, this option is mostly used by programs that are running an embedded version of python, and don't want it to be affected by global installations. Ignoring the registry, along with environment variables, seems to be the correct behavior in this case.

    I asked about this on the python-dev list (http://mail.python.org/pipermail/python-dev/2010-June/100492.html) and was told to submit a patch for this if I wanted it fixed before the 2.7 release.

    I've included a patch for 2.7 and 3.2

    @flashk flashk mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Jun 5, 2010
    @merwok
    Copy link
    Member

    merwok commented Jun 6, 2010

    Looks good to me. Adding the release manager to the nosy list.

    @flashk
    Copy link
    Mannequin Author

    flashk mannequin commented Jun 23, 2010

    Any chance of getting this into 2.7 final? This fix is important for embedding Python in Windows applications.

    @jpe
    Copy link
    Mannequin

    jpe mannequin commented Apr 14, 2014

    Is still an issue with importlib? At this point, I don't think this change can be made on 2.7 or 3.2.

    @pitrou
    Copy link
    Member

    pitrou commented Apr 14, 2014

    I don't think importlib changed anything in that regard (since one of the goals was too keep compatibility with all the old behaviours).
    Indeed the patch probably needs to be retargetted for 3.5.

    @ZackerySpytz
    Copy link
    Mannequin

    ZackerySpytz mannequin commented Mar 28, 2020

    Steve, I've updated the pull request with the requested change. Please take a look.

    @ZackerySpytz ZackerySpytz mannequin added the 3.9 only security fixes label Mar 28, 2020
    @zooba
    Copy link
    Member

    zooba commented Mar 30, 2020

    New changeset 676b105 by Zackery Spytz in branch 'master':
    bpo-8901: Windows registry path is now ignored with the -E option (GH-18169)
    676b105

    @zooba
    Copy link
    Member

    zooba commented Mar 30, 2020

    I'm 99% satisfied that this change is the right approach (rather than adding a new option), but we'll have to wait to hear from beta feedback I think.

    My main concern is users who pass -E on the command line to avoid environment variables, but are relying on a Python install and not an embedded version. But for a regular install it should still find all the (site) libraries, so I think it'll be fine in basically every case.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @iritkatriel
    Copy link
    Member

    I think this can be closed.

    @iritkatriel iritkatriel added the pending The issue will be closed if no feedback is provided label May 19, 2022
    @zooba
    Copy link
    Member

    zooba commented May 20, 2022

    Apparently we never heard any feedback, so yeah

    @zooba zooba closed this as completed May 20, 2022
    @AA-Turner AA-Turner removed the pending The issue will be closed if no feedback is provided label May 28, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants