GH-100807: 🔥 Drop unused BADF def from stdlib socket
#100807
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This variable is unused and is leftover from the decade-old cleanup/refactoring. It was initially hardcoded in Python 2.2 via e5e50591. Then, almost two years later, in Python 2.3, it was replaced with this constant via 70d566be. Four years after that, Python 2.7 had a substantial refactoring of the
socketmodule which removed the use of this constant in7d0a8264 and during almost 16 following years it remained unused.
This patch removes it as it's not really necessary to keep it 1�7 it shouldn't be exposed via
socket.EBADFin addition toerrno.EBADF.