[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-09 Thread STINNER Victor
STINNER Victor added the comment: Maybe the failure should be explained in a comment? (Sorry I din't read the patch.) -- ___ Python tracker ___

[issue15657] Error in Python 3 docs for PyMethodDef

2016-06-09 Thread Berker Peksag
Berker Peksag added the comment: I'm going to delete (but note that :const:`METH_KEYWORDS` alone is equivalent to ``METH_VARARGS | METH_KEYWORDS``) from Doc/c-api/structures.rst in 3.5. Then change the value of METH_KEYWORDS from 0x0002 to 0x0003 in 3.6. Thanks for the review Serhiy.

[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Kaushik or David (or anyone else), does you have an idea of how to fix the Windows tests? It would be good to make the buildbots healthy again, then it is easier to see new failures in Windows. -- priority: normal -> high

[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Test suite emits a new warning, and fails under python -Werror: == ERROR: test_readline (test.test_asyncio.test_pep492.StreamReaderTests)

[issue26868] Document PyModule_AddObject's behavior on error

2016-06-09 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the review Serhiy. Here is an updated patch. -- Added file: http://bugs.python.org/file43328/issue26868_v2.diff ___ Python tracker

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Yes it is okay. The code is compiling a dummy file without main(), just to see what libraries GCC tries to link with it. It is only interested in extracting the line matching *libc.so.*, which in your case should be /lib/i386-linux-gnu/libc.so.6 So you should

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: I presume then that the tests pass on Linux with TEntry removed. I take this as repudiation of the 'X11' behavior by the tk maintainers, and as support for changing the old widgets. Having different paste behavior in text and entry widgets, or even

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks to me that the command used in _findLib_gcc always fails. $ LANG=C LC_ALL=C gcc -Wl,-t -o ttt -lc /usr/bin/ld: mode elf_i386 /usr/lib/gcc/i686-linux-gnu/5/../../../i386-linux-gnu/crt1.o /usr/lib/gcc/i686-linux-gnu/5/../../../i386-linux-gnu/crti.o

[issue20508] IndexError from ipaddress._BaseNetwork.__getitem__ has no message

2016-06-09 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue24617] os.makedirs()'s [mode] not correct

2016-06-09 Thread Martin Panter
Martin Panter added the comment: This version of the patch looks good to me -- stage: patch review -> commit review ___ Python tracker ___

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

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Will try to change the existing code from os.popen to subprocess (Issue 26439) to set a better example for new code like this -- dependencies: +avoid using a shell in ctypes.util: replace os.popen with subprocess

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I deliberately omitted ttk.Entry, because it doesn't have special behavior on X11. -- ___ Python tracker ___

[issue24750] IDLE: Cosmetic improvements for main window

2016-06-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : Added file: http://bugs.python.org/file43327/ttk-scrollbar.diff ___ Python tracker ___

[issue27239] Make idlelib.macosx self-contained.

2016-06-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Updated Python 2 patch merged with recent changes. I will commit at least the Python 3 version soon, because the existing code sets a bad example for potential additions (Issue 26439). -- Added file:

[issue20508] IndexError from ipaddress._BaseNetwork.__getitem__ has no message

2016-06-09 Thread Berker Peksag
Berker Peksag added the comment: +1 for "address index out of range". The current test only covers the first IndexError. We also need to add another one for the else branch. -- nosy: +berker.peksag versions: +Python 3.6 ___ Python tracker

[issue26565] [ctypes] Add value attribute to non basic pointers.

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Eryk Sun’s as_void suggestion sounds similar to doing: ctypes.cast(any_pointer, ctypes.c_void_p) Why do you want the address? Perhaps it is good enough to get it from a void pointer: ctypes.cast(any_pointer, ctypes.c_void_p).value Maybe “pointer_value” would

[issue7356] parsing of ldconfig output in ctypes/utils.py depends on the locale

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset b4839797f482 by Matthias Klose in branch '2.7': Issue #7356: ctypes.util: Make parsing of ldconfig output locale independent. https://hg.python.org/cpython/rev/b4839797f482 -- nosy: +python-dev ___

[issue7356] parsing of ldconfig output in ctypes/utils.py depends on the locale

2016-06-09 Thread Martin Panter
Martin Panter added the comment: This was supposed to be fixed in 2.7 by r78979 and beb9d176503e. But those changes were made to the dead _findLib_ldconfig() function (later deleted as part of Issue 13979). I will port the changes to the live _findSoname_ldconfig() function. -- nosy:

[issue8491] Need readline command and keybinding information

2016-06-09 Thread Martin Panter
Martin Panter added the comment: For the record, I removed some trailing spaces and reworded the link in the comitted version. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue24750] IDLE: Cosmetic improvements for main window

2016-06-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Revised plan: use ttk in 3.6 and only 3.6. I will revise scroll patch for new file names, retest, and apply if good. -- assignee: -> terry.reedy stage: needs patch -> commit review versions: -Python 3.5 ___

[issue24759] Idle: require tk 8.5 and ttk widgets, and drop unneeded code.

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 76f831e4b806 by Terry Jan Reedy in branch 'default': Issue #24759: IDLE requires tk 8.5 and availability ttk widgets. https://hg.python.org/cpython/rev/76f831e4b806 -- ___ Python tracker

[issue24759] Idle: require tk 8.5 and ttk widgets, and drop unneeded code.

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 81927f86fa3a by Terry Jan Reedy in branch 'default': Issue #24759: Add test for IDLE syntax colorizoer. https://hg.python.org/cpython/rev/81927f86fa3a -- ___ Python tracker

[issue8491] Need readline command and keybinding information

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset e981a4273cf6 by Martin Panter in branch '2.7': Issue #8491: Add link to Gnu Readline configuration documentation https://hg.python.org/cpython/rev/e981a4273cf6 New changeset 5bbb021450d7 by Martin Panter in branch '3.5': Issue #8491: Add link to

[issue15476] Index "code object" and link to code object definition

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Thanks for the patch Tommy. I think we can close this now. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue27186] add os.fspath()

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset cec1f00c538d by Brett Cannon in branch 'default': Issue #27186: Document PyOS_FSPath(). https://hg.python.org/cpython/rev/cec1f00c538d -- ___ Python tracker

[issue26556] Update expat to 2.2.1

2016-06-09 Thread Brian Martin
Brian Martin added the comment: Per http://expat.sourceforge.net/, version 2.1.1 fixes CVE-2015-1283, not 2.2.1 as mentioned in a comment. -- nosy: +Brian Martin ___ Python tracker

[issue15476] Index "code object" and link to code object definition

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e9aace7e10a by Tommy Beadle in branch '3.5': [Issue 15476] Make "code object" its own entry in the index https://hg.python.org/cpython/rev/2e9aace7e10a New changeset 8455bbc6b4f2 by Martin Panter in branch 'default': Issue #15476: Merge index

[issue23693] timeit accuracy could be better

2016-06-09 Thread STINNER Victor
STINNER Victor added the comment: Hi, I develop a new implementation of timeit which should be more reliable: http://perf.readthedocs.io/en/latest/ * Run 25 processes instead of just 1 * Compute average and standard deviation rather than the minimum * Don't disable the garbage collector * Skip

[issue27182] PEP 519 support in the stdlib

2016-06-09 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon dependencies: +Add a "What's New" entry for PEP 519 ___ Python tracker ___

[issue27283] Add a "What's New" entry for PEP 519

2016-06-09 Thread Brett Cannon
New submission from Brett Cannon: Issue to track the fact that I need to write the "What's New" entry once all other PEP 519-related work is finished. -- assignee: brett.cannon components: Documentation messages: 268066 nosy: brett.cannon priority: deferred blocker severity: normal

[issue27182] PEP 519 support in the stdlib

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6239673d5e1d by Brett Cannon in branch 'default': Issue #27182: Document os.PathLike. https://hg.python.org/cpython/rev/6239673d5e1d -- ___ Python tracker

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: For 3.6, I added ttk.Entry to x11 fixer. I expanded tests to Entry and Spinboxes. I noted in a comment that tk.Entry/Spinbox, but not ttk.Entry, would not paste with generated <> event without a 0-length selection. This might be a glitch in tk, but pasting

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : Added file: http://bugs.python.org/file43324/x11-paste-35.diff ___ Python tracker ___

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : Added file: http://bugs.python.org/file43325/x11-paste-27.diff ___ Python tracker ___

[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-09 Thread Yury Selivanov
Yury Selivanov added the comment: I've also updated PEP 492: https://hg.python.org/peps/rev/fef4b9969b9d Please feel free to post to this issue if you think that I should have covered it differently or in more detail. -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-09 Thread Brett Cannon
Brett Cannon added the comment: I'm starting to catch up on everything you all did for PEP 519 and I wanted to say thanks! It looks like everything that needs to be done has been committed, has a patch, or just needs docs. The only thing I needed to do post-commit is tweak the docstrings to

[issue27262] IDLE: move Aqua context menu code to maxosx

2016-06-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am leaving this open to look into later adding an automated test for this to the new test_editmenu file that will be added for #5124. -- ___ Python tracker

[issue27186] add os.fspath()

2016-06-09 Thread Brett Cannon
Brett Cannon added the comment: Re-opening as there are several patches that got put in here that have not been applied (e.g. glossary entry, os.DirEntry, etc.). -- assignee: -> brett.cannon status: closed -> open ___ Python tracker

[issue27128] Add _PyObject_FastCall()

2016-06-09 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: > See issue27213. Maybe fast call with keyword arguments would avoid the > creation of a dict. In a first verison of my implementation, I used dictionary items stored a a list of (key, value) tuples in the same PyObject* C

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Uri Okrent
Uri Okrent added the comment: I updated the patch to improve the tests and made the same change to xmlrpc.client.ProtocolError (which was the only other place in xmlrpc.client). I'll let you decide if this patch is better despite the fact that it suffers from the same data duplication as

[issue15657] Error in Python 3 docs for PyMethodDef

2016-06-09 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___

[issue27128] Add _PyObject_FastCall()

2016-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue27213. Maybe fast call with keyword arguments would avoid the creation of a dict. -- ___ Python tracker ___

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Uri Okrent
Uri Okrent added the comment: My reading of the docs leads me to lean towards bug since this seems to break the contract of BaseException API in a standard lib module: https://docs.python.org/3/library/exceptions.html#BaseException says BaseExceptions have args and with_traceback so those

[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-09 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks a lot, Nick! I've merged the patch. -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> enhancement ___ Python tracker

[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 93ad47d63b87 by Yury Selivanov in branch '3.5': Issue #27243: Fix __aiter__ protocol https://hg.python.org/cpython/rev/93ad47d63b87 New changeset 9ff95c30a38e by Yury Selivanov in branch 'default': Merge 3.5 (issue #27243)

[issue27265] Hash of different, specific Decimals created from str is the same

2016-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> resolved ___ Python tracker ___ ___

[issue27265] Hash of different, specific Decimals created from str is the same

2016-06-09 Thread Radosław Szalski
Radosław Szalski added the comment: Thanks for the comments, you are both correct. I think that the issue is resolved now, so I'm closing this a won't fix. -- status: open -> closed ___ Python tracker

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks reasonable. But since Fault never was unpickleable, this issue is in gray zone between bug fixing and adding new feature. The latter can be done only in new Python version. I hesitate with classification of this issue. There are a lot of other

[issue27265] Hash of different, specific Decimals created from str is the same

2016-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that Decimal(0.05) != Decimal('0.05'). >>> Decimal(0.05) Decimal('0.05000277555756156289135105907917022705078125') >>> hash(Decimal(0.05)) 966367654 >>> hash(Decimal('0.05000277555756156289135105907917022705078125')) 966367654 >>>

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread Tim Peters
Tim Peters added the comment: Ah! Yes, .getrandbits(N) outputs remain vulnerable to equation-solving in Python 3, for any value of N. I haven't seen any code where that matters (may be "a security hole"), but would bet some _could_ be found. There's no claim of absolute security here. To

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Uri Okrent
Uri Okrent added the comment: I'm not pickling/unpickling it directly, I'm using multiprocessing to handle queries to my server in worker processes which is using pickle to propagate exceptions raised in the worker to the parent. I could instead raise a different exception and wrap it in a

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why you need to pickle Fault? -- ___ Python tracker ___ ___

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread Donald Stufft
Donald Stufft added the comment: > Sorry, I don't know what "it" refers to. Surely not to a program exposing > the output of .getstate()?! random.getrandbits() -- ___ Python tracker

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread Tim Peters
Tim Peters added the comment: > Searching github pulls up a number of results of people > calling it, but I haven't looked through them to see > how/why they're calling it. Sorry, I don't know what "it" refers to. Surely not to a program exposing the output of .getstate()?! Regardless, there

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue27265] Hash of different, specific Decimals created from str is the same

2016-06-09 Thread Mark Dickinson
Mark Dickinson added the comment: > the behavior differs simply based on whether the Decimal was created from a > string vs a float That's not quite right: a Decimal object keeps no knowledge of how it was created. The behaviour differs depending on whether the value of the Decimal happens

[issue27282] Raise BlockingIOError in os.urandom if kernel is not ready

2016-06-09 Thread Nick Coghlan
Nick Coghlan added the comment: Quoting http://bugs.python.org/issue27266#msg268043: The key advantage the BlockingIOError model offers is that it's trivial to build a blocking version as a busy loop around the non-blocking version: def urandom_wait_for_entropy(num_bytes): while

[issue27266] Always use getrandom() in os.random() on Linux and add block=False parameter to os.urandom()

2016-06-09 Thread Nick Coghlan
Nick Coghlan added the comment: Since Victor requested it, I filed #27282 to track the "raise BlockingIOError if the kernel would block" design option. The key advantage that particular model offers is that it's trivial to build a blocking version as a busy loop around the non-blocking

[issue27282] Raise BlockingIOError in os.urandom if kernel is not ready

2016-06-09 Thread Donald Stufft
Donald Stufft added the comment: This proposal is reasonable to me and solves any problems I have with the default behavior of os.urandom. -- nosy: +dstufft ___ Python tracker

[issue27282] Raise BlockingIOError in os.urandom if kernel is not ready

2016-06-09 Thread Nick Coghlan
New submission from Nick Coghlan: This proposal competes directly with #27250, #27266, and #27279 as possible long term solutions to the Linux/systemd os.urandom deadlock bug described in #26839 Rather than adding new APIs, or making os.urandom potentially blocking on Linux (as it was in

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread Donald Stufft
Donald Stufft added the comment: > But that's not what real-life programs expose. Are you sure? Searching github pulls up a number of results of people calling it, but I haven't looked through them to see how/why they're calling it. > What do you believe? For example, do you believe it would

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Berker Peksag
Berker Peksag added the comment: Looks good to me, thanks. -- nosy: +berker.peksag ___ Python tracker ___ ___

[issue27279] Add random.cryptorandom() and random.pseudorandom, deprecate os.urandom()

2016-06-09 Thread Nick Coghlan
Nick Coghlan added the comment: As with other proposals to add new APIs, I think this is an overreaction to a Linux specific problem. Linux system boot could deadlock with 3.5.0 and 3.5.1 due to: - CPython startup using os.urandom() when it wasn't necessary - systemd invoking a Python script

[issue27271] asyncio lost udp packets

2016-06-09 Thread Guido van Rossum
Guido van Rossum added the comment: You're welcome Valdemar. It's a wonderful world, there's so much to learn! Sounds like you're on the right path. Good luck! -- ___ Python tracker

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread Tim Peters
Tim Peters added the comment: Donald, your script appears to recreate the state from some hundreds of consecutive outputs of getrandbits(64). Well, sure - but what of it? That just requires inverting the MT's tempering permutation. You may as well note that the state can be recreated from

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread SilentGhost
Changes by SilentGhost : -- nosy: +loewis stage: -> patch review versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-09 Thread Nick Coghlan
Nick Coghlan added the comment: +1 from me - my only comments were on the docs updates and one of the explanatory comments in the code. -- ___ Python tracker

[issue27274] [ctypes] Allow from_pointer creation

2016-06-09 Thread Memeplex
Memeplex added the comment: > The first argument can be any type accepted by c_void_p.from_param, such as a > ctypes pointer/array, str, bytes, or an integer address. Now I see why you suggested ptr.as_void in 26565. Both issues are very related. Some functions are overloaded in the sense

[issue26985] Information about CodeType in inspect documentation is outdated

2016-06-09 Thread Berker Peksag
Berker Peksag added the comment: "Return true if the object is a code object." should stay. We can add a short sentence to refer people to the inspect documentation for the list of co_* attributes. -- ___ Python tracker

[issue27274] [ctypes] Allow from_pointer creation

2016-06-09 Thread Memeplex
Memeplex added the comment: Thank you for the great tips, Eryk, somehow I overlooked string_at while reading the docs. Now, given that the address parameter of string_at is pretty overloaded, wouldn't it be reasonable to overload from_address the same instead of introducing from_pointer?

[issue27271] asyncio lost udp packets

2016-06-09 Thread valdemar pavesi
valdemar pavesi added the comment: thanks Guido and Yury I am new on python world. I was working with automation tests, sw implemented in Delphi in 199x. this year I got a python certification from University Texas Arlington University by EDX. and I already wrote 4 projects in python3

[issue26985] Information about CodeType in inspect documentation is outdated

2016-06-09 Thread Xiang Zhang
Xiang Zhang added the comment: So maybe remove the docstring entirely? -- ___ Python tracker ___ ___

[issue27265] Hash of different, specific Decimals created from str is the same

2016-06-09 Thread Radosław Szalski
Radosław Szalski added the comment: Thanks for the reply and analysis, Mark. My motivation was that as a "clueless user", I shouldn't worry about how Decimals are created. Given two equal numbers, I would expect their behavior (e.g., result of a hash) to be the same as well. In this example,

[issue27281] unpickling an xmlrpc.client.Fault raises TypeError

2016-06-09 Thread Uri Okrent
New submission from Uri Okrent: Attempting to unpickle an xmlrpc.client.Fault will raise a TypeError: >>> import xmlrpc.client as xmlrpclib >>> f = xmlrpclib.Fault(42, 'Test Fault') >>> import pickle >>> s = pickle.dumps(f) >>> pickle.loads(s) Traceback (most recent call last): File "", line

[issue27270] 'parentheses-equality' warnings when building with clang and ccache

2016-06-09 Thread STINNER Victor
STINNER Victor added the comment: clang_ccache.patch LGTM. -- nosy: +haypo ___ Python tracker ___ ___

[issue13420] newer() function in dep_util.py discard changes in the same second

2016-06-09 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18027] distutils should access stat_result timestamps via .st_*time attributes

2016-06-09 Thread Berker Peksag
Berker Peksag added the comment: This is a duplicate of issue 13420. -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> newer() function in dep_util.py discard changes in the same second ___

[issue27264] python 3.4 vs. 3.5 strftime same locale different output on Windows

2016-06-09 Thread Eryk Sun
Changes by Eryk Sun : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26243] zlib.compress level as keyword argument

2016-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The original request was for supporting level as keyword argument. Making the first argument a keyword argument was unintentional side effect (due a to the limitation of argument parsing functions). Now it is possible to support positional-only and keyword

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5306f27c53aa by Serhiy Storchaka in branch 'default': Regenerate Argument Clinic code for issue #23026. https://hg.python.org/cpython/rev/5306f27c53aa -- ___ Python tracker

[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset eeb742d8bf9c by Serhiy Storchaka in branch '3.5': Issue #26305: Argument Clinic now escapes braces. No need to double them. https://hg.python.org/cpython/rev/eeb742d8bf9c New changeset d983c313b8f1 by Serhiy Storchaka in branch 'default': Issue

[issue27181] Add geometric mean to `statistics` module

2016-06-09 Thread Mark Dickinson
Mark Dickinson added the comment: > Hmm, well, I don't have SciPy installed, but I've found that despite > their (well-deserved) reputation, numpy (and presumably scipy) often > have rather naive algorithms that can lose accuracy rather > spectacularly. Agreed. And as Ram Rachum hinted,

[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue23867] Argument Clinic: inline parsing code for 1-argument functions

2016-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: patch review -> needs patch ___ Python tracker ___

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2016-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: patch review -> needs patch ___ Python tracker ___

[issue27140] Opcode for creating dict with constant keys

2016-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could anyone please make a review? -- keywords: +needs review ___ Python tracker ___

[issue27181] Add geometric mean to `statistics` module

2016-06-09 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Thu, Jun 09, 2016 at 09:24:04AM +, Mark Dickinson wrote: > On the other hand, apparently `exp(mean(log(...)))` is good enough for SciPy: Hmm, well, I don't have SciPy installed, but I've found that despite their (well-deserved) reputation, numpy (and

[issue26826] Expose new copy_file_range() syscall in os module.

2016-06-09 Thread Marcos Dione
Marcos Dione added the comment: ENOSYS catching fixed. -- Added file: http://bugs.python.org/file43319/copy_file_range.diff ___ Python tracker ___

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-09 Thread Larry Hastings
Larry Hastings added the comment: I just posted to python-dev and asked Guido to make a BDFL ruling. I only represented my side, both because I worried I'd do a bad job of representing *cough* literally everybody else *cough*, and because it already took me so long to write the email. All

[issue27266] Always use getrandom() in os.random() on Linux and add block=False parameter to os.urandom()

2016-06-09 Thread Donald Stufft
Donald Stufft added the comment: Having os.urandom raise an error instead of blocking is OK with me. It turns an implicit error into an explicit one. However, I prefer to have it block until it has initialized it's entropy pool because that makes Linux behave similarly to all of the other

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread Donald Stufft
Donald Stufft added the comment: If seeding from urandom was causing no problems, then I would not care if random.Random() wanted to seed from urandom, even though it doesn't need to. However it is causing problems, and thus it shouldn't. Here's another script, this one runs on Python 3.5.1

[issue26826] Expose new copy_file_range() syscall in os module.

2016-06-09 Thread Martin Panter
Martin Panter added the comment: It’s a bit ugly, but I would write the test so that it is recorded as skipped: try: os.copy_file_range(...) except OSError as err: if err.errno != ENOSYS: raise # We get to see the full exception details self.skipTest(err) # Test is

[issue27279] Add random.cryptorandom() and random.pseudorandom, deprecate os.urandom()

2016-06-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Resources for entropy gathering sources: * Kernel based devices such as /dev/random: https://en.wikipedia.org/wiki//dev/random * EGD - old entropy gathering daemon; blocks when out of entropy http://egd.sourceforge.net/ (not maintained

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread STINNER Victor
STINNER Victor added the comment: > On 'import random' seed random.Random() from _Py_HashSecret.random_seed + > gettimeofday().tv_sec + gettimeofday().tv_usec + id(self). That way > subinterpreters get a different init state. Can we use os.urandom() was random.Random is instanciated manually,

[issue27277] Fatal Python error: Segmentation fault in test_exceptions

2016-06-09 Thread SilentGhost
Changes by SilentGhost : -- components: +Tests ___ Python tracker ___ ___

[issue27280] Paste fail in ipaddress documentation

2016-06-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +pmoody ___ Python tracker ___ ___

[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-09 Thread Christian Heimes
Christian Heimes added the comment: New plan: * Add a new uint64 _Py_HashSecret.random_seed * On 'import random' seed random.Random() from _Py_HashSecret.random_seed + gettimeofday().tv_sec + gettimeofday().tv_usec + id(self). That way subinterpreters get a different init state. On systems

[issue26826] Expose new copy_file_range() syscall in os module.

2016-06-09 Thread Marcos Dione
Marcos Dione added the comment: Fixed the last comments, including comparing what was written to the original data, but only to the length of what was actually written. I'm just not sure if the way to handle the syscall not existing is ok. -- Added file:

  1   2   >