diff --git a/pandas/core/construction.py b/pandas/core/construction.py index 78a7f1890b5de..b5a17e1ef882e 100644 --- a/pandas/core/construction.py +++ b/pandas/core/construction.py @@ -33,7 +33,7 @@ from pandas.core.dtypes.base import ( ExtensionDtype, - registry, + _registry as registry, ) from pandas.core.dtypes.cast import ( construct_1d_arraylike_from_scalar, diff --git a/pandas/core/dtypes/base.py b/pandas/core/dtypes/base.py index d83405803753a..129c6c061d11c 100644 --- a/pandas/core/dtypes/base.py +++ b/pandas/core/dtypes/base.py @@ -388,7 +388,7 @@ def register_extension_dtype(cls: Type[ExtensionDtype]) -> Type[ExtensionDtype]: ... class MyExtensionDtype(ExtensionDtype): ... name = "myextension" """ - registry.register(cls) + _registry.register(cls) return cls @@ -452,4 +452,4 @@ def find( return None -registry = Registry() +_registry = Registry() diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py index 32ea82d9c0402..b9e785ff2f887 100644 --- a/pandas/core/dtypes/common.py +++ b/pandas/core/dtypes/common.py @@ -23,7 +23,7 @@ Optional, ) -from pandas.core.dtypes.base import registry +from pandas.core.dtypes.base import _registry as registry from pandas.core.dtypes.dtypes import ( CategoricalDtype, DatetimeTZDtype, diff --git a/pandas/tests/arrays/test_array.py b/pandas/tests/arrays/test_array.py index 5d2b7c43f6765..bfe588883d9f3 100644 --- a/pandas/tests/arrays/test_array.py +++ b/pandas/tests/arrays/test_array.py @@ -5,7 +5,7 @@ import pytest import pytz -from pandas.core.dtypes.base import registry +from pandas.core.dtypes.base import _registry as registry import pandas as pd import pandas._testing as tm diff --git a/pandas/tests/arrays/test_period.py b/pandas/tests/arrays/test_period.py index e7f3e8c659316..2592a0263c585 100644 --- a/pandas/tests/arrays/test_period.py +++ b/pandas/tests/arrays/test_period.py @@ -4,7 +4,7 @@ from pandas._libs.tslibs import iNaT from pandas._libs.tslibs.period import IncompatibleFrequency -from pandas.core.dtypes.base import registry +from pandas.core.dtypes.base import _registry as registry from pandas.core.dtypes.dtypes import PeriodDtype import pandas as pd diff --git a/pandas/tests/dtypes/test_dtypes.py b/pandas/tests/dtypes/test_dtypes.py index ca311768dc2d9..51a7969162abf 100644 --- a/pandas/tests/dtypes/test_dtypes.py +++ b/pandas/tests/dtypes/test_dtypes.py @@ -4,7 +4,7 @@ import pytest import pytz -from pandas.core.dtypes.base import registry +from pandas.core.dtypes.base import _registry as registry from pandas.core.dtypes.common import ( is_bool_dtype, is_categorical, diff --git a/pandas/tests/frame/indexing/test_setitem.py b/pandas/tests/frame/indexing/test_setitem.py index e8cdcfcaafa86..199347383b171 100644 --- a/pandas/tests/frame/indexing/test_setitem.py +++ b/pandas/tests/frame/indexing/test_setitem.py @@ -5,7 +5,7 @@ import pandas.util._test_decorators as td -from pandas.core.dtypes.base import registry as ea_registry +from pandas.core.dtypes.base import _registry as ea_registry from pandas.core.dtypes.common import ( is_categorical_dtype, is_interval_dtype,