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

urlparse & nfs url (rfc 2224) #49212

Closed
yuhl mannequin opened this issue Jan 16, 2009 · 6 comments
Closed

urlparse & nfs url (rfc 2224) #49212

yuhl mannequin opened this issue Jan 16, 2009 · 6 comments
Assignees
Labels
extension-modules C modules in the Modules dir type-feature A feature request or enhancement

Comments

@yuhl
Copy link
Mannequin

yuhl mannequin commented Jan 16, 2009

BPO 4962
Nosy @orsenthil
Files
  • issue4962-py27.diff
  • issue4962-py3k.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 = 'https://github.com/orsenthil'
    closed_at = <Date 2009-03-30.22:51:37.815>
    created_at = <Date 2009-01-16.10:28:24.036>
    labels = ['extension-modules', 'type-feature']
    title = 'urlparse & nfs url (rfc 2224)'
    updated_at = <Date 2009-03-30.22:51:37.814>
    user = 'https://bugs.python.org/yuhl'

    bugs.python.org fields:

    activity = <Date 2009-03-30.22:51:37.814>
    actor = 'orsenthil'
    assignee = 'orsenthil'
    closed = True
    closed_date = <Date 2009-03-30.22:51:37.815>
    closer = 'orsenthil'
    components = ['Extension Modules']
    creation = <Date 2009-01-16.10:28:24.036>
    creator = 'yuhl'
    dependencies = []
    files = ['13490', '13491']
    hgrepos = []
    issue_num = 4962
    keywords = ['patch']
    message_count = 6.0
    messages = ['79946', '79950', '80150', '84656', '84658', '84671']
    nosy_count = 4.0
    nosy_names = ['jhylton', 'jjlee', 'orsenthil', 'yuhl']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue4962'
    versions = []

    @yuhl
    Copy link
    Mannequin Author

    yuhl mannequin commented Jan 16, 2009

    Hi,

    I'd like to add the ability to parse nfs url (rfc2224). Which look like:
    nfs://server/my/path

    To do this, we only need to add 'nfs' in uses_netloc to make it work

    cEd

    @yuhl yuhl mannequin added extension-modules C modules in the Modules dir type-feature A feature request or enhancement labels Jan 16, 2009
    @orsenthil
    Copy link
    Member

    I'd like to add the ability to parse nfs url (rfc2224). Which look like:
    nfs://server/my/path

    To do this, we only need to add 'nfs' in uses_netloc to make it work

    Do you encounter any errors or weird behaviors while using nfs url?
    The RFC2224 for NFS just says it is for local and network files and
    in turn uses specification in RFC 1738 "Uniform Resource Locators".
    So, I don't think any problem or breakage should occur with NFS

    ('nfs', '', '//server//a/b/c/d/e/f', '', '', '')

    If you have done the research already, can you please explain what
    difference will adding 'nfs' to uses_netloc do in urlparse.py.

    @yuhl
    Copy link
    Mannequin Author

    yuhl mannequin commented Jan 19, 2009

    Do you encounter any errors or weird behaviors while using nfs url?

    Do you mean: Do I have problem using the python module in conjunction of
    urlparse ?
    No, because, I'm not yet using it. But I would like to do it. And I find
    it strange that it can not find the host by itself.

    ('nfs', '', '//server//a/b/c/d/e/f', '', '', '')
    If you have done the research already, can you please explain what
    difference will adding 'nfs' to uses_netloc do in urlparse.py.

    As much as I've looked at the code, the uses_netloc provide an easy way
    to tell urlparse.py if such scheme as nfs is composed
    by a net location (host[:port]). Which is the case. Modifying
    uses_netloc by addind 'nfs' into it will transform the following:
    nfsurl : 'nfs://server//a/b/c/d/e/f'
    in urlparse from:
    ('nfs', '', '//server//a/b/c/d/e/f', '', '', '')
    to
    ('nfs', 'server', '//a/b/c/d/e/f', '', '', '')

    @orsenthil
    Copy link
    Member

    Patch to fix this. Looked into the RFCs and I do not find a reason why
    the nfs://server/path/to/file.txt should not be parsed as:

    >>> urlparse.urlsplit('nfs://server/path/to/file.txt')
    SplitResult(scheme='nfs', netloc='server', path='/path/to/file.txt',
    query='', fragment='')

    Patch and Tests added.

    @jhylton
    Copy link
    Mannequin

    jhylton mannequin commented Mar 30, 2009

    looks good to me

    @orsenthil
    Copy link
    Member

    fixed.

    @orsenthil orsenthil self-assigned this Mar 30, 2009
    @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
    extension-modules C modules in the Modules dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant