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

netrc throws NetrcParseError for record without 'password' #72966

Open
MarkWood mannequin opened this issue Nov 23, 2016 · 1 comment
Open

netrc throws NetrcParseError for record without 'password' #72966

MarkWood mannequin opened this issue Nov 23, 2016 · 1 comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@MarkWood
Copy link
Mannequin

MarkWood mannequin commented Nov 23, 2016

BPO 28780
Dependencies
  • bpo-28806: Improve the netrc library
  • 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 2016-11-23.16:18:23.195>
    labels = ['type-bug', 'library']
    title = "netrc throws NetrcParseError for record without 'password'"
    updated_at = <Date 2016-11-26.11:15:20.420>
    user = 'https://bugs.python.org/MarkWood'

    bugs.python.org fields:

    activity = <Date 2016-11-26.11:15:20.420>
    actor = 'xiang.zhang'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2016-11-23.16:18:23.195>
    creator = 'Mark Wood'
    dependencies = ['28806']
    files = []
    hgrepos = []
    issue_num = 28780
    keywords = []
    message_count = 1.0
    messages = ['281567']
    nosy_count = 1.0
    nosy_names = ['Mark Wood']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28780'
    versions = ['Python 3.4']

    @MarkWood
    Copy link
    Mannequin Author

    MarkWood mannequin commented Nov 23, 2016

    netrc.netrc() throws a NetrcParseError if ~/.netrc contains an entry witout a 'password' field. Other users of .netrc do not do this. In my case, I have entries for sftp hosts which will use public-key authentication instead of a password.

    What I would suggest is that if any or all of 'login', 'account', and 'password' are omitted, simply accept that and store a 0-length string.

    Someone on StackOverflow says he has rewritten netrc to fix various problems but doesn't know how to contribute it. http://stackoverflow.com/questions/28754547/python-netrc-error-on-file-with-comment

    @MarkWood MarkWood mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Nov 23, 2016
    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants