File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55from codegen .utils import CAVEAT , write_source_py
66
77
8- locationmode_traces = [
9- "choropleth" ,
10- "scattergeo" ,
11- ]
12-
13-
148def get_typing_type (plotly_type , array_ok = False ):
159 """
1610 Get Python type corresponding to a valType string from the plotly schema
@@ -97,7 +91,7 @@ def build_datatype_py(node):
9791 )
9892 buffer .write ("import copy as _copy\n " )
9993
100- if node .name_property in locationmode_traces or node . name_property == "template" :
94+ if node .name_property == "template" :
10195 buffer .write ("import warnings\n " )
10296
10397 # Write class definition
@@ -340,22 +334,6 @@ def __init__(self"""
340334 """
341335 )
342336
343- # Add warning for 'country names' locationmode
344- if node .name_property in locationmode_traces :
345- buffer .write (
346- f"""
347- if locationmode == "country names" and kwargs.get("_validate"):
348- warnings.warn(
349- "The library used by the *country names* `locationmode` option is changing in an upcoming version. "
350- "Country names in existing plots may not work in the new version. "
351- "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.",
352- DeprecationWarning,
353- stacklevel=5,
354- )
355-
356- """
357- )
358-
359337 buffer .write (
360338 f"""
361339 self._skip_invalid = kwargs.pop("skip_invalid", False)
Original file line number Diff line number Diff line change @@ -1111,15 +1111,6 @@ def choropleth(
11111111 colored region mark on a map.
11121112 """
11131113
1114- if locationmode == "country names" :
1115- warn (
1116- "The library used by the *country names* `locationmode` option is changing in an upcoming version. "
1117- "Country names in existing plots may not work in the new version. "
1118- "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*." ,
1119- DeprecationWarning ,
1120- stacklevel = 2 ,
1121- )
1122-
11231114 return make_figure (
11241115 args = locals (),
11251116 constructor = go .Choropleth ,
@@ -1179,15 +1170,6 @@ def scatter_geo(
11791170 by a symbol mark on a map.
11801171 """
11811172
1182- if locationmode == "country names" :
1183- warn (
1184- "The library used by the *country names* `locationmode` option is changing in an upcoming version. "
1185- "Country names in existing plots may not work in the new version. "
1186- "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*." ,
1187- DeprecationWarning ,
1188- stacklevel = 2 ,
1189- )
1190-
11911173 return make_figure (
11921174 args = locals (),
11931175 constructor = go .Scattergeo ,
Original file line number Diff line number Diff line change 33
44from plotly .basedatatypes import BaseTraceType as _BaseTraceType
55import copy as _copy
6- import warnings
76
87
98class Choropleth (_BaseTraceType ):
@@ -1486,15 +1485,6 @@ def __init__(
14861485constructor must be a dict or
14871486an instance of :class:`plotly.graph_objs.Choropleth`""" )
14881487
1489- if locationmode == "country names" and kwargs .get ("_validate" ):
1490- warnings .warn (
1491- "The library used by the *country names* `locationmode` option is changing in an upcoming version. "
1492- "Country names in existing plots may not work in the new version. "
1493- "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*." ,
1494- DeprecationWarning ,
1495- stacklevel = 5 ,
1496- )
1497-
14981488 self ._skip_invalid = kwargs .pop ("skip_invalid" , False )
14991489 self ._validate = kwargs .pop ("_validate" , True )
15001490
Original file line number Diff line number Diff line change 33
44from plotly .basedatatypes import BaseTraceType as _BaseTraceType
55import copy as _copy
6- import warnings
76
87
98class Scattergeo (_BaseTraceType ):
@@ -1550,15 +1549,6 @@ def __init__(
15501549constructor must be a dict or
15511550an instance of :class:`plotly.graph_objs.Scattergeo`""" )
15521551
1553- if locationmode == "country names" and kwargs .get ("_validate" ):
1554- warnings .warn (
1555- "The library used by the *country names* `locationmode` option is changing in an upcoming version. "
1556- "Country names in existing plots may not work in the new version. "
1557- "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*." ,
1558- DeprecationWarning ,
1559- stacklevel = 5 ,
1560- )
1561-
15621552 self ._skip_invalid = kwargs .pop ("skip_invalid" , False )
15631553 self ._validate = kwargs .pop ("_validate" , True )
15641554
You can’t perform that action at this time.
0 commit comments