cpython icon indicating copy to clipboard operation
cpython copied to clipboard

Audit and fix unused `NameError` handlers

Open sobolevn opened this issue 3 years ago • 0 comments

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-L66 OSError is always defined. It used to be a WindowsError. Should be removed
  • [ ] copyreg.py: https://github.com/python/cpython/blame/26726c76494d85c7b565b764c732dd4473458409/Lib/copyreg.py#L28-L37 complex is 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

sobolevn avatar Nov 10 '22 12:11 sobolevn