[issue28707] add 'directory' option to the http.server module

2017-05-24 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs

[issue28707] add 'directory' option to the http.server module

2017-05-24 Thread STINNER Victor
STINNER Victor added the comment: Patch merged. Thanks Stéphane and Julien! Especially because writing the unit test was much more painful than I expected, but it's really worth it! -- ___ Python tracker _

[issue28707] add 'directory' option to the http.server module

2017-05-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset a17a2f52c4c3b37414da95a152fc8669978c7c83 by Victor Stinner (Stéphane Wirtel) in branch 'master': bpo-28707: Add the directory parameter to http.server.SimpleHTTPRequestHandler and http.server module (#1776) https://github.com/python/cpython/commi

[issue28707] add 'directory' option to the http.server module

2017-05-23 Thread STINNER Victor
STINNER Victor added the comment: Stéphane Wirtel added the comment: and of course, sorry for this big delay. I am not sure why you are saying that. Nobody was actively awaiting on this feature, we all have busy scedules. It's ok ;-) -- ___ Python t

[issue28707] add 'directory' option to the http.server module

2017-05-23 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: and of course, sorry for this big delay. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue28707] add 'directory' option to the http.server module

2017-05-23 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Victor, I have added the documentation, but for the unit test, there is already a test with the SimpleHTTPRequestHandler class where they specify the cwd attribute, because the code of mdk does not change the behavior, I think it's not needed to write a test

[issue28707] add 'directory' option to the http.server module

2017-05-23 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- pull_requests: +1856 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue28707] add 'directory' option to the http.server module

2016-12-05 Thread Julien Palard
Changes by Julien Palard : Added file: http://bugs.python.org/file45764/issue28707.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue28707] add 'directory' option to the http.server module

2016-12-04 Thread Julien Palard
Julien Palard added the comment: @Victor you're right, I forgot that partial can also apply keyword arguments. Here is a new patch. -- Added file: http://bugs.python.org/file45753/issue28707.diff ___ Python tracker

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread Xiang Zhang
Xiang Zhang added the comment: +1 for this idea. I use this command everyday in work and every time must cd to the directory is an annoyance. -- nosy: +xiang.zhang ___ Python tracker __

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: Julien Palard added the comment: > If we were able to pass an instance of SimpleHTTPRequestHandler instead of > its class, we'd be able to give the `directory` to the handler during the > `main()`, instead of using with `chdir` and `getcwd` to pass the informat

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread Julien Palard
Julien Palard added the comment: Hi Stéphane, Your patch is simple and elegant, but I'm asking myself a question about the idea to pass a class instead of an instance to the TCPServer ctor (I know that's not your choice). If we were able to pass an instance of SimpleHTTPRequestHandler instead

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: The new feature should be documented in Doc/library/http.server.rst, and maybe also Doc/whatsnew/3.7.rst. Is it possible to write an unit test? -- ___ Python tracker

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread Stéphane Wirtel
New submission from Stéphane Wirtel: When we execute the http.server module, the tool will use the current directory (os.getcwd()) but sometimes we would like to specify a directory on the command line. With the next patch, I try to fix this missing feature ;-) Just with python -m http.serve