]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client (GH-28765) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 13 Oct 2021 18:00:05 +0000 (11:00 -0700)
committerGitHub <noreply@github.com>
Wed, 13 Oct 2021 18:00:05 +0000 (20:00 +0200)
commit9210eff61b75edabbe9263df0c4a303fc2149a22
tree4440385025ce0f3a14553ebbc9db2b4717ab046d
parent5d747130933a25a3984f78ae32d2e74a0d2dc5d1
bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client (GH-28765) (GH-28935)

At import time, the xmlrpc.client module uses different date formats to
test strftime so it can format years with 4 digits consistently.
Depending on the underlying C library and its strftime implementation
some of these calls can result in ValueErrors, blocking the
xmlrpc.client module from being imported.

This commit changes the behavior of this bit of code to react to
ValueError exceptions, treating the format that caused them as an
non-viable option.
(cherry picked from commit 1c831353816ff699b54e804047a7242a09e98f5b)

Co-authored-by: rtobar <rtobarc@gmail.com>
Lib/xmlrpc/client.py
Misc/NEWS.d/next/Library/2021-10-07-00-05-05.bpo-45386.q9ORpA.rst [new file with mode: 0644]