cpython
cpython copied to clipboard
Audit and fix unused `NameError` handlers
After https://github.com/python/cpython/commit/d6f276799754f0eab24e1c195d6dca1bc0aadf14 I've decided to take a look at other unused / obsolete NameError items that can be removed.
This is what I found:
- [ ]
tarfile.py: https://github.com/python/cpython/blame/26726c76494d85c7b565b764c732dd4473458409/Lib/tarfile.py#L61-L66OSErroris always defined. It used to be aWindowsError. Should be removed - [ ]
copyreg.py: https://github.com/python/cpython/blame/26726c76494d85c7b565b764c732dd4473458409/Lib/copyreg.py#L28-L37complexis always defined, this code is 16 years old (it is finishing high school now). Should be removed
PR is on its way.
- PR: gh-99326