[issue26027] Support Path objects in the posix module

2016-08-26 Thread Martin Panter
Martin Panter added the comment: One more thing, ;) the Windows buildbots are failing to removing a temporary file: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/8173/steps/test/logs/stdio

[issue27425] Tests fail because of git's newline preferences on Windows

2016-08-26 Thread Martin Panter
Martin Panter added the comment: Emanuel: fix_newlines_2.patch seems to change the contents of batch from CRLF to LF newlines, undoing revision 640ccb924b5f. This seems like a step in the wrong direction. Notice $ means LF, and ^M$ means CRLF: $ curl https://bugs.python.org/file44225

[issue26638] Avoid warnings about missing CLI options when building documentation

2016-08-26 Thread Martin Panter
Martin Panter added the comment: Terry: the four "ini" syntax highlighting warnings were also mentioned in <https://bugs.python.org/issue26462#msg271241>. In that bug, we fixed many other similar warnings, but I think we left those as being less easy to fix. One t

[issue26027] Support Path objects in the posix module

2016-08-26 Thread Martin Panter
Martin Panter added the comment: This change causes test_os to produce warnings, and can fail: $ hg update b64f83d6ff24 $ ./python -bWerror -m test -u all -W test_os [. . .] == ERROR: test_path_t_converter

[issue27830] Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments

2016-08-26 Thread Martin Panter
Martin Panter added the comment: FYI revision ffcfa4f005a3 removed the code that uses your new _PyStack_AsDict() function, so now there is a compiler warning: Objects/abstract.c:2313:1: warning: ‘_PyStack_AsDict’ defined but not used [-Wunused-function] _PyStack_AsDict(PyObject **stack

[issue27805] io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-26 Thread Martin Panter
Changes by Martin Panter : -- title: os.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE -> io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE ___ Python t

[issue19884] Importing readline produces erroneous output

2016-08-25 Thread Martin Panter
Martin Panter added the comment: Thanks, I can try to commit the version fix part of the patch when I get a chance. What is EL6.8, is that a Red Hat (Enterprise Linux) thing? -- versions: +Python 3.6 -Python 3.4 ___ Python tracker <ht

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-24 Thread Martin Panter
Martin Panter added the comment: Here is my attempt to drop automatic Content-Length with files. I also dropped the special handling of zero-length iterables, added some tests for that, and removed some unused and misleading bits from other tests. -- Added file: https

[issue18485] mingw: configure for shared build

2016-08-24 Thread Martin Panter
Martin Panter added the comment: Roumen’s patch amends code added by his patches at Issue 17597. Here is a version which is independent. -- nosy: +martin.panter stage: -> patch review versions: +Python 3.6 -Python 3.4 Added file: http://bugs.python.org/file44210/mingw-shared.v2.pa

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-24 Thread Martin Panter
Martin Panter added the comment: Thankyou Eryksun for the detailed explanation. Unfortunately, that means that uploading an unseekable file via urllib.request, or via http.client, isn’t going to work by default on Windows. I see a couple of workarounds with the current code: * Users can

[issue21826] Performance issue (+fix) AIX ctypes.util with no /sbin/ldconfig present

2016-08-24 Thread Martin Panter
Martin Panter added the comment: For the record, if you wanted to actually load the library function on AIX, I understand the code might look a bit like: if sys.platform.startswith("aix"): if sys.maxsize > 2**32: lib = "libc.a(shr_64.o)" else:

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-24 Thread Martin Panter
Martin Panter added the comment: Rolf, just a note that I had to remove some trailing spaces on various continued lines in the Python code before it would let me push this. Other tweaks I made: * Eliminate _read_iterable() and lambda * Rename line → chunk The Windows buildbots fail the test

[issue27643] test_ctypes fails on AIX with xlc

2016-08-23 Thread Martin Panter
Martin Panter added the comment: Michael: When posting to the bug tracker, please trim irrelevant parts of old messages. It makes it hard to see if you actually added anything new. > [Me] If your compiler does not support “signed short” bitfields, maybe we > just have to accept that

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-23 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue25825] AIX shared library extension modules installation broken

2016-08-23 Thread Martin Panter
Martin Panter added the comment: Patch 1 does not apply to 2.7. The offending commit 88a532a31eb3 was not made in that branch. Patch 2 may apply to 2.7, but I am not sure if it is needed or worthwhile. Again, the offending commit r86731 not made to 2.7. There is also a $(BINLIBDEST)/config

[issue25825] AIX shared library extension modules installation broken

2016-08-22 Thread Martin Panter
Martin Panter added the comment: It looks like the change from plain config to config- was made in Issue 9807 (r86731, 3.2). So the patch seems reasonable to me; it is just catching up with that change. This bug was marked for 2.7 as well. Is there anything that needs to be done for 2.7

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2016-08-22 Thread Martin Panter
Martin Panter added the comment: I had understood that changing find_library() would only be useful in combination with the automatic RTDL_MEMBER detection. If you want to mention lack of support for AIX in the documentation, that is okay by me. If you want to propose an alternative

[issue27643] test_ctypes fails on AIX with xlc

2016-08-22 Thread Martin Panter
Martin Panter added the comment: Now I am confused. In <https://bugs.python.org/issue27643#msg271773> we have [Me] If your compiler does not support “signed short” bitfields, maybe we just have to accept that ctypes supports it even though the compiler doesn’t, and skip the test. [M

[issue27828] Regression in http.cookies parsing with single key without value

2016-08-22 Thread Martin Panter
Martin Panter added the comment: I am not the biggest expert on cookie syntaxes, but maybe these reports are related: Issue 25228: Skip over invalid cookies by searching for a semicolon; needs confirming whether it reopens a security hole Issue 17340: Problem with a comma in (or preceding) a

[issue27674] Quote mark breaks http.cookies, Cookie.py processing

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: Quote mark breaks cookie processing -> Quote mark breaks http.cookies, Cookie.py processing ___ Python tracker <http://bugs.python.org/issu

[issue23930] http.cookies.SimpleCookie doesn't parse comma-only separated cookies correctly

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: SimpleCookie doesn't parse comma-only separated cookies correctly -> http.cookies.SimpleCookie doesn't parse comma-only separated cookies correctly ___ Python tracker <http://bugs.pytho

[issue25228] Regression in http.cookies parsing with brackets and quotes

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: Regression in cookie parsing with brackets and quotes -> Regression in http.cookies parsing with brackets and quotes ___ Python tracker <http://bugs.python.org/issu

[issue1375011] http.cookies, Cookie.py: Improper handling of duplicate cookies

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: Improper handling of duplicate cookies -> http.cookies, Cookie.py: Improper handling of duplicate cookies ___ Python tracker <http://bugs.python.org/issue1

[issue27506] make bytes/bytearray translate's delete a keyword argument

2016-08-21 Thread Martin Panter
Martin Panter added the comment: Looks pretty good thanks Xiang. There’s one English grammar problem in a comment (see review), but I can fix that when I commit. -- stage: patch review -> commit review ___ Python tracker <http://bugs.pyth

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2016-08-21 Thread Martin Panter
Martin Panter added the comment: The ctypes tests all seem to be protected with code that checks for None, and explicitly skip the test in that case. The skip message should be visible when you run the test in verbose mode. We could avoid skipping these tests in 2.7 by adding a special case

[issue21826] Performance issue (+fix) AIX ctypes.util with no /sbin/ldconfig present

2016-08-21 Thread Martin Panter
Martin Panter added the comment: It looks like Bert’s patch adjusted two ldconfig calls; the first one was in a BSD-specific branch. Was this intended? Only the second call (default “else:” branch) seems applicable to AIX. Perhaps the performance is improved now that the popen() shell calls

[issue27746] ResourceWarnings in test_asyncio

2016-08-21 Thread Martin Panter
Changes by Martin Panter : -- stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue27746> ___ ___ Python-bugs-list mailing list Un

[issue16764] Make zlib accept keyword-arguments

2016-08-20 Thread Martin Panter
Martin Panter added the comment: All the interesting keyword arguments seem to work now (checking against my notes from earlier). Is there anything else anyone wants to do, or can we close this now? -- stage: commit review -> resolved ___ Pyt

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Terry, in revision 6c8dd4cb4ee7 you wrote “Fix warning tom test_config.” Perhaps this is meant to say “. . . from test_config_key” (taken from b10a312f6d00)? -- nosy: +martin.panter ___ Python tracker <h

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Handling ESPIPE for append mode seems reasonable to me, even as a bug fix for existing versions. But there is a similar problem with "r+" and "w+" modes and unseekable files (unless buffering=0). See Issue 20074. So we can’t say in g

[issue16968] Fix test discovery for test_concurrent_futures.py

2016-08-20 Thread Martin Panter
Martin Panter added the comment: I don’t know much about the concurrent.futures testing, but in general IMO it makes more sense to call thread.join(), or at least @reap_threads, in each individual test case that needs it. If appropriate, you can call join() with a one-second timeout, which

[issue14853] test_file.py depends on sys.stdin being unseekable

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Long story short: Don’t change Python 2, and just restore the seek(-1) test in 3. I agree in general it is better to skip a test than completely remove it. However, in Python 2, the test that Victor proposes to restore is redundant with test_file2k. Sys.stdin

[issue20074] open() of read-write non-seekable streams broken

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Currently, the documentation for TextIOWrapper says it is “a buffered text stream over a BufferedIOBase binary stream.” If passing a RawIOBase (buffering=0) file works, that seems like an undocumented accident. This is also explicitly disallowed with open

[issue26907] Add missing getsockopt constants

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Patch looks fine to me. -- stage: -> commit review ___ Python tracker <http://bugs.python.org/issue26907> ___ ___ Python-

[issue27816] sock.proto does not reflect actual protocol

2016-08-20 Thread Martin Panter
Martin Panter added the comment: The documentation already says “Socket objects also have these (read-only) attributes that correspond to the values given to the socket constructor. . . . socket.proto”. For existing versions of Python, I’m not sure there is much else we can do. In Issue

[issue1223] httplib does not handle ssl end of file properly

2016-08-20 Thread Martin Panter
Martin Panter added the comment: I think the default of suppress_ragged_eofs=True was a bad idea because by default you cannot tell a secure EOF signal from an insecure error; see Issue 27815. -- nosy: +martin.panter ___ Python tracker <h

[issue27815] Make SSL suppress_ragged_eofs default more secure

2016-08-20 Thread Martin Panter
New submission from Martin Panter: In the SSL module, the wrap_socket() function (and corresponding SSLContext method) take a flag called “suppress_ragged_eofs”. It defaults to True, which makes me uncomfortable. The documentation says: ''' The parameter “suppress_ragged_eofs

[issue27813] When I assign for a item which list of single item

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Original post: “When I assign for a item which list of single item, it seems can't set a value for item which I want to.” See the FAQ entry <https://docs.python.org/3.5/faq/programming.html#how-do-i-create-a-multidimensional-list>. When you mult

[issue27614] Race in test_docxmlrpc.py

2016-08-20 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-08-20 Thread Martin Panter
Martin Panter added the comment: Here is my documentation proposal. -- components: +Documentation -Library (Lib) stage: -> patch review versions: +Python 3.5 Added file: http://bugs.python.org/file44164/iter-unsupported.patch ___ Python trac

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-20 Thread Martin Panter
Martin Panter added the comment: I committed the gc_collect() change to 3.5 as well, because it helped me with a separate test case. Here is the remaining change, for 3.6 only. I added a timeout to the join() call. This matches the @reap_threads decorator, which times out after 1 s

[issue27800] Regular expressions with multiple repeat codes

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Okay so it sounds like my usage is valid if I add the brackets. I will try to come up with a documentation patch as some stage. The reason why it is not supported without brackets is to maintain a bit of consistency with the question mark (?), which modifies

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-19 Thread Martin Panter
Martin Panter added the comment: The origin of this seems to be r68835 and Issue 5008. Victor mentioned imitating the Gnu C library. Maybe there is a better way that also supports non-seekable files better, perhaps handle ESPIPE without failing. This also affects Python 2, if you consider

[issue27802] Add __eq__ and __ne__ to collections.abc.Sequence.

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Your implementation looks like it will make a Sequence equal to a list and a tuple, even though lists and tuples are never equal to each other. -- nosy: +martin.panter type: -> enhancement ___ Python tracker &l

[issue20132] Many incremental codecs don’t handle fragmented data

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Split off Issue 27799 for the base-64 incremental decoder -- dependencies: +Fix base64-codec and bz2-codec incremental decoders ___ Python tracker <http://bugs.python.org/issue20

[issue27800] Regular expressions with multiple repeat codes

2016-08-19 Thread Martin Panter
New submission from Martin Panter: In the documentation for the “re” module, it says repetition codes like {4} and “*” operate on the preceding regular expression. But even though “a{4}” is a valid expression, the obvious way to apply a “*” repetition to it fails: >>> re.com

[issue27799] Fix base64-codec and bz2-codec incremental decoders

2016-08-19 Thread Martin Panter
New submission from Martin Panter: This is split off a large patch I posted at Issue 20132. My new patch here fixes the following two flaws. 1. There is special code in the bz2 decoder that returns an empty text str object at EOF, even though bz2-codec is a bytes-to-bytes codec: >>&g

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Serhiy’s two proposals won’t work for codecs that include non-zero output for zero input: >>> tuple(iterencode((), "utf-8-sig")) (b'\xef\xbb\xbf',) >>> encode(b"", "uu") b'begin 666 \n \nend\n'

[issue26050] Add new StreamReader.readuntil() method

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Also it looks like the b'\n' default confuses Sphinx. Maybe it needs extra escaping? -- ___ Python tracker <http://bugs.python.o

[issue26050] Add new StreamReader.readuntil() method

2016-08-18 Thread Martin Panter
Martin Panter added the comment: In revision 83450939b106, Yury added some documentation for readuntil(). I am not familiar with this StreamReader class, but maybe Mark or someone else can check if the remaining changes in his patch are still useful. I can suggest some spelling and wording

[issue27506] make bytes/bytearray delete a keyword argument

2016-08-17 Thread Martin Panter
Martin Panter added the comment: I can look at enhancing the tests at some stage, but it isn’t a high priority for me. Regarding translate() with no arguments, it makes sense if you see it as a kind of degenerate case of neither using a translation table, nor any set of bytes to delete

[issue27643] test_ctypes fails on AIX with xlc

2016-08-17 Thread Martin Panter
Changes by Martin Panter : -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue27643> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue27643] test_ctypes fails on AIX with xlc

2016-08-17 Thread Martin Panter
Martin Panter added the comment: Michael, byref() is just a helper for passing an object’s address to a C function. Calling func(byref(b), ...) in Python is equivalent to the C code unpack_bitfields(&b, ...) I still think the root problem is in unpack_bitfields(). When compiled with

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-17 Thread Martin Panter
Martin Panter added the comment: Yes I agree it would make sense to separate the test_httplib changes from the general change. I thought this task would be a very easy change, and noticed it wasn’t that simple the last minute. I would like to adjust the cleanup call to self.addCleanup

[issue27791] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread"

2016-08-17 Thread Martin Panter
Martin Panter added the comment: I just happened to notice this failure on 3.5 as well: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.5/builds/791/steps/test/logs/stdio -- nosy: +martin.panter versions: +Python 3.5

[issue27784] Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots

2016-08-17 Thread Martin Panter
Martin Panter added the comment: I think I have seen these kind of errors pop up randomly on various tests on Free BSD buildbots (at least in the last few months or so). Are the buildbots so overloaded that they drop localhost connections? Or are localhost TCP connections generally just that

[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-17 Thread Martin Panter
New submission from Martin Panter: In Issue 12319, there are many iterations of a patch that adds a new TestCase subclass to Lib/test/test_httplib.py. However it never got run by the main regrtest infrastructure, because nobody remembered to add the class to the list of test classes. So I

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-17 Thread Martin Panter
Martin Panter added the comment: Patch 12 has the following changes: * Change the chunked_encoding parameter to keyword-only * Drop most of the change regarding the UpdatingFile test (see code review) * Update the urlopen() TypeError to mention “data” may be a file object * Fix and update the

[issue6143] IDLE - an extension to clear the shell window

2016-08-16 Thread Martin Panter
Changes by Martin Panter : -- nosy: -martin.panter ___ Python tracker <http://bugs.python.org/issue6143> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1602] windows console doesn't print or input Unicode

2016-08-14 Thread Martin Panter
Martin Panter added the comment: I think this CGI thing is a separate bug, just exacerbated by the stdin.encoding problem. :) The urllib.parse.parse_qs() function takes an encoding parameter to figure out what to do with percent-encoded values: "%A9" → b"\xA9".decode(...

[issue3244] multipart/form-data encoding

2016-08-14 Thread Martin Panter
Martin Panter added the comment: I think encoding the user’s IP address into the boundary is a bad idea. Forest’s version uses the existing “email” package, which calls random.randrange(sys.maxsize) and searches through the data for conflicts. I haven’t really researched this, but I suspect

[issue27761] Private _nth_root function loses accuracy

2016-08-13 Thread Martin Panter
Martin Panter added the comment: The problem is more widespread than just Power PC. The same failures (+/-29) are also seen on the three s390x buildbots. There are multiple failures of testExactPowers(Negatives) on http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/11140/steps

[issue1602] windows console doesn't print or input Unicode

2016-08-13 Thread Martin Panter
Martin Panter added the comment: For compatibility, I think it may be good to add custom implementations of the buffer attribute and detach() method to stdin/out. They should be able to at least read and write ASCII bytes. It might be easiest to keep them as the current BufferedReader/Writer

[issue24363] httplib fails to handle semivalid HTTP headers

2016-08-12 Thread Martin Panter
Martin Panter added the comment: In order to avoid messing too much with the intricacies of the existing email parsing, here is a patch for Python 3 that limits the behaviour changes to the HTTP module. It should fix the bad handling of broken header lines. As a side effect, it should also

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-08-12 Thread Martin Panter
Martin Panter added the comment: No super important reason, just to avoid indenting the code. This is a medium-sized test function, with a few long lines already. And if you keep the indentation the same, it makes it easier to port other changes to Python 2, look through the repository

[issue27746] ResourceWarnings in test_asyncio

2016-08-12 Thread Martin Panter
New submission from Martin Panter: $ ./python -bWerror -m test -r -u all . . . 0:12:58 [ 70/402] test_asyncio Exception ignored in: > Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/asyncio/sslproto.py", line 329, in __del__ source=self) Re

[issue23545] Turn on extra warnings on GCC

2016-08-11 Thread Martin Panter
Martin Panter added the comment: I didn’t look too closely, but I did see that _ssl_locks_count is unsigned int. I was compiling for x86-64 Linux, where int is 32 bits and size_t is 64. So maybe GCC was optimizing the (size_t) cast away, and then rightfully warning that the largest unsigned

[issue1732367] Document the constants in the socket module

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Issue 12887 is open to add explanations of the SO_* constants -- dependencies: +Documenting all SO_* constants in socket module ___ Python tracker <http://bugs.python.org/issue1732

[issue12887] Documenting all SO_* constants in socket module

2016-08-11 Thread Martin Panter
Martin Panter added the comment: See also Issue 27409, where I am proposing to list the SO_* and other constants by name (with associated Python version and whether they are missing on some platforms), but without descriptions. -- nosy: +martin.panter

[issue27348] traceback (and threading) drops exception message

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Have you had any luck reviewing this Robert? -- ___ Python tracker <http://bugs.python.org/issue27348> ___ ___ Python-bugs-list m

[issue27614] Race in test_docxmlrpc.py

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Thanks for the explanation. It seems a bit strange that the server thread was running so slow while the main thread did one thousand polls over at least one second. Perhaps there is a blocking DNS call hidden somewhere in it somewhere? In any case, I am pretty

[issue25825] AIX shared library extension modules installation broken

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Patch1 looks fine to me, though I will have to rely on you people to verify that it does what it’s supposed to. Do you want me to commit it straight away, or wait for your follow-up patch? -- ___ Python tracker

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Both parts of your commit seem to have helped. However I found two failures still happening, and one new failure: 1. Casablanca and El_Aaiun still failing since the original commit: http://buildbot.python.org/all/builders/PPC64%20Fedora%203.x/builds/1318/steps

[issue27181] Add geometric mean to `statistics` module

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Tests fail on a Power PC buildbot: http://buildbot.python.org/all/builders/PPC64LE%20Fedora%203.x/builds/1476/steps/test/logs/stdio == FAIL: testExactPowers (test.test_statistics.Test_Nth_Root

[issue27506] make bytes/bytearray delete a keyword argument

2016-08-11 Thread Martin Panter
Martin Panter added the comment: I agree it would be worth checking for a slowdown. As well as giving the option of omitting the table argument, it would make call sites easier to read. It would avoid suggesting that the first argument is translated to the second, like maketrans(). data

[issue23545] Turn on extra warnings on GCC

2016-08-11 Thread Martin Panter
Martin Panter added the comment: The proposed options add exactly one warning for me (ignoring warnings from libffi). How would you work around this: ./Include/pymem.h:136:18: warning: comparison is always false due to limited range of data type [-Wtype-limits] ( ((size_t)(n

[issue15495] enable type truncation warnings for gcc builds

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Issue 23545 has a patch with some comments from me about adding other warnings via “autoconf foo”, so you could copy from that if you want. The few warnings that I glanced at do not look troublesome. But maybe it is worth working around them to see other

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-11 Thread Martin Panter
Martin Panter added the comment: I am pretty happy with the latest patch. I left one comment. I will try to give it a more thorough review and actually test it out at some point, but I don’t anticipate any major problems. -- ___ Python tracker

[issue27364] Deprecate invalid unicode escape sequences

2016-08-11 Thread Martin Panter
Martin Panter added the comment: I am trying out your patch at the moment. There are plenty of test suite failures; I ran the test suite with approximately the following: ./python -bWerror -m test -Wr -j0 -u network -x test_{mailbox,shelve,faulthandler,multiprocessing_main_handling,venv

[issue16764] Make zlib accept keyword-arguments

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Xiang’s patch looks okay from a correctness point of view -- ___ Python tracker <http://bugs.python.org/issue16764> ___ ___ Pytho

[issue10721] Remove HTTP 0.9 server support

2016-08-11 Thread Martin Panter
Martin Panter added the comment: There are a few small benefits from removing it, but I am not too fussed if we decide to leave it. * If we keep it, should we fix it so that it doesn’t deadlock? Otherwise, we carry around buggy and untested code that claims to be a HTTP 0.9 server but isn’t

[issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9

2016-08-11 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +Remove HTTP 0.9 server support ___ Python tracker <http://bugs.python.org/issue26578> ___ ___ Python-bugs-list mailin

[issue27506] make bytes/bytearray delete a keyword argument

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Serhiy, you assigned this to yourself. What do you think of my patch? -- ___ Python tracker <http://bugs.python.org/issue27

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-08-10 Thread Martin Panter
Martin Panter added the comment: Any news on the remaining failures for year 2037? What about the buildbots that time out? Can the size of the tests be reduced, or perhaps should the buildbots be updated to extend the timeout? -- ___ Python tracker

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Martin Panter
Changes by Martin Panter : -- assignee: orsenthil -> martin.panter ___ Python tracker <http://bugs.python.org/issue12319> ___ ___ Python-bugs-list mai

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Martin Panter
Martin Panter added the comment: Some of the header field validation was included in Demian’s first patch, raising HTTPEncodingError. But I don’t know why he included it. Maybe it was more appropriate then; it looks like that patch took a different approach than the current encode_chunked

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Martin Panter
Martin Panter added the comment: _is_textIO(): I’m sorry but I still prefer the TextIOBase check over read(0). Each option has a disadvantage, but with TextIOBase, the disadvantage only affects text files, not byte files. Maybe another option is to stick with the current checking of the “mode

[issue26686] email.parser stops parsing headers too soon when given a defective message.

2016-08-10 Thread Martin Panter
Martin Panter added the comment: Thanks David. Since I am more intersted in fixing this robustly for HTTP and similar protocols, I might focus on just Issue 24363. Either confine my changes to the existing HTTP (or new) policy and start using that, or just address this from the HTTP package

[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread Martin Panter
Martin Panter added the comment: If the code does happen to mutate the dictionary, there would still be a bug with modifying any dictionary passed in by the caller. But I suspect there is no bug. So I am not sure the change is worth it. If we do go ahead, the documentation needs updating to

[issue10721] Remove HTTP 0.9 server support

2016-08-10 Thread Martin Panter
Martin Panter added the comment: FWIW I doubt HTTP 1.1 ever required support for other HTTP versions; see for instance <https://tools.ietf.org/html/rfc2068#section-19.7>. This v2 patch adds another test that includes what I understand is a true HTTP 0.9 request (although the mock conn

[issue27712] Tiny typos in import.rst

2016-08-09 Thread Martin Panter
New submission from Martin Panter: Looks good to me -- nosy: +martin.panter stage: -> commit review versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issu

[issue26686] email.parser stops parsing headers too soon when given a defective message.

2016-08-09 Thread Martin Panter
Martin Panter added the comment: . It would be nice to get feedback if my patch is sensible, especially from people familiar with normal usage of the “email” module, as opposed with the usage by the HTTP module. -- stage: -> patch rev

[issue27716] http.client truncates UTF-8 encoded headers

2016-08-09 Thread Martin Panter
Martin Panter added the comment: For the test case given, the main problem is actually that a header field is being incorrectly split on a Latin-1 “next line” control code U+0085. The problem is already described under Issue 22233. It looks like I wrote a patch for that a while ago, so it

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-09 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue27414> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-07 Thread Martin Panter
Martin Panter added the comment: Yes when I say “text” I mean str objects, as opposed to byte strings, etc. I wonder if it would be safer to test for TextIOBase. With the read(0) hack, the zero size may be unexpected. A file object may need special handling to generate an empty result, or to

[issue23740] http.client request and send method have some datatype issues

2016-08-07 Thread Martin Panter
Martin Panter added the comment: I’ve decided I would prefer deprecating the Latin-1 encoding, rather than adding more encoding support for iterables and text files. If not deprecating it altogether, at least prefer just ASCII encoding (like Python 2). The urlopen() function already rejects

[issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings

2016-08-06 Thread Martin Blais
Martin Blais added the comment: Thank you Martin! -- ___ Python tracker <http://bugs.python.org/issue24278> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1621] Do not assume signed integer overflow behavior

2016-08-05 Thread Martin Panter
Martin Panter added the comment: Xiang: regarding your overflow_fix_in_listextend.patch, what do you think about adding a comment or debugging assertion instead, something like: /* It should not be possible to allocate a list large enough to cause an overflow on any relevant platform

[issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal

2016-08-05 Thread Martin Panter
Martin Panter added the comment: I am pretty sure it isn’t legal. Python’s inet_aton() just wraps the underlying OS call. According to Posix <http://pubs.opengroup.org/onlinepubs/9699919799/functions/inet_addr.html>, the leading zero in 093 would indicate octal notation, but the nine is

[issue27614] Race in test_docxmlrpc.py

2016-08-05 Thread Martin Panter
Martin Panter added the comment: Earl: Can you give any more details on your original hang or race condition? Was it related to setting PORT, or shutting down the server, or something else? It is not clear from your patch. I have tried adding artificial sleep() calls at various points but

<    8   9   10   11   12   13   14   15   16   17   >