Skip to content

Fix: allow graph subclasses to have additional arguments#8369

Merged
dschult merged 3 commits intonetworkx:mainfrom
eriknw:fix_subclass_extra_args
Dec 6, 2025
Merged

Fix: allow graph subclasses to have additional arguments#8369
dschult merged 3 commits intonetworkx:mainfrom
eriknw:fix_subclass_extra_args

Conversation

@eriknw
Copy link
Copy Markdown
Contributor

@eriknw eriknw commented Dec 5, 2025

Closes: #8367

Oops, my bad! Supporting user graph types is kind of important :)

I wasn't sure where to put the test, but it felt important to add at least one test for this.

My bandwidth is limited to make requested changes in a timely manner, so maintainers please feel free to directly update this PR. I'll do my best though and will try to reply to comments/questions.

Copy link
Copy Markdown
Contributor

@rossbar rossbar left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @eriknw !

eriknw and others added 2 commits December 5, 2025 15:04
Co-authored-by: Ross Barnowski <rossbar@caltech.edu>
@rossbar rossbar added this to the 3.6.1 milestone Dec 5, 2025
Copy link
Copy Markdown
Member

@dschult dschult left a comment

Choose a reason for hiding this comment

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

Looks good!
Thanks @eriknw for the quick fix.
And Thanks @JEZiegler for the report!!

@dschult dschult merged commit 75bdd73 into networkx:main Dec 6, 2025
52 checks passed
@dschult dschult modified the milestones: 3.6.1, 3.6 Dec 6, 2025
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.

Providing more than one argument to Digraph subclass leads to exception in __new__

4 participants