Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose to make new node_link arguments keyword only. #5928

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

rossbar
Copy link
Contributor

@rossbar rossbar commented Aug 12, 2022

Just an idea I had while following up on #5787

Since we're adding these new arguments to replace the strange attrs munging (an obvious improvement, thanks @brocla ) I thought it might make sense to set the new args to keyword only.

Note - if we decide to do this, it should go in before the next release!

@rossbar rossbar added this to the networkx-2.8.6 milestone Aug 12, 2022
@dschult
Copy link
Member

dschult commented Aug 12, 2022

I like this idea of making the arguments keyword only. We have talked about moving to that treatment of input arguments where we make a distinction between required arguments (usually positional) and optional arguments (usually keyword only). It helps avoid errors where the arguments are provided in the wrong order. I think we decided that we would move toward keyword-only for new functions (after we no longer supported older versions of Python that didn't allow the keyword only syntax). This seems like a good place to start that process.

I'm also fine with shifting the deprecation notification from v3.1 to v3.2 and that could be done in this PR or a separate PR.

Thanks @rossbar

@dschult dschult merged commit 9b9d75d into networkx:main Aug 17, 2022
jarrodmillman pushed a commit that referenced this pull request Aug 21, 2022
Propose to make new node_link args kwarg only.
MridulS pushed a commit to MridulS/networkx that referenced this pull request Oct 12, 2022
Propose to make new node_link args kwarg only.
MridulS pushed a commit to MridulS/networkx that referenced this pull request Feb 4, 2023
Propose to make new node_link args kwarg only.
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
Propose to make new node_link args kwarg only.
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.

None yet

3 participants