]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35066: _dateime.datetime.strftime copies trailing '%' (GH-10692)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 14 Jan 2019 10:41:33 +0000 (02:41 -0800)
committerGitHub <noreply@github.com>
Mon, 14 Jan 2019 10:41:33 +0000 (02:41 -0800)
commit26122de1a80d1618ee80862cf3b8f73f8ec7d9cf
treeb62038f2577b217d895530138f5c690b2b066f25
parent890d3fa10c68af6306cf6b989b2133978e6e7a12
bpo-35066: _dateime.datetime.strftime copies trailing '%' (GH-10692)

Previously, calling the strftime() method on a datetime object with a
trailing '%' in the format string would result in an exception. However,
this only occured when the datetime C module was being used; the python
implementation did not match this behavior. Datetime is now PEP-399
compliant, and will not throw an exception on a trailing '%'.
(cherry picked from commit 454b3d4ea246e8751534e105548d141ed7b0b032)

Co-authored-by: MichaelSaah <mike.saah@gmail.com>
Lib/test/datetimetester.py
Misc/NEWS.d/next/Library/2018-11-29-09-38-40.bpo-35066.Nwej2s.rst [new file with mode: 0644]
Modules/_datetimemodule.c