-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-46436: Fix command-line option -d/--directory in module http.server #30701
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The substantive change looks good and I confirmed that it worked, but I agree that you should back out the unnecessary changes such as those in import order. They're not necessary to the fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Do revert the import change then this can be merged
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 |
@merwok Done. I have made the requested changes; please review again. |
Thanks for making the requested changes! @merwok: please review the changes made to this pull request. |
Please see https://bugs.python.org/issue46285 |
Thanks for mentioning this issue @merwok. As you pointed out, function The
But method I have just updated my PR to implement this. It fixes both #46285 and #46436. It also adds a command-line option |
Thanks for fixing both issues! I’ll review the code to see if it also addresses my bad feeling about setting attributes directly on class objects. Can we reference two tickets in one pull request title? Also have two blurb notes? |
Nice trick with using a closure to keep
|
Yes that is another solution: moving the creation of Factory methods (like |
I wasn’t suggesting to use |
Yes I think that is necessary. To instantiate a request handler with the
The designer of the class @orsenthil, do you a preference? |
Thanks for reviewing it @merwok! I cleaned up my history and tested the HTTP server locally with Curl for both PRs and I confirm that they both work. You can merge them. |
Can you add your name to Misc/ACKS? |
@merwok It is already there actually. |
Sorry, I can't merge this PR. Reason: |
@merwok Is there anything that I can do to let miss-islington merge? |
Thanks @maggyero for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
…er (pythonGH-30701) Fix command-line option -d/--directory in http.server main function that was ignored when combined with --cgi. Automerge-Triggered-By: GH:merwok (cherry picked from commit 2d08034) Co-authored-by: Géry Ogam <[email protected]>
GH-31102 is a backport of this pull request to the 3.10 branch. |
…er (pythonGH-30701) Fix command-line option -d/--directory in http.server main function that was ignored when combined with --cgi. Automerge-Triggered-By: GH:merwok (cherry picked from commit 2d08034) Co-authored-by: Géry Ogam <[email protected]>
GH-31103 is a backport of this pull request to the 3.9 branch. |
The main branch was locked temporarily, tests were always failing because of a missing indent in a new test. |
@merwok Thanks a lot for your careful review! It really improved the quality of this PR. I think we can now merge the other PR. |
…er (GH-30701) Fix command-line option -d/--directory in http.server main function that was ignored when combined with --cgi. Automerge-Triggered-By: GH:merwok (cherry picked from commit 2d08034) Co-authored-by: Géry Ogam <[email protected]> Co-authored-by: Géry Ogam <[email protected]>
…er (GH-30701) Fix command-line option -d/--directory in http.server main function that was ignored when combined with --cgi. Automerge-Triggered-By: GH:merwok (cherry picked from commit 2d08034) Co-authored-by: Géry Ogam <[email protected]> Co-authored-by: Géry Ogam <[email protected]>
…er (pythonGH-30701) Fix command-line option -d/--directory in http.server main function that was ignored when combined with --cgi. Automerge-Triggered-By: GH:merwok (cherry picked from commit 2d08034) Co-authored-by: Géry Ogam <[email protected]> Co-authored-by: Géry Ogam <[email protected]>
Fix command-line option -d/--directory in http.server main
function that was ignored when combined with --cgi.
https://bugs.python.org/issue46436
Automerge-Triggered-By: GH:merwok
Automerge-Triggered-By: GH:merwok