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

Inconsistent shortest_path warning and return type on main #7339

Closed
eriknw opened this issue Mar 9, 2024 · 0 comments
Closed

Inconsistent shortest_path warning and return type on main #7339

eriknw opened this issue Mar 9, 2024 · 0 comments

Comments

@eriknw
Copy link
Contributor

eriknw commented Mar 9, 2024

Current Behavior

#7161 updated the warning for shortest_path to indicate the return type (from dict to iterator) will occur in NetworkX 3.5.

#6584 changed the return type from dict to iterator, but #7161 didn't change the return type back to dict.

Expected Behavior

I expect shortest_path with no source or target to return an iterator over node, path pairs on main branch to be consistent with the warning.

Steps to Reproduce

>>> import networkx as nx
>>> assert isinstance(nx.shortest_path(nx.complete_graph(4)), dict)  # raises AssertionError

Environment

Python version: 3.10
NetworkX version: main branch

Additional context

This is similar to issue #7315. I haven't fully compared #6584, #7161, and main branch to ensure consistency.

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

No branches or pull requests

1 participant