[issue26685] Raise errors from socket.close()

2016-10-18 Thread Martin Panter
Martin Panter added the comment: If libuv closes the FD (step 3), won’t you get the same sort of problem if the uvloop user tries to do something else with the Python socket object, e.g. call getpeername()? I see the fileno=... parameter for sockets as a parallel to the os.fdopen() function

[issue26685] Raise errors from socket.close()

2016-10-18 Thread Martin Panter
Martin Panter added the comment: I think your code example is not very robust, because the “sock” object refers to a freed file descriptor, and could easily close an unrelated file: $ python3.5 -q >>> import socket >>> sock0 = socket.socket() >>> sock = socket

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-18 Thread Martin Panter
Martin Panter added the comment: Thanks for tackling this one Tim. I agree with Berker that the :const:`True` changes are out of scope (some introduce errors and inaccuracies). class CalledProcessError(SubprocessError): -"""Raised when a check_call() or check_output() proc

[issue28466] SIGALRM fails to interrupt time.sleep() call on Python 3.5

2016-10-17 Thread Martin Panter
Martin Panter added the comment: This is by design; see PEP 475, and the documentation <https://docs.python.org/3.5/library/time.html#time.sleep>. If you make your signal handler raise an exception, it will interrupt the sleep() call most of the time. But if the signal happens to be re

[issue27659] Check for the existence of crypt()

2016-10-17 Thread Martin Panter
Martin Panter added the comment: If there is an obscure platform where we don’t include the right header file for a function, changing the warning into an error would cause the build to fail. If we do make it an error, it should only be so for 3.7

[issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux

2016-10-17 Thread Martin Panter
Martin Panter added the comment: PS: I agree it would be good to add more documentation for cross-compiling. I tried to suggest something in an outdated patch once before; see the bottom of <https://bugs.python.org/file42143/cross-override.pa

[issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux

2016-10-17 Thread Martin Panter
Martin Panter added the comment: Well, I am not really an expert on the setup.py stuff, but I will ask a question anyway that may help the review process: Why do you remove the code that loops over Modules/Setup? Maybe is it redundant with the other code for removing the already-built

[issue28462] subprocess pipe can't see EOF from a child in case of a few children run with subprocess

2016-10-17 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-16 Thread Martin Panter
Martin Panter added the comment: So is your “automatic closing” due to your program, or a bug in Python? You will have to give more information if you want anyone else to look at this. When I run the code you posted (with various modules imported) all I get is NameError: name 'yellow_page

[issue27815] Make SSL suppress_ragged_eofs default more secure

2016-10-15 Thread Martin Panter
Martin Panter added the comment: Patch v2 also adds a new attribute to context objects. With this I can work around my Google server bug: context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH) context.suppress_ragged_eofs = True handler = urllib.request.HTTPSHandler(context=context

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-15 Thread Martin Panter
Martin Panter added the comment: I still think something is closing your socket object. I cannot see what it is from the code you posted though. If you update the print() call, I expect you will see that it is closed, and the file descriptor is set to -1: print("sock_err @ ", msg

[issue28143] ASDL compatibility with Python 3 system interpreter

2016-10-15 Thread Martin Panter
Martin Panter added the comment: Are you sure about adding the space after tab? I am no Python 2 expert, but I don’t see it: $ python2 -c 'print "\t", ""' | cat -A ^I$ Anyway, I’m not happy applying this patch unless it is clear that raising the Python version required t

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-14 Thread Martin Panter
Martin Panter added the comment: This indicated to me that the socket object has indeed been closed _before_ you call getpeername(): - print(sock)>>> sock.getpeername()>>> OS.Error[WinError10038]an operation was attempted on something that is not a socket ==

[issue27800] Regular expressions with multiple repeat codes

2016-10-14 Thread Martin Panter
Martin Panter added the comment: I committed my patch as it was. I understand Silent Ghost’s objection was mainly that they thought the new paragraph or its positioning wouldn’t be very useful, but hopefully it is better than nothing. Perhaps in the future, the documentation could

[issue28290] BETA report: Python-3.6 build messages to stderr: AIX and "not GCC"

2016-10-14 Thread Martin Panter
Martin Panter added the comment: For the blake problem, I guess the structures may either get laid out incorrectly, or you might be lucky and they will get the desired packing by default. You might have to find if XLC has another way to enable struct packing. Or in the worst case, rewrite

[issue27844] Python-3.6a4 build messages to stderr (on AIX and xlc compiler)

2016-10-14 Thread Martin Panter
Martin Panter added the comment: The warnings about platform-dependent libraries should be suppressed now thanks to Issue 27713. The warnings from Modules/_ctypes/_ctypes_test.c about bitfields are covered by Issue 27643. Can you help with developing the patch? The remaning warnings all seem

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

2016-10-14 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-14 Thread Martin Panter
Martin Panter added the comment: The getpeername() method is just a wrapper around the OS function, so it is not going to work if the socket file descriptor is closed or invalid (-1). You haven’t provided enough code or information for someone else to reproduce the problem. But it sounds like

[issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env

2016-10-14 Thread Martin Panter
Martin Panter added the comment: The test tries using ProxyHandler directly. It looks like that handler intentionally ignores the request if it matches no_proxies (Issue 6894), so I think Piotr’s approach of adjusting the tests is correct. The patch looks good to me, though I would drop

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-14 Thread Martin Panter
Martin Panter added the comment: Just some minor comments on aix-library.161004.patch: Instead of _util.py, I wonder if the new file should have a different name, like _util_common.py, to avoid being too similar to util.py. +def get_shared(input): +"""Internal support fu

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-10-14 Thread Martin Panter
Martin Panter added the comment: This is my understanding: We are talking about the code at <https://hg.python.org/cpython/annotate/v3.6.0b2/Lib/sysconfig.py#l377> that switches the values of LDSHARED and/or BLDSHARED. Yes, Michael H. was suggesting to both move and change (revert

[issue28445] Wrong documentation for GzipFile.peek

2016-10-14 Thread Martin Panter
Martin Panter added the comment: The peek() method was originally added by Issue 9962, where Antoine was trying to imitate the BufferedReader.peek() API. However because “the number of bytes returned may be more or less than requested”, I never understood what this methods were good for; see

[issue28436] GzipFile doesn't properly handle short reads and writes on the underlying stream

2016-10-14 Thread Martin Panter
Martin Panter added the comment: I would fix the documentation to say the underlying stream should do “exact” reads and writes, e.g. one that implements io.BufferedIOBase.read(size) or write(). In my experience, most APIs in Python’s library assume or require this, rather than the “raw

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-10-11 Thread Martin Panter
Martin Panter added the comment: For arbitrary C-contiguous buffers aka “bytes-like objects” (which are not just arrays of bytes), I think this trick relies on Issue 15944, which is only added in 3.5+. -- ___ Python tracker <rep...@bugs.python.

[issue28418] Raise Deprecation warning for tokenize.generate_tokens

2016-10-11 Thread Martin Panter
Martin Panter added the comment: There is related discussion in Issue 12486 about supporting unencoded text input. The current patch there actually already raises a warning and removes call sites from the Python library, though it does not add a doc string. -- nosy: +martin.panter

[issue28394] Spelling fixes

2016-10-09 Thread Martin Panter
Martin Panter added the comment: Thanks Ville. I added some more fixes of my own I had been saving up. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Pytho

[issue28373] input() prints to original stdout even if sys.stdout is wrapped

2016-10-09 Thread Martin Panter
Martin Panter added the comment: >From memory, there are at least three code paths for input(): 1. Fallback implementation, used when stdout is a pipe or other non-terminal 2. Default PyOS_ReadlineFunctionPointer() hook, used when stdout is a terminal: https://docs.python.org/3.5/c-

[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-09 Thread Martin Panter
Martin Panter added the comment: For replacing macros, I think “static inline” may be fine, even with older compilers. Maybe these PyDTrace_ functions could also be static inline, since they were originally macros. Or do they really need to be linkable inline functions

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-01 Thread Martin Panter
Martin Panter added the comment: Hi Michael, I have done some cleanup and modifications to your patch. The result is in aix-library.161001.patch, which has all the changes, i.e. it is not based on another patch. More significant changes I made: * Change getExecLibPath_aix() and find_parts

[issue28275] LZMADecompressor.decompress Use After Free

2016-09-30 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2016-09-30 Thread Martin Panter
Martin Panter added the comment: Other tests in this file skip the test if libc_name is None. So I think it would make more sense to skip the test rather than fail in test_find(). I.e. if not found: self.skipTest("Could not find c and m libraries") If you are confident that fi

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-09-30 Thread Martin Panter
Martin Panter added the comment: The test in 2.7 (1aae9b7ff321) seems to cause a Windows 8.1 buildbot to hang in test_sqlite. I deduced this because there is no mention of "test_sqlite" in the test log output, compared to a previous successful test log. http://buildbot.python.org/al

[issue28311] AIX shared library extension modules installation broken - Python2.7

2016-09-30 Thread Martin Panter
Martin Panter added the comment: I think this might be separate to Issue 25825, but my investigation at <https://bugs.python.org/issue25825#msg273425> may be relevant. Following on from that, I reopened Issue 18235, which seems to be about the same LDSHARED vs BLDSHARED problem, but

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-09-30 Thread Martin Panter
Martin Panter added the comment: Reopening this to fix the original bug in 2.7, and to improve things for Python 3. Michael Felt (or anyone else): Can you confirm if Michael Haubenwallner’s suggested patch from <https://bugs.python.org/issue18235#msg219888> is appropriate? It look

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-09-30 Thread Martin Panter
Martin Panter added the comment: It might have been good to get this reopened to attract more attention to it. Anyway, Issue 28311 has now been opened for 2.7, and it seems to be about the same problem. -- nosy: +martin.panter superseder: -> AIX shared library extension modu

[issue28275] LZMADecompressor.decompress Use After Free

2016-09-28 Thread Martin Panter
Martin Panter added the comment: Here is a patch to fix the corresponding bug in the bzip decompressor. I will try to commit it soon if there are no objections. For the record, these bugs were introduced with the max_length support in Issue 15955. The bzip code was modelled after the LZMA

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2016-09-26 Thread Martin Panter
Martin Panter added the comment: The purpose of the test seems to be to check that finding and loading works for widely-available libraries. However I suspect find_library("c") can fail on other platforms as well. Presumably that is why there is the special case for Cygwin

[issue28282] find_library("c") defers to find_msvcrt()

2016-09-26 Thread Martin Panter
New submission from Martin Panter: Issue 1793 added ctypes.util.find_msvcrt(), and special cases that map find_library("c") and "m" to the new function. However this contradicts the documentation <https://docs.python.org/3.5/library/ctypes.html#finding-shared-l

[issue28270] [MinGW] Can't compile Modules/posixmodule.c by MinGW - several macro are missed

2016-09-25 Thread Martin Panter
Martin Panter added the comment: This competes with the patch at Issue 17598. How are you building Python? I presume you are not using the configure script. It would be good to come up with a patch that addresses for both cases. -- nosy: +martin.panter

[issue28267] [MinGW] Crash at start when compiled by MinGW for 64-bit Windows using PC/pyconfig.h

2016-09-25 Thread Martin Panter
Martin Panter added the comment: It looks like Issue 4709 may also be a duplicate. Your added definition is distant from the comment explaining it. And why not open MS_WIN64 to any Windows compiler, rather than limiting it to just MSC and MINGW? I presume you are not building by running

[issue10504] Trivial mingw compile fixes

2016-09-25 Thread Martin Panter
Martin Panter added the comment: The patch seems to share some changes to Modules/posixmodule.c with parts of Issue 17598’s patch (and one common part has already been applied). Issue 17591 already fixed to lowercase. Just now Issue 28269 has been opened about strcasecmp

[issue28267] [MinGW] Crash at start when compiled by MinGW for 64-bit Windows using PC/pyconfig.h

2016-09-25 Thread Martin Panter
Martin Panter added the comment: This probably duplicates Issue 17590, although the extra context here is nice :) What do you think of my patch there, which also removes them from PC/pyconfig.h? I think it is better to define things in one place if possible. -- nosy: +martin.panter

[issue23505] Urlparse insufficient validation leads to open redirect

2016-09-24 Thread Martin Panter
Martin Panter added the comment: It is not clear what Yassine’s bug is. Maybe it is about round-tripping from urlparse() → urlunparse(). If so, it could be solved by fixing either of the following two problems: 1. urlunparse() forgets the initial pair of slashes when netloc="".

[issue21109] tarfile: Traversal attack vulnerability

2016-09-24 Thread Martin Panter
Martin Panter added the comment: Issue 17102 is open about the specific problem of escaping the destination directory. Maybe it is a duplicate, but this bug also discusses other problems. -- dependencies: +tarfile extract can write files outside the destination path

[issue28221] Unused indata in test_ssl.ThreadedTests.test_asyncore_server

2016-09-23 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue28143] ASDL compatibility with Python 3 system interpreter

2016-09-23 Thread Martin Panter
Martin Panter added the comment: That would get the patch mostly working with 2.6+. Is it okay to break Python < 2.6 support? I know there was an OS X Tiger buildbot using 2.5 until recently; see Issue 28039. Personally, I would rather focus on the problems with make dependencies, bu

[issue27950] Superfluous messages when running make

2016-09-22 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- versions: +Python 3.7 -Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27950] Superfluous messages when running make

2016-09-22 Thread Martin Panter
Martin Panter added the comment: The version I committed has the space separating @ # -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue27348] traceback (and threading) drops exception message

2016-09-22 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue27815] Make SSL suppress_ragged_eofs default more secure

2016-09-22 Thread Martin Panter
Martin Panter added the comment: I have been experimenting with a patch that changes the default to suppress_ragged_eofs=False. One disadvantage of this change is it could make servers less robust. E.g. in the tests, I explicitly enabled suppress_ragged_eofs=True in a server, because

[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2016-09-22 Thread Martin Panter
Martin Panter added the comment: Added review comment -- nosy: +martin.panter ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-22 Thread Martin Panter
Martin Panter added the comment: Serhiy, what’s the relevance? In the built-in Element Tree package, it is a class: <https://docs.python.org/3.5/library/xml.etree.elementtree.html#element-objects>. -- ___ Python tracker <rep...@bugs.p

[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-21 Thread Martin Panter
Martin Panter added the comment: Mostly looks good to me. I left some comments on the code review. -- nosy: +martin.panter versions: +Python 2.7, Python 3.5, Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28221] Unused indata in test_ssl.ThreadedTests.test_asyncore_server

2016-09-20 Thread Martin Panter
Martin Panter added the comment: Actually in the Py 3 branch, I found an earlier revision that added indata="FOO\n": r59506 (Dec 2007). Anyway, the server in the test case just does a simple lower() call on the data, so I think the simpler FOO line may be fine on its own. --

[issue28221] Unused indata in test_ssl.ThreadedTests.test_asyncore_server

2016-09-20 Thread Martin Panter
New submission from Martin Panter: In r62273 (Apr 2008), method testAsyncoreServer() was added to the py3k branch with indata="FOO\n". In r64578 (Jun 2008), this test method was added to the Py 2 branch, but with indata = "TEST MESSAGE of mixed case\n". Later, r80598 added

[issue10808] ssl unwrap fails with Error 0

2016-09-17 Thread Martin Panter
Martin Panter added the comment: I understand this condition happens when the local end calls unwrap(), but the low-level socket connection has already been shut down from the remote end. If the remote is too slow, I get ConnectionResetError instead. There is some discussion of this at <h

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

2016-09-17 Thread Martin Panter
Martin Panter added the comment: Thanks to the fix for Issue 22233, now the response is parsed more sensibly, and the body can be read. The 0x85 byte now gets decoded with Latin-1: >>> print(ascii(resp.getheader("Link")[:100])) '<http://www.babla.cn/\xe8\x8b\xb1\xe8\xa

[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-17 Thread Martin Panter
Martin Panter added the comment: Personally, I’m not too enthusiastic, because it is rather magical, and does not work in all cases. It seems more like a feature than a bug fix. But I have rarely used the fileno=... parameter, and it shouldn’t have much negative impact, so I’m not too fussed

[issue28143] ASDL compatibility with Python 3 system interpreter

2016-09-17 Thread Martin Panter
Martin Panter added the comment: This patch ports the logic written for Issue 26662 to Python 2. Basically, configure searches for commands called python2.7, python2, and python (in order of priority), and sets PYTHON_FOR_GEN to the result. PYTHON_FOR_GEN could be overridden by the user

[issue28139] Misleading Indentation in C source code

2016-09-17 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.

[issue28187] Check return value of _PyBytes_Resize

2016-09-17 Thread Martin Panter
Martin Panter added the comment: Can the resize fail if the buffer is only being strunk? I haven’t looked closely, but maybe that’s why some of the cases don’t check for failure. -- nosy: +martin.panter ___ Python tracker <rep...@bugs.python.

[issue27761] Private _nth_root function loses accuracy

2016-09-17 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- nosy: -martin.panter ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27761> ___

[issue27348] traceback (and threading) drops exception message

2016-09-16 Thread Martin Panter
Martin Panter added the comment: Yes, a bug fix for 3.5+. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27348> ___ ___ Pyth

[issue28177] Compilation failure on Debian 4

2016-09-15 Thread Martin Panter
Martin Panter added the comment: For the record, there is more discussion of this in Issue 28092 -- nosy: +martin.panter superseder: -> Build failure for 3.6 on Centos 5.11 ___ Python tracker <rep...@bugs.python.org> <http://bug

[issue24363] httplib fails to handle semivalid HTTP headers

2016-09-15 Thread Martin Panter
Martin Panter added the comment: I pushed my Py 2 patch, since it is simpler and does not interfere with other modules. But it would still be good to get feedback on policy-flag.patch for Python 3. -- ___ Python tracker <rep...@bugs.python.

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2016-09-15 Thread Martin Panter
Martin Panter added the comment: Just to clarify, the current status is that the revision that Koobs identified is still in place, meaning that the AST files are regenerated into the build tree, not the source tree. I don’t think there is much else to do for this bug, unless Koobs can provide

[issue27348] traceback (and threading) drops exception message

2016-09-15 Thread Martin Panter
Martin Panter added the comment: I plan to commit this soon, in time for the next release. -- stage: patch review -> commit review versions: +Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.or

[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-15 Thread Martin Panter
Martin Panter added the comment: I agree the doc is far from perfect. The bit I was going off is just above <https://docs.python.org/3.5/library/socket.html#socket.socket.family>, saying “these (read-only) attributes that correspond to the values given to the socket constructor”. My in

[issue28139] Misleading Indentation in C source code

2016-09-15 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: Added file: http://bugs.python.org/file44684/indent.py3.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28139] Misleading Indentation in C source code

2016-09-15 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: Added file: http://bugs.python.org/file44683/indent.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28143] ASDL compatibility with Python 3 system interpreter

2016-09-15 Thread Martin Panter
Martin Panter added the comment: Another option I forgot to point out is that some of the other regeneration Python scripts (in Py 2 and/or 3; I forget which) have some autoconf magic to figure out the right installed python command to use. We should probably use that for Py 2’s ASDL script

[issue28139] Misleading Indentation in C source code

2016-09-15 Thread Martin Panter
Martin Panter added the comment: . I found more messed up indentation looking through Antoine’s large “untabify” commit r81029. These don’t trigger compiler warnings, but I think it may be worth restoring them. -- nosy: +martin.panter stage: resolved -> patch review status: clo

[issue28143] ASDL compatibility with Python 3 system interpreter

2016-09-15 Thread Martin Panter
Martin Panter added the comment: It seems a terrible idea to require Python 3 to be installed in order to regenerate the boot files for a Python 2 build. Maybe if we can figure out the minimum installed Python version expected for these ASDL scripts in 2.7, and maintain that while adding

[issue28169] shift exponent overflow

2016-09-15 Thread Martin Panter
Martin Panter added the comment: Perhaps this is a dupe of Issue 15119. When I was testing with the sanitizer, the only excessive shift error I got was explained by that bug. -- nosy: +martin.panter ___ Python tracker <rep...@bugs.python.org>

[issue28145] Fix whitespace in C source code

2016-09-14 Thread Martin Panter
Martin Panter added the comment: What is the reasoning behind this? It seems like trading one person’s style, fashion, or editor settings for another. I think it is better to just tolerate existing styles, unless they cause significant problems. But maybe see what other people think

[issue28149] Incorrect indentation under “else” in _bsddb.c

2016-09-14 Thread Martin Panter
New submission from Martin Panter: Compiling Python 2.7 gives: /home/proj/python/cpython/Modules/_bsddb.c: In function ‘newDBObject’: /home/proj/python/cpython/Modules/_bsddb.c:936:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation] else ^~~~ /home/proj/python

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Martin Panter
Martin Panter added the comment: Thanks that works well Christian -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28118> ___ ___

[issue25868] test_eintr.test_sigwaitinfo() hangs on "AMD64 FreeBSD CURRENT 3.x" buildbot

2016-09-13 Thread Martin Panter
Martin Panter added the comment: Happened again: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/4990/steps/test/logs/stdio Timeout (0:10:00)! Thread 0x000801807400 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib

[issue28128] Improve the warning message for invalid escape sequences

2016-09-13 Thread Martin Panter
Martin Panter added the comment: See also Issue 28028. Serhiy suggested translating warnings to SyntaxWarning in general. Looks like that may help narrowing down the location of escaping problems. -- ___ Python tracker <rep...@bugs.python.

[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-13 Thread Martin Panter
Martin Panter added the comment: The documentation says that the family, type and proto attributes correspond to the constructor arguments. Although it is unfortunate and quirky, I think your behaviour does match the documentation. Do the mismatched settings cause any serious problems

[issue27778] PEP 524: Add os.getrandom()

2016-09-13 Thread Martin Panter
Martin Panter added the comment: I understand it’s already implemented, and Victor just reopened it for more documentation. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue16189] ld_so_aix not found

2016-09-13 Thread Martin Panter
Martin Panter added the comment: Closing this assuming that revision ca1ddd365f5f (committed to 3.5 and 3.6+ branches) fixed it. -- nosy: +martin.panter resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> AIX shared library exten

[issue23404] 'make touch' does not work with git clones of the source repository

2016-09-13 Thread Martin Panter
Martin Panter added the comment: Okay so my “make -t” trick has various flaws. You still have to know the filenames to specify, it requires Makefile to be generated by configure in the source tree, and it creates empty files if you use it in a separate build directory. Another idea: instead

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Martin Panter
Martin Panter added the comment: I was thinking of “static inline” for PyMem_New(). I understand the Centos and OS X Tiger problem is only related “extern inline” vs plain “inline”, and “static inline” should not be affected. -- ___ Python tracker

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Martin Panter
Martin Panter added the comment: Perhaps another way to defeat the warning is to make PyMem_New() an inline function? I haven’t tried, but this way would make all the data types involved more explicit. -- ___ Python tracker <rep...@bugs.python.

[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Martin Panter
Martin Panter added the comment: As Serhiy suggested in the other bug, one workaround is just to disable the warning with -Wno-type-limits. It would depend if the benefits of the warning outweigh the annoyance of coming up with a more complicated workaround for this specific case

[issue23545] Turn on extra warnings on GCC

2016-09-12 Thread Martin Panter
Martin Panter added the comment: I think Silent Ghost is talking about my -Wtype-limits warning, which is still present. That is the only warning I am getting. I suspect you won’t see it with a 32-bit build. -- ___ Python tracker <

[issue25895] urllib.parse.urljoin does not handle WebSocket URLs

2016-09-12 Thread Martin Panter
Martin Panter added the comment: IMO if a versionadded/versionchanged notice is relevant, that is a good sign it is a feature rather than bug fix. If the 3.6.1 documentation says “added in 3.5.3”, how do you know if it is in 3.6.0? I looked at the history of other schemes being added to try

[issue18828] urljoin behaves differently with custom and standard schemas

2016-09-12 Thread Martin Panter
Martin Panter added the comment: Recording bugs reports for specific schemes as dependencies of this: Issue 25895: ws(s) Issue 16134: rtmp(e/s/t) Issue 23759: coap(s) -- dependencies: +Add support for RTMP schemes to urlparse, urllib.parse.urljoin does not handle WebSocket URLs

[issue28092] Build failure for 3.6 on Centos 5.11

2016-09-11 Thread Martin Panter
Martin Panter added the comment: Benjamin changed PEP 7 to allow static inline functions directly in Python 3.6. But later he added program-wide, linkable inline functions in the Python 3.6 code: 2f77a9f0b9d6: add plain “inline” to header file 63ae310b60ff: add “extern inline” stubs in a new

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2016-09-11 Thread Martin Panter
Martin Panter added the comment: Matthias seems to have already applied his patch in Python 3.3 and 3.4+: revision f2cc3d8b88bb. Roumen: Is your problem still relevant? If so, perhaps open a separate bug to elaborate. Koobs: Is your problem with finding Python/Python-ast.c still relevant

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 -Python 3.7 ___ Python tracker <rep...@bugs.python.org> &l

[issue28092] Build failure for 3.6 on Centos 5.11

2016-09-11 Thread Martin Panter
Martin Panter added the comment: This is like the OS X Tiger buildbot failure. http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/11323/steps/compile/logs/stdio /usr/bin/ld: multiple definitions of symbol _PyDTrace_FUNCTION_ENTRY Python/ceval.o definition

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2016-09-11 Thread Martin Panter
Martin Panter added the comment: I’m not sure what the overall status of this bug is, so I will leave the versions as they are. Are the three comments from 2013 relevant, and is there anything I can do to help? The Python 2 code already unconditionally adds -IInclude (see Issue 786737

[issue28084] Fatal Python error: Py_EndInterpreter: not the last thread

2016-09-11 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> duplicate status: open -> closed superseder: -> test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" _

[issue27952] Finish converting fixcid.py from regex to re

2016-09-11 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue28022] SSL releated deprecation for 3.6

2016-09-11 Thread Martin Panter
Martin Panter added the comment: New test failure when using -Werror: == ERROR: test_local_bad_hostname (test.test_httplib.HTTPSTest) -- Traceback (most recent

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: Added file: http://bugs.python.org/file44549/srcdir-check.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: Removed file: http://bugs.python.org/file44548/srcdir-check.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Martin Panter
Martin Panter added the comment: There are various tricky cases to be considered with the regenerated files like importlib.h. One of them is that you are supposed to be able to build Python from a read-only source tree. See Issue 15819. Writing files into $(srcdir) would break this. Also

<    4   5   6   7   8   9   10   11   12   13   >