Skip to content

MAINT: delay loading of backend_info to after imports - #7672

Merged
dschult merged 3 commits into
networkx:mainfrom
dschult:delay_backend_info_load
Oct 11, 2024
Merged

dschult merged 3 commits into
networkx:mainfrom
dschult:delay_backend_info_load

Conversation

@dschult

@dschult dschult commented Oct 11, 2024

Copy link
Copy Markdown
Member

Fixes #7671

Delays updating backend_info and setting up configs until the end of the import process so that backends which import networkx inside their backend_info function don't run into a circular import issue.

We should test this locally with nx-cugraph installed just to make sure nothing strange occurs.

@dschult dschult added this to the 3.4.1 milestone Oct 11, 2024

@rossbar rossbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does indeed fix the runtime warning in the docs, thanks @dschult for chasing this down!

@jarrodmillman jarrodmillman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dschult

dschult commented Oct 11, 2024

Copy link
Copy Markdown
Member Author

Thanks for verifying @rossbar . :)

I fixed a mypy issue and in the course of time-testing nx-parallel with this I caught a missing nx. in front of config that is now needed. greped for more missing nx. so I think that's OK now. I also moved the setting of doc_string for config.backends to inside the config setup function rather than in __init__.py.

I've checked it locally with nx-parallel installed as the only backend. And with no backends.
The CI checks are all passing including coverage.

@dschult

dschult commented Oct 11, 2024

Copy link
Copy Markdown
Member Author

OK... This is passing now. @rlratzel has completed some other tests. In it goes!

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

Development

Successfully merging this pull request may close these issues.

Docs for Stable 3.4 Tutorial first result is a RunTimeWarning

3 participants