Skip to content

[3.8] bpo-1812: Fix newline conversion when doctest.testfile loads from a package whose loader has a get_data method (GH-17385)#19175

Merged
miss-islington merged 1 commit intopython:3.8from
miss-islington:backport-e0b8101-3.8
Mar 26, 2020
Merged

[3.8] bpo-1812: Fix newline conversion when doctest.testfile loads from a package whose loader has a get_data method (GH-17385)#19175
miss-islington merged 1 commit intopython:3.8from
miss-islington:backport-e0b8101-3.8

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Mar 26, 2020

This pull request fixes the newline conversion bug originally reported in bpo-1812. When that issue was originally submitted, the open builtin did not default to universal newline mode; now it does, which makes the issue fix simpler, since the only code path that needs to be changed is the one in doctest._load_testfile where the file is loaded from a package whose loader has a get_data method.
(cherry picked from commit e0b8101)

Co-authored-by: Peter Donis peterdonis@alum.mit.edu

https://bugs.python.org/issue1812

…ackage whose loader has a get_data method (pythonGH-17385)

This pull request fixes the newline conversion bug originally reported in bpo-1812. When that issue was originally submitted, the open builtin did not default to universal newline mode; now it does, which makes the issue fix simpler, since the only code path that needs to be changed is the one in doctest._load_testfile where the file is loaded from a package whose loader has a get_data method.
(cherry picked from commit e0b8101)

Co-authored-by: Peter Donis <peterdonis@alum.mit.edu>
@miss-islington
Copy link
Contributor Author

@pdonis and @zware: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit b05fbe9 into python:3.8 Mar 26, 2020
@miss-islington miss-islington deleted the backport-e0b8101-3.8 branch March 26, 2020 16:18
@miss-islington
Copy link
Contributor Author

@pdonis and @zware: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@pdonis and @zware: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants