diff --git a/codegen/datatypes.py b/codegen/datatypes.py index 8e977efda0..9c38699263 100644 --- a/codegen/datatypes.py +++ b/codegen/datatypes.py @@ -5,12 +5,6 @@ from codegen.utils import CAVEAT, write_source_py -locationmode_traces = [ - "choropleth", - "scattergeo", -] - - def get_typing_type(plotly_type, array_ok=False): """ Get Python type corresponding to a valType string from the plotly schema @@ -97,7 +91,7 @@ def build_datatype_py(node): ) buffer.write("import copy as _copy\n") - if node.name_property in locationmode_traces or node.name_property == "template": + if node.name_property == "template": buffer.write("import warnings\n") # Write class definition @@ -340,22 +334,6 @@ def __init__(self""" """ ) - # Add warning for 'country names' locationmode - if node.name_property in locationmode_traces: - buffer.write( - f""" - if locationmode == "country names" and kwargs.get("_validate"): - warnings.warn( - "The library used by the *country names* `locationmode` option is changing in an upcoming version. " - "Country names in existing plots may not work in the new version. " - "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.", - DeprecationWarning, - stacklevel=5, - ) - - """ - ) - buffer.write( f""" self._skip_invalid = kwargs.pop("skip_invalid", False) diff --git a/plotly/express/_chart_types.py b/plotly/express/_chart_types.py index bf3bf84dda..fd353d1a00 100644 --- a/plotly/express/_chart_types.py +++ b/plotly/express/_chart_types.py @@ -1111,15 +1111,6 @@ def choropleth( colored region mark on a map. """ - if locationmode == "country names": - warn( - "The library used by the *country names* `locationmode` option is changing in an upcoming version. " - "Country names in existing plots may not work in the new version. " - "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.", - DeprecationWarning, - stacklevel=2, - ) - return make_figure( args=locals(), constructor=go.Choropleth, @@ -1179,15 +1170,6 @@ def scatter_geo( by a symbol mark on a map. """ - if locationmode == "country names": - warn( - "The library used by the *country names* `locationmode` option is changing in an upcoming version. " - "Country names in existing plots may not work in the new version. " - "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.", - DeprecationWarning, - stacklevel=2, - ) - return make_figure( args=locals(), constructor=go.Scattergeo, diff --git a/plotly/graph_objs/_choropleth.py b/plotly/graph_objs/_choropleth.py index cea7f6b316..8bdd47e050 100644 --- a/plotly/graph_objs/_choropleth.py +++ b/plotly/graph_objs/_choropleth.py @@ -3,7 +3,6 @@ from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy -import warnings class Choropleth(_BaseTraceType): @@ -1486,15 +1485,6 @@ def __init__( constructor must be a dict or an instance of :class:`plotly.graph_objs.Choropleth`""") - if locationmode == "country names" and kwargs.get("_validate"): - warnings.warn( - "The library used by the *country names* `locationmode` option is changing in an upcoming version. " - "Country names in existing plots may not work in the new version. " - "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.", - DeprecationWarning, - stacklevel=5, - ) - self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) diff --git a/plotly/graph_objs/_scattergeo.py b/plotly/graph_objs/_scattergeo.py index 0d518fb1bc..2eee11a6ed 100644 --- a/plotly/graph_objs/_scattergeo.py +++ b/plotly/graph_objs/_scattergeo.py @@ -3,7 +3,6 @@ from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy -import warnings class Scattergeo(_BaseTraceType): @@ -1550,15 +1549,6 @@ def __init__( constructor must be a dict or an instance of :class:`plotly.graph_objs.Scattergeo`""") - if locationmode == "country names" and kwargs.get("_validate"): - warnings.warn( - "The library used by the *country names* `locationmode` option is changing in an upcoming version. " - "Country names in existing plots may not work in the new version. " - "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.", - DeprecationWarning, - stacklevel=5, - ) - self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True)