-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Deprecate sorting by default in connected component methods to avoid type errors #35889
Comments
Something like
? |
That's the idea but we have to change other parts to really fix the issue. |
Maybe this could be fixed together with #35897? |
And possibly, add a battery of tests for graphs without sortable vertices... |
I'm currently working on deprecating sorting by default in |
I change the title and description of this issue to better reflect it's goal. |
… for graphs Fixes #35889. ### 📚 Description We deprecate sorting by default in `connected_components` and `connected_component_containing_vertex`. The default value of parameter `sort` was `True`. We change it to `None` to identify calls when a deprecation warning is necessary. We also add parameter `key` so that users can define home made sorting rules. This deprecation is needed to avoid type errors when vertices have labels of incomparable type. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies URL: #35891 Reported by: David Coudert Reviewer(s): Dima Pasechnik
Is there an existing issue for this?
Did you read the documentation and troubleshoot guide?
Environment
Steps To Reproduce
This issue was reported in https://groups.google.com/g/sage-devel/c/grTffw3S15E for
feedback_vertex_set
but is actually located inconnected_component_containing_vertex
Expected Behavior
Actual Behavior
Additional Information
We should deprecate sorting vertices by default in
connected_components
andconnected_component_containing_vertex
to avoid type errors when vertices are of incomparable types. Users can pass a sorting key to deal with vertices of different types.The text was updated successfully, but these errors were encountered: