add deprecation notice for mapbox traces
Closes #4730.
These show up when you are using the new traces
Also, it looks like they are removed when we run the commands to update Plotly.js. Those classes are probably autogenerated
cc @archmoj
could we use a warning as mentioned by @ndrezn above https://github.com/plotly/plotly.py/pull/4783#discussion_r1791936053
could we use a warning as mentioned by @ndrezn above #4783 (comment)
I am not sure is that's a good idea. My concern is that it could be too annoying for users and it may be considered a notable undesirable change.
could we use a warning as mentioned by @ndrezn above #4783 (comment)
I am not sure is that's a good idea. My concern is that it could be too annoying for users and it may be considered a notable undesirable change.
@archmoj Being annoying is the whole point, so that users will change their code before the traces are removed entirely.
@LiamConnors Could you please test this to see if this produce the desirable warnings? Thank you!
@archmoj, I see the deprecation notice on traces and px functions that don't use mapbox
import plotly.express as px
df = px.data.gapminder().query("year == 2007")
fig = px.line_geo(df, locations="iso_alpha",
color="continent", # "continent" is one of the columns of gapminder
projection="orthographic")
fig.show()
But not on ones that do:
@archmoj Maybe you're already on it but I think the warning needs to go inside the __init__ function rather than at the top of the class to fix the issue Liam is seeing.
@archmoj Maybe you're already on it but I think the warning needs to go inside the
__init__function rather than at the top of the class to fix the issue Liam is seeing.
@LiamConnors Thanks for catching that. Let's try @emilykl's suggestion.
@archmoj, I still see the issue
@LiamConnors Debugging the bug you noticed wasn't easy. I figured the error is coming from the plotly.py templates which include defaults for "scattermapbox" traces as well as `"mapbox" subplots. On the other hand resolving the merge conflicts of this PR is not easy. So I close this PR; then open a new PR. Thank you!