Remove pyyaml dependency via module getattr#4802
Remove pyyaml dependency via module getattr#4802jarrodmillman merged 11 commits intonetworkx:mainfrom
Conversation
|
We should still plan to remove them completely for 3.0. So maybe we should also mention that in the message. |
|
We may also want to mention the security issue (especially since we are removing a function w/out deprecating it). |
|
Okay I've updated the exception messages w/ a note about security and a note that the message will be removed in 3.0. Here's an example: I like the |
|
Thank you for fixing the pyyaml dependency. Do you know when this fix will be released? The security bug, CVE-2020-1747, has been flag as a high severity for us and is currently a show stopper. |
|
The milestone date for v2.6 is May 31. We are aiming to be close to that. |
|
Add a note about extra files to: https://github.com/networkx/networkx/blob/main/doc/developer/deprecations.rst |
Ensure they are correct, runnable examples.
4b58cc9 to
96fd946
Compare
|
I've updated the deprecation notes and removed the yaml section from the docs. I could've left the yaml section in there as a stub with a warning, but I decided to be more aggressive. If there's a preference for leaving a docs stub with a warning LMK and I'll add it back! |
* WIP: adding getattr to nx_yaml module. * WIP: Tests that informative exceptions raised. * Add tests for informative messages. * Add getattrs to higher-up pkgs. * Remove test_yaml.py * Remove pyyaml from requirements. * Update examples in warning messages. Ensure they are correct, runnable examples. * Add security warning and removal time to message. * Cp __getattr__ to other mods/pkgs. * Update deprecation notes w/ getattrs. * Remove yaml section from docs.
* WIP: adding getattr to nx_yaml module. * WIP: Tests that informative exceptions raised. * Add tests for informative messages. * Add getattrs to higher-up pkgs. * Remove test_yaml.py * Remove pyyaml from requirements. * Update examples in warning messages. Ensure they are correct, runnable examples. * Add security warning and removal time to message. * Cp __getattr__ to other mods/pkgs. * Update deprecation notes w/ getattrs. * Remove yaml section from docs.
An alternative to removing
pyyamlwith a full deprecation cycle. Adds a__getattr__to each module/package from whichread_yaml,write_yaml, andnx_yamlwere accessible. Since the functions were one-liners, raise an informative error message describing how to usepyyamldirectly to replicate the functionality of thenx_yamlmodule.