Skip to content

Commit 0ecced6

Browse files
Dr-IrvJulianWgs
authored andcommitted
make EA registry private (pandas-dev#40538)
1 parent 6887aa8 commit 0ecced6

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

pandas/core/construction.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
from pandas.core.dtypes.base import (
3535
ExtensionDtype,
36-
registry,
36+
_registry as registry,
3737
)
3838
from pandas.core.dtypes.cast import (
3939
construct_1d_arraylike_from_scalar,

pandas/core/dtypes/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def register_extension_dtype(cls: Type[ExtensionDtype]) -> Type[ExtensionDtype]:
388388
... class MyExtensionDtype(ExtensionDtype):
389389
... name = "myextension"
390390
"""
391-
registry.register(cls)
391+
_registry.register(cls)
392392
return cls
393393

394394

@@ -452,4 +452,4 @@ def find(
452452
return None
453453

454454

455-
registry = Registry()
455+
_registry = Registry()

pandas/core/dtypes/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
Optional,
2424
)
2525

26-
from pandas.core.dtypes.base import registry
26+
from pandas.core.dtypes.base import _registry as registry
2727
from pandas.core.dtypes.dtypes import (
2828
CategoricalDtype,
2929
DatetimeTZDtype,

pandas/tests/arrays/test_array.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66
import pytz
77

8-
from pandas.core.dtypes.base import registry
8+
from pandas.core.dtypes.base import _registry as registry
99

1010
import pandas as pd
1111
import pandas._testing as tm

pandas/tests/arrays/test_period.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pandas._libs.tslibs import iNaT
55
from pandas._libs.tslibs.period import IncompatibleFrequency
66

7-
from pandas.core.dtypes.base import registry
7+
from pandas.core.dtypes.base import _registry as registry
88
from pandas.core.dtypes.dtypes import PeriodDtype
99

1010
import pandas as pd

pandas/tests/dtypes/test_dtypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55
import pytz
66

7-
from pandas.core.dtypes.base import registry
7+
from pandas.core.dtypes.base import _registry as registry
88
from pandas.core.dtypes.common import (
99
is_bool_dtype,
1010
is_categorical,

pandas/tests/frame/indexing/test_setitem.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import pandas.util._test_decorators as td
77

8-
from pandas.core.dtypes.base import registry as ea_registry
8+
from pandas.core.dtypes.base import _registry as ea_registry
99
from pandas.core.dtypes.common import (
1010
is_categorical_dtype,
1111
is_interval_dtype,

0 commit comments

Comments
 (0)