Skip to content

Commit

Permalink
TST / string dtype: add env variable to enable future_string and add …
Browse files Browse the repository at this point in the history
…test build
  • Loading branch information
jorisvandenbossche committed Apr 27, 2024
1 parent a1fc8e8 commit d8c2654
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/unit-tests.yml
Expand Up @@ -57,6 +57,10 @@ jobs:
# Also install zh_CN (its encoding is gb2312) but do not activate it.
# It will be temporarily activated during tests with locale.setlocale
extra_loc: "zh_CN"
- name: "Future infer strings"
env_file: actions-311.yaml
pattern: "not slow and not network and not single_cpu"
pandas_future_infer_string: "1"
- name: "Pypy"
env_file: actions-pypy-39.yaml
pattern: "not slow and not network and not single_cpu"
Expand All @@ -75,6 +79,7 @@ jobs:
LANG: ${{ matrix.lang || 'C.UTF-8' }}
LC_ALL: ${{ matrix.lc_all || '' }}
PANDAS_CI: ${{ matrix.pandas_ci || '1' }}
PANDAS_FUTURE_INFER_STRING: ${{ matrix.pandas_future_infer_string || '0' }}
TEST_ARGS: ${{ matrix.test_args || '' }}
PYTEST_WORKERS: ${{ matrix.pytest_workers || 'auto' }}
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/config_init.py
Expand Up @@ -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,
"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).",
Expand Down

0 comments on commit d8c2654

Please sign in to comment.