Skip to content

Commit 66aec2f

Browse files
committed
Merge branch 'v7.0' into add-ci-codegen-check
2 parents bf4eae6 + 623abd8 commit 66aec2f

603 files changed

Lines changed: 7759 additions & 5233 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

codegen/datatypes.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
from codegen.utils import CAVEAT, write_source_py
66

77

8-
locationmode_traces = [
9-
"choropleth",
10-
"scattergeo",
11-
]
12-
13-
148
def 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)

plotly/express/_chart_types.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff 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,

plotly/graph_objs/_box.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,15 @@ def fillcolor(self):
217217
the line color, marker color, or marker line color, whichever
218218
is available.
219219
220-
The 'fillcolor' property is a color and may be specified as:
221-
- A hex string (e.g. '#ff0000')
222-
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
223-
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
224-
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
225-
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
220+
The 'fillcolor' property is a color and may be specified as a string in the following formats:
221+
- hex or short hex (e.g. '#d3d3d3', '#d3d')
222+
- hex or short hex with alpha (e.g. '#d3d3d380', '#d3d8')
223+
- rgb (e.g. 'rgb(255, 0, 0)', 'rgb(255 0 0)')
224+
- rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)')
225+
- hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)')
226+
- hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)')
227+
- hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)')
228+
- a named CSS color: see https://plotly.com/python/css-colors/ for a list
226229
227230
Returns
228231
-------

plotly/graph_objs/_carpet.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,15 @@ def color(self):
203203
lightened by blending this with the plot background Individual
204204
pieces can override this.
205205
206-
The 'color' property is a color and may be specified as:
207-
- A hex string (e.g. '#ff0000')
208-
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
209-
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
210-
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
211-
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
206+
The 'color' property is a color and may be specified as a string in the following formats:
207+
- hex or short hex (e.g. '#d3d3d3', '#d3d')
208+
- hex or short hex with alpha (e.g. '#d3d3d380', '#d3d8')
209+
- rgb (e.g. 'rgb(255, 0, 0)', 'rgb(255 0 0)')
210+
- rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)')
211+
- hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)')
212+
- hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)')
213+
- hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)')
214+
- a named CSS color: see https://plotly.com/python/css-colors/ for a list
212215
213216
Returns
214217
-------

plotly/graph_objs/_choropleth.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
55
import copy as _copy
6-
import warnings
76

87

98
class Choropleth(_BaseTraceType):
@@ -1486,15 +1485,6 @@ def __init__(
14861485
constructor must be a dict or
14871486
an 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

plotly/graph_objs/_contour.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,15 @@ def fillcolor(self):
318318
Defaults to a half-transparent variant of the line color,
319319
marker color, or marker line color, whichever is available.
320320
321-
The 'fillcolor' property is a color and may be specified as:
322-
- A hex string (e.g. '#ff0000')
323-
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
324-
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
325-
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
326-
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
321+
The 'fillcolor' property is a color and may be specified as a string in the following formats:
322+
- hex or short hex (e.g. '#d3d3d3', '#d3d')
323+
- hex or short hex with alpha (e.g. '#d3d3d380', '#d3d8')
324+
- rgb (e.g. 'rgb(255, 0, 0)', 'rgb(255 0 0)')
325+
- rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)')
326+
- hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)')
327+
- hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)')
328+
- hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)')
329+
- a named CSS color: see https://plotly.com/python/css-colors/ for a list
327330
- A number that will be interpreted as a color
328331
according to contour.colorscale
329332

plotly/graph_objs/_contourcarpet.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,15 @@ def fillcolor(self):
417417
Defaults to a half-transparent variant of the line color,
418418
marker color, or marker line color, whichever is available.
419419
420-
The 'fillcolor' property is a color and may be specified as:
421-
- A hex string (e.g. '#ff0000')
422-
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
423-
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
424-
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
425-
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
420+
The 'fillcolor' property is a color and may be specified as a string in the following formats:
421+
- hex or short hex (e.g. '#d3d3d3', '#d3d')
422+
- hex or short hex with alpha (e.g. '#d3d3d380', '#d3d8')
423+
- rgb (e.g. 'rgb(255, 0, 0)', 'rgb(255 0 0)')
424+
- rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)')
425+
- hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)')
426+
- hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)')
427+
- hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)')
428+
- a named CSS color: see https://plotly.com/python/css-colors/ for a list
426429
- A number that will be interpreted as a color
427430
according to contourcarpet.colorscale
428431

plotly/graph_objs/_layout.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,12 +1357,15 @@ def paper_bgcolor(self):
13571357
Sets the background color of the paper where the graph is
13581358
drawn.
13591359
1360-
The 'paper_bgcolor' property is a color and may be specified as:
1361-
- A hex string (e.g. '#ff0000')
1362-
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
1363-
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
1364-
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
1365-
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
1360+
The 'paper_bgcolor' property is a color and may be specified as a string in the following formats:
1361+
- hex or short hex (e.g. '#d3d3d3', '#d3d')
1362+
- hex or short hex with alpha (e.g. '#d3d3d380', '#d3d8')
1363+
- rgb (e.g. 'rgb(255, 0, 0)', 'rgb(255 0 0)')
1364+
- rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)')
1365+
- hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)')
1366+
- hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)')
1367+
- hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)')
1368+
- a named CSS color: see https://plotly.com/python/css-colors/ for a list
13661369
13671370
Returns
13681371
-------
@@ -1402,12 +1405,15 @@ def plot_bgcolor(self):
14021405
Sets the background color of the plotting area in-between x and
14031406
y axes.
14041407
1405-
The 'plot_bgcolor' property is a color and may be specified as:
1406-
- A hex string (e.g. '#ff0000')
1407-
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
1408-
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
1409-
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
1410-
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
1408+
The 'plot_bgcolor' property is a color and may be specified as a string in the following formats:
1409+
- hex or short hex (e.g. '#d3d3d3', '#d3d')
1410+
- hex or short hex with alpha (e.g. '#d3d3d380', '#d3d8')
1411+
- rgb (e.g. 'rgb(255, 0, 0)', 'rgb(255 0 0)')
1412+
- rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)')
1413+
- hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)')
1414+
- hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)')
1415+
- hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)')
1416+
- a named CSS color: see https://plotly.com/python/css-colors/ for a list
14111417
14121418
Returns
14131419
-------

plotly/graph_objs/_mesh3d.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,15 @@ def color(self):
209209
"""
210210
Sets the color of the whole mesh
211211
212-
The 'color' property is a color and may be specified as:
213-
- A hex string (e.g. '#ff0000')
214-
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
215-
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
216-
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
217-
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
212+
The 'color' property is a color and may be specified as a string in the following formats:
213+
- hex or short hex (e.g. '#d3d3d3', '#d3d')
214+
- hex or short hex with alpha (e.g. '#d3d3d380', '#d3d8')
215+
- rgb (e.g. 'rgb(255, 0, 0)', 'rgb(255 0 0)')
216+
- rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)')
217+
- hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)')
218+
- hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)')
219+
- hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)')
220+
- a named CSS color: see https://plotly.com/python/css-colors/ for a list
218221
- A number that will be interpreted as a color
219222
according to mesh3d.colorscale
220223

plotly/graph_objs/_scatter.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,15 @@ def fillcolor(self):
279279
ignored except for setting the background color of the hover
280280
label, if any.
281281
282-
The 'fillcolor' property is a color and may be specified as:
283-
- A hex string (e.g. '#ff0000')
284-
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
285-
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
286-
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
287-
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
282+
The 'fillcolor' property is a color and may be specified as a string in the following formats:
283+
- hex or short hex (e.g. '#d3d3d3', '#d3d')
284+
- hex or short hex with alpha (e.g. '#d3d3d380', '#d3d8')
285+
- rgb (e.g. 'rgb(255, 0, 0)', 'rgb(255 0 0)')
286+
- rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)')
287+
- hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)')
288+
- hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)')
289+
- hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)')
290+
- a named CSS color: see https://plotly.com/python/css-colors/ for a list
288291
289292
Returns
290293
-------

0 commit comments

Comments
 (0)