diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-03-26 16:18:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-26 16:18:52 (GMT) |
commit | b05fbe9f374bc660af3c589a1146b2026606d442 (patch) | |
tree | 2d86c47a18833500a9d4d6351065bf512a4d7d5f /Misc | |
parent | 96686c761d0587080effc113367431a0d396eb45 (diff) | |
download | cpython-b05fbe9f374bc660af3c589a1146b2026606d442.zip cpython-b05fbe9f374bc660af3c589a1146b2026606d442.tar.gz cpython-b05fbe9f374bc660af3c589a1146b2026606d442.tar.bz2 |
bpo-1812: Fix newline conversion when doctest.testfile loads from a package whose loader has a get_data method (GH-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 e0b8101492f6c61dee831425b4d3dae39a953599)
Co-authored-by: Peter Donis <peterdonis@alum.mit.edu>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Tests/2019-11-25-21-46-47.bpo-1812.sAbTbY.rst | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -412,6 +412,7 @@ Walter Dörwald Jaromir Dolecek Zsolt Dollenstein Brendan Donegan +Peter Donis Ismail Donmez Ray Donnelly Robert Donohue diff --git a/Misc/NEWS.d/next/Tests/2019-11-25-21-46-47.bpo-1812.sAbTbY.rst b/Misc/NEWS.d/next/Tests/2019-11-25-21-46-47.bpo-1812.sAbTbY.rst new file mode 100644 index 0000000..7ffe90d --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2019-11-25-21-46-47.bpo-1812.sAbTbY.rst @@ -0,0 +1,2 @@ +Fix newline handling in doctest.testfile when loading from a package whose +loader has a get_data method. Patch by Peter Donis. |