Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjusting socketserver.BaseServer #13082

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

tungol
Copy link
Contributor

@tungol tungol commented Nov 24, 2024

This one might be a bad idea. fileno, get_request, and server_bind are documented to exist on BaseServer, but they don't. Of these, only get_request is actually called from the existing implementation of BaseServer (as part of handle_request and serve_forever).

In the ideal case, they'd probably all be abstract methods in CPython.

This one might be a bad idea. fileno, get_request, and server_bind
are documented to exist on BaseServer, but they don't. Of these,
only get_request is actually called from the existing implementation
of BaseServer (as part of handle_request and serve_forever).

In the ideal case, they'd probably all be abstract methods in
CPython.
@tungol tungol changed the title adjusting socketserver.BaseServer adjusting socketserver.BaseServer Nov 24, 2024
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@tungol
Copy link
Contributor Author

tungol commented Nov 24, 2024

No mypy primer hits, but I'm not convinced that means this is the right thing to do.

@tungol
Copy link
Contributor Author

tungol commented Nov 24, 2024

I opened a CPython issue about it: python/cpython#127209

@tungol tungol marked this pull request as draft November 24, 2024 01:03
@tungol
Copy link
Contributor Author

tungol commented Nov 24, 2024

I could also try making them abstract in the stubs, even if CPython doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant