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.

Author Julian
Recipients Julian, p-ganssle
Date 2021-08-24.20:32:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629837138.94.0.0862501406939.issue44994@roundup.psfhosted.org>
In-reply-to
Content
This line (which contains a non-ASCII digit):

    python3.9 -c "import datetime; datetime.date.fromisoformat('1963-06-1৪')"

raises:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ValueError: Invalid isoformat string: '1963-06-1৪'

under the C implementation of the datetime module, but when the pure Python implementation is the one imported, succeeds (and produces `datetime.date(1963, 6, 14)`)

The pure Python implementation should instead explicitly check and raise when encountering a non-ASCII string.

(On PyPy, which always uses the pure-Python implementation, this contributes to a behavioral difference)
History
Date User Action Args
2021-08-24 20:32:18Juliansetrecipients: + Julian, p-ganssle
2021-08-24 20:32:18Juliansetmessageid: <1629837138.94.0.0862501406939.issue44994@roundup.psfhosted.org>
2021-08-24 20:32:18Julianlinkissue44994 messages
2021-08-24 20:32:18Juliancreate