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
datetime: Tests for potential crashes due to non-UTF-8-encodable strings #78663
Comments
This is a follow-up of bpo-34454. 'datetime' extension module attempts to encode input strings into UTF-8 in several places, which requires special care because some valid Python strings can't be represented in UTF-8. It makes sense to add more tests for methods dealing with strings. Note that my PR doesn't attempt to deal with bpo-34481. In cases where behavior differs between C and Python datetime impls the tests check only for absence of crashes. |
Somewhat related: bpo-6697. Turns out there are already some tests here for this, specifically for the C version only: https://github.com/python/cpython/blob/master/Lib/test/datetimetester.py#L3328 |
Thanks for the PR, Alexey! |
It seems like thie issue introduced a memory leak: bpo-35322 . |
The added test exposed a leak in unicode_encode_locale(). See msg330534. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: