Message282330
Here is a patch that makes all Doc/library/datetime.rst doctests pass. The tests only pass with Python 3.6 and 3.7 (the optional ``timespec`` argument of ``datetime.isoformat()`` has been introduced in Python 3.6).
To apply the patch you should agree with issue 28863. In particular, to make the patch effective, as explained in issue 28863, you should:
* apply the Doc/conf.py patch of issue 28863.
* rename Doc/includes/tzinfo-examples.py to Doc/includes/tzinfo_examples.py
About the Raymond disappointment expressed in #10225, I see two ways to make both Raymond happy and the code examples tested. For the examples included from Doc/includes, using the ``literalinclude`` Sphinx directive, we can just add the Doc/includes path in Doc/conf.py (see issue 28863). At this point we can import them in the shell code examples (or in the ``setupcode``). In the datetime.rst.patch in attachment, I make use of this solution. Another option, for short snippets of code, not included from Doc/includes, is to use the ``testcode`` Sphinx directive. |
|
Date |
User |
Action |
Args |
2016-12-04 10:53:44 | marco.buttu | set | recipients:
+ marco.buttu, brett.cannon, terry.reedy, r.david.murray, python-dev, berker.peksag, zach.ware, JelleZijlstra |
2016-12-04 10:53:43 | marco.buttu | set | messageid: <1480848823.99.0.540966385129.issue27200@psf.upfronthosting.co.za> |
2016-12-04 10:53:43 | marco.buttu | link | issue27200 messages |
2016-12-04 10:53:43 | marco.buttu | create | |
|