[issue17214] http.client.HTTPConnection.putrequest encode error

2015-10-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue25522] IDLE: warn if save-as name matches stdlib name

2015-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The lib messages should say "Neither you nor python will be able to import the stdlib module". Example of python-imported lib names that a beginner might write are abc, io, os, nt, and stat. -- ___ Python tracker

[issue25498] Python 3.4.3 core dump with simple sample code

2015-10-30 Thread Martin Panter
Martin Panter added the comment: Okay, so says writability must be consistent. As far as I can see, there is no similar requirement for contiguity. So in theory PyBUF_FULL_RO could produce a discontiguous buffer when PyBUF_WRITAB

[issue25522] IDLE: warn if save-as name matches stdlib name

2015-10-30 Thread Terry J. Reedy
New submission from Terry J. Reedy: When users 'saveas', warn if name matches that of a stdlib modules. Note that shadowing is opposite for lib and binary (builtin) modules, so message needs to be different. I am not worrying about 3rd party modules on the search path (ie, site-packages), whi

[issue15994] memoryview to freed memory can cause segfault

2015-10-30 Thread Martin Panter
Martin Panter added the comment: Saving a reference to the overall buffered reader is probably not good enough. I think the buffer is freed when close() is called, so a reference to this internal buffer would need to be saved instead (or as well). Unless we stop having close() free the buffer.

[issue25041] document AF_PACKET socket address format

2015-10-30 Thread Martin Panter
Martin Panter added the comment: Quickly looking through the history (annotate function on Mercurial web frontend): * Revisions 3d4a7cd0bf17, c8ef864ba861 (2001): AF_PACKET support added on Linux. Partially documented in C comment and socket.bind() docstring. AF/PF_PACKET, PACKET_* constants

[issue25454] operator.methodcaller should accept additional arguments during the call

2015-10-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Closing this for the reasons mentions above. -- resolution: -> rejected status: open -> closed ___ Python tracker ___ __

[issue17214] http.client.HTTPConnection.putrequest encode error

2015-10-30 Thread Martin Panter
Martin Panter added the comment: This bug only applies to Python 3. In Python 2, the non-ASCII bytes are sent through to the redirect target verbatim. I think this would also be the ideal way to handle the problem in 3, but percent-encoding them as proposed also seems good enough, and does not

[issue25519] Minor difflib documentation bug

2015-10-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs

[issue25519] Minor difflib documentation bug

2015-10-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4ed175ee3cca by Terry Jan Reedy in branch '2.7': Issue #25519: Mark difflib.ndiff as a functions where not already. https://hg.python.org/cpython/rev/4ed175ee3cca New changeset b7686cb0b698 by Terry Jan Reedy in branch '3.4': Issue #25519: Mark diff

[issue25519] Minor difflib documentation bug

2015-10-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: docs@python -> terry.reedy nosy: +terry.reedy versions: -Python 3.2, Python 3.3 ___ Python tracker ___ _

[issue25505] undefined name 'window' in Tools/scripts/fixdiv.py

2015-10-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker ___

[issue25505] undefined name 'window' in Tools/scripts/fixdiv.py

2015-10-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2672ab3cfb23 by Terry Jan Reedy in branch '2.7': Issue #25505: Remove unused buggy method. https://hg.python.org/cpython/rev/2672ab3cfb23 New changeset ef435729bc80 by Terry Jan Reedy in branch '3.4': Issue #25505: Remove unused buggy method. https:

[issue25521] optparse module does not emit DeprecationWarning

2015-10-30 Thread John Hagen
New submission from John Hagen: According to the Python docs, optparse has been deprecated since Python 3.2, but it does not emit a DeprecationWarning when imported Python 3.2+. https://docs.python.org/3/library/optparse.html PyCharm can uses these DeprecationWarnings to provide helpful alerts

[issue25505] undefined name 'window' in Tools/scripts/fixdiv.py

2015-10-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: -> terry.reedy nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-10-30 Thread desbma
desbma added the comment: Here is an improved patch with the following changes: * Fallback to copyfileobj if sendfile fails with errno set to EINVAL or ENOSYS * Add a test for > 4GB file -- Added file: http://bugs.python.org/file40906/issue25156_v2.patch ___

[issue25495] binascii documentation incorrect

2015-10-30 Thread Martin Panter
Martin Panter added the comment: I was only referring to the original Python documentation and library. See the base64.encode() implementation for an example which does do this 57-byte pre-chunking. Simplified: MAXLINESIZE = 76 # Excluding the CRLF MAXBINSIZE = (MAXLINESIZE//4)*3 # 57 ... whi

[issue25516] threading.Condition._is_owned() is wrong when using threading.Lock

2015-10-30 Thread Nir Soffer
Changes by Nir Soffer : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue25474] Weird behavior when setting f_trace in a context manager

2015-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: ZERO <__main__.Context object at 0x00874AF3E0B8> ONE <__main__.Context object at 0x00874AF326D8> Traceback (most recent call last): File "F:\Python\mypy\tem.py", line 45, in print ('TWO', two) NameError: name 'two' is not defined Traceback (most re

[issue25493] warnings.warn: wrong stacklevel causes import of local file "sys"

2015-10-30 Thread Brett Cannon
Brett Cannon added the comment: So I'm going to close this as "won't fix" because linecache is horribly over-engineered and I'm afraid trying to fix this will break code that actually worked previously. This is obviously an odd edge case that I think we can live with. -- resolution:

[issue25443] Add a count of how many benchmarks are left to run

2015-10-30 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-l

[issue25487] imp module DeprecationWarning in test suite

2015-10-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3f924cb4c3eb by Brett Cannon in branch 'default': Issue #25487: Fix tests not updated when the imp module moved to a https://hg.python.org/cpython/rev/3f924cb4c3eb -- nosy: +python-dev ___ Python tracker

[issue25487] imp module DeprecationWarning in test suite

2015-10-30 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the finding these, Martin! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue25443] Add a count of how many benchmarks are left to run

2015-10-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 71967658feb5 by Brett Cannon in branch 'default': Issue #25443: Add a running count of benchmarks. https://hg.python.org/benchmarks/rev/71967658feb5 -- nosy: +python-dev ___ Python tracker

[issue25426] Deprecate the regex_compile benchmark

2015-10-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0da7b44c2ea3 by Brett Cannon in branch 'default': Use re.purge() to clear the re cache. https://hg.python.org/benchmarks/rev/0da7b44c2ea3 -- nosy: +python-dev ___ Python tracker

[issue25426] Deprecate the regex_compile benchmark

2015-10-30 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the pointer about re.purge(), Serhiy! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue25498] Python 3.4.3 core dump with simple sample code

2015-10-30 Thread Stefan Krah
Stefan Krah added the comment: Per the docs the readonly flag must be consistent for all consumers, so checking for writability after getting the view should be okay in principle. -- ___ Python tracker

[issue25520] unittest load_tests protocol not working as documented

2015-10-30 Thread Stefan Seefeld
New submission from Stefan Seefeld: As described in the README contained in the attached tarball, I'm observing wrong behavior. I have based this code on my understanding of https://docs.python.org/2/library/unittest.html#load-tests-protocol, but the effect isn't as expected (I see duplicate a

[issue25498] Python 3.4.3 core dump with simple sample code

2015-10-30 Thread Stefan Krah
Stefan Krah added the comment: If memoryview B is created from memoryview A, then B must be registered with the same ManagedBuffer as A, otherwise the whole scheme breaks down (PyMemoryView_FromObject() performs this check). PyMemoryView_FromBuffer() is really a legacy function that should be o

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-10-30 Thread Arkadiusz Miskiewicz Arkadiusz Miskiewicz
Arkadiusz MiskiewiczArkadiusz Miskiewicz added the comment: Same for 3.5 branch from hg (git mirror actually). -- ___ Python tracker ___

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-10-30 Thread Arkadiusz Miskiewicz Arkadiusz Miskiewicz
Arkadiusz MiskiewiczArkadiusz Miskiewicz added the comment: Should it work with /configure '--with-cxx-main=g++' && make? Because currently it doesn't: g++ -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes

[issue25485] Add a context manager to telnetlib.Telnet

2015-10-30 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Ok i will submit an other patch for the tests and the documentation > On 30 oct. 2015, at 4:37 PM, SilentGhost wrote: > > > SilentGhost added the comment: > > That's fine as a code change, but that's not the kind of test I meant. There > is a Lib/test/test

[issue11315] Fix type regression in http.cookies.load (want bytes, not str)

2015-10-30 Thread R. David Murray
R. David Murray added the comment: If strings and values are constrained to be ascii, there is no obvious reason to use bytes. I don't see a bug here in python3. -- nosy: +r.david.murray ___ Python tracker __

[issue25144] 3.5 Win install fails with "TARGETDIR"

2015-10-30 Thread Wade Hedrick
Wade Hedrick added the comment: I had the same problem when trying to install 3.5 with Windows 10. I got the same results as Felipe has listed in the post from 9/16. -- nosy: +WadeH type: behavior -> ___ Python tracker

[issue11315] Fix type regression in http.cookies.load (want bytes, not str)

2015-10-30 Thread Chad Whitacre
Chad Whitacre added the comment: Here's a start on converting to bytes everywhere for cookies. I'm not sure I fully understand the library's original worldview on type conversion. There's a value_{decode,encode} facility, and in the test suite attribute values in particular are often not even

[issue25498] Python 3.4.3 core dump with simple sample code

2015-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Before committing any solution we first should have understood the cause of the crash. The peculiarity of example ctypes_crash.py is that the argument of ctypes.c_char.from_buffer is a memoryview. With current code we have following chain (the list creates a

[issue25516] threading.Condition._is_owned() is wrong when using threading.Lock

2015-10-30 Thread Nir Soffer
Nir Soffer added the comment: The commit hash in the previous message is a git commit from the github mirror: https://github.com/python/cpython/commit/8cb1ccbb8b9ed01c26d2c5be7cc86682e525dce7 -- ___ Python tracker

[issue25144] 3.5 Win install fails with "TARGETDIR"

2015-10-30 Thread Laura Creighton
Laura Creighton added the comment: webmaster just got mail from another person hit with this on Windows 10. -- nosy: +lac ___ Python tracker ___ _

[issue25514] better startup error messages in IDLE when stdlib modules shadowed

2015-10-30 Thread Laura Creighton
Laura Creighton added the comment: Re: misunderstanding Sorry Terry. From my end the great 4 day "weekend of mail.python.org needs to be rebuilt from scratch" happened precisely as I was about to reply to your post. The reply to Peter Otten showed up later as part of my mailer agent trying t

[issue25489] sys.exit() caught in exception handler

2015-10-30 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I'll wait for someone to submit a patch for this. (I tried a quick hack, but unless we limit this to BaseException instances that aren't also Exception instances it's complicated). -- ___ Python tracker

[issue25519] Minor difflib documentation bug

2015-10-30 Thread Andrew Scheller
New submission from Andrew Scheller: In the documentation for difflib.HtmlDiff.__init__ there's a couple of references to ``ndiff()``. I believe these should be modified to :func:`ndiff` (as used elsewhere in the difflib documentation) so that they get nicely hyperlinked in the HTML documentat

[issue25495] binascii documentation incorrect

2015-10-30 Thread Mouse
Mouse added the comment: As far as I remember, the data was not "originally processed in 57-byte chunks". I've been around the first PEM and MIME standards and discussions (and code, though not in Python, which wasn't around then) to be in position to know. :) Whether the user prefers to proc

[issue25518] Investigate implementation of PyOS_CheckStack on OSX

2015-10-30 Thread Ronald Oussoren
New submission from Ronald Oussoren: On OSX 10.4 or later the following functions are available: size_t pthread_get_stacksize_np(pthread_t); void* pthread_get_stackaddr_np(pthread_t); These functions could be used to implement PyOS_CheckStack on OSX. The advantage of this would be that it woul

[issue25512] apparent memory leak using ctypes

2015-10-30 Thread Martin Smith
Martin Smith added the comment: I'm persuaded that this is not a sustained memory leak. Thanks to Martin Panter and Benjamin Peterson for the tests and the careful explanations. Apologies for distracting busy people. -- resolution: -> not a bug status: open -> closed ___

[issue11315] Fix type regression in http.cookies.load (want bytes, not str)

2015-10-30 Thread Chad Whitacre
Chad Whitacre added the comment: Here's a patch that fixes the two new failing tests. Now a bunch of other tests are busted. :-) -- Added file: http://bugs.python.org/file40903/fix-the-two-new-tests.patch ___ Python tracker

[issue25485] Add a context manager to telnetlib.Telnet

2015-10-30 Thread SilentGhost
SilentGhost added the comment: That's fine as a code change, but that's not the kind of test I meant. There is a Lib/test/test_ftplib.py and it basically needs test_with_statement added to one or few test cases. Have a look at how the similar functions implemented in Lib/test/. -- __

[issue25144] 3.5 Win install fails with "TARGETDIR"

2015-10-30 Thread Steve Dower
Steve Dower added the comment: That's a good idea. Can you grab the log files from %UserProfile%\AppData\Local\Temp (sort by date - they'll all be grouped together) and upload to this issue? Like Felipe, you may want to censor some usernames/paths. If you do, please let me know if they conta

[issue25485] Add a context manager to telnetlib.Telnet

2015-10-30 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: New version of the patch, I have modified the 'test' function. In this function, I use the with statement with the __enter__ and __exit__. -- Added file: http://bugs.python.org/file40902/issue25485-2.patch ___ Pytho

[issue11315] Fix type regression in http.cookies.load (want bytes, not str)

2015-10-30 Thread Chad Whitacre
Chad Whitacre added the comment: Here's a patch with a couple failings tests for the type regression in 3.x. -- Added file: http://bugs.python.org/file40901/failing-tests-for-type-regression.patch ___ Python tracker

[issue11315] Fix/add unicode support in Cookie module?

2015-10-30 Thread Chad Whitacre
Chad Whitacre added the comment: > in the 3.x version, only character strings (unicode) are accepted > The code was changed to do this in r83361 #3788. That seems like a bug to me. It looks like the intention was to avoid the `type("")` check for stylistic reasons, so `isinstance(rawdata, str)`

[issue11315] Fix type regression in http.cookies.load (want bytes, not str)

2015-10-30 Thread Chad Whitacre
Changes by Chad Whitacre : -- title: Fix/add unicode support in Cookie module? -> Fix type regression in http.cookies.load (want bytes, not str) versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 -Python 2.7 ___ Python tracker

[issue25144] 3.5 Win install fails with "TARGETDIR"

2015-10-30 Thread Peter
Peter added the comment: We just hit this bug with "The TARGETDIR variable must be provided when invoking this installer" and an OK button (only) on a colleagues' machine. We first tried https://www.python.org/ftp/python/3.5.0/python-3.5.0-webinstall.exe (default options) and then https://www

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-10-30 Thread Fredrik Averpil
Fredrik Averpil added the comment: > Yes. Steve also checked in the patch to Python 2.7. Excellent. I'll sit tight until the 2.7.11 comes out then (hopefully December), as platform.release() did not return "10" on Windows 10 for me. -- ___ Python tr

[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2015-10-30 Thread Robin Roth
Robin Roth added the comment: Is there any more info needed to the issue or the patch? It would be really helpful to have this fixed and I don't see any critical changes due to the patch. There is an issue in ansible depending on this fix: https://github.com/ansible/ansible-modules-core/issue

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-10-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 30.10.2015 14:03, Fredrik Averpil wrote: > Will this fix be included in python 2.7.11? Yes. Steve also checked in the patch to Python 2.7. -- ___ Python tracker ___

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-10-30 Thread Fredrik Averpil
Fredrik Averpil added the comment: Will this fix be included in python 2.7.11? -- nosy: +Fredrik Averpil ___ Python tracker ___ ___ Py

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-30 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Ah, I didn't know it. Thank you for clarification. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-30 Thread STINNER Victor
STINNER Victor added the comment: Atsuo Ishimoto added the comment: > But I still think it is desirable for Python to have something like > signalfd(), because not all functions used in the signal handler of third > party library can be called from user's Python script in general. I don't thi

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-30 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Yes, I can. So, for my custom text editor, problem have solved already. But I still think it is desirable for Python to have something like signalfd(), because not all functions used in the signal handler of third party library can be called from user's Pyth

[issue25517] regex howto example in "Lookahead Assertions"

2015-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that lookbehind assertions still are not documented in Regular Expression HOWTO. The example that demonstrates negative lookahead assertion is ".*[.](?!bat$)[^.]*$". But then we should explain why ".*" is changed to "[^.]*". -- nosy: +akuchlin

[issue25517] regex howto example in "Lookahead Assertions"

2015-10-30 Thread Pavel
New submission from Pavel: The example advises ".*[.](?!bat$).*$" expression "to match filenames where the extension is not bat". But here is an example which passes such check: >>> re.match("(.*)[.](?!bat$).*$", "test.a.bat") <_sre.SRE_Match object at 0x7ff221996f30> To my mind use of negativ

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-30 Thread STINNER Victor
STINNER Victor added the comment: > As in my previous example, if other 3rd party libraries(ncurses in my case) > need to handle the signal, signal is consumed by Python handler and not > delivered to the library. In the Python signal handler, can't you call the ncurses function that should be

[issue25489] sys.exit() caught in exception handler

2015-10-30 Thread Brian Sutherland
Brian Sutherland added the comment: On Wed, Oct 28, 2015 at 03:32:36PM +, Guido van Rossum wrote: > > Guido van Rossum added the comment: > > How about we extend loop.stop() so that you can pass it an exception to > raise once the loop is stopped? This exception would then be thrown out of

[issue25041] document AF_PACKET socket address format

2015-10-30 Thread Berker Peksag
Berker Peksag added the comment: Thanks! The patch looks good to me. I left a few minor comments on Rietveld: http://bugs.python.org/review/25041/ -- nosy: +berker.peksag stage: needs patch -> patch review ___ Python tracker

[issue18531] Undocumented different between METH_KEYWORDS and **kws

2015-10-30 Thread Evgeny Kapun
Changes by Evgeny Kapun : -- nosy: +abacabadabacaba ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue25512] apparent memory leak using ctypes

2015-10-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: cast() always creates a ref cycle, which is probably what you are seeing. >>> from ctypes import c_double, cast, POINTER >>> samples = (c_double*23)() >>> cast(samples, POINTER(c_double)) <__main__.LP_c_double object at 0x7f33bc920560> >>> samples._objects {1