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

Fix for test_netrc on Windows #45686

Closed
tiran opened this issue Oct 27, 2007 · 3 comments
Closed

Fix for test_netrc on Windows #45686

tiran opened this issue Oct 27, 2007 · 3 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@tiran
Copy link
Member

tiran commented Oct 27, 2007

BPO 1345
Nosy @gvanrossum, @tiran
Superseder
  • bpo-1395: py3k: duplicated line endings when using read(1)
  • 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 2007-11-06.02:18:37.916>
    created_at = <Date 2007-10-27.21:45:48.631>
    labels = ['invalid', 'type-bug', 'library']
    title = 'Fix for test_netrc on Windows'
    updated_at = <Date 2008-01-06.22:29:45.357>
    user = 'https://github.com/tiran'

    bugs.python.org fields:

    activity = <Date 2008-01-06.22:29:45.357>
    actor = 'admin'
    assignee = 'none'
    closed = True
    closed_date = <Date 2007-11-06.02:18:37.916>
    closer = 'christian.heimes'
    components = ['Library (Lib)']
    creation = <Date 2007-10-27.21:45:48.631>
    creator = 'christian.heimes'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 1345
    keywords = ['patch']
    message_count = 3.0
    messages = ['56863', '56917', '56960']
    nosy_count = 2.0
    nosy_names = ['gvanrossum', 'christian.heimes']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = None
    status = 'closed'
    superseder = '1395'
    type = 'behavior'
    url = 'https://bugs.python.org/issue1345'
    versions = ['Python 3.0']

    @tiran
    Copy link
    Member Author

    tiran commented Oct 27, 2007

    Index: Lib/test/test_netrc.py
    ===================================================================

    --- Lib/test/test_netrc.py      (revision 58695)
    +++ Lib/test/test_netrc.py      (working copy)
    @@ -25,7 +25,7 @@
             mode = 'w'
             if sys.platform not in ['cygwin']:
                 mode += 't'
    -        fp = open(temp_filename, mode)
    +        fp = open(temp_filename, mode, newline='')
             fp.write(TEST_NETRC)
             fp.close()

    @tiran tiran added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Oct 27, 2007
    @gvanrossum
    Copy link
    Member

    Are you sure this is the proper fix? Why does netrc.py insist on not
    having \r\n line endings? It opens the file in text mode so I don't
    quite understand your patch.

    @tiran
    Copy link
    Member Author

    tiran commented Oct 30, 2007

    Guido van Rossum wrote:

    Are you sure this is the proper fix? Why does netrc.py insist on not
    having \r\n line endings? It opens the file in text mode so I don't
    quite understand your patch.

    I don't quite understand why it fails. :/ I've to take more time to
    debug it.

    Christian

    @tiran tiran closed this as completed Nov 6, 2007
    @tiran tiran added the invalid label Nov 6, 2007
    @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

    2 participants