File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -141,13 +141,15 @@ def __init__(
141
141
if storage is None :
142
142
if na_value is not libmissing .NA :
143
143
storage = get_option ("mode.string_storage" )
144
- if storage is None :
144
+ if storage == "auto" :
145
145
if HAS_PYARROW :
146
146
storage = "pyarrow"
147
147
else :
148
148
storage = "python"
149
149
else :
150
- storage = get_option ("mode.string_storage" ) or "python"
150
+ storage = get_option ("mode.string_storage" )
151
+ if storage == "auto" :
152
+ storage = "python"
151
153
152
154
if storage == "pyarrow_numpy" :
153
155
# TODO raise a deprecation warning
Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ def is_terminal() -> bool:
457
457
458
458
459
459
def is_valid_string_storage (value : Any ) -> None :
460
- legal_values = [None , "python" , "pyarrow" ]
460
+ legal_values = ["auto" , "python" , "pyarrow" ]
461
461
if value not in legal_values :
462
462
msg = "Value must be one of python|pyarrow"
463
463
if value == "pyarrow_numpy" :
@@ -472,7 +472,7 @@ def is_valid_string_storage(value: Any) -> None:
472
472
with cf .config_prefix ("mode" ):
473
473
cf .register_option (
474
474
"string_storage" ,
475
- None ,
475
+ "auto" ,
476
476
string_storage_doc ,
477
477
# validator=is_one_of_factory(["python", "pyarrow"]),
478
478
validator = is_valid_string_storage ,
You can’t perform that action at this time.
0 commit comments