Skip to content

modifies bfs_edges and adds warning to generic_bfs_edges - #5925

Merged
MridulS merged 6 commits into
networkx:mainfrom
whym1here:bugfix-for-issue-5871
Aug 1, 2023
Merged

MridulS merged 6 commits into
networkx:mainfrom
whym1here:bugfix-for-issue-5871

Conversation

@whym1here

@whym1here whym1here commented Aug 10, 2022 •

Copy link
Copy Markdown
Contributor
  • adds the deprecated warning for sort_neighbors argument in generic_bfs_edges
  • modifies the implementation of bfs_edges where it calls generic_bfs_edges with only neighbors parameters.
    #5871

@MridulS

MridulS commented Feb 13, 2023

Copy link
Copy Markdown
Member

Sorry for the delay in the review @still-n0thing.

Could you update this deprecation notice and also add this to https://github.com/networkx/networkx/blob/main/doc/developer/deprecations.rst so we can keep a track of what to remove when 3.2 comes around :)

Thanks!

@dschult

dschult commented Feb 25, 2023

Copy link
Copy Markdown
Member

Is there a reason to split out the deprecations.rst change from the PR itself? Not a big deal, but it seems easier to keep them together -- but I might be missing something.

@whym1here

whym1here commented Feb 25, 2023 •

Copy link
Copy Markdown
Contributor Author

Is there a reason to split out the deprecations.rst change from the PR itself?

@dschult Should I add the deprecations.rst changes to this PR? and what about the unit tests should I change it here or create another PR?

@dschult

dschult commented Feb 25, 2023

Copy link
Copy Markdown
Member

Yes -- please:

  • include the deprecations.rst change in this PR
  • add a note in deprecations line of doc/release/release_dev.rst
  • add a test of the deprecation (see below)

The tests seem to need more work... I don't see any tests of the generic_bfs_edges function.
Adding them could be done here quickly by copying the bfs_edges tests and revising them to run generic_bfs_edges. But there is probably a better way to do that. In the interest of getting this PR merged, let's bump the job of creating tests for generic_bfs_edges to another PR.

The test of the deprecation can look something like:

        with pytest.deprecated_call():
            nx.generic_bfs_edges(self.G, source=1, sort_neighbors=sorted)

@dschult
dschult force-pushed the bugfix-for-issue-5871 branch from dde4f2d to 37a31b3 Compare June 3, 2023 03:08

@dschult dschult 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.

I think this is ready...

@MridulS
MridulS merged commit 2f2ccd1 into networkx:main Aug 1, 2023
@jarrodmillman jarrodmillman added this to the 3.2 milestone Aug 1, 2023
Alex-Markham pushed a commit to Alex-Markham/networkx that referenced this pull request Oct 13, 2023
…etworkx#5925)

* modifies bfs_edges

* fixes unused import

* Update networkx/algorithms/traversal/breadth_first_search.py

Updates the version number

Co-authored-by: Mridul Seth <[email protected]>

* Update networkx/algorithms/traversal/breadth_first_search.py

Co-authored-by: Dan Schult <[email protected]>

* Add deprecation warnings and tests of warn

---------

Co-authored-by: Mridul Seth <[email protected]>
Co-authored-by: Dan Schult <[email protected]>
Co-authored-by: Mridul Seth <[email protected]>
dschult added a commit to BrunoBaldissera/networkx that referenced this pull request Oct 23, 2023
…etworkx#5925)

* modifies bfs_edges

* fixes unused import

* Update networkx/algorithms/traversal/breadth_first_search.py

Updates the version number

Co-authored-by: Mridul Seth <[email protected]>

* Update networkx/algorithms/traversal/breadth_first_search.py

Co-authored-by: Dan Schult <[email protected]>

* Add deprecation warnings and tests of warn

---------

Co-authored-by: Mridul Seth <[email protected]>
Co-authored-by: Dan Schult <[email protected]>
Co-authored-by: Mridul Seth <[email protected]>
@whym1here
whym1here deleted the bugfix-for-issue-5871 branch March 29, 2024 07:13
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
…etworkx#5925)

* modifies bfs_edges

* fixes unused import

* Update networkx/algorithms/traversal/breadth_first_search.py

Updates the version number

Co-authored-by: Mridul Seth <[email protected]>

* Update networkx/algorithms/traversal/breadth_first_search.py

Co-authored-by: Dan Schult <[email protected]>

* Add deprecation warnings and tests of warn

---------

Co-authored-by: Mridul Seth <[email protected]>
Co-authored-by: Dan Schult <[email protected]>
Co-authored-by: Mridul Seth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants