-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: Fixed tm.set_locale
context manager, it could error and leak when category LC_ALL was used
#47570
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
BUG: Fixed tm.set_locale
context manager, it could error and leak when category LC_ALL was used
#47570
Changes from 7 commits
1cba2e9
149556f
59cd733
f692b5f
a651167
efcc805
d1f9cf9
b53796b
6b863c3
38b7e26
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -291,6 +291,7 @@ def test_to_datetime_format_microsecond(self, cache): | |
marks=pytest.mark.xfail( | ||
locale.getlocale()[0] in ("zh_CN", "it_IT"), | ||
reason="fail on a CI build with LC_ALL=zh_CN.utf8/it_IT.utf8", | ||
strict=False, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we just remove these xfails entirely? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, these tests are executed on other workers, and they pass. So they are important :) We should actually try to solve the issue (datetime parsing, separate topic) if we wish to remove the xfail mark There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we be make the xfail condition more specific? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is already quite specific: the test will be marked as xfail only if Note that I did not write this code, it was already there. But since there was a locale leakage bug, the zh_CN and it_IT locale was actually never active (even on the 2 corresponding CI workers) when hitting the code. This is why noone every needed to add the strict=False flag. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not clear to me why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is less specific IMO. See below : on test_to_time you use a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm okay with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
im not clear on what this path is. can you elaborate on this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
From your investigation @smarie fixing the datetime parsing would allow us to remove the xfail? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, fixing the parsing for these two locales would remove the xfail. |
||
), | ||
), | ||
pytest.param( | ||
|
@@ -300,6 +301,7 @@ def test_to_datetime_format_microsecond(self, cache): | |
marks=pytest.mark.xfail( | ||
locale.getlocale()[0] in ("zh_CN", "it_IT"), | ||
reason="fail on a CI build with LC_ALL=zh_CN.utf8/it_IT.utf8", | ||
strict=False, | ||
), | ||
), | ||
pytest.param( | ||
|
@@ -309,6 +311,7 @@ def test_to_datetime_format_microsecond(self, cache): | |
marks=pytest.mark.xfail( | ||
locale.getlocale()[0] in ("zh_CN", "it_IT"), | ||
reason="fail on a CI build with LC_ALL=zh_CN.utf8/it_IT.utf8", | ||
strict=False, | ||
), | ||
), | ||
], | ||
|
Uh oh!
There was an error while loading. Please reload this page.