Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.9] bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client (GH-28765) #28935

Merged
merged 1 commit into from Oct 13, 2021

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 13, 2021

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 1c83135)

Co-authored-by: rtobar rtobarc@gmail.com

https://bugs.python.org/issue45386

…ythonGH-28765)

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 1c83135)

Co-authored-by: rtobar <rtobarc@gmail.com>
@miss-islington
Copy link
Contributor Author

@rtobar and @ambv: Status check is done, and it's a success ✅ .

@ambv ambv merged commit 9210eff into python:3.9 Oct 13, 2021
@miss-islington miss-islington deleted the backport-1c83135-3.9 branch October 13, 2021 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants