[issue26585] Use html.escape to replace _quote_html in http.server

2016-04-02 Thread Martin Panter
Martin Panter added the comment: I left a couple notes on minor style nits (which I can fix when I commit this). But perhaps we should fix the business with tempdir_name and absolute URL paths (Issue 26609) first. -- dependencies: +Wrong request target in test_httpservers.py

[issue23735] Readline not adjusting width after resize with 6.3

2016-04-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset b29edd0108ee by Martin Panter in branch '3.5': Issue #23735: Add SIGWINCH handler for Readline 6.3+ support, by Eric Price https://hg.python.org/cpython/rev/b29edd0108ee New changeset 41c2f8742bfe by Martin Panter in branch 'default': Issue #23735:

[issue25951] SSLSocket.sendall() does not return None on success like socket.sendall()

2016-04-02 Thread Martin Panter
Martin Panter added the comment: I made some simple tweaks to avoid long lines. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26586] Simple enhancement to BaseHTTPRequestHandler

2016-04-02 Thread Martin Panter
Martin Panter added the comment: I didn’t touch 2.7 because that doesn’t have the same header parsing code as Python 3. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker

[issue25951] SSLSocket.sendall() does not return None on success like socket.sendall()

2016-04-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 92947704321c by Martin Panter in branch 'default': Issue #25951: Fix SSLSocket.sendall() to return None, by Aviv Palivoda https://hg.python.org/cpython/rev/92947704321c -- nosy: +python-dev ___ Python

[issue26586] Simple enhancement to BaseHTTPRequestHandler

2016-04-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset f5247195238f by Martin Panter in branch '3.5': Issue #26586: Handle excessive header fields in http.server, by Xiang Zhang https://hg.python.org/cpython/rev/f5247195238f New changeset e8edddb4f74b by Martin Panter in branch 'default': Issue #26586:

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-02 Thread Sylvain Corlay
Sylvain Corlay added the comment: I attached a patch for ccompiler.py adding the new `has_flag` method. -- keywords: +patch Added file: http://bugs.python.org/file42358/has_flag.diff ___ Python tracker

[issue19959] argparse.FileType does not expand tilde "~"

2016-04-02 Thread Martin Panter
Martin Panter added the comment: I’m not super familiar with argparse, but to get a Path or FilePath object, can’t you use that directly instead of argparse’s FileType class? The proposal would conflict with escaping a literal tilde (~) in the shell. It would make it harder for the end user

[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-04-02 Thread Martin Panter
Martin Panter added the comment: Regarding the trailing slash: this is certainly inconsistent, but one call site of translate_path() appears to depend on this being a forward slash. There seems to be confusion about whether the output is an OS path or a URL. I think this is just more thing to

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-02 Thread Sylvain Corlay
New submission from Sylvain Corlay: I would be very useful to have a `has_flag` method in `distutils.CCompiler` similar to `has_function`, allowing to check if the compiler supports certain flags. Cmake has a `CHECK_CXX_COMPILER_FLAG` macro for that purpose, which checks if a simple C++ file

[issue26678] Incorrect linking to elements in datetime package

2016-04-02 Thread Martin Panter
Martin Panter added the comment: That’s good news. I did not expect it, but I seem to have fixed the problem anyway. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue26609] Wrong request target in test_httpservers.py

2016-04-02 Thread Martin Panter
Martin Panter added the comment: Perhaps tempdir_name could get the slash prefixed in setUp() rather than in every test. There is one case that creates index.html which could probably be changed to use self.tempdir, and then the rest could be renamed to say self.base_url. Rejecting requests

[issue26586] Simple enhancement to BaseHTTPRequestHandler

2016-04-02 Thread Martin Panter
Martin Panter added the comment: I propose to commit the “Too many headers” handler as a bug fix, and the other changes to only 3.6. Currently when more than 100 header fields are sent, the connection is killed and the server logs an unhandled exception. -- stage: patch review ->

[issue1346874] httplib simply ignores CONTINUE

2016-04-02 Thread Martin Panter
Martin Panter added the comment: Patrick, can you elaborate on the problem with Apache and renegotiation? How does the 100-continue request, or anticipating the 100 response, help? Perhaps Issue 25919 is relevant in this case, where we want the client to receive an error response before the

[issue25987] collections.abc.Reversible

2016-04-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I was not sure whether Andrew is still interested. I made a simple-minded patch following his proposal. I also added tests and changed docs accordingly. Note that I also changed the expected MRO for MutableSequence in one of the functools tests according to

[issue22757] TclStackFree: incorrect freePtr. Call out of sequence?

2016-04-02 Thread Thomas Caswell
Thomas Caswell added the comment: I do not think this got reported to mpl, is a year and a half old, and has no example, probably can be closed. -- nosy: +tcaswell ___ Python tracker

[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-04-02 Thread Steve Dower
Steve Dower added the comment: Windows-only tests are fine, and certainly better than adding a new parameter just for testing. Forward slashes are valid path segment separators on Windows 99% of the time, so that'll be why nobody has complained. Personally I prefer consistency, but not

[issue26673] Tkinter error when opening IDLE configuration menu

2016-04-02 Thread wysaard
wysaard added the comment: For some reason the freshly downloaded files have this problem too. If I remove my config-main.def and let my package manager get a new one it breaks again. I don't really know the implications of this; is this just a problem with my particular setup or does this

[issue17436] hashlib: add a method to hash the content of a file

2016-04-02 Thread Aviv Palivoda
Aviv Palivoda added the comment: > * hashobj.readfile(filename: str) > * hashobj.readfileobj(file) where file is an object with a read() method > which returns bytes strings I changed the API to the one Victor suggested. > For readfile() it might make more sense to implement it directly in C

[issue26678] Incorrect linking to elements in datetime package

2016-04-02 Thread Andy Maier
Andy Maier added the comment: Martin, I just noticed that your fix must already be active. My link to tzinfo now lands on the long description. So maybe it was not a user error of mine that resolved the problem with the two methods (I was pretty sure I had tried the same syntax I use now),

[issue26678] Incorrect linking to elements in datetime package

2016-04-02 Thread Andy Maier
Andy Maier added the comment: Martin, I can now link to the two methods e.g. via :meth:`py:datetime.tzinfo.utcoffset`, and it resolves nicely. See here (linking to Python 2): https://pywbem.readthedocs.org/en/latest/#pywbem.MinutesFromUTC Don't know why it now works, probably user error I

[issue26488] hashlib command line interface

2016-04-02 Thread Aviv Palivoda
Aviv Palivoda added the comment: Adding new patch after CR changes. -- Added file: http://bugs.python.org/file42355/hashlib-script-mod-md5sum-style-5.patch ___ Python tracker

[issue23371] mimetypes initialization fails on Windows because of TypeError

2016-04-02 Thread Berker Peksag
Berker Peksag added the comment: This is a duplicate of issue 22028 (fixed in 2.7 in 7c4c4e43c452). -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python 3.4.1 Installer ended prematurely (Windows msi)

[issue13952] mimetypes doesn't recognize .csv

2016-04-02 Thread Berker Peksag
Berker Peksag added the comment: I will commit issue13952.patch this weekend to 2.7, 3.5 and default. -- nosy: +berker.peksag stage: needs patch -> patch review versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker