-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST / string dtype: add env variable to enable future_string and add test build #58459
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
Changes from all commits
d8c2654
4c3042d
3860a11
57b2464
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 |
---|---|---|
|
@@ -858,7 +858,7 @@ def register_converter_cb(key: str) -> None: | |
with cf.config_prefix("future"): | ||
cf.register_option( | ||
"infer_string", | ||
False, | ||
True if os.environ.get("PANDAS_FUTURE_INFER_STRING", "0") == "1" else 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 make this something that is explicitly FOR_TESTING_ONLY or something to clarify users shouldn't use it 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 would personally prefer to keep the name a bit more readable. We did the same for CoW, I don't think we had any problems with it? (in general, there is not really a back compat issue with the env variable, in pandas 3.0 we will just start ignoring it, which is even easier than the explicit |
||
"Whether to infer sequence of str objects as pyarrow string " | ||
"dtype, which will be the default in pandas 3.0 " | ||
"(at which point this option will be deprecated).", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could also add a flag to pytest and then change the exit code from conftest.py (like in https://github.com/yashtodi94/pytest-custom_exit_code/blob/master/pytest_custom_exit_code.py), but since this is only temporary, this seems the easiest short term hack.