[issue22038] Implement atomic operations on non-x86 platforms

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: is not compatible with C++: I disabled completly pyatomic.h on C++. pyatomic.h is only needed by Python core, not to compile Python extensions, so it's not an issue. -- ___ Python tracker

[issue23606] ctypes.util.find_library("c") no longer makes sense

2015-03-17 Thread Steve Dower
Steve Dower added the comment: Pretty much, except the entry point DLL version won't increment unless there's a breaking change to the API. So you have to know where it's from, but (AIUI) the l1-0-0 file will always be available. At some point it may turn into a wrapper rather than a redirect,

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write?

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > With and without the patch, write() accepts bytes, bytearray and memoryview. > Which other byte-like types do you know? The "bytes-like object" term is used as an alias of "an instance of type that supports buffer protocol". Besides bytes, bytearray and mem

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 730bbd1499ba by Ned Deily in branch '2.7': Issue #23458: Skip test_urandom_fd_non_inheritable on OS X 10.4 since https://hg.python.org/cpython/rev/730bbd1499ba -- ___ Python tracker

[issue6422] timeit called from within Python should allow autoranging

2015-03-17 Thread Robert Collins
Robert Collins added the comment: I'm confused by the feedback on the patch. It adds a single new function, doesn't alter the public interface for any existing functions, and seems fit for purpose. Could someone help me understand how its deficient? --

[issue23693] timeit accuracy could be better

2015-03-17 Thread Robert Collins
New submission from Robert Collins: In #6422 Haypo suggested making the timeit reports much better. This is a new ticket just for that. See https://bitbucket.org/haypo/misc/src/tip/python/benchmark.py and http://bugs.python.org/issue6422?@ok_message=issue%206422%20nosy%2C%20nosy_count%2C%20sta

[issue6422] timeit called from within Python should allow autoranging

2015-03-17 Thread Robert Collins
Robert Collins added the comment: Filed #23693 for the accuracy thing. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue19495] context manager for measuring duration of blocks of code

2015-03-17 Thread Robert Collins
Changes by Robert Collins : -- nosy: +rbcollins title: Enhancement for timeit: measure time to run blocks of code using 'with' -> context manager for measuring duration of blocks of code ___ Python tracker ___

[issue23648] PEP 475 meta issue

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: In msg196555, Charles-François Natali wrote: """ >From a cursory look, the main files affected would be: Modules/fcntlmodule.c Modules/ossaudiodev.c Modules/posixmodule.c Modules/selectmodule.c Modules/selectmodule.c Modules/signalmodule.c Modules/socketmodule.c

[issue23552] Have timeit warn about runs that are not independent of each other

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that emits a warning using the warnings module. The warning is output to stderr and can be suppressed with the -Wignore option, as all other warnings. $ ./python -m timeit -n1 -r 10 -s "import time, random" -- "time.sleep(random.random())" 1

[issue23552] Have timeit warn about runs that are not independent of each other

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Implemented Robert's suggestion. $ ./python -m timeit -n1 -r 10 -s "import time, random" -- "time.sleep(random.random())" 1 loops, best of 10: 30.2 msec per loop :0: UserWarning: The test results are likely unreliable. The worst time (946 msec) was more than

[issue23552] Have timeit warn about runs that are not independent of each other

2015-03-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file38532/timeit_python_warning.diff ___ Python tracker ___ ___ Python-bugs

[issue23694] PEP 475: handle EINTR in fileutils.c

2015-03-17 Thread STINNER Victor
New submission from STINNER Victor: fileutils.c must be modified to retry when a function fails with EINTR: see the PEP 475. I'm working on a patch. -- messages: 238358 nosy: haypo priority: normal severity: normal status: open title: PEP 475: handle EINTR in fileutils.c versions: Pyth

[issue23694] PEP 475: handle EINTR in fileutils.c

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0b99d7043a99 by Victor Stinner in branch 'default': Issue #23694: Enhance _Py_open(), it now raises exceptions https://hg.python.org/cpython/rev/0b99d7043a99 -- nosy: +python-dev ___ Python tracker

[issue23683] allow timeit to run expensive reset code per repeats

2015-03-17 Thread Robert Collins
Robert Collins added the comment: bah, nevermind - I failed to get that setup is called once per loop regardless - I might consider this a doc issue, or perhaps I was just fuzzy brained. -- resolution: -> not a bug status: open -> closed ___ Python

[issue23693] timeit accuracy could be better

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue21988. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailin

[issue23677] Mention dict and set comps in library reference

2015-03-17 Thread Mark Lawrence
Mark Lawrence added the comment: That was embarrassing, hopefully this is rather better. -- nosy: +BreamoreBoy Added file: http://bugs.python.org/file38534/issue23677_v2.diff ___ Python tracker

[issue18828] urljoin behaves differently with custom and standard schemas

2015-03-17 Thread Demian Brecht
Demian Brecht added the comment: > I haven’t heard any arguments against this option yet, and it didn’t break > any tests. Pre patch: >>> urljoin('mailto:foo@', 'bar.com') 'bar.com' Post patch: >>> urljoin('mailto:foo@', 'bar.com') 'mailto:bar.com/bar.com' I'm taking an educated guess here

[issue18828] urljoin behaves differently with custom and standard schemas

2015-03-17 Thread Demian Brecht
Changes by Demian Brecht : -- stage: -> patch review versions: +Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue23693] timeit accuracy could be better

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: Not only I'm too lazy to compute manually the number of loops and repeat, but also I don't trust myself. It's even worse when someone publishs results of a micro-benchmark. I don't trust how the benchmark was calibrated. In my experience, micro-benchmark are p

[issue23695] idiom for clustering a data series into n-length groups

2015-03-17 Thread Paddy McCarthy
New submission from Paddy McCarthy: In the zip section of the documentation, e.g. https://docs.python.org/3/library/functions.html#zip There is mention of an idiom for clustering a data series into n-length groups that I seem to only come across when people are explaining how it works on blog

[issue23694] PEP 475: handle EINTR in fileutils.c

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset cfe541c694f3 by Victor Stinner in branch 'default': Issue #23694: Enhance _Py_fopen(), it now raises an exception on error https://hg.python.org/cpython/rev/cfe541c694f3 -- ___ Python tracker

[issue23694] PEP 475: handle EINTR in fileutils.c

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: fileutils_eintr.patch: handle EINTR for open, fopen and dup (only on Linux for dup in _Py_dup). _Py_wfopen() and _Py_fopen() are not modified because callers are not really prepared to handle exceptions. These functions are mostly used during early steps of P

[issue23694] PEP 475: handle EINTR in fileutils.c

2015-03-17 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue23696] zipimport: chain ImportError to OSError

2015-03-17 Thread STINNER Victor
New submission from STINNER Victor: To work on the issue #23694, I refactored the C function _Py_fopen_obj() to raise an exception on error. I noticed the that zipimport replaces the current exception with ZipImportError. Attached patch chains the ZipImportError to the OSError to provide more

[issue9782] _multiprocessing.c warnings under 64-bit Windows

2015-03-17 Thread Mark Lawrence
Mark Lawrence added the comment: Where do we currently stand with all compiler warnings, I'm still seeing some but I recall that we've other open issues about this problem? -- nosy: +serhiy.storchaka, steve.dower, zach.ware versions: +Python 3.4, Python 3.5 -Python 3.2

[issue23695] idiom for clustering a data series into n-length groups

2015-03-17 Thread Ethan Furman
Ethan Furman added the comment: I think an example should suffice: >>> s = [1, 2, 3, 4, 5, 6, 7, 8, 9] >>> n = 3 >>> zip(*[iter(s)]*n) [(1, 2, 3), (4, 5, 6), (7, 8, 9)] -- nosy: +ethan.furman versions: -Python 3.2, Python 3.3 ___ Python tracker

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-03-17 Thread Ned Deily
Ned Deily added the comment: The buildbot is now green -> closed. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue23529] Limit decompressed data when reading from LZMAFile and BZ2File

2015-03-17 Thread Nikolaus Rath
Nikolaus Rath added the comment: If you want to add support for buffer_size=0 in a separate patch/issue I think that's fine. But in that case I would not add a buffer_size parameter now at all. IMO, not having it is better as having it but not supporting zero (even if it's documented that's pr

[issue23697] Module level map & submit for concurrent.futures

2015-03-17 Thread Nick Coghlan
New submission from Nick Coghlan: Currently, concurrent.futures requires you to explicitly create and manage the lifecycle of a dedicated executor to handle multithreaded and multiprocess dispatch of concurrent activities. It may be beneficial to provide module level tmap(), pmap(), tsubmit()

[issue23207] logging.basicConfig does not validate keyword arguments

2015-03-17 Thread Jeremy Goss
Jeremy Goss added the comment: The argument validation in basicConfig has introduced another problem. I cannot pass in an optional filename/filemode argument pair. Previously, I passed in an optional logfile argument from ArgumentParser (which could be None). Now, I get a ValueError because fil

[issue23695] idiom for clustering a data series into n-length groups

2015-03-17 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[issue19351] python msi installers - silent mode

2015-03-17 Thread Doug Rohm
Doug Rohm added the comment: I realize this hasn't been commented on for a long time, but I'm noticing the same issue trying to do a silent install with the 3.4.3 x64 windows installer. The 3.4.2 x64 windows installer worked perfectly fine, but I can't seem to get the registry and add/remove

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write?

2015-03-17 Thread Martin Panter
Martin Panter added the comment: I would say that the current patch looks correct enough, in that it would still get the correct lengths when a memoryview() object is passed in. The zlib module’s crc32() function and compress() method already seem to support arbitrary bytes-like objects. But

[issue19495] context manager for measuring duration of blocks of code

2015-03-17 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue23695] idiom for clustering a data series into n-length groups

2015-03-17 Thread Paddy McCarthy
Paddy McCarthy added the comment: Hmmm. It seems that the problem isn't to do with the fact that it works, or how to apply it; the problem is with *how* it works. Making it an idiom means that too many will use it without knowing why it works which could lead to later maintenance issues. I th

[issue23441] rlcompleter: tab on empty prefix => insert spaces

2015-03-17 Thread R. David Murray
R. David Murray added the comment: The CLI is a UI. We're using readline facilities (ie: "the terminal") to improve it. And people cut and paste from the interactive terminal, so I think the presence of tab characters is a negative from that perspective as well. -- _

[issue23677] Mention dict and set comps in library reference

2015-03-17 Thread Frank Millman
Frank Millman added the comment: Lists and tuples are described like this - class list([iterable]) Lists may be constructed in several ways: [...] class tuple([iterable]) Tuples may be constructed in a number of ways: [...] I think a similar approach to Dicts and Sets could make sense - cla

[issue23698] Fix documentation for multiprocessing.Manager

2015-03-17 Thread Anand B Pillai
New submission from Anand B Pillai: multiprocessing.Manager seems to have an inconsistency in behaviour/documentation or both. The behaviour inconsistency is documented in the attached test script which should run for both Python2 and Python3. Briefly, multiprocessing.managers.BaseManager cl

<    1   2