Skip to content

netrc should be able to ignore some tokens like 'protocol' #123735

@LucHermitte

Description

@LucHermitte

Feature or enhancement

Proposal:

netrc._parse() rejects unknown tokens.

So far so good except some tools like git also use netrc files for authentication purposes through git-credential-netrc helper.

The issue is that git-credential-netrc expects a few other tokens like protocol that are currently rejected by netrc._parse()

It would be nice to be able to just ignore those tokens instead of failing the parsing of the netrc file.

I can't tell whether we should just register these exact tokens as "to be ignored", or if it would be better to have a way for netrc users to register the tokens they wish to ignore.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

none found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions