This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: doctest should have lib2to3 integration
Type: enhancement Stage: resolved
Components: 2to3 (2.x to 3.x conversion tool), Library (Lib) Versions: Python 3.8, Python 3.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, bhy, collinwinter, eric.araujo, matrixise, scoder, tim.peters
Priority: low Keywords:

Created on 2008-06-01 14:37 by scoder, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg67594 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2008-06-01 14:37
Running a doctest with Py2 syntax in Py3 currently involves either
running the 2to3 tool by hand or writing code to convert the doctest
using lib2to3, and then running the modified version. This basically
pushes the burden of automating this step in any test runner script in
the world onto the authors or users of these scripts.

Writing portable code is hard enough, but writing portable doctests that
remain user readable should not remain as hard as it currently is. The
doctest module in Py3 should have a simple option to run a Py2 doctest
(in a file or doc string) without requiring users to write the glue code
for it.

On a related note, if a 3to2 tool becomes available, this should be
directly supported by doctest in Py2.6.
msg116566 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-09-16 16:06
Is this still valid, can it be closed as out of date or what?
msg116608 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-09-16 20:31
Still valid IMO.
msg342465 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-05-14 14:25
I move this issue to the last stable 3.7 and master.
msg342485 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2019-05-14 16:39
I'm closing this old ticket. Python 2 will be dead by the time someone gets around to do something about it.
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47270
2019-05-14 16:39:54scodersetstatus: open -> closed
resolution: out of date
messages: + msg342485

stage: resolved
2019-05-14 14:25:27matrixisesetnosy: + matrixise

messages: + msg342465
versions: + Python 3.7, Python 3.8, - Python 3.2
2014-02-03 19:44:21BreamoreBoysetnosy: - BreamoreBoy
2010-09-16 20:32:48eric.araujosetnosy: + tim.peters, benjamin.peterson

versions: + Python 3.2, - Python 3.0
2010-09-16 20:31:14eric.araujosetmessages: + msg116608
2010-09-16 16:06:01BreamoreBoysetnosy: + BreamoreBoy
messages: + msg116566
2010-01-31 16:20:21eric.araujosetnosy: + eric.araujo
2009-05-27 19:22:23bhysetnosy: + bhy
2008-11-26 15:49:08benjamin.petersonsetpriority: low
assignee: collinwinter ->
2008-06-01 14:37:26scodercreate