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

global .pdbrc on windows 7 not reachable out of the box #64722

Closed
mbyt mannequin opened this issue Feb 5, 2014 · 6 comments
Closed

global .pdbrc on windows 7 not reachable out of the box #64722

mbyt mannequin opened this issue Feb 5, 2014 · 6 comments
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes OS-windows stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@mbyt
Copy link
Mannequin

mbyt mannequin commented Feb 5, 2014

BPO 20523
Nosy @birkenfeld, @tjguk, @wiggin15, @zware, @zooba, @miss-islington
PRs
  • bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME #11846
  • bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME #11847
  • bpo-20523: pdb.Pdb can read the global ~/.pdbrc file on Windows 7 #11855
  • [3.7] bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847) #15084
  • [3.8] bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847) #15085
  • Files
  • pdb.diff: pdb diff
  • 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 = <Date 2019-08-03.14:39:49.796>
    created_at = <Date 2014-02-05.21:57:33.472>
    labels = ['3.7', '3.8', '3.9', 'type-feature', 'library', 'OS-windows']
    title = 'global .pdbrc on windows 7 not reachable out of the box'
    updated_at = <Date 2019-08-03.14:39:49.795>
    user = 'https://bugs.python.org/mbyt'

    bugs.python.org fields:

    activity = <Date 2019-08-03.14:39:49.795>
    actor = 'steve.dower'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-08-03.14:39:49.796>
    closer = 'steve.dower'
    components = ['Library (Lib)', 'Windows']
    creation = <Date 2014-02-05.21:57:33.472>
    creator = 'mbyt'
    dependencies = []
    files = ['33935']
    hgrepos = []
    issue_num = 20523
    keywords = ['patch']
    message_count = 6.0
    messages = ['210349', '235815', '235900', '348924', '348925', '348927']
    nosy_count = 7.0
    nosy_names = ['georg.brandl', 'tim.golden', 'wiggin15', 'zach.ware', 'steve.dower', 'mbyt', 'miss-islington']
    pr_nums = ['11846', '11847', '11855', '15084', '15085']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue20523'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @mbyt
    Copy link
    Mannequin Author

    mbyt mannequin commented Feb 5, 2014

    The global .pdbrc file is determined by the %HOME% environment variable. However, this is not available out of the box on e.g. windows 7 systems. Here only %HOMEDRIVE% and %HOMEPATH% are defined.

    Thus the usual approach to have a global .pdbrc file on windows is to define a %HOME% environment variable by hand. This could be avoided if the global .pdbrc would be determined by os.path.expanduser("~/.pdbrc"), which works on current windows and does the magic behind.

    There are two possible approaches to improve this situation:

    • explicitly mention in the docs that on windows a %HOME% varialbe need to be created manually
    • patch pdb.py to use os.path.expanduser instead (see attached diff)

    For reference, see also old discussion https://mail.python.org/pipermail/python-list/2005-October/349550.html.

    @mbyt mbyt mannequin added the type-feature A feature request or enhancement label Feb 5, 2014
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Feb 12, 2015

    We have a patch to review or we need a doc patch, unless someone has a different idea to the approaches suggested by the originator. I prefer the idea of changing the code, manually changing environment variables just seems wrong to me, but I won't lose any sleep over it.

    @BreamoreBoy BreamoreBoy mannequin added stdlib Python modules in the Lib dir OS-windows labels Feb 12, 2015
    @zooba
    Copy link
    Member

    zooba commented Feb 13, 2015

    expanduser() sounds like the better choice here.

    @zooba zooba added 3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes labels Aug 2, 2019
    @zooba
    Copy link
    Member

    zooba commented Aug 2, 2019

    New changeset 7ea9a85 by Steve Dower (Timothy Hopper) in branch 'master':
    bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)
    7ea9a85

    @miss-islington
    Copy link
    Contributor

    New changeset 1ff7dd6 by Miss Islington (bot) in branch '3.7':
    bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)
    1ff7dd6

    @miss-islington
    Copy link
    Contributor

    New changeset 79af3bd by Miss Islington (bot) in branch '3.8':
    bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)
    79af3bd

    @zooba zooba closed this as completed Aug 3, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes OS-windows stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants