Skip to content

TYP: make EA registry private #40538

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

Merged
merged 2 commits into from
Mar 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/core/construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/dtypes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -452,4 +452,4 @@ def find(
return None


registry = Registry()
_registry = Registry()
2 changes: 1 addition & 1 deletion pandas/core/dtypes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/arrays/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/arrays/test_period.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/dtypes/test_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/frame/indexing/test_setitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down