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.

classification
Title: Disallow fold not in [0, 1] in time and datetime constructors
Type: behavior Stage: resolved
Components: Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: belopolsky Nosy List: belopolsky, python-dev
Priority: normal Keywords:

Created on 2016-08-08 15:43 by belopolsky, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg272174 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2016-08-08 15:43
The current implementation does not restrict values accepted by the fold argument:

>>> from datetime import *
>>> time(fold=2)
datetime.time(0, 0, fold=2)
>>> datetime(1, 1, 1, fold=2)
datetime.datetime(1, 1, 1, 0, 0, fold=2)
msg272192 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-08-08 21:05
New changeset 035778fdc641 by Alexander Belopolsky in branch 'default':
Closes #27710: Disallow fold not in [0, 1] in time and datetime constructors.
https://hg.python.org/cpython/rev/035778fdc641
History
Date User Action Args
2022-04-11 14:58:34adminsetgithub: 71897
2016-08-08 21:05:45python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg272192

resolution: fixed
stage: resolved
2016-08-08 15:43:13belopolskycreate