[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-29 Thread Lars Gustäbel

Lars Gustäbel added the comment:

@Thomas:

I think your proposal adds a little too much complexity. Also, ExFileObject is 
not used during iteration, and we would like to detect broken archives without 
unpacking all the data segments first.

I have written patches for Python 2 and 3.

--
stage:  - patch review
versions: +Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39543/issue24259-3.x.diff

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



[issue1818] Add named tuple reader to CSV module

2015-05-29 Thread Cédric Krier

Changes by Cédric Krier cedric.kr...@b2ck.com:


--
nosy: +ced

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



[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-29 Thread Thomas Guettler

Thomas Guettler added the comment:

I thought about this again. 

It could be solved with the help of a ByteCountingStreamReader.

With ByteCountingStreamReader I mean a wrapper around a stream like 
codescs.StreamReader. But the ByteCountingStreamReader should not changes the 
content, but just count the bytes it passed.

The ByteCountingStreamReader would be wrapped around ExFileObject.

This class could be handy in other situations.

What do you think?

--

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



[issue24321] interaction of nonlocal and except leading to incorrect behavior

2015-05-29 Thread R. David Murray

R. David Murray added the comment:

Indeed, if you replace the except clause with a 'del x', you get the same 
UnboundLocalError.  This is working as designed.

--
nosy: +r.david.murray

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



[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-29 Thread Eric V. Smith

Eric V. Smith added the comment:

It's trying to say that i is optional, as stated in the footnote. I agree it 
would be better written as s.pop(i), since square brackets are otherwise used 
in that section as indexing operators. But the footnote should stay, explaining 
what happens if you omit the parameter.

--
nosy: +eric.smith

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



[issue24313] json fails to serialise numpy.int64

2015-05-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't know about __index__, but there's the ages-old discussion of allowing 
some kind of __json__ hook on types. Of course, none of those solutions would 
allow round-tripping.

--

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



[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-29 Thread Eric V. Smith

Changes by Eric V. Smith e...@trueblade.com:


--
versions:  -Python 3.2, Python 3.3

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



[issue24313] json fails to serialise numpy.int64

2015-05-29 Thread R. David Murray

R. David Murray added the comment:

So in python2, some were json serializable and some weren't?  Yes, I'd call 
that a quirk :)

So back to the question of whether it makes sense for json to look for 
__index__ to decide if something can be serialized as an int.  If not, I don't 
think there is anything we can do.

--

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



[issue24322] Hundreds of linker warnings on Windows

2015-05-29 Thread Mark Lawrence

New submission from Mark Lawrence:

The first of them.

3C:\cpython\PCbuild\obj\win32_Debug\python3dll\python3_d.def : warning 
LNK4197: export 'PyArg_Parse' specified multiple times; using first 
specification

--
components: Build, Windows
messages: 244364
nosy: BreamoreBoy, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Hundreds of linker warnings on Windows
type: behavior
versions: Python 3.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24322
___
___
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-05-29 Thread Cyd Haselton

Cyd Haselton added the comment:

All,
Just checking in as it has been a while...is there anything I need to do on my 
end for this port?

--

___
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



[issue24313] json fails to serialise numpy.int64

2015-05-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I wouldn't call it a bug in Numpy (a quirk perhaps?). Numpy ints are 
fixed-width ints, so some of them can inherit from Python int in 2.x, but not 
in 3.x.
But not all of them do, since the bitwidth can be different:

 issubclass(np.int64, int)
True
 issubclass(np.int32, int)
False
 issubclass(np.int16, int)
False

--

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



[issue24313] json fails to serialise numpy.int64

2015-05-29 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +njs

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



[issue9674] make install DESTDIR=/home/blah fails when the prefix specified is /

2015-05-29 Thread Martin Olsen

Martin Olsen added the comment:

I have python (2.7.9  3.4.3) installed with prefix=/ which causes problems 
when change_root() doesn't lstrip() the path separators.

I have applied Ivailo's patch from 2015-02-13 and handful of packages without 
issues.

Attached is a port of the patch to 3.4.3. Please note that the test failed 
(because it used the old distutils package, I suspect) and the win32 path 
handling is a bit messed up, but I don't have time to fix that ATM. It works as 
expected during runtime.

--
nosy: +mro
Added file: http://bugs.python.org/file39545/Python-3.4.3-issue9674-3.patch

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



[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2015-05-29 Thread Matěj Stuchlík

Matěj Stuchlík added the comment:

+1 from the Python team from Fedora, the patch looks good from downstream 
standpoint.

--

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



[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-29 Thread eimista

New submission from eimista:

In section 
(https://docs.python.org/3.5/library/stdtypes.html#mutable-sequence-types) 
written s.pop([i]). But this syntax doesn't work.
Maybe the correct notation will be s.pop(i)?

--
assignee: docs@python
components: Documentation
messages: 244365
nosy: docs@python, eimista
priority: normal
severity: normal
status: open
title: Typo in Mutable Sequence Types documentation.
type: resource usage
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

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



[issue24315] collections.abc: Coroutine should be derived from Awaitable

2015-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 968af3838553 by Yury Selivanov in branch '3.5':
Issue 24315: Make collections.abc.Coroutine derived from Awaitable
https://hg.python.org/cpython/rev/968af3838553

New changeset a7a9c8631d0e by Yury Selivanov in branch 'default':
Issue 24315: Make collections.abc.Coroutine derived from Awaitable
https://hg.python.org/cpython/rev/a7a9c8631d0e

--
nosy: +python-dev

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



[issue24315] collections.abc: Coroutine should be derived from Awaitable

2015-05-29 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/issue24315
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

Stefan,

Because of 
https://mail.python.org/pipermail/python-committers/2015-May/003410.html I've 
decided to commit 24315 and 24316 today.  Please try to check that everything 
works before new beta 2.

--

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7356f71fb0a4 by Yury Selivanov in branch '3.5':
Issue 24316: Fix types.coroutine() to accept objects from Cython
https://hg.python.org/cpython/rev/7356f71fb0a4

New changeset 748c55375225 by Yury Selivanov in branch 'default':
Issue 24316: Fix types.coroutine() to accept objects from Cython
https://hg.python.org/cpython/rev/748c55375225

--
nosy: +python-dev

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 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/issue24316
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23659] csv.register_dialect doc string

2015-05-29 Thread Skip Montanaro

Skip Montanaro added the comment:

LGTM.

--

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



[issue24270] PEP 485 (math.isclose) implementation

2015-05-29 Thread Stefan Krah

Stefan Krah added the comment:

 While we're on the subject, though, trying to convert a very large int to 
 float fails with an OverflowError. Perhaps Decimal should do the same?

I've always viewed float() as a cast. For casting Decimal's behavior
seems to be the right one to me.

If we go ahead with implicit casts for isclose(), I still think
the PEP's non-float section should be changed:  It sounds as if
native support was planned for Decimal.

Does someone have the tracker id of Chris?

--

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-29 Thread Stefan Behnel

Stefan Behnel added the comment:

I'm seeing crashes with this assertion in Cython test modules:

python: ./Python/importdl.c:75: get_encoded_name: Assertion 
`(((PyObject*)(encoded))-ob_refcnt) == 1' failed.

The problem seems to be that the module name is only one character long (a), 
and single character byte strings are interned.

--
nosy: +scoder

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



[issue24324] Remove -Wunreachable-code flag

2015-05-29 Thread Skip Montanaro

New submission from Skip Montanaro:

Makefile.pre defines BASECFLAGS to include -Wunreachable-code. When building in 
the Linux environment available to me (GCC 4.4.6), compilation spews tons of 
warnings about warning: will never be executed. According to this 
StackOverflow thread:

http://stackoverflow.com/questions/14591778/

that flag was always broken in GCC and was eventually removed in 4.5. Maybe we 
should dispense with it when building Python, at least unless requested by the 
user.

--
components: Build
messages: 244377
nosy: skip.montanaro
priority: normal
severity: normal
stage: needs patch
status: open
title: Remove -Wunreachable-code flag
type: compile error
versions: Python 2.7, Python 3.5

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



[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

I think it should be changed to `pop(i=-1)`.

--
nosy: +yselivanov

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



[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

 Tried it, works for me. Thanks!

This is really good news! Thanks!

--

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



[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-29 Thread Eric V. Smith

Eric V. Smith added the comment:

s.pop(i=-1) doesn't actually work, but I guess it gets the point across.

For 2.7 it's even more confusing, since it includes:
s.index(x[, i[, j]])
and
s.sort([cmp[, key[, reverse]]])

I'd suggest not changing the 2.7 docs.

--

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-29 Thread Stefan Behnel

Stefan Behnel added the comment:

Patch LGTM and it fixes the problem (tried it on my side). Please make sure it 
gets applied in time for beta 2.

--

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



[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-29 Thread Stefan Behnel

Stefan Behnel added the comment:

Tried it, works for me. Thanks!

--

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



[issue24325] Speedup types.coroutine()

2015-05-29 Thread Yury Selivanov

New submission from Yury Selivanov:

Attached patch provides an implementation (part of it) of types.coroutine in C.

The problem with the current pure Python implementation is that it copies the 
code object of the generator function, which is a small overhead during import.

I'm not sure if this should be merged in 3.5 at all.  Please take a look at the 
patch.

--
assignee: yselivanov
components: Library (Lib)
files: types_coroutine_speedup.patch
keywords: patch
messages: 244388
nosy: gvanrossum, ncoghlan, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: Speedup types.coroutine()
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39547/types_coroutine_speedup.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24325
___
___
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-05-29 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

I thought you were running the tests...

Or was there something I had to do that I missed?

On May 29, 2015 5:54:18 AM CDT, Cyd Haselton rep...@bugs.python.org wrote:

Cyd Haselton added the comment:

All,
Just checking in as it has been a while...is there anything I need to
do on my end for this port?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___

--

___
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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Stefan Behnel

Stefan Behnel added the comment:

I just noticed that I hadn't used the real types.coroutine in my Py3.5 tests 
when reporting back in issue 24017. When I pass a Cython generator through it, 
I get


Traceback (most recent call last):
  File tests/run/test_coroutines_pep492.pyx, line 245, in 
test_coroutines_pep492.CoroutineTest.test_func_5 
(test_coroutines_pep492.c:13445)
for el in bar():
  File /opt/python3.5/lib/python3.5/types.py, line 197, in wrapped
'non-coroutine: {!r}'.format(coro))
TypeError: callable wrapped with types.coroutine() returned non-coroutine: 
generator object at 0x7f178c458898


This is actually obvious, given that the sole purpose of the decorator is to 
turn something that is a Generator and *not* a Coroutine into something that is 
a Coroutine, as a means for the user to say but I know better. So checking 
for the return value being a Coroutine is wrong. Instead, it should check that 
it's a Generator and if it's not an Awaitable, wrap it as a self-returning 
Awaitable. That's more or less what my proposed implementation in issue 24017 
did:

  class types_coroutine(object):
def __init__(self, gen):
self._gen = gen

class as_coroutine(object):
def __init__(self, gen):
self._gen = gen
self.send = gen.send
self.throw = gen.throw
self.close = gen.close

def __await__(self):
return self._gen

def __call__(self, *args, **kwargs):
return self.as_coroutine(self._gen(*args, **kwargs))

--

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-29 Thread Petr Viktorin

Petr Viktorin added the comment:

Ah, indeed. I need to create a new bytes object here after all.
Here is a fix, with a test.

Thank you Stefan!

--
Added file: http://bugs.python.org/file39546/fix-short-names.patch

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



[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-05-29 Thread Brett Cannon

Brett Cannon added the comment:

Skipping select frames is a shift in semantics for warnings.warn() (so can't go 
into 3.5b1), doing it implicitly might be costly on interpreters where getting 
a frame is expensive, and coming up with a new API allows for a nicer design, 
e.g. `warnings.deprecate_module(__name__, 'it will be removed in Python 3.6')` 
- the formatter module is deprecated; it will be removed in Python 3.6

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24305
___
___
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-05-29 Thread Cyd Haselton

Cyd Haselton added the comment:

On May 29, 2015 10:52:23 AM CDT, Ryan Gonzalez rep...@bugs.python.org wrote:

Ryan Gonzalez added the comment:

I thought you were running the tests...


Which tests?

Or was there something I had to do that I missed?

From one of the earlier messages I posted:

1) -python3.4m needs to be changed to -python3.5m...or the appropriate 
versioning variable. 
2) colons at the end of the elif lines in setup.py (1950- ) 
3) The _crypt and readline module builds in setup.py need additional libraries 
to work...python3.5m for both and possibly ncurses for readline, I'll test and 
get back to you. With #1 and #2 added, the build and install completes 
successfully, although you obviously can't import readline and _crypt.

*snip*

The messages after that one document how I got readline to work

On May 29, 2015 5:54:18 AM CDT, Cyd Haselton rep...@bugs.python.org
wrote:

Cyd Haselton added the comment:

All,
Just checking in as it has been a while...is there anything I need to
do on my end for this port?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___

--

___
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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Stefan Behnel

Stefan Behnel added the comment:

One failing test in test_coroutines: test_func_5. The reason is that the 
GeneratorWrapper is not iterable (and there is no reason it shouldn't be, given 
that it wraps a Generator). That was my fault, I had already added an __iter__ 
method but didn't copy it in my previous message. Adding it as follows fixes 
the test for me:

def __iter__(self):
return self.__wrapped__

Alternatively, __iter__ = __await__ would do the same.

--

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



[issue23767] Library and include paths not added when cross compiling on localized sytem

2015-05-29 Thread Thomas Petazzoni

Thomas Petazzoni added the comment:

I confirm seeing the same issue. This patch fixes it.

--
nosy: +thomas-petazzoni

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



[issue23810] Suboptimal stacklevel of deprecation warnings for formatter and imp modules

2015-05-29 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
versions: +Python 3.6

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



[issue24327] yield unpacking

2015-05-29 Thread Mital Ashok

New submission from Mital Ashok:

(This is more of a feature request than a bug, but 
https://www.python.org/dev/peps/pep-0042/ said to post it here)

My request is to have syntax like this:

yield *iterable

to lazily return the iterable's items, not much unlike:

# ...
for i in iterable:
yield i
# ...

This is because I constantly find myself yielding all the values in, say, a 
list, then modifying it and yielding it in a loop.

--
messages: 244397
nosy: Mital Ashok
priority: normal
severity: normal
status: open
title: yield unpacking
type: enhancement
versions: Python 3.6

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Stefan Behnel

Stefan Behnel added the comment:

BTW, it's not only for compiled generators but also for normal Python functions 
that construct Python generators internally and return them, or that delegate 
the generator creation in some way. With this change, it's enough to decorate 
the constructor function and not each of the potential generators that it 
returns.

--

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

Please test the attached patch.

 BTW, it's not only for compiled generators but also for normal Python 
 functions that construct Python generators internally and return them

You're right, that's why I used primarily word in that comment ;) 

types.coroutine() is only used by asyncio.coroutine() so far, and returning 
generator objects from factory functions isn't a very common pattern in 
asyncio.

--
Added file: http://bugs.python.org/file39551/types_coroutine.patch

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



[issue7094] Add alternate float formatting styles to new-style formatting.

2015-05-29 Thread Seungbeom Kim

Seungbeom Kim added the comment:

It looks like this change has not been applied to Python 2.7. Do we have any 
chance of getting it to 2.7?

 So I'm unsure if anyone is actually using alternate formatting.

The alternative form is my favorite, and I think that %#g should be the 
default format for general floating-point values in numerical applications. 
That is why I miss this feature in Python 2.7 so much.

--
nosy: +Seungbeom Kim

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



[issue19989] Error while sending function code over queue (multiprocessing)

2015-05-29 Thread Davin Potts

Davin Potts added the comment:

Without further information from the OP, there is not much more we can do as 
the problem may well originate with the user's compiled C code (which 
circumstantially seems quite likely).  Closing as out-of-date.

--
resolution:  - out of date
status: pending - closed

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



[issue24328] Extension modules with single-letter names can't be loaded

2015-05-29 Thread Martin Panter

Martin Panter added the comment:

Two minor comments on Reitveld. Looks like you alreay fixed one of them in the 
actual commit.

--
nosy: +vadmium
type:  - behavior

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



[issue24326] Audioop: weightB not divided by GCD, weightA divided twice

2015-05-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your report and patch David.

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

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-05-29 Thread Davin Potts

Davin Potts added the comment:

At first blush it does appear there is potential for conflict because of how 
the semaphore filename template was implemented -- that's a cool find.  In 
practice, I wonder how often this has actually bitten anyone in the real world. 
 The Linux world's use of clone() (creating pid namespaces) is relatively 
new/young.  The BSD world's use of jails (bsd-style) take a bit of a different 
approach, advocate against the use of shared filesystems across jails where a 
similar conflict could arise, and have been around longer.

@Paul:  Out of curiosity, what inspired your discovery?

Agreed that backporting Richard's work from issue8713 does not appeal.

A few concerns:
* Retrying with a modified filename makes sense but basing it on a timestamp 
from the system clock is not particularly robust given that the cloned 
processes can be executing in sufficiently close lock step that they both get 
the same timestamp (given the granularity/precision of the clock functions).  
Developers new to high performance computing often learn this the hard way when 
trying to use the system clock to create uniquely named files.
* Instead, what about using the system's available pseudo-random number 
generators?  Most are implemented to avoid just this problem where two or more 
processes/threads ask for a random/distinct value at nearly the same moment.
* What about simply using a counter (not the same static int counter but 
another) and incrementing it when the attempt to create the semaphore file 
fails?  This avoids a system function call and potentially simplifies things.  
Would this be faster in the majority of cases?

--

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



[issue24270] PEP 485 (math.isclose) implementation

2015-05-29 Thread Christopher Barker

Christopher Barker added the comment:

Sorry for the confusion:

when I wrote the PEP, I was thinking in terms of a Python, duck-typed 
implementation.

Now that it's in C, that doesn't work so well.

I will update the PEP to indicate that it is float-only, or complex for the 
cmath implementation (thanks, Tal!).

Any other type will be converted to float if possible, with the limitations 
that that has.

As for Decimal -- the right thing to do would be to do a native Decimal 
implementation -- but that would live in the decimal module, maybe as a method 
on the Decimal type. (or stand alone -- not sure)

Fraction doesn't have the same precision issues as floats, so not sure what the 
point is.

--

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



[issue17094] sys._current_frames() reports too many/wrong stack frames

2015-05-29 Thread Devin Jeanpierre

Devin Jeanpierre added the comment:

The patch I'm providing with this comment has a ... really hokey test case, and 
a two line + whitespace diff for pystate.c . The objective of the patch is only 
to have _current_frames report the correct frame for any live thread. It 
continues to report dead threads' frames, up until they would conflict with a 
live thread. IMO it's the minimal possible fix for this aspect of the bug, and 
suitable for 2.7.x. Let me know what you think.

--
Added file: http://bugs.python.org/file39564/_current_frames_27_setdefault.diff

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



[issue7094] Add alternate float formatting styles to new-style formatting.

2015-05-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

New features only go in new versions.

--

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



[issue24326] Audioop: weightB not divided by GCD, weightA divided twice

2015-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 800a55c20b56 by Serhiy Storchaka in branch '3.4':
Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
https://hg.python.org/cpython/rev/800a55c20b56

New changeset 418ab34fd1ce by Serhiy Storchaka in branch '2.7':
Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
https://hg.python.org/cpython/rev/418ab34fd1ce

New changeset fc85a384b16c by Serhiy Storchaka in branch '3.5':
Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
https://hg.python.org/cpython/rev/fc85a384b16c

New changeset 1acb6c88b901 by Serhiy Storchaka in branch 'default':
Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
https://hg.python.org/cpython/rev/1acb6c88b901

--
nosy: +python-dev

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



[issue24328] Extension modules with single-letter names can't be loaded

2015-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 784f372d701a by Benjamin Peterson in branch '3.5':
fix importing one char extension modules (closes #24328)
https://hg.python.org/cpython/rev/784f372d701a

New changeset d89bab1f160e by Benjamin Peterson in branch 'default':
merge 3.5 (#24328)
https://hg.python.org/cpython/rev/d89bab1f160e

--
nosy: +python-dev
resolution:  - fixed
stage: commit review - resolved
status: open - closed

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



[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-29 Thread Martin Panter

Martin Panter added the comment:

For the record, the difference between Python 2 and 3 is probably a side effect 
of revision 050f0f7be11e. Python 2 copies data from the ExFileObject returned 
by extractfile(), while Python 3 copies directly from the underlying file.

The patches to the file reading class look good.

I would be a bit hesitant about the bit that reads all the file data in the 
next() method. I guess if someone had an uncompressed tar file with only a 
couple of large files, and they just wanted to list the file names or extract a 
small file at the end, reading all the data would have a significant impact. 
Perhaps there is a way to seek almost to the end, and then just read one byte 
or something.

Also, beware that according to the documentation, os.truncate() only supports 
Windows in 3.5+, so you might have to adjust the test if applying this to 3.4.

--

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-05-29 Thread Mike Frysinger

Mike Frysinger added the comment:

we hit this problem daily in Chromium OS's build farm because we use pid 
namespaces heavily

--

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


Added file: http://bugs.python.org/file39566/0813b1a88171.diff

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



[issue24325] Speedup types.coroutine()

2015-05-29 Thread Serhiy Storchaka

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


--
nosy: +larry
type:  - enhancement

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Eric Snow

Eric Snow added the comment:

@Jim, I believe I've addressed all the review comments that have indicate a 
risk.  I've also answered basically all the rest.  Thanks for the great review.

Unless there are any objections, I'll likely commit the patch in the next hour 
or two.

--

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e7af362b78df by Eric Snow in branch 'default':
Issue #16991: Add a C implementation of collections.OrderedDict.
https://hg.python.org/cpython/rev/e7af362b78df

--
nosy: +python-dev

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Eric Snow

Eric Snow added the comment:

Yep.  :)

--

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b85028c9d4b9 by Eric Snow in branch '3.5':
Issue #16991: Add a C implementation of collections.OrderedDict.
https://hg.python.org/cpython/rev/b85028c9d4b9

--

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

@Eric: I think you also want to commit it to 3.5

--

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



[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

2015-05-29 Thread Stefan Behnel

Stefan Behnel added the comment:

IMHO less clear and less correct than the previous suggestions.

--

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Eric Snow

Eric Snow added the comment:

I'll keep an eye out for trouble on the buildbots.

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

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



[issue23509] Speed up Counter operators

2015-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fe4efc0032b5 by Raymond Hettinger in branch '3.5':
Issue #23509: Speed up Counter operators
https://hg.python.org/cpython/rev/fe4efc0032b5

--

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PyObject_TypeCheck() should be used instead of PyObject_IsInstance() (see 
issue24257).

Perhaps Py_ODict_GetItemId() should be private API as relevant dict function.

--
status: pending - open

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



[issue24330] Configure Idle not in Options

2015-05-29 Thread yellow

New submission from yellow:

Configure Idle not in Options
No solution found online
Running OSX 10.10.3

--
components: Macintosh
messages: 23
nosy: Yellow, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Configure Idle not in Options
versions: Python 2.7

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



[issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation

2015-05-29 Thread Stefan Behnel

Stefan Behnel added the comment:

Seems like a good idea to explain text and tail in one section, though. 
That makes tail easier to find for those who are not used to this kind of 
split (and that's basically everyone who needs to read the docs in the first 
place).

--

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



[issue24326] Audioop: weightB not divided by GCD, weightA divided twice

2015-05-29 Thread David Moore

New submission from David Moore:

Hi - 

During a code review of Modules/audioop.c I noted that weightB is never divided 
by the GCD while weightA is divided twice. This is contrary to the comment and 
appears to be a bug:

/* divide weightA and weightB by their greatest common divisor */
d = gcd(weightA, weightB);
weightA /= d;
weightA /= d;

The patch file below (hg diff) fixes this issue.

--
components: Extension Modules
files: audioop.patch
keywords: patch
messages: 244392
nosy: David Moore
priority: normal
severity: normal
status: open
title: Audioop: weightB not divided by GCD, weightA divided twice
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file39549/audioop.patch

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



[issue24327] yield unpacking

2015-05-29 Thread Ethan Furman

Ethan Furman added the comment:

Do you mean something like:

-- def heh():
...   yield [1, 2, 3]
... 
-- for i in heh():
...   print(i)
... 
[1, 2, 3]
# *grumble*
-- def heh():
...   for i in [1, 2, 3]:
... yield i
... 
-- for i in heh():
...   print(i)
... 
1
2
3


If so, use `yield from`:

-- def huh():
...   yield from [1, 2, 3]
... 
-- for i in huh():
...   print(i)
... 
1
2
3

--
nosy: +ethan.furman

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



[issue24326] Audioop: weightB not divided by GCD, weightA divided twice

2015-05-29 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka
stage:  - patch review
versions: +Python 2.7, Python 3.4, Python 3.5

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Eric Snow

Eric Snow added the comment:

Planning on committing today after I address some review comments.

--

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Wes Turner

Wes Turner added the comment:

 * Would this make it easy/faster to also have a DefaultOrderedDict (which
can/could also be accomplished with .get(attr, []) and .setdefault ?
On May 29, 2015 2:39 PM, Eric Snow rep...@bugs.python.org wrote:


 Eric Snow added the comment:

 Planning on committing today after I address some review comments.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue16991
 ___


--

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Yury Selivanov

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


--
resolution: fixed - 
status: closed - open

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



[issue24329] __qualname__ and __slots__

2015-05-29 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

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



[issue24270] PEP 485 (math.isclose) implementation

2015-05-29 Thread Tal Einat

Tal Einat added the comment:

It's Chris.Barker. I've added him to the nosy list.

--
nosy: +Chris.Barker

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



[issue24136] document PEP 448

2015-05-29 Thread Neil Girdhar

Neil Girdhar added the comment:

Simplified functools.partial documentation.

--
Added file: http://bugs.python.org/file39561/wn2.diff

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



[issue24136] document PEP 448

2015-05-29 Thread Neil Girdhar

Changes by Neil Girdhar mistersh...@gmail.com:


Added file: http://bugs.python.org/file39562/wn2.diff

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-29 Thread Petr Viktorin

Petr Viktorin added the comment:

I've opened issue24328 for that regression.

--

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



[issue24328] Extension modules with single-letter names can't be loaded

2015-05-29 Thread Petr Viktorin

New submission from Petr Viktorin:

A regression in the PEP 489 implementation prevents loading extension modules 
with single-character names (because length-1 bytestrings are interned).

Here is a fix. It would be great to have it in 3.5.0b2.

--
files: fix-short-names.patch
keywords: patch
messages: 244403
nosy: brett.cannon, encukou, eric.snow, ncoghlan
priority: normal
severity: normal
status: open
title: Extension modules with single-letter names can't be loaded
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39554/fix-short-names.patch

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-29 Thread Petr Viktorin

Petr Viktorin added the comment:

And, the remaining refleak is a known issue from 2012: PyType_FromSpec-created 
types with custom tp_dealloc leak references when instantiated.
See issue 16690
There's more discussion is in issue 15653

Martin v. Löwis notes:
 So I'd propose that it is actually the leaf subtype which decrefs
 ob_type. The check whether you are the leaf type is then done by
 checking whether tp_dealloc is the one you are in right now.

Is that really the way to go? I didn't find this info in the docs, should those 
be updated?

--

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



[issue24147] Dialect class defaults are not documented.

2015-05-29 Thread Mik

Mik added the comment:

I think it's clearer that way. Thank you.

--

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

Updated patch. Wrapper now proxies gi_code, gi_running and gi_frame

--
Added file: http://bugs.python.org/file39555/types_coroutine.patch

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



[issue24328] Extension modules with single-letter names can't be loaded

2015-05-29 Thread R. David Murray

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


--
priority: normal - release blocker
stage:  - commit review

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8080b53342e8 by Yury Selivanov in branch '3.5':
Issue 24316: Wrap gen objects returned from callables in types.coroutine
https://hg.python.org/cpython/rev/8080b53342e8

New changeset c0434ef75177 by Yury Selivanov in branch 'default':
Issue 24316: Wrap gen objects returned from callables in types.coroutine
https://hg.python.org/cpython/rev/c0434ef75177

--

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



[issue21297] csv.skipinitialspace only skips spaces, not whitespace in general

2015-05-29 Thread Brandon Milam

Changes by Brandon Milam jmilam...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file39560/csv_skipinitialspace_docfix.patch

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



[issue21297] csv.skipinitialspace only skips spaces, not whitespace in general

2015-05-29 Thread Brandon Milam

Changes by Brandon Milam jmilam...@gmail.com:


Added file: http://bugs.python.org/file39559/csv_skipinitialspace_testing.csv

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



[issue21297] csv.skipinitialspace only skips spaces, not whitespace in general

2015-05-29 Thread Brandon Milam

Brandon Milam added the comment:

This code shows what Daniel Andersson was talking about. I changed the 
whitespace references in the documentation that Daniel mentioned to say 
spaces. Also I changed ignore space at the start of the field to ignore 
spaces at the start of the field due to Terry's confusion.

Let me know of any errors or extra changes that are needed.

--
nosy: +jbmilam
Added file: http://bugs.python.org/file39558/csv_skipinitialspace_testing.py

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



[issue24147] Dialect class defaults are not documented.

2015-05-29 Thread Brandon Milam

Brandon Milam added the comment:

Here I added on to the Dialects and Formatting Parameters paragraph explaining 
that the defaults listed are for the excel dialect and that all the attributes 
need to be specified if the user is wanting to create custom dialects through 
sub-classing. I will also include the html file this produces for those who do 
not want to look at the .rst file.

Also I can go in and change the defaults of the Dialect class on the parameters 
that expect Boolean values if desired but I would open a separate issue for it. 

Let me know if there are any errors or desired changes in document change.

--
keywords: +patch
Added file: http://bugs.python.org/file39552/csv_dialect_doc_clarify.patch

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Stefan Behnel

Stefan Behnel added the comment:

Ok, now the problem with *this* patch is that __iter__ and __await__ are 
special methods that are being looked up on the type, not the instance. 
Similarly __next__, I think, as it also has its own (type) slot. But I think 
you're right that __next__ is also needed here.

I'm attaching a patch that works for me.

--
Added file: http://bugs.python.org/file39556/types_coroutine.patch

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

 I'm attaching a patch that works for me.

Looks like we were working in parallel ;)  I've incorporated your changes.  
Please look at the new patch (hopefully this one is final)

--
Added file: http://bugs.python.org/file39557/types_coroutine.patch

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



[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2015-05-29 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

I don't know what problems I might have run into previously, but it's working 
now and seems fine to me.  +1

--
nosy: +barry

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



[issue24329] __qualname__ and __slots__

2015-05-29 Thread Yury Selivanov

New submission from Yury Selivanov:

The following code doesn't work.  Would be great if we can fix it in 3.5

class Foo:
__slots__ = ('__qualname__',)

--
components: Interpreter Core
messages: 244410
nosy: pitrou, yselivanov
priority: normal
severity: normal
status: open
title: __qualname__ and __slots__
versions: Python 3.5, Python 3.6

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Stefan Behnel

Stefan Behnel added the comment:

Your latest patch works for me.

--

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

Committed. Thanks, Stefan!

--
resolution:  - fixed
status: open - closed

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



[issue23810] Suboptimal stacklevel of deprecation warnings for formatter and imp modules

2015-05-29 Thread Brett Cannon

Brett Cannon added the comment:

Latest patch should work for Serhiy's needs by taking a container of names to 
compare against the filename instead of a single argument.

--
Added file: http://bugs.python.org/file39550/deprecated_module_stacklevel.diff

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



[issue16991] Add OrderedDict written in C

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

Can we merge this patch before new beta2? 
https://mail.python.org/pipermail/python-committers/2015-May/003410.html

--

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



[issue24147] Dialect class defaults are not documented.

2015-05-29 Thread Brandon Milam

Changes by Brandon Milam jmilam...@gmail.com:


Added file: http://bugs.python.org/file39553/csv.html

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



[issue24325] Speedup types.coroutine()

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

Attached is the second iteration of the patch.  Now, besides just speeding up 
types.coroutine() for pure python generator functions, it also provides a 
better wrapper around generator-like objects.

--
nosy: +scoder
Added file: http://bugs.python.org/file39563/types_coroutine_speedup.patch

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



[issue24316] Fix types.coroutine to accept objects from Cython

2015-05-29 Thread Yury Selivanov

Yury Selivanov added the comment:

Stefan, please take a look at this issue #24325 too.

--

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



[issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec

2015-05-29 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
nosy: +ncoghlan

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



[issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec

2015-05-29 Thread Nick Coghlan

Nick Coghlan added the comment:

The new test cases for PEP 489 (multi-phase extension module import) appear to 
be encountering this leak.

See issue 24268 for context.

--
nosy: +encukou

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



  1   2   >