[issue23703] urljoin() with no directory segments duplicates filename

2015-03-19 Thread Martin Panter

New submission from Martin Panter:

This is a regression caused by revision 901e4e52b20a. Before (e.g. Python 3.4):

 urljoin('a', 'b')
'b'

After:

 urljoin('a', 'b')
'b/b'

This was identified in https://bugs.python.org/issue18828#msg238363 but is 
actually caused by the revision committed for Issue 22278.

--
components: Library (Lib)
messages: 238493
nosy: demian.brecht, vadmium
priority: normal
severity: normal
status: open
title: urljoin() with no directory segments duplicates filename
type: behavior
versions: Python 3.5

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



[issue23632] memoryview doesn't allow tuple-indexing

2015-03-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It would be good to add examples with multidimensional memoryviews. For example:

 a = array.array('l', [-, , -, ])
 m = memoryview(a).cast('B').cast('l', [2, 2])
 m[0, 0]
-
 m[1, 0]
-
 m[-1, -1]


--

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



[issue23704] Make deques a full MutableSequence by adding index(), insert(), and copy()

2015-03-19 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
components: Library (Lib)
files: deque_insert_index_copy3.diff
keywords: patch
nosy: rhettinger
priority: normal
severity: normal
stage: patch review
status: open
title: Make deques a full MutableSequence by adding index(), insert(), and 
copy()
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38552/deque_insert_index_copy3.diff

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



[issue22278] urljoin duplicate slashes

2015-03-19 Thread Martin Panter

Martin Panter added the comment:

I opened Issue 23703 for a regression caused by this commit.

--
nosy: +vadmium

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



[issue23704] Make deques a full MutableSequence by adding index(), insert(), and copy()

2015-03-19 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
assignee:  - rhettinger

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



[issue20680] Pickle socket enums by names

2015-03-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Ethan.

--

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



[issue18828] urljoin behaves differently with custom and standard schemas

2015-03-19 Thread Martin Panter

Martin Panter added the comment:

I opened Issue 23703 about the funny doubled bar.com result. After backing out 
revision 901e4e52b20a, but with my patch here applied:

 urljoin('mailto:foo@', 'bar.com')
'mailto:bar.com'

which seems fairly sensible to me. A more awkward question is if this behaviour 
of my patch is reasonable:

 urljoin('mailto:person-foo/b...@example.net', 'bar.com')
'mailto:person-foo/bar.com'

Yet another option, similar to my “any_scheme=True” flag, might be to change 
from the “uses_relative” white-list to a “not_relative” black-list of URL 
schemes, so that urljoin() works for arbitrary schemes except for ones like 
“mailto:” that are in the hard-coded list.

--

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



[issue23705] Speed-up deque.__contains__

2015-03-19 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Help deques match the performance of lists for a __contains__ check.  
Comparative timings are attached.

--
assignee: rhettinger
components: Library (Lib)
files: deque_contains0.diff
keywords: patch
messages: 238496
nosy: rhettinger
priority: normal
severity: normal
stage: patch review
status: open
title: Speed-up deque.__contains__
type: performance
versions: Python 3.5
Added file: http://bugs.python.org/file38553/deque_contains0.diff

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



[issue20204] pydocs fails for some C implemented classes

2015-03-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue23705] Speed-up deque.__contains__

2015-03-19 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Added file: http://bugs.python.org/file38554/deque_contains_timings.txt

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



[issue11468] Improve unittest basic example in the doc

2015-03-19 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Yes, go ahead an apply this patch.

--
assignee: rhettinger - ezio.melotti

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



[issue23325] Turn SIG_DFL and SIG_IGN into functions

2015-03-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Currently the action parameter of signal.signal() can be SIG_DFL, SIG_IGN, or a 
callable Python object. Would be just a callable Python object. This is simpler.

The main benefit is that they will be better look in pydoc output.

--

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



[issue23539] Content-length not set for HTTP methods expecting body when body is None

2015-03-19 Thread James Rutherford

James Rutherford added the comment:

Python 3 patch attached. The documentation has changed structure a little so 
I've adapted (simplified) this from the original. Otherwise, it's pretty much 
the same, except with python3 fixes, and incorporated feedback. I'll upload an 
updated 2.7 patch as well in a few minutes.

--
Added file: http://bugs.python.org/file38569/issue23539-py3.patch

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



[issue23709] Refactor ossaudiodev: use _Py_read and _Py_write with the Py_buffer

2015-03-19 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +neologix, pitrou

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



[issue23707] PEP 475: os.urandom() doesn't handle EINTR correctly

2015-03-19 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue23708] PEP 475: Add _Py_read() and _Py_write() functions

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 116e4c40115f by Victor Stinner in branch 'default':
Issue #23708: Fix _Py_read() compilation error on Windows
https://hg.python.org/cpython/rev/116e4c40115f

--

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



[issue23632] memoryview doesn't allow tuple-indexing

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7d4eb5902f82 by Antoine Pitrou in branch 'default':
Issue #23632: Memoryviews now allow tuple indexing (including for 
multi-dimensional memoryviews).
https://hg.python.org/cpython/rev/7d4eb5902f82

--
nosy: +python-dev

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



[issue16834] ioctl mutate_flag behavior in regard to the buffer size limit

2015-03-19 Thread Martin Panter

Martin Panter added the comment:

Looking at the C code, if a writable buffer is passed, mutate_arg is false, and 
the buffer is longer than 1024 bytes, then a ValueError is raised:

 ioctl(0, 0, bytearray(2048), False)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: ioctl string arg too long

So it seems the implementation does not match the documentation’s claim that 
“the 1024 byte limit . . . is avoided”. IMO this is an implementation bug.

But instead of (or in addition to) fixing it, maybe we could consider removing 
“mutate_flag” parameter altogether. It was originally added as a backwards 
compatibility helper for Issue 555817 in Python 2.3, and changed to True by 
default in Python 2.5.

--
components: +Extension Modules
nosy: +vadmium
versions: +Python 3.4

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



[issue23648] PEP 475 meta issue

2015-03-19 Thread STINNER Victor

STINNER Victor added the comment:

unittest_setitimer.patch: hack unittest.TestCase.run() to inject signals every 
1 ms, send the first signal in 100 ms. It should help to detect functions which 
doesn't retry on EINTR.

--
keywords: +patch
Added file: http://bugs.python.org/file38572/unittest_setitimer.patch

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



[issue23711] ConfigParser module blames on section less ini file

2015-03-19 Thread Martin Panter

Martin Panter added the comment:

I think this is already discussed in Issue 22253.

--
nosy: +vadmium
resolution:  - duplicate
status: open - closed
superseder:  - ConfigParser does not handle files without sections

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



[issue23712] Experiment: Assume that exact unicode hashes are perfect discriminators

2015-03-19 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Assuming Siphash is in fact cryptographically secure (in the sense you can't 
choose a desired result hash with better odds that brute force), and it appears 
to be so, with a keyspace of 64 bits, if it's evenly distributed (which a 
cryptographically secure hash should be), that implies to even have a 1% chance 
of any two keys in a set colliding, you'd need over 2**29 keys ( you can plug 
in your own numbers for the conditional calculation here 
https://lazycackle.com/Probability_of_repeated_event_online_calculator__birthday_problem_.html
 ). Even at the one ten thousandth of a percent collision threshold, you're 
talking about a set of 6 million strings to find even one pair that match.

I'd still be leery of using such an approach for general purpose sets and 
dicts, where they could conceivably contain enough entries to pose a risk 
(vanishingly small, but not heat death of the universe small). But for Python 
implementation dictionaries (module, nested scope, class, and instance 
dictionaries), where we're talking about maybe a thousand attributes in extreme 
cases, which are almost never under the control of an attacker in any event, 
I could definitely see a low risk win. If you're assuming a dictionary with 
less than 10,000 keys, that's a hit would be literally one in a trillion; under 
a hundred and you're below one in a quadrillion chance, which I think is safe 
enough. If you wanted to make it safe you could conceivably use an approach 
that changed algorithms up front, depending on the size of the dictionary; less 
than a hundred entries, use hash only lookup, above 100, use safe lookup.

--
nosy: +josh.r

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



[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8c73af0b3cd9 by Victor Stinner in branch 'default':
Issue #22181: Fix dev_urandom_noraise(), try calling py_getrandom() before
https://hg.python.org/cpython/rev/8c73af0b3cd9

--

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



[issue23708] PEP 475: Add _Py_read() and _Py_write() functions

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c3c47ea32f72 by Victor Stinner in branch 'default':
Issue #23708: Add _Py_read() and _Py_write() functions to factorize code handle
https://hg.python.org/cpython/rev/c3c47ea32f72

--
nosy: +python-dev

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



[issue23708] PEP 475: Add _Py_read() and _Py_write() functions

2015-03-19 Thread STINNER Victor

STINNER Victor added the comment:

I commited both patches. Thanks Antoine for the review of 
py_read_write-2.patch, I removed the commented assertion.

--
resolution:  - fixed
status: open - closed

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



[issue23707] PEP 475: os.urandom() doesn't handle EINTR correctly

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e57b4d464d1c by Victor Stinner in branch 'default':
Issue #23707: On UNIX, os.urandom() now calls the Python signal handler when
https://hg.python.org/cpython/rev/e57b4d464d1c

--
nosy: +python-dev

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



[issue23686] Update Windows and OS X installer OpenSSL to 1.0.2a

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 447794596266 by Ned Deily in branch '2.7':
Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a.
https://hg.python.org/cpython/rev/447794596266

New changeset 59b8a83ea50b by Ned Deily in branch '3.4':
Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a.
https://hg.python.org/cpython/rev/59b8a83ea50b

New changeset e43e5cc887fe by Ned Deily in branch 'default':
Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a.
https://hg.python.org/cpython/rev/e43e5cc887fe

--
nosy: +python-dev

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



[issue23342] run() - unified high-level interface for subprocess

2015-03-19 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Thanks, that was an oversight. Patch 5 adds CompletedProcess to __all__.

--
Added file: http://bugs.python.org/file38574/subprocess_run5.patch

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-19 Thread Steve Dower

Steve Dower added the comment:

Supporting proper per-user installs of Python 2.7 or 3.4 would require a second 
MSI that is configured to not ask for administrative privileges. The code is in 
Tools/msi/msi.py if you want to look at it (it's not my code and I have no 
intention of touching it), but the bigger concern is you're asking python.org 
to host twice as many files.

I'm planning to discuss installers at PyCon in a few weeks with the other core 
developers, so there may be a change of approach after that. Currently, we view 
Continuum and Enthought as the equivalent of any of the Linux distributors - 
either you live within their walled gardens, or you brave the outside world 
yourself. Linux distributions have shown that it's not a fatal split in the 
community, though it can lead to some obscure issues when people don't 
understand how they got/get Python.

--

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



[issue23712] Experiment: Assume that exact unicode hashes are perfect discriminators

2015-03-19 Thread Donald Stufft

Donald Stufft added the comment:

To be clear, I have no opinion on your specific proposal and I don't know if 
the difference between cryptographically secure and not cryptographically 
secure matters for it. I just wanted to be clear that with SipHash an attacker 
should *not* be able to choose keys that will collide on purpose, but given the 
small output space (64bits IIRC) that collisions are more likely to occur than 
with MD5, SHA1, SHA2, etc.

--

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



[issue23709] Refactor ossaudiodev: use _Py_read and _Py_write with the Py_buffer

2015-03-19 Thread STINNER Victor

STINNER Victor added the comment:

I commited changes to use _Py_read() and _Py_write().

I attach an updated patch to use Py_ssize_t instead of int, and to use 
Py_buffer instead of char*.

--
Added file: http://bugs.python.org/file38571/ossaudiodev-py_buffer.patch

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



[issue23709] Refactor ossaudiodev: use _Py_read and _Py_write with the Py_buffer

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d564695b67bb by Victor Stinner in branch 'default':
Issue #23709: The ossaudiodev module now retries read/write when interrupted by
https://hg.python.org/cpython/rev/d564695b67bb

--
nosy: +python-dev

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



[issue22634] importing _ctypes failed: undefined symbol: ffi_call_win32

2015-03-19 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
resolution:  - duplicate
stage:  - resolved
status: open - closed

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



[issue23632] memoryview doesn't allow tuple-indexing

2015-03-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I didn't add the 2d example as the double cast is quite ugly.  Probably we 
should allow casting when the format stays the same.

--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue23042] ctypes module doesn't build on FreeBSD x86

2015-03-19 Thread Davin Potts

Davin Potts added the comment:

Inheriting the priority from issue22634 which has been marked closed-duplicate 
(duplicate of this issue).

Previously issue22634 was given a priority of release blocker by @pitrou.  
Issue22634 described how this issue also afflicts 32-bit builds on multiple 
RHEL release versions.

--
nosy: +benjamin.peterson, berker.peksag, larry, pitrou
priority: normal - release blocker

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



[issue23342] run() - unified high-level interface for subprocess

2015-03-19 Thread Martin Panter

Martin Panter added the comment:

One thing that just popped into my mind that I don’t think has been discussed: 
The patch adds the new run() function to subprocess.__all__, but the 
CompletedProcess class is still missing. Was that an oversight or a conscious 
decision?

--

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



[issue12006] strptime should implement %G, %V and %u directives

2015-03-19 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag

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



[issue23708] PEP 475: Add _Py_read() and _Py_write() functions

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e232b57ee784 by Victor Stinner in branch 'default':
Issue #23708: select.devpoll now retries its internal write() when interrupted
https://hg.python.org/cpython/rev/e232b57ee784

--

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



[issue23539] Content-length not set for HTTP methods expecting body when body is None

2015-03-19 Thread James Rutherford

James Rutherford added the comment:

Updated 2.7 patch attached.

--
Added file: http://bugs.python.org/file38570/issue23539-py27.patch

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



[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread STINNER Victor

STINNER Victor added the comment:

test_csv now fails on Windows:

http://buildbot.python.org/all/builders/x86 Windows7 3.x/builds/9421/

==
ERROR: test_read_dict_fieldnames_from_file (test.test_csv.TestDictFields)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_csv.py, 
line 629, in test_read_dict_fieldnames_from_file
self.assertEqual(next(reader), {f1: '1', f2: '2', f3: 'abc'})
  File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\csv.py, 
line 110, in __next__
row = next(self.reader)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\tempfile.py, line 
431, in __iter__
yield from iter(self.file)
ValueError: I/O operation on closed file.

--
nosy: +haypo
resolution: fixed - 
status: closed - open

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



[issue23712] Experiment: Assume that exact unicode hashes are perfect discriminators

2015-03-19 Thread Donald Stufft

Donald Stufft added the comment:

I'm not sure what you mean by Siphash isn't cryptographically secure. One of 
the key points of Siphash is that it *is* cryptographically secure. It has a 
smaller space than your typical hash function (MD5, SHA1, SHA2, etc) which 
means that collisions themselves are more likely, but the hash itself is 
cryptographically secure against pre-image attacks and it has collision 
resistance (collision resistance is different than just getting a collision).

--
nosy: +dstufft

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



[issue23686] Update Windows and OS X installer OpenSSL to 1.0.2a

2015-03-19 Thread Ned Deily

Ned Deily added the comment:

1.0.2a is now available.
https://www.openssl.org/source/openssl-1.0.2a.tar.gz

The OS X 10.5 installer builds are now updated.  Leaving the issue open for 
updates to the Windows installers.

--

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-19 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

I am slowly attaching the patches I created.

Titles:

- issue_16353.patch - Issue 16353 for tip
- issue_20305_tweaked.patch - Issue 2305 for tip
- rjmatthews62_fixes_tweaked.patch - rjmatthew...@gmail.com's Android fixes (a 
bit more modularized)
- unused_var.patch - An extension of 2305. Can't figure out how to merge them.
- issue_21668.patch - Issue 21668 for tip
- issue_20306.patch - Guess...
- android_segfault_fix.patch - The actual segfault fix
- kbox_fix.patch - Cyd's KBox fixes

Someone, please test them!

--
Added file: http://bugs.python.org/file38575/android_segfault_fix.patch

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-19 Thread Ryan Gonzalez

Changes by Ryan Gonzalez rym...@gmail.com:


Added file: http://bugs.python.org/file38578/issue_20305_tweaked.patch

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-19 Thread Ryan Gonzalez

Changes by Ryan Gonzalez rym...@gmail.com:


Added file: http://bugs.python.org/file38582/rjmatthews62_fixes_tweaked.patch

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-19 Thread Ryan Gonzalez

Changes by Ryan Gonzalez rym...@gmail.com:


Added file: http://bugs.python.org/file38579/issue_20306.patch

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-19 Thread Ryan Gonzalez

Changes by Ryan Gonzalez rym...@gmail.com:


Added file: http://bugs.python.org/file38580/issue_21668.patch

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-19 Thread Ryan Gonzalez

Changes by Ryan Gonzalez rym...@gmail.com:


Added file: http://bugs.python.org/file38581/unused_var.patch

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



[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9882cc2efd36 by Victor Stinner in branch 'default':
Issue #23646: Enhance precision of time.sleep() and socket timeout when
https://hg.python.org/cpython/rev/9882cc2efd36

--

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



[issue23703] urljoin() with no directory segments duplicates filename

2015-03-19 Thread Demian Brecht

Demian Brecht added the comment:

Yep, that's a lot cleaner and tests pass. I've updated the patch with that 
line. Thanks.

--
Added file: http://bugs.python.org/file38573/issue23703_1.patch

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-19 Thread Ryan Gonzalez

Changes by Ryan Gonzalez rym...@gmail.com:


Added file: http://bugs.python.org/file38576/kbox_fix.patch

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-19 Thread Ryan Gonzalez

Changes by Ryan Gonzalez rym...@gmail.com:


Added file: http://bugs.python.org/file38577/issue_16353.patch

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



[issue23539] Content-length not set for HTTP methods expecting body when body is None

2015-03-19 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag

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



[issue23419] Faster default __reduce__ for classes without __init__

2015-03-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

But isn't the result different?
NEWOBJ calls cls.__new__() and __init__ is skipped.
REDUCE calls cls(): both __new__ and __init__ are used.

--
nosy: +amaury.forgeotdarc

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



[issue23706] pathlib.Path.write_text should include a newline argument

2015-03-19 Thread Ugra Dániel

New submission from Ugra Dániel:

The new pathlib.Path [read|write]_[binary|text] methods will be very useful, 
one thing I miss badly is the newline argument for write_text.

In some cases text files need a specific line ending (independent from the 
platform the code is being executed on.) In my mind this is analogous to 
passing an explicit encoding argument.

Of course, one can always use built-in open for this scenario. It would be a 
nice addition anyway :)

--
components: Library (Lib)
messages: 238498
nosy: daniel.ugra
priority: normal
severity: normal
status: open
title: pathlib.Path.write_text should include a newline argument
type: enhancement
versions: Python 3.5

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



[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2015-03-19 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy:  -haypo

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



[issue23419] Faster default __reduce__ for classes without __init__

2015-03-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Sorry, I missed the important point:
for classes without __init__

--

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



[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Wolfgang Maier

Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de:


--
nosy: +wolma

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



[issue23703] urljoin() with no directory segments duplicates filename

2015-03-19 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +orsenthil

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



[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2015-03-19 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
stage: needs patch - resolved

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



[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2015-03-19 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue23681] Have -b warn when directly comparing ints and bytes

2015-03-19 Thread Paul Moore

Paul Moore added the comment:

LGTM, just one minor comment in review.

--
nosy: +paul.moore

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



[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2015-03-19 Thread STINNER Victor

STINNER Victor added the comment:

Oh, test_os now fails on Linux because os.urandom() doesn't use a file 
descriptor anymore. The test should be skipped when getrandom() is used. The 
test is already skipped when getentropy() is used.

--
resolution: fixed - 
status: closed - open

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



[issue23707] PEP 475: os.urandom() doesn't handle EINTR correctly

2015-03-19 Thread STINNER Victor

New submission from STINNER Victor:

dev_urandom_python() retries read() if it fails with EINTR, but Python signal 
handlers are not called: PyErr_CheckSignals() is not called. It's important be 
able to interrupt a function by a signal, especially if it's blocking.

We need maybe a new _Py_read() function which would retry on EINTR. The code 
can be based on posix_read(). For open(), there is already _Py_open() which 
retries on EINTR (since the changeset ed25e945cdc2, issue #23694). It can be 
useful for FileIO.read().

dev_urandom_noraise() retries on EINTR without calling PyErr_CheckSignals(). It 
may be acceptable since this function is only called by _PyRandom_Init() at an 
early stage of Python initialization. Or maybe EINTR should call 
Py_FatalError()?

On Linux 3.18 (Fedora 21 with kernel 3.18.7-200.fc21.x86_64), reading 1 GB from 
/dev/urandom or getrandom() returns 0x1ff bytes (32 MB). It's not an issue, 
os.urandom() continues to read until it gets enough data.

I tried to interrupt os.urandom() on Python 3.4 (read) and Python 3.5 
(getrandom): reading from /dev/urandom using a file descriptor or getrandom() 
have the same behaviour, none fail with EINTR. I checked syscalls using strace.

It looks like getrandom() only fails with EINTR when flags=GRND_RANDOM. So this 
issue is maybe more theoric.

--
messages: 238503
nosy: haypo
priority: normal
severity: normal
status: open
title: PEP 475: os.urandom() doesn't handle EINTR correctly
versions: Python 3.5

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



[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Bohuslav Slavek Kabrda

Bohuslav Slavek Kabrda added the comment:

I'm attaching second version of the patch. It now contains link to this bug and 
a more real test case according to suggestion from the review.

One of the reviews of first patch version mentioned that there should be a 
better explanation of how this issue can be provoked. I think that the test 
shows it nice and there's no need to explain it in greater detail. Also, the 
comment references this bug, where anyone can find the explanation. (Fix for 
#18879 fixes pretty much the same in a different method and has very similar 
comment, so I think this should be fine.)

--
Added file: http://bugs.python.org/file38556/python-3.4-tempfile-iter-v2.patch

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



[issue23001] Accept mutable bytes-like objects

2015-03-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added versionchanged directives and fixed other documentation.

--
Added file: http://bugs.python.org/file38555/accept_mutable_buffers_2.patch

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



[issue22831] Use with to avoid possible fd leaks

2015-03-19 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2015-03-19 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue23539] Content-length not set for HTTP methods expecting body when body is None

2015-03-19 Thread Demian Brecht

Demian Brecht added the comment:

One super minor comment left in Rietveld (py3 patch). Otherwise LGTM.

--

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



[issue12006] strptime should implement %G, %V and %u directives

2015-03-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch is synchronized with the tip, added the versionadded directives and 
whatsnews entry, addressed sasha's comment on Rietveld. Fixed a bug: %a and %A 
now are interchangeable with %u as well as with %w.

I don't understand what more test are needed. Existing tests cover %Y %V 
ambiguity:

 date(1906, 12, 31).strftime('%G %V %u')
'1907 01 1'
 date(1917, 12, 31).strftime('%G %V %u')
'1918 01 1'

--
Added file: http://bugs.python.org/file38585/issue12006_5.patch

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



[issue23715] PEP 475: signal.sigtimedwait() must retry if sigtimedwait() failed with EINTR

2015-03-19 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch changes signal.sigtimedwait() to retry if sigtimedwait() failed 
with EINTR and the signal handler didn't raise an exception.

--
files: sigtimedwait_eintr.patch
keywords: patch
messages: 238595
nosy: haypo
priority: normal
severity: normal
status: open
title: PEP 475: signal.sigtimedwait() must retry if sigtimedwait() failed with 
EINTR
versions: Python 3.5
Added file: http://bugs.python.org/file38583/sigtimedwait_eintr.patch

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



[issue23648] PEP 475 meta issue

2015-03-19 Thread STINNER Victor

STINNER Victor added the comment:

New issue #23715: handle EINTR in the signal module.

--
dependencies: +PEP 475: handle EINTR in the signal module

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



[issue23001] Accept mutable bytes-like objects

2015-03-19 Thread Martin Panter

Martin Panter added the comment:

I had a closer look at the changes, and most of them seem good. However I think 
I found one leak in fcntl(); see Reitveld.

I noticed there is no test for “ossaudiodev”. Would that be too hard, or is it 
just an oversight?

--

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



[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-19 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue23681] Have -b warn when directly comparing ints and bytes

2015-03-19 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue22831] Use with to avoid possible fd leaks

2015-03-19 Thread Berker Peksag

Berker Peksag added the comment:

Looks good. A couple of comments:

* Doc/includes/email-* changes have already been committed.

* There is a commented-out line in Tools/scripts/nm2def.py:

  -f.close()
  +# f.close()

* The patch is huge, I'd commit Tools/ and Lib/test/ parts separately.

* Most of the open(..., 'r') usages can be changed to open(...)

* It would be good to add context management protocol support to 
http.client.HTTPConnection.

--
nosy: +berker.peksag

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



[issue22826] Support context management protocol in bkfile

2015-03-19 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
assignee:  - serhiy.storchaka
stage: patch review - commit review

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



[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.

2015-03-19 Thread irdb

Changes by irdb dalba.w...@gmail.com:


--
nosy: +irdb

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



[issue23715] PEP 475: handle EINTR in the signal module

2015-03-19 Thread STINNER Victor

STINNER Victor added the comment:

It looks like signal.sigwaitinfo() can also fail with InterruptedError. It 
should also be modified.

--
title: PEP 475: signal.sigtimedwait() must retry if sigtimedwait() failed with 
EINTR - PEP 475: handle EINTR in the signal module

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



[issue23716] test_multiprocessing_spawn hangs on x86 Ubuntu Shared 3.x

2015-03-19 Thread STINNER Victor

New submission from STINNER Victor:

It looks like the changeset 0b99d7043a99 (issue #23694) introduced a regression:

http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/11358/

[340/393] test_multiprocessing_spawn
Timeout (1:00:00)!
Thread 0x55aacdc0 (most recent call first):
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/connection.py,
 line 379 in _recv
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/connection.py,
 line 407 in _recv_bytes
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/connection.py,
 line 250 in recv
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/managers.py,
 line 717 in _callmethod
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/managers.py,
 line 943 in acquire
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/_test_multiprocessing.py,
 line 911 in test_notify_all
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/case.py, 
line 577 in run
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/case.py, 
line 625 in __call__
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 122 in run
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 84 in __call__
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 122 in run
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 84 in __call__
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 122 in run
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 84 in __call__
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/runner.py, 
line 176 in run
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/__init__.py, 
line 1772 in _run_suite
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/__init__.py, 
line 1806 in run_unittest
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py, 
line 1283 in test_runner
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py, 
line 1284 in runtest_inner
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py, 
line 967 in runtest
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py, 
line 763 in main
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py, 
line 1568 in main_in_temp_cwd
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/__main__.py, 
line 3 in module
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/runpy.py, line 85 
in _run_code
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/runpy.py, line 170 
in _run_module_as_main
make: *** [buildbottest] Error 1

--
messages: 238600
nosy: haypo, sbt
priority: normal
severity: normal
status: open
title: test_multiprocessing_spawn hangs on x86 Ubuntu Shared 3.x
versions: Python 3.5

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



[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

2015-03-19 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue21802] Reader of BufferedRWPair is not closed if writer's close() fails

2015-03-19 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1291649f38df by Victor Stinner in branch 'default':
Issue #23646: Fix test_threading on Windows
https://hg.python.org/cpython/rev/1291649f38df

--

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



[issue23716] test_multiprocessing_spawn hangs on x86 Ubuntu Shared 3.x

2015-03-19 Thread STINNER Victor

STINNER Victor added the comment:

Oops, I posted the output of 
http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/11359/steps/test/logs/stdio

--

Other output:

http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/11358/steps/test/logs/stdio

[131/393] test_multiprocessing_spawn
Timeout (1:00:00)!
Thread 0x58300b40 (most recent call first):
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py, line 
293 in wait
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/queues.py, 
line 224 in _feed
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py, line 
871 in run
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py, line 
923 in _bootstrap_inner
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py, line 
891 in _bootstrap

Thread 0x55aacdc0 (most recent call first):
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/popen_fork.py,
 line 29 in poll
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/popen_fork.py,
 line 51 in wait
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/process.py,
 line 121 in join
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/_test_multiprocessing.py,
 line 714 in test_task_done
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/case.py, 
line 577 in run
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/case.py, 
line 625 in __call__
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 122 in run
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 84 in __call__
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 122 in run
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 84 in __call__
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 122 in run
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, 
line 84 in __call__
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/runner.py, 
line 176 in run
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/__init__.py, 
line 1772 in _run_suite
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/__init__.py, 
line 1806 in run_unittest
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py, 
line 1283 in test_runner
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py, 
line 1284 in runtest_inner
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py, 
line 967 in runtest
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py, 
line 763 in main
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/regrtest.py, 
line 1568 in main_in_temp_cwd
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/__main__.py, 
line 3 in module
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/runpy.py, line 85 
in _run_code
  File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/runpy.py, line 170 
in _run_module_as_main
make: *** [buildbottest] Error 1

--

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



[issue22832] Tweak parameter names for fcntl module

2015-03-19 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue2211] Cookie.Morsel interface needs update

2015-03-19 Thread Demian Brecht

Demian Brecht added the comment:

The attached patch reverts back to the old set() API, ignoring the parameter 
and adding a deprecation warning. I've also added a few versionchanged and 
deprecated tags in the Morsel docs. Other than the deprecation note in 
whatsnew/3.5.rst that was added, I'm not entirely sure what you're suggesting 
should be added (I'm also not overly familiar with what qualifies for what's 
new additions in the various categories without causing unnecessary noise).

--
Added file: 
http://bugs.python.org/file38584/http_cookies_morsel_deprecate_set.patch

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



[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-19 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue23136] BUG in how _strptime() handles week 0

2015-03-19 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

including Jan 30 - did you mean Dec 31?

--

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



[issue23136] BUG in how _strptime() handles week 0

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d9f3dd1d6b48 by Serhiy Storchaka in branch '2.7':
Fixed Misc/NEWS entry for issue #23136.
https://hg.python.org/cpython/rev/d9f3dd1d6b48

New changeset afca9867e1bb by Serhiy Storchaka in branch '3.4':
Fixed Misc/NEWS entry for issue #23136.
https://hg.python.org/cpython/rev/afca9867e1bb

New changeset 18bc81ce6090 by Serhiy Storchaka in branch 'default':
Fixed Misc/NEWS entry for issue #23136.
https://hg.python.org/cpython/rev/18bc81ce6090

--

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



[issue23136] BUG in how _strptime() handles week 0

2015-03-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for the review Alexander. Thank you for your contribution Jim.

--
resolution:  - fixed
stage: commit review - resolved
status: open - closed

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



[issue23713] intermittent failure of multiprocessing unit test test_imap_unordered_handle_iterable_exception

2015-03-19 Thread Davin Potts

New submission from Davin Potts:

test_imap_unordered_handle_iterable_exception fails intermittently on some 
platforms due to the test being too rigid (fragile) about the order of the 
items being iterated over which, as the name would imply, is not guaranteed.

Of the multiprocessing module's test modules, test_multiprocessing_fork, 
test_multiprocessing_forkserver, and test_multiprocessing_spawn all leverage 
the unit test test_imap_unordered_handle_iterable_exception in multiple 
different contexts.  There are thus multiple opportunities for 
test_imap_unordered_handle_iterable_exception to fail due to this fragility -- 
it's maybe a little bit surprising the test doesn't fail more often than it 
does.

A patch is forthcoming.

--
assignee: davin
components: Tests
messages: 238553
nosy: davin, jnoller, sbt
priority: normal
severity: normal
status: open
title: intermittent failure of multiprocessing unit test 
test_imap_unordered_handle_iterable_exception
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

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



[issue23712] Experiment: Assume that exact unicode hashes are perfect discriminators

2015-03-19 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Added file: http://bugs.python.org/file38566/assume_perf_uni_hash1.diff

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



[issue23713] intermittent failure of multiprocessing unit test test_imap_unordered_handle_iterable_exception

2015-03-19 Thread Davin Potts

Davin Potts added the comment:

Attaching patch for this fragile test for default/3.5 and 3.4 branches.

Blame for implementing the fragile test falls to @davin.  In my own defense, 
@davin also discovered it in testing on FreeBSD 10.1 i386-RELEASE.

--
keywords: +patch
Added file: 
http://bugs.python.org/file38567/issue_23713_fix_fragile_imap_unordered_test_py35_and_py34.patch

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



[issue23712] Experiment: Assume that exact unicode hashes are perfect discriminators

2015-03-19 Thread Raymond Hettinger

New submission from Raymond Hettinger:

This tracker item is for a thought experiment I'm running where I can collect 
the thoughts and discussions in one place.  It is not an active proposal for 
inclusion in Python.

The idea is to greatly speed-up the language for set/dict lookups of unicode 
value by skipping the exact comparison when the unicode type is exact and the 
64-bit hash values are known to match.

Given the siphash and hash randomization, we get a 1 in 2**64 chance of a false 
positive (which is better than the error rate for non-ECC DRAM itself).  

However, since the siphash isn't cryptographically secure, presumably a 
malicious chooser of keys could generate a false positive on-purpose.

This technique is currently used by git and mercurial which use hash values for 
file and version graphs without checking for an exact match (because the chance 
of a false positive is vanishingly rare).

The Python test suite passes as does the test suites for a number of packages I 
have installed.

--
assignee: rhettinger
components: Interpreter Core
files: assume_perf_uni_hash.diff
keywords: patch
messages: 238552
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Experiment:  Assume that exact unicode hashes are perfect discriminators
type: performance
versions: Python 3.5
Added file: http://bugs.python.org/file38565/assume_perf_uni_hash.diff

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



[issue23712] Experiment: Assume that exact unicode hashes are perfect discriminators

2015-03-19 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Removed file: http://bugs.python.org/file38565/assume_perf_uni_hash.diff

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



[issue22634] importing _ctypes failed: undefined symbol: ffi_call_win32

2015-03-19 Thread Davin Potts

Davin Potts added the comment:

Comparing this to issue23042, this same behavior appears on i386 releases of 
FreeBSD 8.3 and 10.1 (the i386-RELEASE means it's 32-bit as opposed to 64-bit 
build).  Given that this issue is being triggered here with -m32 (triggers 
building of 32-bit binaries) and yet we don't appear to be having this issue on 
64-bit builds, that could be a useful clue.

--
nosy: +davin

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



[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7fa741fe9425 by Serhiy Storchaka in branch '3.4':
Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
https://hg.python.org/cpython/rev/7fa741fe9425

New changeset c84a0b35999a by Serhiy Storchaka in branch 'default':
Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
https://hg.python.org/cpython/rev/c84a0b35999a

--
nosy: +python-dev

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



[issue23042] ctypes module doesn't build on FreeBSD x86

2015-03-19 Thread Davin Potts

Davin Potts added the comment:

Attaching a patch which enabled successful compilation of ctypes on FreeBSD 
10.1 i386-RELEASE in each of default/3.5, 3.4, and 2.7 branches.

This patch attempts to fix the incomplete logic regarding Windows target 
platforms in the ifdef's inside Modules/_ctypes/libffi/src/x86/ffi.c which at 
times tested for X86_WIN64 but not X86_WIN32 inside corresponding #else clauses 
(and vice versa).

This especially needs to be tested on a 32-bit Windows system -- I do not have 
one handy so help testing it there (and elsewhere) would be much appreciated.

--
keywords: +patch
Added file: 
http://bugs.python.org/file38561/issue_23042_fix_windows_ifdefs_py35_and_py34_and_py27.patch

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



[issue23042] ctypes module doesn't build on FreeBSD x86

2015-03-19 Thread Davin Potts

Changes by Davin Potts pyt...@discontinuity.net:


--
stage:  - patch review

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



[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  - serhiy.storchaka
stage: patch review - commit review

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



[issue23042] ctypes module doesn't build on FreeBSD x86

2015-03-19 Thread Davin Potts

Davin Potts added the comment:

Reading issue22634 suggests that perhaps this issue is not limited to FreeBSD 
-- issue22634 appears to suffer the same behavior on RHEL 6.4 and 5.5 when 
compiling to 32-bit (the -m32 compiler flag is being used there).

--

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



  1   2   >