[issue25581] Python -U raises error during site import

2015-11-08 Thread SilentGhost
SilentGhost added the comment: > Interesting, I didn't even know (remember?) about the -U flag, and it isn't > documented. https://docs.python.org/2/using/cmdline.html#cmdoption-U It isn't clear when this broken or why, but I think existing documentation could be adjusted to have a bigger

[issue25570] urllib.request > Request.add_header("abcd", "efgh") fails with character ":" in first parameter string

2015-11-08 Thread Christian Rickert
Christian Rickert added the comment: >>Ah, I think I see where you are coming from. I guess you aren’t intimately >>familiar with the HTTP protocol. Exactly. :) >>If you can given a specific comment line to add to a specific example, that >>might be useful. Even if you aren’t 100% sure of

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Daniel Plachotich
New submission from Daniel Plachotich: Since Windows 7 (or even Vista), Windows gives permission error(5, ERROR_ACCESS_DENIED if you try to create a directory in a drive root with the same name as a drive itself, even if you have administrative permissions. This behavior is not mentioned in

[issue22499] [SSL: BAD_WRITE_RETRY] bad write retry in _ssl.c:1636

2015-11-08 Thread Nikolaus Rath
Nikolaus Rath added the comment: This just happened again to someone else, also using Python 3.4: https://bitbucket.org/nikratio/s3ql/issues/87 Is there anything the affected people can do to help debugging this? -- ___ Python tracker

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset a13d9656f954 by Martin Panter in branch '3.5': Issue #24802: Update test case for ValueError in 3.5 https://hg.python.org/cpython/rev/a13d9656f954 New changeset 96cdd2532034 by Martin Panter in branch 'default': Issue #24802: Merge ValueError test

[issue25582] Fixed memory leaks in test_ctypes

2015-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry. Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file40979/ctypes_test_leak.patch ___ Python tracker

[issue25580] async and await missing from token list

2015-11-08 Thread Martin Panter
Martin Panter added the comment: I wonder if the new tokens need a “versionadded” notice. They were added in revision eeeb666a5365 for 3.5. -- nosy: +martin.panter, yselivanov ___ Python tracker

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Daniel Plachotich
Daniel Plachotich added the comment: Probably better solution: if not (exist_ok and path.isdir(name) and e.errno in (errno.EEXIST, errno.EACCES)): -- ___ Python tracker

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2015-11-08 Thread anon
anon added the comment: Any update on this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24203] Depreciate threading.Thread.isDaemon etc

2015-11-08 Thread anon
anon added the comment: Any consensus? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25581] Python -U raises error during site import

2015-11-08 Thread STINNER Victor
STINNER Victor added the comment: Reminder: use Python 3 to get an excellent Unicode support everywhere. -- ___ Python tracker ___

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-08 Thread Martin Panter
Martin Panter added the comment: Thanks for picking that up Serhiy -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-11-08 Thread Stefan Krah
Stefan Krah added the comment: > It looks to me that all issues are related to floating points. You need to compile with "-fp-model strict" or the Windows equivalent (I think "-fp-model precise"). -- ___ Python tracker

[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-11-08 Thread Stefan Krah
Stefan Krah added the comment: If anyone worries that "-fp-model strict" will slow things down: In the Python context these settings have no measurable impact: A while ago I tested setting/restoring the control word *for every operation*, and even that did not have any impact. --

[issue19883] Integer overflow in zipimport.c

2015-11-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file40981/zipimport_int_overflow_2.patch ___ Python tracker ___

[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I already don't remember if it was a deliberate design, or just implementation detail. In any case it is not documented. > I believe this behavior matches the documentation: No, it is not related. It is that './**/' will list only directories, not regular

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread Jakub Stasiak
New submission from Jakub Stasiak: It is my understanding that socket.sendall effectively calls the underlying socket.send's implementation in a retry loop, possibly multiple times. It is also my understanding that each one of those low level send calls can timeout on its own if a socket

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Daniel Plachotich
Daniel Plachotich added the comment: Of course in examples I create '.' by hand, but in real code such things are mostly automatic. Assume, for example, that you have a function for downloading files: def download_file(url, save_as): ... # Before saving, you must ensure that path exists:

[issue19883] Integer overflow in zipimport.c

2015-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is revised patch. It addresses Gregory's comments, uses properly integer types and converters for all values, and adds additional checks for integer overflows and ZIP file validity. As a side effect the performance can be increased due to less memory

[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-08 Thread Laura Creighton
New submission from Laura Creighton: Somebody reported this today: File "C:/Python27/kivyhello.py", line 4, in from kivy.app import App File "C:/Python27\kivy\app.py", line 316, in from kivy.base import runTouchApp, stopTouchApp File "C:/Python27\kivy\base.py", line 30, in

[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-08 Thread R. David Murray
R. David Murray added the comment: I'm guessing that's the error we got from the OS. Maybe there's additional info we could add, though, I don't know. It would be interesting to know if it does the same thing in python3...and unfortunately it isn't as easy to change things in the python2

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Daniel Plachotich
Daniel Plachotich added the comment: I meant x1.3 times faster on Linux :) -- ___ Python tracker ___ ___

[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-08 Thread R. David Murray
R. David Murray added the comment: I believe this behavior matches the documentation: "If the pattern is followed by an os.sep, only directories and subdirectories match." ('the pattern' being '**') I wonder if '***.pacnew' would work. -- nosy: +pitrou, r.david.murray

[issue19883] Integer overflow in zipimport.c

2015-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, the patch contained parts of the advanced patch that will be submitted in separate issue. -- Added file: http://bugs.python.org/file40982/zipimport_int_overflow_2.patch ___ Python tracker

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread Martin Panter
Martin Panter added the comment: I don’t like the sound of improvement 2. I think it would break existing use cases, e.g. HTTPConnection(timeout=...), urlopen(timeout=...). If you want a HTTP request to abort if it takes a long time, how is that behaviour broken? Regarding improvement 1, I

[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-08 Thread SilentGhost
Changes by SilentGhost : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread STINNER Victor
STINNER Victor added the comment: FYI the behaviour of socket.socket.sendall() regarding timeout has been modified in Python 3.5: https://docs.python.org/dev/library/socket.html#socket.socket.sendall "Changed in version 3.5: The socket timeout is no more reset each time data is sent

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Daniel Plachotich
Daniel Plachotich added the comment: Of course, exist_ok must be taken into account: if not (exist_ok and path.isdir(name)): mkdir(name, mode) -- ___ Python tracker

[issue19883] Integer overflow in zipimport.c

2015-11-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file40981/zipimport_int_overflow_2.patch ___ Python tracker ___

[issue19883] Integer overflow in zipimport.c

2015-11-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file40980/zipimport_int_overflow_2.patch ___ Python tracker ___

[issue25576] Remove “Content-Type: application/x-www-form-urlencoded; charset” advice

2015-11-08 Thread R. David Murray
R. David Murray added the comment: OK, I'll accept that as authoritative :) One very minor comment in the review, otherwise looks good to me. -- ___ Python tracker

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread R. David Murray
R. David Murray added the comment: If you are trying to create a directory named '.' your code will not do anything useful, you might as well skip the call. What's the use case? That said, the fix looks reasonable. -- nosy: +r.david.murray ___

[issue25570] urllib.request > Request.add_header("abcd", "efgh") fails with character ":" in first parameter string

2015-11-08 Thread Martin Panter
Martin Panter added the comment: Hmm, I wonder if that OpenerDirector example is a bit obscure. Normally you would use the default urlopen() to set User-Agent, without resorting to a custom OpenerDirector. In my patch: * Included “User-Agent header _value_” in the “headers” parameter

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: Martin: While I'd consider timeout in HTTPConnection(timeout=...) or urlopen(timeout=...) to be the timeout for the entire operation, just just for the data sending part and HTTPConnection/urlopen can achieve the timeout behavior using just send I concede

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread Martin Panter
Martin Panter added the comment: Maybe it would be reasonable to expand on that “On error” sentence. I imagine the main errors that would cause this situation are a timeout as you say, and also a blocking exception. Also, you could point out that if you have lost record of how much has

[issue25576] Remove “Content-Type: application/x-www-form-urlencoded; charset” advice

2015-11-08 Thread Martin Panter
Martin Panter added the comment: The second version of the patch changes some more examples in the how-to to data.encode("ascii"). I’ll leave this open for a bit in case Senthil is around and wants to comment (seeing as he added the text I am removing). -- Added file:

[issue25576] Remove “Content-Type: application/x-www-form-urlencoded; charset” advice

2015-11-08 Thread Martin Panter
Martin Panter added the comment: I think the server bugs referenced by the Mozilla bug are mainly about servers that do not recognize the content type at all, due the the presence of any charset parameter. They probably do something like “if headers['Content-Type'] ==

[issue25582] Fixed memory leaks in test_ctypes

2015-11-08 Thread Martin Panter
Martin Panter added the comment: Seems to be missing your patch -- nosy: +martin.panter ___ Python tracker ___

[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-08 Thread Xavier de Gaye
New submission from Xavier de Gaye: On archlinux during an upgrade, the package manager backups some files in /etc with a .pacnew extension. On my system there are 20 such files, 9 .pacnew files located in /etc and 11 .pacnew files in subdirectories of /etc. The following commands are run

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Martin Panter
Martin Panter added the comment: Daniel: your latest suggestions look like they introduce a race condition. What happens if another thread or process, perhaps also calling makedirs(), creates the directory just after isdir() says it doesn’t exist? Similar to Issue 1608579. Perhaps the

[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Likely it was implementation artifact. Current implementation is simpler butter fitted existing glob design. The problem was that '**/a' should list 'a' and 'd/a', but '**/' should list only 'd/', and not ''. Here is a patch that makes '**' to match also

[issue2275] Make urllib.request.Request.has_header() etc case-insensitive

2015-11-08 Thread Martin Panter
Martin Panter added the comment: Please review insensitive-lookup.patch: * Adapt John’s patch to current code * Apply similar changes to Request.remove_header() * Expanded on case-insensitivity, previous capitalize() requirements, and header_items() casing in the documentation * Dropped

[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-08 Thread R. David Murray
R. David Murray added the comment: Ah, I see, 'pattern' there means the whole pattern. That certainly isn't clear. -- ___ Python tracker ___

[issue25587] Useless addition in PyTuple_New

2015-11-08 Thread Jim Nasby
New submission from Jim Nasby: In PyTuple_New, if the new tuple won't go on the free_list: /* Check for overflow */ if (nbytes / sizeof(PyObject *) != (size_t)size || (nbytes > PY_SSIZE_T_MAX - sizeof(PyTupleObject) - sizeof(PyObject *)))

[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-08 Thread eryksun
eryksun added the comment: The "DLL load failed" message is from Python, but the rest is the text for the Windows error code, ERROR_BAD_EXE_FORMAT (0x00c1) [1]. The "%1" in the string can be expanded as the first element of the Arguments array parameter of FormatMessage [2]. But currently the