Commit
2 years ago
gh-35891: Deprecate sorting by default in connected component methods for graphs Fixes #35889. ### :books: 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. ### :memo: 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. ### :hourglass: Dependencies URL: https://github.com/sagemath/sage/pull/35891 Reported by: David Coudert Reviewer(s): Dima Pasechnik
Author
Release Manager
Loading