[issue23496] Steps for Android Native Build of Python 3.4.2

2015-07-23 Thread Russell Keith-Magee

Russell Keith-Magee added the comment:

What hardware architecture are you compiling for? If it's ARM64, and you're not 
using a trunk version of libffi, that segfault in test_ctypes is to be expected.

--

___
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-07-23 Thread Cyd Haselton

Cyd Haselton added the comment:

Build complete. Unfortunately while some of the tests complete successfully, 
the run ends in a segfault (see attached log)

--
Added file: http://bugs.python.org/file40002/py_test_results.log

___
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



[issue24700] array compare is hideously slow

2015-07-23 Thread swanson

New submission from swanson:

Comparing two array.array objects is much slower than it ought to be.

The whole point of array.array is to be efficient:
 array — Efficient arrays of numeric values

But comparing them is orders of magnitude less efficient than comparing tuples 
or lists of numbers.  It would seem that array's __eq__ is converting every 
single number into an int, float, etc. first instead of just comparing the 
arrays in their native format.
If arrays can be copied efficiently, and bytearray can be copied or compared 
efficiently, there's no good reason for array's equality test to be so stupid.

example code:
-

from timeit import timeit

setup = '''
from array import array
a = array(I, %s)
ac = a.__copy__
b = ac()
t = tuple(a)
u = t[:1] + t[1:]
'''
for init in ([1]*10, [0x]*10, [1]*1000, [0x]*1000):
 print(\n, init)
 for action in (ac(), a == b, a == ac(), t == u):
  print((%6.2f % timeit(action, setup % init)), action)


results:


 [1]*10
  0.31 ac()
  0.50 a == b
  0.73 a == ac()
  0.17 t == u

 [0x]*10
  0.29 ac()
  1.59 a == b
  1.87 a == ac()
  0.15 t == u

 [1]*1000
  0.84 ac()
 37.06 a == b
 37.72 a == ac()
  2.91 t == u

 [0x]*1000
  0.84 ac()
146.03 a == b
145.97 a == ac()
  2.90 t == u

--
components: Library (Lib)
messages: 247234
nosy: swanson
priority: normal
severity: normal
status: open
title: array compare is hideously slow
type: performance
versions: Python 3.4

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



[issue24697] Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines

2015-07-23 Thread Stefan Behnel

Stefan Behnel added the comment:

 Hm, I think there's little need for new exceptions...

While I agree with Yuri that the names are a bit awkward, I actually second 
this. The StopIteration is almost an implementation detail of how the return 
value is passed on to become the (Future) result of the coroutine. It is 
intended to be caught by some framework and users would not normally get to see 
that exception. There is little room for general confusion.

--
nosy: +scoder

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



[issue10708] Misc/porting should be folded into the development FAQ or the devguide

2015-07-23 Thread Berker Peksag

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


--
nosy: +berker.peksag

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



[issue24695] Don't print traceback header if traceback is None in TracebackException

2015-07-23 Thread Berker Peksag

Berker Peksag added the comment:

Here is a patch. I was pretty sure that I've already created an issue for this 
but couldn't find it now.

--
keywords: +patch
nosy: +berker.peksag
stage: needs patch - patch review
Added file: http://bugs.python.org/file40001/issue24695.diff

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



[issue24692] types.coroutines() idempotence documentation

2015-07-23 Thread Antoine Pietri

New submission from Antoine Pietri:

In the new types.coroutines() documentation, it is not clearly stated whether 
this function is idempotent or not: what happens when it is called on a 
function that is already a native coroutine?

--
assignee: docs@python
components: Documentation
messages: 247184
nosy: docs@python, seirl
priority: normal
severity: normal
status: open
title: types.coroutines() idempotence documentation
versions: Python 3.5

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



[issue24692] types.coroutines() idempotence documentation

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 636ce05ea8f6 by Yury Selivanov in branch '3.5':
Issue #24692: Add more tests for types.coroutine
https://hg.python.org/cpython/rev/636ce05ea8f6

New changeset 3f3e398bcd3e by Yury Selivanov in branch 'default':
Merge 3.5 (Issue #24692)
https://hg.python.org/cpython/rev/3f3e398bcd3e

--
nosy: +python-dev

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



[issue21750] mock_open data is visible only once for the life of the class

2015-07-23 Thread Michael Foord

Michael Foord added the comment:

So the problem with the testing-cabal issue 280 is *really* a problem with 
decorators - the decorator is applied at method creation time and mock_open is 
only called once rather than once *per call*.

Better would be to use mock.patch as a context manager inside the test, so that 
mock_open is (correctly) called each time.

From a purist point of view I think that the Python 3.5==mock 1.1.4 behaviour 
is *better*. Whether that's enough justification to break existing code is a 
difficult question.

--

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



[issue24681] Put most likely test first in set_add_entry()

2015-07-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sets are under no obligation to keep their code synced with dicts and have over 
time diverged in a number of ways.

--

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



[issue24681] Put most likely test first in set_add_entry()

2015-07-23 Thread Raymond Hettinger

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


Added file: http://bugs.python.org/file39992/move_likely_first.diff

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



[issue24619] async/await parser issues

2015-07-23 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
resolution:  - fixed
stage: patch review - commit review

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



[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

2015-07-23 Thread Charles-François Natali

New submission from Charles-François Natali:

Consider this code:

-
from __future__ import print_function

from pyccp.unittest import SafeTestCase


class MyTest(SafeTestCase):

def setUp(self):
print(setUp)

def tearDown(self):
print(tearDown)

def test(self):
print(creating)
self.addCleanup(lambda: print(destroying))
-


When run:

setUp
creating
tearDown
destroying


We lose the LIFO ordering between between setUP and addCleanup, which is highly 
counter-intuitive, and almost always incorrect (despite addCleanup being 
docuemented to be run after tearDown).

--
components: Library (Lib)
messages: 247196
nosy: neologix
priority: normal
severity: normal
status: open
title: callables registered in TestCase.addCleanup should be run before tearDown
type: behavior

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



[issue21750] mock_open data is visible only once for the life of the class

2015-07-23 Thread Robert Collins

Robert Collins added the comment:

@Paul

So the problem is that its never been a high fidelity thing in that sense 
In that:
3.3 - read() is a constant for the thing opened from the mock
3.4 - read() works once and only once across all opened files from the mock
3.5 today - read() works once for *each* opened file from the mock, but you 
*can't access* each file object (because the mock.returnvalue is replaced each 
time, which is unmocklike)

With this patch: - read() works once for each opened file, as long as the 
sequence open - read - open - read is followed, and mock.returnvalue is a 
constant, mocklike.

--

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



[issue24693] zipfile: change RuntimeError to more appropriate exception type

2015-07-23 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

RuntimeError is raised in the zipfile module in many cases where more 
appropriate exception type is expected. Proposed patch changes a number of 
RuntimeErrors to one of BadZipFile, NotImplementedError, or ValueError. Only 
changing to NotImplementedError is backward compatible (NotImplementedError is 
subclass of RuntimeError), other changes are not.

--
components: Library (Lib)
files: zipfile_exceptions.patch
keywords: patch
messages: 247189
nosy: alanmcintyre, ned.deily, ronaldoussoren, serhiy.storchaka, twouters
priority: normal
severity: normal
stage: patch review
status: open
title: zipfile: change RuntimeError to more appropriate exception type
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file39994/zipfile_exceptions.patch

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



[issue24686] zipfile is intolerant of extra bytes

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Opened issue24693 about exception type.

--

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



[issue24692] types.coroutines() idempotence documentation

2015-07-23 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
nosy: +vadmium

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



[issue24690] find_executable should expand ~

2015-07-23 Thread R. David Murray

R. David Murray added the comment:

Agree with Eric.  Use expanduser if you want the ~ expanded.

--
nosy: +r.david.murray
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue24681] Put most likely test first in set_add_entry()

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bc80c783c4ab by Raymond Hettinger in branch 'default':
Issue #24681:  Move the store of so-table to the code block where it is used.
https://hg.python.org/cpython/rev/bc80c783c4ab

--
nosy: +python-dev

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



[issue24681] Put most likely test first in set_add_entry()

2015-07-23 Thread Raymond Hettinger

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


Added file: http://bugs.python.org/file39993/move_likely_first.diff

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



[issue24300] Code Refactoring in function nis_mapname()

2015-07-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

It is perfectly reasonable to make refactorings.

--
resolution:  - fixed
status: open - closed
versions: +Python 3.6 -Python 3.4

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



[issue24302] Dead Code of Handler check in function faulthandler_fatal_error()

2015-07-23 Thread Pankaj Sharma

Changes by Pankaj Sharma pankaj@samsung.com:


--
nosy: +benjamin.peterson

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



[issue24703] Resource Leak

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Spaces should be used instead tabs for indenting.

--
nosy: +serhiy.storchaka
stage:  - patch review
type:  - resource usage

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



[issue24620] Segfault with nonsensical random state

2015-07-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This is ready to apply.

--
assignee: rhettinger - serhiy.storchaka

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



[issue24659] dict() built-in fails on iterators with a keys attribute

2015-07-23 Thread Raymond Hettinger

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


--
priority: normal - low
stage:  - needs patch

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



[issue24695] Don't print traceback header if traceback is None in TracebackException

2015-07-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This patch looks correct, applies cleanly, and passes tests.

--
nosy: +rhettinger

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



[issue9850] obsolete macpath module dangerously broken and should be removed

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In third-party code the path manipulating functions can be used in unexpected 
manner than doesn't relate to paths on MacOS. Also import macpath can be left 
even with the use of macpath was eliminated or are dead code. There is a chance 
to break third-party code when just remove macpath without deprecation period.

--

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5400e21e92a7 by Meador Inge in branch '3.5':
Issue #24485: Function source inspection fails on closures.
https://hg.python.org/cpython/rev/5400e21e92a7

New changeset 0e7d64595223 by Meador Inge in branch 'default':
Issue #24485: Function source inspection fails on closures.
https://hg.python.org/cpython/rev/0e7d64595223

--

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



[issue24485] Function source inspection fails on closures

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5400e21e92a7 by Meador Inge in branch '3.5':
Issue #24485: Function source inspection fails on closures.
https://hg.python.org/cpython/rev/5400e21e92a7

New changeset 0e7d64595223 by Meador Inge in branch 'default':
Issue #24485: Function source inspection fails on closures.
https://hg.python.org/cpython/rev/0e7d64595223

--

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



[issue24702] Uninitialised Pointer buf.outobj

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, sorry, this is 2.7 only. The patch LGTM for 2.7.

--
assignee:  - serhiy.storchaka
resolution: not a bug - 
stage: resolved - commit review
status: closed - open
type:  - crash

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



[issue24300] Code Refactoring in function nis_mapname()

2015-07-23 Thread Raymond Hettinger

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


--
assignee:  - rhettinger
nosy: +rhettinger

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



[issue24703] Resource Leak

2015-07-23 Thread Serhiy Storchaka

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


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

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



[issue24703] Resource Leak

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4fc7b803ac00 by Serhiy Storchaka in branch '2.7':
Issue #24703: Fixed resource leak on error in bsddb.verify().
https://hg.python.org/cpython/rev/4fc7b803ac00

--
nosy: +python-dev

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



[issue24681] Put most likely test first in set_add_entry()

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch makes set_add_entry() inconsistent not only with dict, but with other 
set methods that use set_lookkey(). I don't know if there is some subtle bug 
here, but I feel myself slightly uncomfortable with it. Also the new code looks 
a little less readable to me. Current code is straightforward translation from 
Python to C (first check error, then check that the result still is actual, 
finally check the result itself), the new code forces you to stop and think, 
it's correctness is not so obvious.

Even if all good with the patch, please don't commit it right now. Wait at 
least a week and then commit. May be someone other will find a flaw in the 
patch.

--

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



[issue24703] Resource Leak

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Otherwise the patch LGTM.

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

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



[issue24681] Put most likely test first in set_add_entry()

2015-07-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Serhiy, do you see anything actually wrong with the patch?  If it isn't broken 
in some clear cut way, I'm going to apply it shortly.  The comparison with dict 
internals is a red herring -- there is no promise need or precedent for making 
that code exactly the same (nor is there is restriction on PyPy or Jython which 
have already traveled down other paths not aligned with cpyhton dict internals).

--

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



[issue24700] array compare is hideously slow

2015-07-23 Thread Josh Rosenberg

Josh Rosenberg added the comment:

You're correct about what is going on; aside from bypassing a bounds check 
(when not compiled with asserts enabled), the function it uses to get each 
index is the same as that used to implement indexing at the Python layer. It 
looks up the getitem function appropriate to the type code over and over, then 
calls it to create the PyLongObject and performs a rich compare.

The existing behavior is probably necessary to work with array subclasses, but 
it's also incredibly slow as you noticed. Main question is whether to keep the 
slow path for subclasses, or (effectively) require that array subclasses 
overriding __getitem__ also override he rich comparison operators to make them 
work as expected.

For cases where the signedness and element size are identical, it's trivial to 
acquire readonly buffers for both arrays and directly compare the memory (with 
memcmp for EQ/NE or size 1 elements, wmemcmp for appropriately sized wider 
elements, and simple loops for anything else).

--
nosy: +josh.r

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



[issue22000] cross type comparisons clarification

2015-07-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

 Why do we need a dedicated section in Built-in Types about Comparisons?

It is nice to have some of that information collected together.  I think people 
learn about comparison logic as a single topic rather than piecemeal type by 
type.

To Jim's point, the discussion of is and is not should probably be 
factored-out (their meaning is type-invariant and is not overridable with a 
dunder method).  Also, they don't have the same reflective logic as the rich 
comparisons.

--
nosy: +rhettinger

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



[issue24701] list.pop() removes items from multiple lists

2015-07-23 Thread annoywife

New submission from annoywife:

When executing the following code, I would expect the 3 to be removed from 
list_copy while list_original remains unaltered.  However, list_copy.pop() 
removes the 3 from both lists.  If an index is specified for pop, this behavior 
occurs as well.

list_original = [1,2,3]
list_copy = list_original
list_copy.pop()

Please let me know if I can provide any other information.

--
components: IDLE, Windows
messages: 247239
nosy: annoywife, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: list.pop() removes items from multiple lists
type: behavior
versions: Python 3.4

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



[issue24702] Uninitialised Pointer buf.outobj

2015-07-23 Thread pankaj.s01

New submission from pankaj.s01:

Hi ,
Reporting an issue of uninitialized  pointer buf.outobj in python-2.7.x .
I have attached patch ,please check and review it.

Thanks!

--
components: Extension Modules, Library (Lib)
files: Python-2.7.10-multibytecodec.patch
keywords: patch
messages: 247243
nosy: pankaj.s01
priority: normal
severity: normal
status: open
title: Uninitialised Pointer buf.outobj
versions: Python 2.7
Added file: http://bugs.python.org/file40003/Python-2.7.10-multibytecodec.patch

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



[issue24702] Uninitialised Pointer buf.outobj

2015-07-23 Thread pankaj.s01

Changes by pankaj.s01 pankaj@samsung.com:


--
nosy: +benjamin.peterson -pankaj.s01

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



[issue24702] Uninitialised Pointer buf.outobj

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ba8ab143f4e6 by Serhiy Storchaka in branch '2.7':
Initialize buf.outobj in multibyte encoder (closes issue #24702).
https://hg.python.org/cpython/rev/ba8ab143f4e6

--
nosy: +python-dev

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



[issue24701] list.pop() removes items from multiple lists

2015-07-23 Thread R. David Murray

R. David Murray added the comment:

https://docs.python.org/3/faq/programming.html#why-did-changing-list-y-also-change-list-x

--
nosy: +r.david.murray
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue24703] Resource Leak

2015-07-23 Thread pankaj.s01

New submission from pankaj.s01:

Hi,
There is an issue of resource leak of file descriptor outFile in 
Python-2.7.10 ,file :Python-2.7.10/Modules/_bsddb.c:3456.
variable outFile is going out of scope which leaks the storage.So need to 
close file before return on error.
I have attached the patch ,please check and review it.

thanks!

--
components: Extension Modules, Library (Lib)
files: Python-2.7.10_bsddb.patch
keywords: patch
messages: 247249
nosy: benjamin.peterson, pankaj.s01
priority: normal
severity: normal
status: open
title: Resource Leak
versions: Python 2.7
Added file: http://bugs.python.org/file40004/Python-2.7.10_bsddb.patch

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



[issue24685] collections.OrderedDict collaborative subclassing

2015-07-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Eric, I believe you're profoundly misunderstanding my Pycon talk.  The posted 
code is not expected to work if I swap the order of the classes around -- 
MRO's are controlled by the child classes (subject to a number of constraints) 
and the order classes are listed matters greatly.  Also, cooperative classes 
have to be designed cooperatively.  The standard library OD class was 
intentionally tightly bound to its parent class to provide opportunities for a 
C implementation, to provide acceptable performance, and to make it easier for 
Jython and PyPy to implement the OD in ways favorable to their implementations. 
 Likewise it was intentional to hide access to the underlying dict using name 
mangling for the same reasons (that one was Guido's suggestion).  Also note, 
Guido's defaultdict also won't let you step in-between the class and its parent.

Also, your posted mal-functioning wrapper is mis-implemented.   Please see the 
How to Incorporate a Non-cooperative Class section of the referenced blog 
post.  The dependency injection technique is something that be used when 
testing your own subclasses which were built a loose coupling to a default 
supplier and where the calls between the consumer and supplier are a well 
defined part of the public API.  Only a handful of standard library tools were 
meant to be used this way. (That is why I the non-cooperative class integration 
part of the blog post was necessary).  

I've reclassified the tracker item as a feature request for 3.6.  Without 
compelling use cases, it will likely be re-rejected shortly. That said, I'm 
concerned that you've got a burr under your saddle and won't take no for an 
answer, so I'll leave this open for a while to allow you a chance to think 
about it and re-close it yourself.  I hope your will understand that we have 
valid reasons for not over-specifying the API and have a reluctance to tie our 
hands to the implementation details as the OD gets transitioned to a C 
implementation suitable internal use within the core.  FWIW, the OD code is 
pure python and there's nothing stopping you from using your own variants.

--
priority: normal - low
type:  - enhancement
versions:  -Python 3.5

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



[issue24300] Code Refactoring in function nis_mapname()

2015-07-23 Thread pankaj.s01

Changes by pankaj.s01 pankaj@samsung.com:


--
nosy: +benjamin.peterson -pankaj.s01

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



[issue24702] Uninitialised Pointer buf.outobj

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The MultibyteDecodeBuffer structure doesn't have the outobj field.

--
nosy: +pankaj.s01, serhiy.storchaka
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue24700] array compare is hideously slow

2015-07-23 Thread Raymond Hettinger

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


--
versions: +Python 3.6 -Python 3.4

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



[issue24485] Function source inspection fails on closures

2015-07-23 Thread Meador Inge

Meador Inge added the comment:

Thanks Yury!  I have committed my patches to 3.5 and default.

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

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



[issue24300] Code Refactoring in function nis_mapname()

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3bbd0cbfe836 by Raymond Hettinger in branch 'default':
Issue #24300:  Minor refactoring.
https://hg.python.org/cpython/rev/3bbd0cbfe836

--
nosy: +python-dev

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



[issue24702] Uninitialised Pointer buf.outobj

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Committed in ba8ab143f4e6.

Thank you for your contribution pankaj.s01 (could you please specify your real 
name?).

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

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



[issue24300] Code Refactoring in function nis_mapname()

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch doesn't fix any bug. Usually we avoid changing source code without 
need.

--
nosy: +serhiy.storchaka

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



[issue24697] Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines

2015-07-23 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm, I think there's little need for new exceptions...

--

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



[issue24699] TemporaryDirectory is cleaned up twice

2015-07-23 Thread Ilya Kulakov

New submission from Ilya Kulakov:

I'm seeing the issue using python 3.4.3 on Windows 8

In the __init__.py method of my package I define temporary directory at the 
module level like this:

_TempDir = tempfile.TemporaryDirectory(prefix='...'))
tempfile.tempdir = _TempDir.name


I expect it to be deleted on exit.

However, _sometimes_, I'm seeing the following exception on exit:

Traceback (most recent call last):
  File :/weakref.pyo, line 582, in _exitfunc
  File :/weakref.pyo, line 506, in __call__
  File :/tempfile.pyo, line 674, in _cleanup
  File :/shutil.pyo, line 478, in rmtree
  File :/shutil.pyo, line 360, in _rmtree_unsafe
  File :/shutil.pyo, line 358, in _rmtree_unsafe
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\
Users\\BC79~1\\AppData\\Local\\Temp\\..._s9wqmyo_'

--
messages: 247233
nosy: Ilya.Kulakov
priority: normal
severity: normal
status: open
title: TemporaryDirectory is cleaned up twice
type: behavior
versions: Python 3.4

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



[issue24485] Function source inspection fails on closures

2015-07-23 Thread Yury Selivanov

Yury Selivanov added the comment:

Meador, I've reverted changes introduced in #21217 -- I don't want to risk 
shipping 3.5beta4 with broken backwards compatibility.

Feel free to rebase  commit your patch (I decorated test_decorator_with_lambda 
with @unittest.expectedFailure).

--

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



[issue13248] deprecated in 3.2/3.3, should be removed in 3.5 or ???

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 558199e060fd by Yury Selivanov in branch 'default':
Issue #13248: Remove inspect.getmoduleinfo() from 3.6 (deprecated in 3.3)
https://hg.python.org/cpython/rev/558199e060fd

--

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



[issue16995] Add Base32 support for RFC4648 Extended Hex alphabet (patch attached)

2015-07-23 Thread Serhiy Storchaka

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


Added file: http://bugs.python.org/file39996/py36_base32hex.patch

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



[issue21750] mock_open data is visible only once for the life of the class

2015-07-23 Thread Robert Collins

Robert Collins added the comment:

Discussed with Michael Foord; we're going to go with the -2 patch - the new 
behaviour.

--

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



[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

2015-07-23 Thread Yury Selivanov

Yury Selivanov added the comment:

This is a documented behaviour, changing it would likely break too much code.

Moreover, I don't think that calling addCleanup callbacks before tearDown makes 
more sense than after.  tearDown is a common cleanup method for all tests of 
testcase, and addCleanup callbacks are for additional cleanup procedures.

-1 on changing this.

--
nosy: +yselivanov

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



[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

2015-07-23 Thread Robert Collins

Robert Collins added the comment:

The ordering is deliberate to support folk migrating from tearDown to cleanups 
- its not a bug. I thought we documented it clearly - 
https://docs.python.org/dev/library/unittest.html#unittest.TestCase.doCleanups 
- but if you wanted to submit improvements to the docs, that would be welcome.

The reverse ordering you propose, setup - cleanups - teardown means that its 
nearly impossible to migrate to cleanups bottom-up, you have to migrate 
top-down, which locks folk in inheritance based frameworks into waiting for the 
top of the tree to migrate first.

class Base(TestCase):

 def setUp(self):
  super().setUp()
  self.helper = Something()

 def tearDown(self):
  self.helper.finished()
  self.helper = None
  super().tearDown()


class Child(Base):

 def setUp(self):
  super().setUp()
  self.addCleanup(self.helper.release, my_resource)



If the order is
setup
teardown
cleanup

then in the cleanup the helper is already finished, and the release call will 
fail.

With the order of
setup
cleanup
teardown

The child's cleanup runs before the parents teardowns.

It does of course pose the same reverse problem: the base of an inheritance 
based frame for tests needs to be more conservative adopting cleanups, or 
signal backwards incompatibility, but since that is generally true anyway 
(frameworks move slower than their users), we considered it a reasonable 
tradeoff.


btw, you don't need a lambda in your example:

 self.addCleanup(print, 'destroying')

--
nosy: +rbcollins

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



[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

2015-07-23 Thread Charles-François Natali

Charles-François Natali added the comment:

I understand the risk of breakeage, but that's still broken, because
we break LIFO ordering.

I'd been using addCleanup() for years and never bothered looking at
the documentation - which is admitedly a mistake - because LIFO
ordering is the natural behavior: since addCleanup() is called once
the test has been entered - so after setUp, logic would expect it to
be undone before tearDown.

But I guess that ship has sailed...

--

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



[issue13248] deprecated in 3.2/3.3, should be removed in 3.5 or ???

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a565aad5d6e1 by Yury Selivanov in branch 'default':
Issue #13248: Remove inspect.getargspec from 3.6 (deprecated from 3.0)
https://hg.python.org/cpython/rev/a565aad5d6e1

--

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



[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

2015-07-23 Thread Robert Collins

Robert Collins added the comment:

So yeah - setup  + cleanup is LIFO.
setup + teardown *can* be LIFO [depends on where you upcall]

setup + teardown + cleanup CANNOT be LIFO in all cases: we have to pick one, 
and either local-first or local-last.

So it is ultimately somewhat arbitrary and transitionary: one shouldn't use 
tearDown + cleanups, because tearDown is just a poor API by comparison.

--

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



[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

2015-07-23 Thread Yury Selivanov

Yury Selivanov added the comment:

 But I guess that ship has sailed...

Closing the issue.

--
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue24485] Function source inspection fails on closures

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4e42a62d5648 by Yury Selivanov in branch '3.5':
Issue #24485: Revert backwards compatibility breaking changes of #21217.
https://hg.python.org/cpython/rev/4e42a62d5648

New changeset 98a2bbf2cce2 by Yury Selivanov in branch 'default':
Merge 3.5 (issues #21217, #24485).
https://hg.python.org/cpython/rev/98a2bbf2cce2

--
nosy: +python-dev

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4e42a62d5648 by Yury Selivanov in branch '3.5':
Issue #24485: Revert backwards compatibility breaking changes of #21217.
https://hg.python.org/cpython/rev/4e42a62d5648

New changeset 98a2bbf2cce2 by Yury Selivanov in branch 'default':
Merge 3.5 (issues #21217, #24485).
https://hg.python.org/cpython/rev/98a2bbf2cce2

--

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



[issue24695] Don't print traceback header if traceback is None

2015-07-23 Thread Adam Bartoš

New submission from Adam Bartoš:

The documentation of traceback.print_exception says if traceback is not None, 
it prints a header Traceback (most recent call last):. That also meant that 
the header wasn't printed if traceback was None. However, the new Python 3.5 
TracebackException object always prints the header.

--
components: Library (Lib)
messages: 247208
nosy: Drekin
priority: normal
severity: normal
status: open
title: Don't print traceback header if traceback is None
type: behavior
versions: Python 3.5

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



[issue24696] Don't use None as sentinel for traceback

2015-07-23 Thread Adam Bartoš

New submission from Adam Bartoš:

There is a subtle bug in Python 3.4 implementation of traceback library:

 import traceback

 try:
... 1 / 0
... except Exception as e:
... exc = e
...
 traceback.print_exception(exc.__class__, exc, exc.__traceback__)
Traceback (most recent call last):
  File stdin, line 2, in module
ZeroDivisionError: division by zero
 
 traceback.print_exception(exc.__class__, exc, None)
Traceback (most recent call last):
  File stdin, line 2, in module
ZeroDivisionError: division by zero
 
 traceback.print_exception(exc.__class__, exc, None, chain=False)
ZeroDivisionError: division by zero

As can be seen, giving None traceback is ignored if chain == True. This is 
because None is incorrectly used as a sentinel value in traceback._iter_chain 
(see line 135).

Note that this bug is fixed in Python 3.5 since there is a new implementation 
of traceback module using TracebackException objects. Will this be backported 
to Python 3.4? Otherwise, the bug itself should be fixed anyway.

--
components: Library (Lib)
messages: 247210
nosy: Drekin
priority: normal
severity: normal
status: open
title: Don't use None as sentinel for traceback
type: behavior
versions: Python 3.4

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



[issue24695] Don't print traceback header if traceback is None in TracebackException

2015-07-23 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
stage:  - needs patch
title: Don't print traceback header if traceback is None - Don't print 
traceback header if traceback is None in TracebackException
versions: +Python 3.6

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



[issue2091] file accepts 'rU+' as a mode

2015-07-23 Thread Robert Collins

Robert Collins added the comment:

@Larry - should this go in 3.5, or would you rather it not?

--
nosy: +larry

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



[issue24694] callables registered in TestCase.addCleanup should be run before tearDown

2015-07-23 Thread Robert Collins

Robert Collins added the comment:

Argh, and my memory had things inverted.

Anyhow - the inheritance story was the big thing, and -1 on changing.

--

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



[issue16995] Add Base32 support for RFC4648 Extended Hex alphabet (patch attached)

2015-07-23 Thread Matthäus Wander

Matthäus Wander added the comment:

*facepalm* Yes, I uploaded the old patch twice. Sorry for that.

- Added doc update.
- Added test case that includes all 32 characters codes.

I'm reusing the existing Base32 table generation logic without changes. It has 
been changed (in 3.4 or so) since the first patch. If the logic is still to be 
changed as suggested by Martin in Rietveld review, I'd suggest to open a 
separate issue because it affects the existing Base32 implementation, too.

--
Added file: http://bugs.python.org/file39995/py36_base32hex.patch

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



[issue24689] Add tips for effective online communication to devguide

2015-07-23 Thread Carol Willing

Carol Willing added the comment:

Ezio and Stephen, The content that you are brainstorming here is very 
helpful, and I'm learning new resources and detail from it. 

I've learned something from Ezio's link to Nick's post on python-committers. 
I'm not a core developer so I'm not subscribed to this list (kudos for the 
archives being public). When Stephen mentioned if mailing list code of conduct 
is to be fleshed out in msg247162, I was confused by the comment since I had 
not intended these tracker issues to be the place to develop a mailing list 
CoC. That's a bigger task :D and I want to stay focused on small, practical 
patches that are iterated over time.

[Note: A good takeaway from this is that there will be times that core 
developers believe that a topic has been extensively discussed i.e. mailing 
list CoC. Yet, the contributors without core developer status would not be 
aware that the topic has been extensively discussed unless they regularly read 
the python-committer archives.]

As a group, I think it would be helpful to step back for a moment and remind 
ourselves the improving mailing list communications will use a number of 
resources (FAQs, CoCs, devguide, helpful model messages, useful info from other 
projects, etc.).

As a next step on this issue, I will take the action item of editing 12.1 
Mailing Lists to provide better description of each list's purpose. I will also 
draft section 12.4 Tips for effective online communication (more CPython 
focused than general). When I post the patch, I will also suggest updates that 
may be helpful to include in the communications section of the FAQ.

Thanks to each of you for caring about being welcoming and considerate to our 
community members and for lending your experience to improving the complex and 
fluid blob of communication between people.

P.S. Please keep your ideas and suggestions flowing. We can roll them over into 
new issues as we feel is helpful.

--
assignee:  - willingc

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



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b5a7f529b4ac by Yury Selivanov in branch '3.5':
Issue #24687: Plug refleak on SyntaxError in function parameters annotations.
https://hg.python.org/cpython/rev/b5a7f529b4ac

New changeset cf91ae981afd by Yury Selivanov in branch 'default':
Merge 3.5 (Issue #24687)
https://hg.python.org/cpython/rev/cf91ae981afd

--
nosy: +python-dev

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



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-23 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks, Benjamin!

--

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



[issue24619] async/await parser issues

2015-07-23 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
nosy: +benjamin.peterson

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



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-23 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


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

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



[issue24619] async/await parser issues

2015-07-23 Thread Yury Selivanov

Yury Selivanov added the comment:

Updated patch attached (rebased; minor optimization).  I'll commit this patch 
in a few hours to make sure it lands in 3.5beta4.

--
Added file: http://bugs.python.org/file39991/issue24619.4.patch

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



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-23 Thread Yury Selivanov

Yury Selivanov added the comment:

 I would prefer that compiler_visit_argannotation[s] be fixed to use the 
 normal calling convention.

Agree, new patch attached.

--
Added file: http://bugs.python.org/file39990/compile2.patch

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



[issue24687] refleak on SyntaxError in function parameter annotation

2015-07-23 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Seems fine to me.

--

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



[issue24651] Mock.assert* API is in user namespace

2015-07-23 Thread Erik Bray

Changes by Erik Bray erik.m.b...@gmail.com:


--
nosy: +erik.bray

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



[issue21750] mock_open data is visible only once for the life of the class

2015-07-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 83e28ee348bf by Robert Collins in branch '3.4':
Issue #21750: Further fixup to be styled like other mock APIs.
https://hg.python.org/cpython/rev/83e28ee348bf

New changeset b30fc1de006c by Robert Collins in branch '3.5':
Issue #21750: Further fixup to be styled like other mock APIs.
https://hg.python.org/cpython/rev/b30fc1de006c

New changeset c896ab62ac75 by Robert Collins in branch 'default':
Issue #21750: Further fixup to be styled like other mock APIs.
https://hg.python.org/cpython/rev/c896ab62ac75

--

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



[issue24697] Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines

2015-07-23 Thread Guido van Rossum

Guido van Rossum added the comment:

What problem does this solve?

--

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



[issue24697] Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines

2015-07-23 Thread Guido van Rossum

Guido van Rossum added the comment:

What problem does this solve?

--

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



[issue16995] Add Base32 support for RFC4648 Extended Hex alphabet (patch attached)

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added comments on Rietveld.

--

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



[issue2091] file accepts 'rU+' as a mode

2015-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I would add a warning in 3.4- (or 3.5-). The 'U' mode should not work
with '+', and it can't work with '+' correctly. This is a bug that we can 
decide not fix by raising an exception.

--

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



[issue24695] Don't print traceback header if traceback is None in TracebackException

2015-07-23 Thread Berker Peksag

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


--
nosy: +rbcollins

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



[issue24697] Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines

2015-07-23 Thread Yury Selivanov

New submission from Yury Selivanov:

Since native coroutines (see PEP 492) hadn't had a separate type when the PEP 
was accepted, we didn't discuss that it might be necessary to introduce new 
exception types specifically for coroutines.

To maintain backwards compatibility with 3.5, I think we can do the following:

1. Add CoroutineReturn exception type, inherited from StopIteration;

2. Add CoroutineExit exception type, inherited from GeneratorExit.

--
assignee: yselivanov
components: Interpreter Core
messages: 247214
nosy: gvanrossum, ncoghlan, yselivanov
priority: normal
severity: normal
status: open
title: Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines
type: enhancement
versions: Python 3.6

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



[issue16995] Add Base32 support for RFC4648 Extended Hex alphabet (patch attached)

2015-07-23 Thread Serhiy Storchaka

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


--
stage: needs patch - patch review

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



[issue24455] IDLE debugger causes crash if not quitted properly before next run

2015-07-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thank you for testing this.  I am hoping that you left the patch applied for 
testing in routine use.  I an now reviewing the code so I can understand it 
well enough to apply, and to see what non-debug functions might possibly be 
affected, and need testing with the patch applied.

--

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



[issue24698] get_externals.bat script fails

2015-07-23 Thread Alex Budovski

New submission from Alex Budovski:

The svn commands need to be wrapped with call, otherwise the batch 
interpreter hangs. Attached simple fix.

--
files: externalsfix.diff
keywords: patch
messages: 247223
nosy: Alex Budovski
priority: normal
severity: normal
status: open
title: get_externals.bat script fails
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file39997/externalsfix.diff

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



[issue24685] collections.OrderedDict collaborative subclassing

2015-07-23 Thread Eric Frederich

Eric Frederich added the comment:

Raymond,

Thanks for the explanation of your reasoning.
Could you please provide an example of how to create a cooperative subclass of 
OrderedDict?

I have attempted to make one.
I succeeded to make it work where the previous example failed but in doing made 
the example that used to work now fail.
I have attached my attempt at making a cooperative OrderedDict in inj2.py

class coop_OrderedDict(OrderedDict):

A cooperative version of OrderedDict

def __setitem__(self, k, v, **kwargs):
# OrderedDict calls dict.__setitem__ directly skipping over LoggingDict
# fortunately we can control this with dict_setitem keyword argument

# calculate OrderedDict's real parent instead of skipping right to 
dict.__setitem__
# though depending on the hierarchy it may actually be dict.__setitem__
m = super(OrderedDict, self).__setitem__
# dict_setitem wants an unbound method
unbound_m = m.im_func
return super(coop_OrderedDict, self).__setitem__(k, v, 
dict_setitem=unbound_m)

In Python2 it fails with:

Traceback (most recent call last):
  File /tmp/inj2.py, line 51, in module
old1['hooray'] = 'it worked'
  File /tmp/inj2.py, line 30, in __setitem__
return super(LoggingDict, self).__setitem__(k, v)
  File /tmp/inj2.py, line 18, in __setitem__
unbound_m = m.im_func
AttributeError: 'method-wrapper' object has no attribute 'im_func'

In Python3 both cases fail.

--
Added file: http://bugs.python.org/file39998/inj2.py

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



[issue24685] collections.OrderedDict collaborative subclassing

2015-07-23 Thread Eric Frederich

Changes by Eric Frederich eric.freder...@gmail.com:


Removed file: http://bugs.python.org/file39998/inj2.py

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



[issue24685] collections.OrderedDict collaborative subclassing

2015-07-23 Thread Eric Frederich

Changes by Eric Frederich eric.freder...@gmail.com:


Added file: http://bugs.python.org/file3/inj2.py

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



[issue24681] Put most likely test first in set_add_entry()

2015-07-23 Thread Raymond Hettinger

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


Removed file: http://bugs.python.org/file39992/move_likely_first.diff

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



[issue24685] collections.OrderedDict collaborative subclassing

2015-07-23 Thread Eric Frederich

Eric Frederich added the comment:

Attached, as inj3.py, is a version I made which seems to work with Python2 but 
not with Python3's C implementation of OrderedDict.

I had to walk the MRO myself to get the unbound method to pass along as 
dict_setitem.

With Python3 it doesn't look like doing this was left configurable.
It crashes complaining TypeError: wrapper __setitem__ doesn't take keyword 
arguments

Re-opening this bug since it seems impossible to make OrderedDict cooperative 
in Python3 even with a wrapper.

Perhaps Python3's OrderedDict should either
(a) be cooperative at the C level
(b) support dict_setitem keyword argument to maintain compatibility with 
Python2.

--
resolution: not a bug - 
status: closed - open
versions: +Python 3.5
Added file: http://bugs.python.org/file4/inj3.py

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



[issue2091] file accepts 'rU+' as a mode

2015-07-23 Thread R. David Murray

R. David Murray added the comment:

I agree, a change that emits an error where none was emitted before should only 
go in the next release.  With a what's new entry.

It is possible there should be a deprecation or -3 warning in 2.7, but I'm not 
sure it is worth the effort.

--
nosy: +r.david.murray

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



[issue24697] Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines

2015-07-23 Thread Yury Selivanov

Yury Selivanov added the comment:

 What problem does this solve?

Only avoiding confusion, because coroutines now have a separate type, lack 
__iter__, and thus are quite different (on the surface) from generators. The 
fact that 'coro.send(..)' raises StopIteration (when coroutines aren't 
iterable), and that 'coro.close()' raises GeneratorExit might be confusing and 
non-obvious to some users.

FWIW I created this ticket mostly as a reminder for myself to have some 
discussion on this topic in the future, when 3.5 is released and we have some 
initial feedback on PEP 492 ideas.

--

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



[issue24698] get_externals.bat script fails

2015-07-23 Thread R. David Murray

R. David Murray added the comment:

This script has been working for a long time, and while it was updated recently 
there was no 'call' previously either.  What environment are you experiencing a 
hang in?

--
components: +Windows
nosy: +paul.moore, r.david.murray, steve.dower, tim.golden, zach.ware

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



[issue24698] get_externals.bat script fails

2015-07-23 Thread Steve Dower

Steve Dower added the comment:

Apparently you've installed SVN differently and you're calling svn.bat (or 
svn.cmd) instead of svn.exe.

Adding call there should not cause a problem for people who have svn.exe, but 
Alex, I suggest you try running where svn to make sure you are actually 
invoking the right thing.

--

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



  1   2   >