Skip to content

remove duplicate FigureWidget code in graph_objects - #3779

Closed
jvdd wants to merge 1 commit into
plotly:mainfrom
jvdd:graph_objects_fw
Closed

jvdd wants to merge 1 commit into
plotly:mainfrom
jvdd:graph_objects_fw

Conversation

@jvdd

@jvdd jvdd commented Jun 15, 2022 •

Copy link
Copy Markdown
Contributor

This PR removes the logic that is used to import FigureWidget in __init__.py from graph_objects and imports it from ..graph_objs instead

(I might be missing smth in my understanding - but atm I can't think of a reason why you would want exactly the same code in those two files)

@gvwilson gvwilson changed the title 🧹 remove duplicate FigureWidget code in graph_objects remove duplicate FigureWidget code in graph_objects Aug 12, 2024
@gvwilson gvwilson added P2 considered for next cycle community community contribution fix fixes something broken labels Aug 12, 2024
@gvwilson gvwilson assigned gvwilson and emilykl and unassigned gvwilson Aug 23, 2024
@ndrezn

ndrezn commented Aug 23, 2024

Copy link
Copy Markdown
Contributor

This seems like a reasonable change. I'm not sure why we handle FigureWidget differently than any other imports in this file. Python < 3.7 doesn't support .. imports, which is why we have this special handler, but it's not clear to me why we use the special handler for just FigureWidget and no other import.

In favour of this change to make this file easier to understand 👍 I'd be curious whether this breaks compatibility with <3.6 for some arcane reason though (although to be honest I'm open to requiring Python>=3.8 for Plotly.py in general).

@robertclaus

Copy link
Copy Markdown

@camdecoster could you take a look at this? It's very old, but the low line count implies it could be a quick win.

@camdecoster

Copy link
Copy Markdown
Contributor

This PR edits a generated file (which we don't want to do) and it would take some time to dig into porting the fix over to the latest code, so I'm going to close it.

@camdecoster

Copy link
Copy Markdown
Contributor

I added #5849 to track the underlying issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community community contribution fix fixes something broken P2 considered for next cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants