pyupio / safety

Safety checks Python dependencies for known security vulnerabilities and suggests the proper remediations for vulnerabilities detected.
https://safetycli.com/product/safety-cli
MIT License
1.66k stars 141 forks source link

Remove Unused Dependency: Urllib3 #481

Open gdrosos opened 10 months ago

gdrosos commented 10 months ago

Summary

This pull request removes the unused dependency urllib3 from the setup.cfg and the test_requirements.txt configuration files. The removal is a finding from ongoing research focused on identifying and eliminating code bloat within software projects.

Rationale

The urllib3 dependency was introduced in 509f977, but it appears to be unused within the source code. As this dependency is unnecessary, its removal will simplify the project's dependency management and reduce the project's overall footprint.

Changes

Impact

This change aligns with the best practices in maintaining a clean and optimized codebase.

oz123 commented 10 months ago

Requests depends on urllib3. There is no direct usage of it, so it's probably safe to remove.

gdrosos commented 9 months ago

Hello @yeisonvargasf ,

I hope this message finds you well. We are currently engaged in a research project focused on optimizing projects by identifying and eliminating unnecessary dependencies. Your insights and expertise as a maintainer would greatly contribute to our research efforts.

Could you please take a moment to review these changes? Your input would be highly valuable to us.

Thank you for your consideration!

Zeckie commented 3 weeks ago

As requests uses urllib3, removing this dependency will not result in fewer dependencies to install.

urllib3>=1.26.5 - was that version chosen for some reason (for example, was there a bug or vulnerability that was fixed in that version that might affect safety)?