◐ Shell
reader mode source ↗
Skip to content

[3.6] bpo-31639: Use threads in http.server module. (GH-5018)#6203

Closed
miss-islington wants to merge 1 commit into
python:3.6from
miss-islington:backport-8bcfa02-3.6
Closed

[3.6] bpo-31639: Use threads in http.server module. (GH-5018)#6203
miss-islington wants to merge 1 commit into
python:3.6from
miss-islington:backport-8bcfa02-3.6

Conversation

@miss-islington

@miss-islington miss-islington commented Mar 23, 2018

Copy link
Copy Markdown
Contributor

(cherry picked from commit 8bcfa02)

Co-authored-by: Julien Palard julien@palard.fr

https://bugs.python.org/issue31639

(cherry picked from commit 8bcfa02)

Co-authored-by: Julien Palard <julien@palard.fr>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@JulienPalard: Backport status check is done, and it's a success ✅ .

@ned-deily ned-deily left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

+0 I'm not sure that is appropriate for 3.6.x at this stage but I'm willing to be persuaded. BTW, I believe all of the comments apply to the 3.7 and master versions of the changes. I'm too lazy to duplicate.

@bedevere-bot

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@JulienPalard

Copy link
Copy Markdown
Member

@ned-deily thanks for the feedback. I think it's ok for 3.6 (not as a language bug fix I agree, but as a usability fix): I encontered the issue multiple time by using "python3 -m http.server", typically to test the doc. I expect other people to find the bug too.

@ned-deily

Copy link
Copy Markdown
Member

OK, I guess this is OK for 3.6. If you want to address some or all of the comments in a follow-on PR for master and 3.7, that's fine.

@JulienPalard

Copy link
Copy Markdown
Member

As discussed with @vstinner, I'll finally won't backport it to 3.6: introducing a new class (changing the API) is something we should not do. It's still fixable without changing the API by hiding the ThreadedHTTPServer class in the test function if someone want to do it.

@geryogam

geryogam commented May 28, 2018

Copy link
Copy Markdown
Contributor

@JulienPalard @miss-islington Thanks for this PR. However what do you think about changing the class name http.server.ThreadedHTTPServer to http.server.ThreadingHTTPServer, in order to be consistent with the already existing classes:

  • socketserver.ForkingTCPServer;
  • socketserver.ForkingUDPServer;
  • socketserver.ThreadingTCPServer;
  • socketserver.ThreadingUDPServer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants