[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue25177] OverflowError in statistics.mean when summing large floats

2015-10-19 Thread Mark Dickinson
Mark Dickinson added the comment: > I strongly suspect that moving from float to Fraction-based ratios is going > to kill performance in the common case The existing code already converts each of the input items to Fraction; the only difference is that the old code converts the sum of those Fr

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: There are two 'width=250' settings, which I tried changing to 150, with no effect, so there is something else making the dialog wider than before. -- ___ Python tracker __

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-19 Thread Марк Коренберг
Марк Коренберг added the comment: Man getrandom() As of Linux 3.19, the following bug exists: * Depending on CPU load, getrandom() does not react to interrupts before reading all bytes requested. So, is it goot to use this syscall now? -- _

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8953a42c2ac4 by Terry Jan Reedy in branch '2.7': Issue #24782: Don't try to run now-removed extension dialog test. https://hg.python.org/cpython/rev/8953a42c2ac4 New changeset 4bf862fc10a5 by Terry Jan Reedy in branch '3.4': Issue #24782: Don't try

[issue25445] type xterm in python

2015-10-19 Thread Reema
New submission from Reema: python xterm give output /usr/bin/xterm when used in unix shell script. Need to get same output in python for: type xterm similarly for type textedit When trying to do it with subprocess.Popen, i am getting an error: type object 'type' has no attribute 'rfind' or xterm

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-19 Thread STINNER Victor
STINNER Victor added the comment: I knew the subtle difference between reading from /dev/urandom and getrandom() syscall: the syscall hangs until /dev/urandom is feeded with enough entropy. It should be documented in Whats New, os.urandom and maybe also random doc. Not only python 3.5 was affecte

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-19 Thread Марк Коренберг
Марк Коренберг added the comment: Just install rngd and setup it to user /dev/urandom as entropy source. I think thread is closed :) -- nosy: +mmarkk ___ Python tracker ___

[issue25444] Py Launch Icon

2015-10-19 Thread Nils Lindemann
Nils Lindemann added the comment: Hm actually an alternative icon for idle can be useful to separate it from command lines in the task bar. But a special launcher symbol is not necessary in my opinion. -- ___ Python tracker

[issue25444] Py Launch Icon

2015-10-19 Thread Nils Lindemann
New submission from Nils Lindemann: Hi, See attached screen for a list of alternative 16x16 icon suggestions to the current launcher symbol, which i dont like (Dudes, rockets are used in wars!). I copied them a few times to show how they look in groups. (while i was at it i also created an ic

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2015-10-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll update this document to reflect the current state of the world. -- ___ Python tracker ___ __

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2015-10-19 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue25177] OverflowError in statistics.mean when summing large floats

2015-10-19 Thread Josh Rosenberg
Josh Rosenberg added the comment: Do you have any benchmarks on the before and after? I strongly suspect that moving from float to Fraction-based ratios is going to kill performance in the common case, particularly for longer input sequences, but that's a hunch only. -- nosy: +josh.r

[issue20499] Rounding errors with statistics.variance

2015-10-19 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- assignee: -> steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue25177] OverflowError in statistics.mean when summing large floats

2015-10-19 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- assignee: -> steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue25442] Shelve consistency issues

2015-10-19 Thread Yanyan Jiang
Yanyan Jiang added the comment: Thanks for reminding. It is originally reported with the default setting. We conducted further tests with other options of anydbm (dbhash, dbm, gdbm), none of them survived crash testing. For the detailed reasoning please refer to an OSDI'14 research paper: htt

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

2015-10-19 Thread Brett Cannon
New submission from Brett Cannon: It would be nice to know when doing a long benchmark run -- i.e., running in rigorous mode with a lot of benchmarks -- how many benchmarks are left, much like how you know how many tests are left when running under regrtest. -- assignee: brett.cannon c

[issue25390] Can't define a typing.Union containing a typing.re.Pattern

2015-10-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 955d3faf727a by Guido van Rossum in branch '3.5': Issue #25390: typing: Don't crash on Union[str, Pattern]. https://hg.python.org/cpython/rev/955d3faf727a New changeset 04314479af0b by Guido van Rossum in branch 'default': Issue #25390: typing: Don'

[issue25390] Can't define a typing.Union containing a typing.re.Pattern

2015-10-19 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue11174] add argparse formatting option to display type names for metavar

2015-10-19 Thread paul j3
paul j3 added the comment: This formatter produces an error if one or more of the arguments uses the default `None` type (a string). This is because `None` does not have a `.__name__`. This HelpFormatter probably has been rarely, if ever, used. The metavar parameter works just as well. --

[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2015-10-19 Thread Марк Коренберг
Марк Коренберг added the comment: Suppose conditions: - Old linux kernel ignoring flag - malicious hacker force use of PLAIN FILE instead of directory On new kernel it will fail On old kernel it will just open that file! So, we can make a HACK! Just add last slash to directory name. This will n

[issue25442] Shelve consistency issues

2015-10-19 Thread R. David Murray
R. David Murray added the comment: Shelve does not itself implement any database, but it does *use* a database[*]. Any aspects of this must be directed toward the underlying database library used. In particular, it is not part of the shelve API to know anything about any possible underlying

[issue18673] Add O_TMPFILE to os module

2015-10-19 Thread Марк Коренберг
Марк Коренберг added the comment: Just for link. Issue #21515 — tempfile use this functionality now. -- nosy: +mmarkk ___ Python tracker ___ _

[issue25436] argparse.ArgumentError missing error message in __repr__

2015-10-19 Thread paul j3
paul j3 added the comment: The short `repr` is produced in Python2.7, but not 3.5. Your test case: action = argparse._StoreAction(['--file], dest='file_path') error = argparse.ArgumentError(action, 'File not found.') print(str(error)) print(repr(error)) With Python3.5 this disp

[issue22684] message.as_bytes() produces recursion depth exceeded

2015-10-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Even more minimized artificial example: from email._header_value_parser import * import email.policy tl = TokenList([ TokenList([ ValueTerminal('x', 'atext'), WhiteSpaceTerminal(' ', 'fws'), ValueTerminal('x'*76, 'atext'), ]),

[issue24885] StreamReaderProtocol docs recommend using private API

2015-10-19 Thread Guido van Rossum
Changes by Guido van Rossum : -- assignee: -> gvanrossum resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pyth

[issue16500] Add an 'atfork' module

2015-10-19 Thread Ionel Cristian Mărieș
Changes by Ionel Cristian Mărieș : -- nosy: +ionelmc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue24885] StreamReaderProtocol docs recommend using private API

2015-10-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset d91208957e4e by Guido van Rossum in branch '3.4': Issue #24885: Update note in docs about stream convenience functions. https://hg.python.org/cpython/rev/d91208957e4e New changeset 43c63dd2f383 by Guido van Rossum in branch '3.5': Issue #24885: Upda

[issue24885] StreamReaderProtocol docs recommend using private API

2015-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: I just re-read the docs here (which came straight from the open_connection() docstring). The parenthetical remark is confusing -- I meant something more like """ If you want to use different classes than StreamReader, StreamReaderProtocol and StreamWriter, j

[issue22684] message.as_bytes() produces recursion depth exceeded

2015-10-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is minimized example. from email._header_value_parser import * al = AddressList([Address([Mailbox([NameAddr([DisplayName([Atom([ValueTerminal('example', 'atext'), CFWSList([WhiteSpaceTerminal('\t', 'fws')])])]), AngleAddr([ValueTerminal('<', 'angle-add

[issue25442] Shelve consistency issues

2015-10-19 Thread Yanyan Jiang
New submission from Yanyan Jiang: I am currently working on the file system reliability issues. I have a disk driver that is able to simulate crash disk sites after injected power failures. This disk is totally compatible with the Linux block driver semantics (refer to https://www.kernel.org/

[issue25441] StreamWriter.drain() unreliably reports closed sockets

2015-10-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 17f76258d11d by Guido van Rossum in branch '3.4': Issue #25441: asyncio: Raise error from drain() when socket is closed. https://hg.python.org/cpython/rev/17f76258d11d New changeset d30fbc55194d by Guido van Rossum in branch '3.5': Issue #25441: asy

[issue25441] StreamWriter.drain() unreliably reports closed sockets

2015-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: Fixed by 17f76258d11d, d30fbc55194d and 08adb4056b5f. -- assignee: -> gvanrossum resolution: -> fixed status: open -> closed ___ Python tracker

[issue25154] Drop the pyvenv script

2015-10-19 Thread Brett Cannon
Brett Cannon added the comment: I have a typo in my commit where I accidentally placed the file argument in str.format() instead of for print() (pointed out on GitHub). -- status: closed -> open ___ Python tracker

[issue25441] StreamWriter.drain() unreliably reports closed sockets

2015-10-19 Thread Sebastien Bourdeauducq
Sebastien Bourdeauducq added the comment: Yes, this patch fixes the problem (in both this example and my real application). Thanks! -- ___ Python tracker ___ ___

[issue22684] message.as_bytes() produces recursion depth exceeded

2015-10-19 Thread Jan Malte
Jan Malte added the comment: for the same objects as_string() is working correctly -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue25437] Issue with ftplib.FTP_TLS and server forcing SSL connection reuse

2015-10-19 Thread Daniel Waites
Changes by Daniel Waites : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue25441] StreamWriter.drain() unreliably reports closed sockets

2015-10-19 Thread Guido van Rossum
Changes by Guido van Rossum : -- versions: +Python 3.4, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue25441] StreamWriter.drain() unreliably reports closed sockets

2015-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: See also this upstream git issue: https://github.com/python/asyncio/issues/263. Let me know whether the patch suggested there works for you, and I'll prioritize getting it checked in. (Help would also be appreciated, e.g. in the form of a unittest.) ---

[issue25441] StreamWriter.drain() unreliably reports closed sockets

2015-10-19 Thread Sebastien Bourdeauducq
New submission from Sebastien Bourdeauducq: 1. Open a listening socket: $ nc6 -l -p 1066 2. Run the following (tested here on Linux): import asyncio async def bug(): reader, writer = await asyncio.open_connection("::1", "1066") while True: writer.write("foo\n".encode())

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-19 Thread STINNER Victor
STINNER Victor added the comment: If your OS has no entropy at all, you will have much more severe issue. For example, don't try to generate a SSH key or established a SSL/TLS session. -- ___ Python tracker ___

[issue25440] python3.4-config --extension-suffix not expanded

2015-10-19 Thread Matthias Klose
Changes by Matthias Klose : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue25440] python3.4-config --extension-suffix not expanded

2015-10-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 74b6b19e52b4 by doko in branch '3.4': - Issue #25440: Fix output of python-config --extension-suffix. https://hg.python.org/cpython/rev/74b6b19e52b4 New changeset 40aba0cda7b6 by doko in branch '3.5': - Issue #25440: Fix output of python-config --ex

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-19 Thread jan matejek
jan matejek added the comment: On 18.10.2015 23:09, STINNER Victor wrote: > Hum ok, so your issue is specific to Linux. yes, should have specified that, sorry > Hum, the problem was already fixed some months/years ago: you must attach a > RNG virtio device to your VM. Python is just one exampl

[issue25440] python3.4-config --extension-suffix not expanded

2015-10-19 Thread Matthias Klose
New submission from Matthias Klose: $ python3.4-config --extension-suffix @SO@ this is fallout from issue #16754. Use EXT_SUFFIX directly in the shell script, which then gets expanded by configure. -- messages: 253177 nosy: doko priority: normal severity: normal status: open title: pyt

[issue25439] Add type checks to urllib.request.Request

2015-10-19 Thread Ezio Melotti
Ezio Melotti added the comment: > For the request data, the question is what types do we currently support? This is what I was wondering as well. The doc says "data must be a bytes object specifying additional data to send to the server, or None if no such data is needed."[0] However one of t

[issue25439] Add type checks to urllib.request.Request

2015-10-19 Thread Martin Panter
Martin Panter added the comment: Type checking on the URL should be reasonably straightforward. For the request data, the question is what types do we currently support? This may be a can of worms. We would have to be careful not to break existing use cases, even undocumented ones. Looking at

[issue16113] Add SHA-3 (Keccak) support

2015-10-19 Thread Björn Edström
Björn Edström added the comment: Remember that FIPS202 slightly change some parts of the Keccak that won the competition, so test results are different. I updated my stand alone SHA3 module, for anyone who is interested in using this now in Python 2 and 3. https://github.com/bjornedstrom/pytho

[issue25439] Add type checks to urllib.request.Request

2015-10-19 Thread Ezio Melotti
New submission from Ezio Melotti: Currently urllib.request.Request seems to accept invalid types silently, only to fail later on with unhelpful errors when the request is passed to urlopen. This might cause users to go through something similar: >>> r = Request(b'https://www.python.org') >>> #