[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2015-10-19 Thread Gregory P. Smith

New submission from Gregory P. Smith:

https://docs.python.org/3/c-api/structures.html#c.PyMemberDef

T_STRING members are turned into str objects in Python.  The documentation 
needs updating to mention which codec the char * bytes are treated as.

Solving this issue involves code inspection and leaving pointers to that code 
here in the issue, then updating the docs to mention the requirements for the 
char * member data as well as what happens upon assignment for non-READONLY 
T_STRING data (a different restriction?  or encoding to the same codec?)

My _guess_ would be UTF-8 or ASCII but I'll let someone else dive in and find 
out.  This is a Python 3 specific documentation clarification.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 253172
nosy: docs@python, gregory.p.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: document what codec PyMemberDef T_STRING decodes the char * as
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 example, a lot of 
> applications need entropy.

i disagree that this is a good solution; similar to your haveged 
suggestion, this is a workaround.

Unless a program specifically uses randomness, it should not need to 
read any entropy. For the python runtime itself, this is preventable by 
setting fixed PYTHONHASHSEED. For `random` module, there is no clean way 
to prevent it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 --extension-suffix.
https://hg.python.org/cpython/rev/40aba0cda7b6

New changeset dd1abadb1325 by doko in branch 'default':
- Issue #25440: Fix output of python-config --extension-suffix.
https://hg.python.org/cpython/rev/dd1abadb1325

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: python3.4-config --extension-suffix not expanded
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 Issue 23740, the underlying “http.client” accepts a variety of data 
types (bytes, Latin-1 str, iterables, files), and this support varies depending 
if the Content-Length header is supplied. I don’t think all combinations work 
with urlopen(), but judging by Issue 5038, there is at least partial support 
for bytes-like, iterables, and file objects.

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the error messages says "POST data should be bytes or an 
iterable of bytes." and "Content-Length should be specified for iterable data" 
so iterables of bytes also seem to be supported.
One option is to simply reject str and dict (or mappings in general), since 
these seem to me the two most likely errors (the first in case the user forgot 
to encode the output of urlencode(), the second in case the user forgot 
urlencode() altogether and passed a dict).

[0]: 
https://docs.python.org/3/library/urllib.request.html#urllib.request.Request

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/python-sha3

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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')
>>> # so far, so good
>>> urlopen(r)
Traceback (most recent call last):
  ...
urllib.error.URLError: 

This unhelpful error might lead users to think https is not supported, whereas 
the problem is that the url should have been str, not bytes.

The same problem applies to post data:

>>> r = Request('https://www.python.org', {'post': 'data'})
>>> # so far, so good
>>> urlopen(r)
Traceback (most recent call last):
  ...
TypeError: memoryview: dict object does not have the buffer interface
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  ...
ValueError: Content-Length should be specified for iterable data of type  {'post': 'data'}

This error seems to indicate that Content-Length should be specified somewhere, 
but AFAICT from the docs, the data should be bytes or None -- so let's try to 
urlencode them:

>>> r = Request('https://www.python.org', urlencode({'post': 'data'}))
>>> # so far, so good
>>> urlopen(r)
Traceback (most recent call last):
  ...
TypeError: POST data should be bytes or an iterable of bytes. It cannot be of 
type str.

OK, maybe I should use bytes in the dict:

>>> r = Request('https://www.python.org', urlencode({b'post': b'data'}))
>>> # so far, so good
>>> urlopen(r)
Traceback (most recent call last):
  ...
TypeError: POST data should be bytes or an iterable of bytes. It cannot be of 
type str.

That didn't work, I also needed to encode the output of urlencode().


Most of these problems could be prevented if Request() raised for non-str URLs, 
and non-bytes (and non-None) POST data.  Unless there some valid reason to 
accept invalid types, I think they should be rejected early.

--
components: Library (Lib)
keywords: easy
messages: 253173
nosy: ezio.melotti
priority: normal
severity: normal
stage: needs patch
status: open
title: Add type checks to urllib.request.Request
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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())
await writer.drain()
# Uncommenting this makes drain() raise BrokenPipeError
# when the server closes the connection.
#await asyncio.sleep(0.1)

loop = asyncio.get_event_loop()
loop.run_until_complete(bug())

3. Terminate netcat with Ctrl-C. The program will go on a endless loop of 
"socket.send() raised exception." as writer.drain() fails to raise an exception 
to report the closed connection. Reducing the output rate of the program by 
using asyncio.sleep causes writer.drain() to raise BrokenPipeError (and 
shouldn't it be ConnectionResetError?)

--
components: asyncio
messages: 253181
nosy: gvanrossum, haypo, sebastien.bourdeauducq, yselivanov
priority: normal
severity: normal
status: open
title: StreamWriter.drain() unreliably reports closed sockets
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 displays:

argument --file: File not found.

ArgumentError(_StoreAction(option_strings=['--file'],
   dest='file_path', nargs=None, const=None, default=None,
   type=None, choices=None, help=None, metavar=None), 
   'File not found.')

In Python2.7 the `repr()` produces:

ArgumentError()

Your patch changes the `repr` to:

ArgumentError('File not found.', '--file')

I think you could achieve the same effect by defining a `__repr__` method for 
`ArgumentError`.  

By the way, to produce such an Action, you would normally use:

parser.add_argument('--file')

'--file=/foo/bar' is not a good argument option flag.  The code may accept it, 
but it will confuse your users.


--

Normally an `ArgumentError` is raised during parsing, and is caught at the end 
of `parse_known_args` with:

except ArgumentError:
err = _sys.exc_info()[1]
self.error(str(err))

So its `str()` is passed on the the `parser.error` method (and on to 
`parser.exit`).  Normally a user, or developer's code will not see this error 
class.

The purpose of `ArgumentError` is to clearly identify a class of error, and to 
add the `Action` identity to the error message.  It's part of the API so custom 
Action classes can use it to pass errors through the normal parsing error 
system.

Can you make a better case for needing an improved `repr`?  How would it be 
logged or otherwise be made visible to users and/or developers?

--
nosy: +paul.j3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
nosy: +paul.j3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-addr-start'), 
AddrSpec([LocalPart([DotAtom([DotAtomText([ValueTerminal('very-very-very-very-very-very-very-very-very-very-very-very-long',
 'atext')])])]), ValueTerminal('@', 'address-at-symbol'), 
Domain([DotAtom([DotAtomText([ValueTerminal('example', 'atext'), 
ValueTerminal('.', 'dot'), ValueTerminal('org', 'atext')])])])]), 
ValueTerminal('>', 'angle-addr-end')])])])]), ValueTerminal(',', 
'list-separator'), 
Address([Mailbox([NameAddr([AngleAddr([CFWSList([WhiteSpaceTerminal('\t', 
'fws')]), ValueTerminal('<', 'angle-addr-start'), 
AddrSpec([LocalPart([DotAtom([DotAtomText([ValueTerminal('very-very-very-very-very-very-very-very-very-very-very-very-long',
 'atext')])])]), ValueTerminal('@', 'address-at-symbol'), 
Domain([DotAtom([DotAtomText([ValueTerminal('example', 'atext'), 
ValueTerminal('.', 'dot'), Val
 ueTerminal('org', 'atext')])])])]), ValueTerminal('>', 
'angle-addr-end')])])])])])
import email.policy
al.fold(policy=email.policy.default)

--
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file40814/msg.mbox

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 file or files, nor is it *necessarily* the case that 
there is pending data to be flushed on close.

So, if you want to suggest a documentation enhancement, it should to make 
reference to the issue and point the user at the documentation for the 
underlying database they choose to use for more information.

[*] There is an open issue proposing an sqlite backend for shelve, but no one 
so far has had the motivation to finish it.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, just copy the code of open_connection() and substitute your 
own classes.
"""

That is, the customization it is trying to refer to is open_connection(), not 
the classes.

FWIW I think subclassing implementation classes is a dangerous practice and 
shouldn't be encouraged.

Because the same reasoning applies to all the top-level functions here (but not 
to the classes), I think I'll delete the offending paragraph and replace it 
with something like the following at the top of the docs for this module:

"""
The top-level functions in this module are meant convenience wrappers only; 
there's really nothing special there, and if they don't do what you want feel 
free to copy their code.
"""

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: Update note in docs about stream convenience functions. (Merge 
3.4->3.5)
https://hg.python.org/cpython/rev/43c63dd2f383

New changeset 7947f43a1a87 by Guido van Rossum in branch 'default':
Issue #24885: Update note in docs about stream convenience functions. (Merge 
3.5->3.6)
https://hg.python.org/cpython/rev/7947f43a1a87

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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'),
]),
ValueTerminal(',', 'list-separator')
])
tl.fold(policy=email.policy.default)

list(tl.parts)[0] == tl and tl.has_fws is True, so TokenList._fold() is called 
recursively with the same argument.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 not 
hurt on new kernels, but protect on old kernels.

tests should also test a case when directory is symlink really.

--
nosy: +mmarkk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/doc/Documentation/block/writeback_cache_control.txt), 
and may create many crash sites that pending blocks are partially flushed into 
the disk which is a common behavior of a commodity disk with write buffer.

Our automated tool confirms the corruptions could happen on a crash site at an 
unclean shutdown (Linux with default ext4 setting). We also found that there 
are some discussions on 
[Stackoverflow](http://stackoverflow.com/questions/4226580/prevent-python-shelve-corruption)
 concerning this issue. I am suggesting to explicitly remind the developers of 
such behaviors.

Suggested documentation enhancement
--
As a minimal database library, `shelve` does not offer as strong ACID 
(atomicity, consistency, isolation and durability) guarantee as a database 
(like SQLite). On certain system configurations, a system crash would lead to a 
corrupted shelve file. If you are using shelve to persistent precious data like 
user's document, we suggest using the following steps to ensure data is not 
lost:

1. Create a copy of the file, say, the temporary.
2. Operate on a copy of the temporary file. Closing a shelve db implies data to 
be flushed to the disk.
3. Rename the temporary file to replace the original file. Renaming is 
carefully treated by a journaled filesystem to be atomic.

--
assignee: docs@python
components: Documentation
messages: 253188
nosy: Yanyan Jiang, docs@python
priority: normal
severity: normal
status: open
title: Shelve consistency issues
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: asyncio: Raise error from drain() when socket is closed. (Merge 
3.4->3.5)
https://hg.python.org/cpython/rev/d30fbc55194d

New changeset 08adb4056b5f by Guido van Rossum in branch 'default':
Issue #25441: asyncio: Raise error from drain() when socket is closed. (Merge 
3.5->3.6)
https://hg.python.org/cpython/rev/08adb4056b5f

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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't crash on Union[str, Pattern]. (Merge 3.5->3.6)
https://hg.python.org/cpython/rev/04314479af0b

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
components: Benchmarks
messages: 253199
nosy: brett.cannon, pitrou
priority: normal
severity: normal
status: open
title: Add a count of how many benchmarks are left to run

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-pillai.pdf
 This paper discussed vulnerabilities of GDBM implementation in that paper, and 
these lightweight db implementations have similar problems. We also have tests 
SQLite, and it is much more robust that we have not found ACID violation yet.

Personally I think it is reasonable to have an SQLite backend, as it is much 
safer (plus providing thread safety). Just to see what I can do for that.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 icon for idle, see the idle window in the Screenshot).

Actually i wonder why it is necessary at all to use more than the three default 
icons, but if, then my icons are better. Hopefully i can inspire the designer 
to do a redesign of the luncher icon :-)

Nils

--
components: IDLE, Installation, Windows
files: (py icons, idle) screenshot.png
messages: 253203
nosy: Nils-Hero, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Py Launch Icon
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40815/(py icons, idle) screenshot.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com