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: test_time needs to handle '+' at the beginning of large years
Type: Stage: resolved
Components: Tests Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, miss-islington
Priority: normal Keywords: patch

Created on 2018-09-12 22:39 by benjamin.peterson, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9238 merged benjamin.peterson, 2018-09-12 22:47
PR 9245 merged miss-islington, 2018-09-12 23:21
PR 9246 merged miss-islington, 2018-09-12 23:21
Messages (4)
msg325203 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2018-09-12 22:39
POSIX allows the '%Y' format in strftime to start with a '+' sign for years with more than 4 digits. test_time is not tolerant of that, which leads to failures like this with musl:

======================================================================
FAIL: test_large_year (test.test_time.TestStrftime4dyear)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-alpine/build/Lib/test/test_time.py", line 683, in test_large_year
    return super().test_large_year()
  File "/buildbot/buildarea/3.x.ware-alpine/build/Lib/test/test_time.py", line 706, in test_large_year
    self.assertEqual(self.yearstr(12345), '12345')
AssertionError: '+12345' != '12345'
- +12345
? -
+ 12345
msg325209 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2018-09-12 23:21
New changeset e1a34ceb541ef87e03bb428630097dacc9c658e5 by Benjamin Peterson in branch 'master':
closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)
https://github.com/python/cpython/commit/e1a34ceb541ef87e03bb428630097dacc9c658e5
msg325215 - (view) Author: miss-islington (miss-islington) Date: 2018-09-12 23:54
New changeset ea2fcd3db65b796ad3eda1619a903cefb1aa9363 by Miss Islington (bot) in branch '3.7':
closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)
https://github.com/python/cpython/commit/ea2fcd3db65b796ad3eda1619a903cefb1aa9363
msg325217 - (view) Author: miss-islington (miss-islington) Date: 2018-09-13 00:06
New changeset 21a808230aa33741f1dd9bf38f0e283c1b72210e by Miss Islington (bot) in branch '3.6':
closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)
https://github.com/python/cpython/commit/21a808230aa33741f1dd9bf38f0e283c1b72210e
History
Date User Action Args
2022-04-11 14:59:05adminsetgithub: 78835
2018-09-13 00:06:57miss-islingtonsetmessages: + msg325217
2018-09-12 23:54:14miss-islingtonsetnosy: + miss-islington
messages: + msg325215
2018-09-12 23:21:56miss-islingtonsetpull_requests: + pull_request8677
2018-09-12 23:21:49miss-islingtonsetpull_requests: + pull_request8676
2018-09-12 23:21:43benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg325209

stage: patch review -> resolved
2018-09-12 22:47:58benjamin.petersonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request8669
2018-09-12 22:39:41benjamin.petersoncreate