[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-05-28 Thread Serhiy Storchaka

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


--
nosy: +larry

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24320
___
___
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-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 It looks like json doesn't check for __index__, and I wonder if it should.

I don't know. Simply, under 2.7, int64 inherits from int:

 np.int64.__mro__
(type 'numpy.int64', type 'numpy.signedinteger', type 'numpy.integer', 
type 'numpy.number', type 'numpy.generic', type 'int', type 'object')

while it doesn't under 3.x:

 np.int64.__mro__ 
(class 'numpy.int64', class 'numpy.signedinteger', class 'numpy.integer', 
class 'numpy.number', class 'numpy.generic', class 'object')

--
nosy: +pitrou
type: crash - enhancement
versions: +Python 3.6 -Python 3.4

___
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



[issue20126] sched doesn't handle events added after scheduler starts

2015-05-28 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Why would you not expect this to work in the first place? I'd think a 
relatively simple use case for schedulers is using a single thread to do the 
work of a Timer instead of spawning a thread for every Timer. In that sort of 
use case, the timer worker is constantly pulling tasks and other thread(s) 
are adding them; for an empty event queue, if thread A adds a task 'a' that 
delays for 10 minutes and thread B adds a task 'b' that delays for 1 minute, 
the time at which task 'b' executes changes dramatically based on which thread 
squeaks out a win on the race to insert into the scheduler queue. As long as 
task 'a' wins the race, a million other tasks could be scheduled to run before 
it, but all of them will be stuck behind task 'a' no matter their priority or 
delay.

It should be possible to fix this without too much trouble (and without polling 
loops), but it would require scheduler to remove the option to customize 
delayfunc; you'd change the scheduler's RLock to a Condition, have mutations to 
the event queue notify the Condition, and the run method would replace sleeping 
outside the locked scope with a wait w/timeout inside it.

The only thing blocking a fix for this is backwards compatibility. If people 
are okay with breaking that, I'll happily contribute a patch, but I want some 
indication of whether back compat can be sacrificed to make sched actually 
useful in threaded contexts.

--
nosy: +josh.r

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20126
___
___
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-28 Thread Mik

Mik added the comment:

Hi,

I have just read the documentation once again.

The problem is that it specifies that the default value for Dialect.doublequote 
is True :
quoteControls how instances of quotechar appearing inside a field should be 
themselves be quoted. When True, the character is doubled. When False, the 
escapechar is used as a prefix to the quotechar. It defaults to True./quote

So it is easy to understand that the class csv.Dialect implements this default 
value. Although the class Dialect default in the csv.reader calling is Excel 
and thus, implicitly, it is csv.excel the default class whose attributes are 
described in the above paragraph. 

It would be great in this case to describe the attributes of the base class 
Dialect or specify that all attributes must be settled when we subclass this.

Optionally it would be good that the code of CSV.Dialect be changed for really 
Boolean values. But the clarification of documentation is more important I 
think.

--

___
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



[issue23659] csv.register_dialect doc string

2015-05-28 Thread Brandon Milam

Brandon Milam added the comment:

I believe this was the requested change. Let me know if more was desired.

--
keywords: +patch
nosy: +jbmilam
Added file: 
http://bugs.python.org/file39540/register_dialect_docstring_fix.patch

___
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



[issue23659] csv.register_dialect doc string

2015-05-28 Thread Brandon Milam

Brandon Milam added the comment:

Sorry, I forgot an end parentheses in the doc string of the last patch.

--
Added file: 
http://bugs.python.org/file39541/register_dialect_docstring_fix.patch

___
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



[issue24147] Dialect class defaults are not documented.

2015-05-28 Thread Brandon Milam

Brandon Milam added the comment:

Hi all,

I've been looking at this bug and am ready to start putting in some work on it 
but I have some questions about what is wanting to be done. From what I can 
tell these are the possible tasks for this issue.

- Add to the docs under the dialect section the excel attributes vs. the 
dialect class attributes and explain how the excel dialect is the default and 
this is the functionality you'd be changing by creating a new dialect.

- Add code to make sure that a certain number of attributes are set before the 
dialect can be accessed. (Though this might be C code and not really a C 
programmer nor do I know where _Dialect is in the repository)

- Change the defaults in the dialects class because currently the documentation 
for double quote and skip initial space says that the default is False when 
in the code it is None. Also I did not find the strict dialect in the module 
at all. (maybe its part of that C code that I don't know how to find.

- Add an example to the documentation on sub-classing dialect under the example 
on registering a new dialect

If someone could clarify which of these is the desired direction for this issue 
it would be much appreciated.

--
nosy: +jbmilam

___
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



[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-05-28 Thread Eric Snow

Eric Snow added the comment:

Would we be okay fixing this in 3.5 as well?  I ask because I'm not familiar 
with the constraints we have on what pip is bundled.

--

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



[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-05-28 Thread Eric Snow

New submission from Eric Snow:

In issue #23911 I worked around a bug [1] in pkg_resources (setuptools) which 
caused test_venv to fail when I split out importlib._bootstrap_external.  That 
bug has now been fixed so we just(?) need to update the version of pip we're 
bundling and remove the hack I put in as a workaround (see msg242440).

[1] https://bitbucket.org/pypa/setuptools/issue/378

--
assignee: eric.snow
messages: 244350
nosy: brett.cannon, eric.snow, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Remove a now-unnecessary workaround from importlib._bootstrap.
versions: Python 3.6

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



[issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order

2015-05-28 Thread Josh Rosenberg

Josh Rosenberg added the comment:

sched has been around for a long time, but it's been useless for so many 
purposes that it *should* handle (completely unsafe in threaded contexts until 
3.3, still can't handle useful threaded scenarios today, e.g. scheduling tasks 
for short delays when draining the task queue, waiting on a task with a long 
delay, see #20126 ) that calling it acceptable is more about lack of available 
uses than acceptable design.

Saying don't schedule two events for the same time and priority if expect to 
cancel either of them is not a reasonable solution; the main reason to 
schedule two such events in that way would be to have the option to cancel one 
but not the other; as is, trying to cancel one will (pseudo-)randomly cancel 
either of them. I don't particularly care how it's fixed (though the proposed 
fix for #13451 seems like a good one), and the issue with changing event order 
isn't so important, but cancelling the wrong event is really bad.

--
nosy: +josh.r

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



[issue24306] Backport py.exe to 3.4

2015-05-28 Thread Mark Lawrence

Mark Lawrence added the comment:

I don't see removing the launcher as an option.  So how about do the backport 
and make certain it's well documented in the release notes and here 
https://docs.python.org/3/using/windows.html ?  If anyone has a better idea 
feel free to fire away.

--

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



[issue23906] poplib maxline behaviour may be wrong

2015-05-28 Thread Remy Blank

Changes by Remy Blank remy.bl...@pobox.com:


--
nosy: +rblank

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



[issue22095] Use of set_tunnel with default port results in incorrect post value in host header

2015-05-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3b6e0720a69d by Serhiy Storchaka in branch '2.7':
Issue #22095: Fixed HTTPConnection.set_tunnel with default port.  The port
https://hg.python.org/cpython/rev/3b6e0720a69d

--

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



[issue24297] Lib/symbol.py is out of sync with Grammar/Grammar

2015-05-28 Thread Yury Selivanov

Yury Selivanov added the comment:

Marius, thanks for reporting the bug and review!

--

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



[issue24297] Lib/symbol.py is out of sync with Grammar/Grammar

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



[issue11205] Evaluation order of dictionary display is different from reference manual.

2015-05-28 Thread Steve Dougherty

Steve Dougherty added the comment:

Anyone care to review issue11205-v3.patch ?

--

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



[issue22095] Use of set_tunnel with default port results in incorrect post value in host header

2015-05-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Backported to 2.7 because this is needed to support proxy with a port in 
urllib/urllib2 as documented. See issue24311.

--
versions: +Python 2.7

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



[issue23895] python socket module fails to build on Solaris when -zignore is in LDFLAGS

2015-05-28 Thread Alexander Pyhalov

Alexander Pyhalov added the comment:

We have similar patch here in OpenIndiana. The patch is correct.

--
nosy: +Alexander.Pyhalov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23895
___
___
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-28 Thread Tal Einat

Tal Einat added the comment:

@Stefan K.: I tend to agree, but still think that's a separate issue. 
math.isclose() certainly shouldn't be checking the type of its arguments.


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?

 float(10**999)
Traceback (most recent call last):
  File stdin, line 1, in module
OverflowError: int too large to convert to float

 math.isclose(10**999, 10**40)
Traceback (most recent call last):
  File stdin, line 1, in module
OverflowError: int too large to convert to float

--

___
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



[issue24318] Make profile-opt the default Make target?

2015-05-28 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Also FWIW, I setup a buildbot earlier this year building in profile-opt mode.

--

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



[issue24318] Make profile-opt the default Make target?

2015-05-28 Thread Gregory P. Smith

Gregory P. Smith added the comment:

The Makefile's default make all target is meant for developers and iterative 
development.

make profile-opt is not.

If anything, this issue should document it somewhere if we even have docs on 
how to make release builds of something.  Realistically Debian already uses 
profile-opt for its binary builds.  I _believe_ the rpm based distros do as 
well (but I haven't checked, someone else can confirm).  Anyone else not doing 
so, please look at what debian does:

make profile-opt PROFILE_TASK=...

where ... is regrtest.py given a test exclusion list of some of the longer 
running more annoying ones.

Not using a profile-opt builds in production is costing you ~10-40% in CPU 
performance.  This advice applies to all programs, not only python. :)

--
nosy: +gregory.p.smith

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



[issue24309] string.Template should be using str.format and/or deprecated

2015-05-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agree with Barry. And please note, that string.Template is not invented in 
Python, it is used in a lot of other languages, including shell, make, Tcl, 
Perl. One of the advantage is that these templates are cross-language.

--

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



[issue24318] Better documentaiton of profile-opt (and release builds in general?)

2015-05-28 Thread R. David Murray

R. David Murray added the comment:

Agreed with Greg, this should not be the default.  Changing title and component 
to reflect that better documentation is the goal here.

--
assignee:  - docs@python
components: +Documentation -Build
nosy: +docs@python, r.david.murray
stage:  - needs patch
title: Make profile-opt the default Make target? - Better documentaiton of 
profile-opt (and release builds in general?)
versions: +Python 3.4, Python 3.5 -Python 3.6

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



[issue24309] string.Template should be using str.format and/or deprecated

2015-05-28 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

So yeah, we don't want to deprecate string.Template.  It has a very specific 
use case that's used a lot, i.e. making strings dead simple to translate.  
%(foo)s was very problematic.  {foo} is a little better, but looks too weird 
for most translators.  $foo is very common, well understood, and hard to get 
wrong.

As for modernizing the code (the L146 bit was thanks to Python 2), I wouldn't 
be against it if it doesn't change the documented API or functionality and all 
the tests still pass (and there's good coverage - I don't remember anymore).  I 
don't think it's really that important though; typically these are not used in 
performance critical sections.

Re: ${thing.attribute} - no, that wouldn't keep them Simple and PEP 292 was 
deliberately targeting simplicity.

Bottom line: keep $-strings simple and focused on their original use case.  For 
more complicated use cases, use str.format().

--

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



[issue24309] string.Template should be using str.format and/or deprecated

2015-05-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 678a76610723 by Serhiy Storchaka in branch 'default':
Issue #24309: Removed Python 2 idioms.
https://hg.python.org/cpython/rev/678a76610723

--
nosy: +python-dev

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



[issue4753] Faster opcode dispatch on gcc

2015-05-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 17d3bbde60d2 by Benjamin Peterson in branch '2.7':
backport computed gotos (#4753)
https://hg.python.org/cpython/rev/17d3bbde60d2

--
nosy: +python-dev

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



[issue24297] Lib/symbol.py is out of sync with Grammar/Grammar

2015-05-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a95d0dd3c2b1 by Yury Selivanov in branch 'default':
Issue 24297: Add a unittest that Lib/symbol.py is in sync with Grammar
https://hg.python.org/cpython/rev/a95d0dd3c2b1

--

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



[issue11205] Evaluation order of dictionary display is different from reference manual.

2015-05-28 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I downloaded and tried to apply to 3.5 (then default) as it was last Saturday, 
before the .b1 cutoff.  Only ceval.py and test_compile.py patches worked.  
Everything else failed.  You need to update your repository (3.5 is now a 
branch and default is 3.6) and then the patch.

--

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



[issue11205] Evaluation order of dictionary display is different from reference manual.

2015-05-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6f05f83c7010 by Benjamin Peterson in branch '3.5':
in dict displays, evaluate the key before the value (closes #11205)
https://hg.python.org/cpython/rev/6f05f83c7010

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

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

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



[issue23895] python socket module fails to build on Solaris when -zignore is in LDFLAGS

2015-05-28 Thread Alexander Pyhalov

Alexander Pyhalov added the comment:

BTW, we use the following version for Python 3.4

--
Added file: http://bugs.python.org/file39539/socket.patch

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



[issue24318] Better documentaiton of profile-opt (and release builds in general?)

2015-05-28 Thread Skip Montanaro

Skip Montanaro added the comment:

Thanks. The doc change occurred to me while I was composing my ticket. It 
wasn't obvious at that time that profile-opt shouldn't be the default (though I 
was carrying on an email conversation with Greg at about the same time).

--

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



[issue24311] urllib2.urlopen() through proxy fails when HTTPS URL contains port number

2015-05-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your report Atzm.

--
assignee:  - serhiy.storchaka
resolution:  - duplicate
stage:  - resolved
status: open - closed
superseder:  - Use of set_tunnel with default port results in incorrect post 
value in host header
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24311
___
___
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-28 Thread Eric Snow

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


--
nosy: +benjamin.peterson

___
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



[issue10344] codecs.open() buffering doc needs fix

2015-05-28 Thread Martin Panter

Martin Panter added the comment:

A couple of specific problems have been raised by Terry here. Checking each 
against the current Python 3 status, some have already been fixed:

* The codecs.open() signature has been fixed in Issue 19548.

* The StreamReader.readline(size=...) parameter documentation has been fixed to 
match the docstring in Issue 18336.

So that leaves these three problems, as I see it:

1. The notice about opening in binary mode still needs fixing for encoding=None.

2. The buffering parameter is applied to the underlying builtins.open() call, 
so should be clarified in the documentation.

3. codecs.open(filename, encoding=...) will by default call 
builtins.open(filename, rb, buffering=1), which makes no sense according the 
the documentation.

--
nosy: +vadmium
stage:  - needs patch
title: codecs.StreamReader.readline doc needs fix - codecs.open() buffering 
doc needs fix

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



[issue10344] codecs.open() buffering doc needs fix

2015-05-28 Thread Antoine Pitrou

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


--
nosy:  -pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10344
___
___
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-28 Thread R. David Murray

R. David Murray added the comment:

Ah, so this is a numpy bug?

--

___
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



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

2015-05-28 Thread Devin Jeanpierre

Devin Jeanpierre added the comment:

This bug also affects 2.7. The main problem I'm dealing with is 
sys._current_frames will then return wrong stack frames for existing threads. 
One fix to just this would be to change how the dict is created, to keep newer 
threads rather than tossing them.

Alternatively, we could backport the 3.4 fix.

Thoughts?

--
nosy: +Devin Jeanpierre

___
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



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

2015-05-28 Thread Yury Selivanov

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


--
nosy: +yselivanov

___
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



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

2015-05-28 Thread whitequark

New submission from whitequark:

To reproduce in Python 3.4.2:

def f():
x = None
def g():
nonlocal x
try:
raise Exception()
except Exception as x:
pass
g()
# ↓ UnboundLocalError: local variable 'x' referenced before assignment
print(x, x)
f()

Compare this to:

def f():
x = None
def g():
nonlocal x
with open(/dev/null) as x:
pass
g()
print(x, x)
f()

(which prints: x _io.TextIOWrapper name='/dev/null' mode='r' encoding='UTF-8')

--
components: Interpreter Core
messages: 244356
nosy: whitequark
priority: normal
severity: normal
status: open
title: interaction of nonlocal and except leading to incorrect behavior
type: behavior
versions: Python 3.4

___
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



[issue23659] csv.register_dialect doc string

2015-05-28 Thread Berker Peksag

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


--
nosy: +berker.peksag
stage:  - patch review
versions: +Python 3.5, Python 3.6

___
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



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

2015-05-28 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
stage:  - resolved
status: open - closed

___
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



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

2015-05-28 Thread Martin Panter

Martin Panter added the comment:

The first example seems to behave as I would expect. The UnboundLocalError is 
raised by the print() call, because the “x” variable has been deleted by the 
exception handler. Equivalent code without using “nonlocal”:

 def f():
... x = None
... try:
... raise Exception()
... except Exception as x:
... pass
... print(x, x)  # UnboundLocal due to exception handler
... 
 f()
Traceback (most recent call last):
  File stdin, line 1, in module
  File stdin, line 7, in f
UnboundLocalError: local variable 'x' referenced before assignment

In both cases, I think this is correct behaviour. See 
https://docs.python.org/3.4/reference/compound_stmts.html#except, which says 
“When an exception has been assigned using ‘as target’, it is cleared at the 
end of the except clause.”

--
nosy: +vadmium
resolution:  - not a bug

___
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



[issue24314] irrelevant cross-link in documentation of user-defined functions

2015-05-28 Thread Martin Panter

Martin Panter added the comment:

I think the proper way to suppress the link is :attr:`!__name__`.

However I am posting a patch which takes a different approach. I tweaked some 
of the entries under 
https://docs.python.org/dev/library/stdtypes.html#special-attributes that 
also apply to functions, etc. I invented the pseudo class name “definition” for 
this; better suggestions are welcome!

Then I converted the user-defined functions reference, as well as many other 
references, to :attr:`~definition.__name__` or similar, for these three 
attributes:

* definition.__name__
* definition.__qualname__
* object.__dict__

I also moved the index markup so that the index entries for the table of 
function attributes work.

--
keywords: +patch
nosy: +vadmium
stage:  - patch review
Added file: http://bugs.python.org/file39542/special-attr.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24314
___
___
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-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, it looks as a bug (or rather lack of feature) in numpy, but numpy have no 
chance to fix it without help from Python. The json module is not flexible 
enough.

For now this issue can be workarounded only from user side, with special 
default handler.

 import numpy, json
 def default(o):
... if isinstance(o, numpy.integer): return int(o)
... raise TypeError
... 
 json.dumps({'value': numpy.int64(42)}, default=default)
'{value: 42}'

--
nosy: +serhiy.storchaka

___
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



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

2015-05-28 Thread Lars Gustäbel

Lars Gustäbel added the comment:

I have written a test for the issue, so that we have a basis for discussion.

There are four different scenarios where an unexpected eof can occur: inside a 
metadata block, directly after a metadata block, inside a data segment or 
directly after a data segment (i.e. missing end of archive marker).

Case #1 is taken care of (TruncatedHeaderError).

Case #4 is merely a violation of standard, which is neglectable.

Case #2 and #3 are essentially the same. If a data segment is empty or 
incomplete this means data was lost when the archive was created which should 
not go unnoticed when reading it. (see _FileInFile.read() for the code in 
question)

The problem is that, even after we have fixed case #2 and #4, we have no 
reliable way to detect an incomplete data segment unless we read it and count 
the bytes. If we simply iterate over the TarFile (e.g. do a TarFile.list()) the 
archive will appear intact. That is because in the TarFile.next() method we 
seek from one metadata block to the next, but we cannot simply detect if we 
seek beyond the end of the archive - except if we insist on the premise that 
each tar that we read is standards-compliant and comes with an end of archive 
marker (see case #4), which we probably should not.

Three possible options come to my mind:

1. Add a warning to the documentation that in order to test the integrity of an 
archive the user has to read through all the data segments.
2. Instead of using seek() in TarFile.next() use read() to advance the file 
pointer. This is a negative impact on the performance in most cases.
3. Insist on an end of archive marker. This has the disadvantage that users may 
get an exception although everything is fine.

--
assignee:  - lars.gustaebel
keywords: +patch
Added file: http://bugs.python.org/file39528/01-issue24259-test.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



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

2015-05-28 Thread Stefan Behnel

Stefan Behnel added the comment:

 Yield-from iterates, and a coroutine is not supposed to be iterable, only 
 awaitable (at least, that's what all error messages tell me when I try it). 
 So why should yield from work on them? What if foo() was not an Iterable 
 but a Coroutine? Should yield from then call __await__ on it internally? 
 I would find that *really* surprising, but given the above, I think it would 
 be necessary to achieve consistency.
 
 This is a special backwards-compatibility thing.

That only answers the half-serious first part of my question. ;)

This code only works if foo() returns an Iterable, including a (yield)
coroutine:

@types.coroutine
def bar():
return (yield from foo())

It does not work for arbitrary Coroutines as they are not iterable, but it
might trick people into writing code that fails for non-coroutine
Coroutines. I'd rather like to have this either work for any Coroutine or
not at all.

--

___
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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-05-28 Thread Nathaniel Smith

Nathaniel Smith added the comment:

There isn't really any magic in how warnings work. Basically someone calls 
warnings.warn(...), which is a regular Python function, and it gathers up some 
information about the specific warning message and calling context, checks a 
global variable (warnings.filters) to decide how this message in this context 
should be handled, and then either does nothing, prints something to stderr, or 
raises an exception.

There are lots of warnings that are printed by default, and I'm sure IDLE is 
handling them fine already. It's just (Pending)DeprecationWarnings in 
particular that have an entry stuck into warnings.filters saying please ignore 
these (unless it gets overridden by something else).

So you just need to make sure that a filter is added to warnings.filters that 
says to treat DeprecationWarnings generated by the __main__ module using the 
default action. (default is the name of a specific way of handling 
warnings; for most types of warnings, the default handler is the one named 
default, but for DeprecationWarning, the default handler is the one named 
ignore. Obvious, right?)

So you just need to make sure to run the following line of code somewhere in 
the user process:

warnings.filterwarnings(default, category=DeprecationWarning, 
module=__main__)

Adjust as necessary if (a) you want to apply similar handling to 
PendingDeprecationWarning, (b) your user namespace has some value of __name__ 
that is different from __main__.

Then to test, you can just type

warnings.warn(foo, DeprecationWarning)

at the prompt, and it should be printed.

Note that because the warnings module tries to suppress duplicate warnings 
(which is good), and it has a bug where it can't tell the difference between 
different lines of code at the REPL (this is bad -- see 
https://github.com/ipython/ipython/issues/6611 , and there should probably be a 
python bug too but I haven't gotten around to filing it), then the *second* 
time you run that line of code in the same REPL, nothing will be printed. So 
the moral is just, when testing this, make sure you use a different warning 
message each time, or you'll get very confused.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24294
___
___
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-28 Thread Matěj Stuchlík

Changes by Matěj Stuchlík matej.stuch...@gmail.com:


--
nosy: +sYnfo

___
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



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

2015-05-28 Thread Stefan Behnel

Stefan Behnel added the comment:

BTW, given that iter(iterator) works and returns the iterator, should we also 
allow await x.__await__() to work? I guess that would be tricky to achieve 
given that __await__() is only required to return any kind of arbitrary 
Iterator, and Iterators cannot be awaited due to deliberate restrictions. But 
it might be nice to have for wrapping purposes.

--

___
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



[issue24308] Test failure: test_with_pip (test.test_venv.EnsurePipTest in 3.x

2015-05-28 Thread Martin Panter

Martin Panter added the comment:

Are you sure if fails since those revisions, or is _fixed_ by those revisions? 
See my initial report in Issue 24267. For me this test started failing a few 
weeks ago, and was fixed by updating to revision 29b95625a07c (“Merge 3.4 into 
default, upgrading pip to 7.0.1”).

--
nosy: +vadmium

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24308
___
___
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-28 Thread Stefan Behnel

Stefan Behnel added the comment:

 Can't your Coroutine object return itself from its __await__, and implement 
 __next__?  Like genobject in CPython simply returns self from its __iter__.

That was my first try, sure, and it mostly worked. It has a drawback,
though: it's an incomplete implementation of the Iterator protocol. It's
still (mostly) an Iterator, but not an Iterable, so it depends on how you
use it whether you notice or not, and whether it works at all with other
code or not. There's a test for a failing next(coro) in your test suite,
for example, which would then not fail in Cython. OTOH, code cannot assume
that calling iter() or for-looping over on an Iterable is a sane thing to
do, because it doesn't work for Python's generator type based coroutine
either, so we might get away with it...

All of these little details make this trick appear like a potential source
of subtle inconsistencies or incompatibilities. But given that there will
almost certainly remain inconsistencies for compiled Python code, I'm not
sure yet which approach is better. It's not impossible that I'll end up
going back to the original design. I guess I'll eventually have to include
some benchmarks in the decision.

On a related note, my testing made me stumble over this code in
asyncio.tasks.Task():

if coro.__class__ is types.GeneratorType:
self._coro = coro
else:
self._coro = iter(coro)  # Use the iterator just in case.

This seems wrong regardless of how you look at it. And it definitely fails
with both designs.

--

___
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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-05-28 Thread Terry J. Reedy

Terry J. Reedy added the comment:

For Idle, the addition could be made in current versions. Idle compiles user 
code in the idle process and ships it to the user process for execution.  In 
particular, idlelib.run.Executive.runcode, line 351, is
exec(code, self.locals)
Am I to presume that a) the warnings that you want to display will escape the 
exec call and that b) they are currently being caught at the module level and 
c) that the filterwarnings line or lines would do what you want if added to 
run.main, such as at line 104?  Do warnings from python code and user code get 
treated the same?

Please post test cases to enter by hand, both at the prompt and in the editor, 
to get system warnings for 2.7 and 3.4 or 3.5. Also, please copy the positive 
and negative examples you posted to python-ideas.

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24294
___
___
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-28 Thread Dirkjan Ochtman

Changes by Dirkjan Ochtman dirk...@ochtman.nl:


--
nosy: +djc

___
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



[issue24312] miniDOM._write_data() give a vague error message when the argument isn't of type str

2015-05-28 Thread Oz Tamir

New submission from Oz Tamir:

In Python 3.3, 3.4 and on 3.6.0a0 (default:dfe62f685538) the following snippet:

 from xml.dom.minidom import getDOMImplementation
 doc = getDOMImplementation().createDocument(None, 'Issues Tracker', None)
 tracker = doc.documentElement
 new_issue = doc.createElement('issue')
 new_issue.setAttribute('id', 10)
 tracker.appendChild(new_issue)
 with open('file.xml', 'w') as f:
... doc.writexml(f, addindent='\t', newl='\n')


will produce the following exception:
[Traceback]
AttributeError: 'int' object has no attribute 'replace'

which I found to be vague and rather confusing.

--
components: XML
messages: 244283
nosy: oz.tamir
priority: normal
severity: normal
status: open
title: miniDOM._write_data() give a vague error message when the argument isn't 
of type str
type: behavior
versions: Python 3.3, Python 3.4, Python 3.6

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



[issue24312] miniDOM._write_data() give a vague error message when the argument isn't of type str

2015-05-28 Thread Oz Tamir

Oz Tamir added the comment:

I created a patch that will raise a TypeError when _write_data() has recvived 
an argument that is not a str.

I found this exception and the error message it provide to be more straight 
forward and helpful when encountering this error.

--
keywords: +patch
Added file: http://bugs.python.org/file39529/issue24312.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24312
___
___
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-28 Thread Martin Panter

Martin Panter added the comment:

If you are already seeking in the file, can’t you seek to the end to determine 
the length of the file, and then use that to verify if a data segment is 
truncated? And if you can’t seek, I guess you have to read all the bytes anyway.

I guess Ethan’s test was an instance of case #4 (EOF directly after data block).

--

___
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



[issue24311] urllib2.urlopen() through proxy fails when HTTPS URL contains port number

2015-05-28 Thread Atzm WATANABE

New submission from Atzm WATANABE:

urllib2.urlopen() through proxy causes ssl.CertificateError when HTTPS URL 
contains port number.

Sample code:

$ https_proxy='http://proxy.example.com:8080/' python -c 'import urllib2; 
urllib2.urlopen(https://www.python.org:443/;)'
Traceback (most recent call last):
  File string, line 1, in module
  File /path/to/lib/python2.7/urllib2.py, line 154, in urlopen
return opener.open(url, data, timeout)
  File /path/to/lib/python2.7/urllib2.py, line 431, in open
response = self._open(req, data)
  File /path/to/lib/python2.7/urllib2.py, line 449, in _open
'_open', req)
  File /path/to/lib/python2.7/urllib2.py, line 409, in _call_chain
result = func(*args)
  File /path/to/lib/python2.7/urllib2.py, line 1240, in https_open
context=self._context)
  File /path/to/lib/python2.7/urllib2.py, line 1194, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
  File /path/to/lib/python2.7/httplib.py, line 1053, in request
self._send_request(method, url, body, headers)
  File /path/to/lib/python2.7/httplib.py, line 1093, in _send_request
self.endheaders(body)
  File /path/to/lib/python2.7/httplib.py, line 1049, in endheaders
self._send_output(message_body)
  File /path/to/lib/python2.7/httplib.py, line 893, in _send_output
self.send(msg)
  File /path/to/lib/python2.7/httplib.py, line 855, in send
self.connect()
  File /path/to/lib/python2.7/httplib.py, line 1274, in connect
server_hostname=server_hostname)
  File /path/to/lib/python2.7/ssl.py, line 352, in wrap_socket
_context=self)
  File /path/to/lib/python2.7/ssl.py, line 579, in __init__
self.do_handshake()
  File /path/to/lib/python2.7/ssl.py, line 816, in do_handshake
match_hostname(self.getpeercert(), self.server_hostname)
  File /path/to/lib/python2.7/ssl.py, line 271, in match_hostname
% (hostname, ', '.join(map(repr, dnsnames
ssl.CertificateError: hostname 'www.python.org:443' doesn't match either of 
'www.python.org', 'python.org', 'pypi.python.org', 'docs.python.org', 
'testpypi.python.org', 'bugs.python.org', 'wiki.python.org', 'hg.python.org', 
'mail.python.org', 'packaging.python.org', 'pythonhosted.org', 
'www.pythonhosted.org', 'test.pythonhosted.org', 'us.pycon.org', 'id.python.org'

This problem seems to be caused because urllib2.AbstractHTTPHandler.do_open() 
calls httplib.HTTPSConnection.set_tunnel() without splitting hostname and port 
number.

To fix this problem, I suggest applying the patch posted in issue 
https://bugs.python.org/issue22095 .
This problem looks serious because it means we cannot access HTTPS using 
various port number at restricted environment (e.g. under the firewall).

--
components: Library (Lib)
messages: 244277
nosy: atzm
priority: normal
severity: normal
status: open
title: urllib2.urlopen() through proxy fails when HTTPS URL contains port number
versions: Python 2.7

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-05-28 Thread Nathaniel Smith

Nathaniel Smith added the comment:

Okay, that sounds reasonable to me.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24294
___
___
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-28 Thread Tal Einat

Tal Einat added the comment:

Hopefully final patch attached. This adds cmath.isclose() along with relevant 
tests and documentation.

Note that cmath.isclose() rejects complex tolerances -- only the values may be 
complex.

--
Added file: http://bugs.python.org/file39532/isclose.patch

___
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



[issue24270] PEP 485 (math.isclose) implementation

2015-05-28 Thread Stefan Krah

Stefan Krah added the comment:

I think users may be surprised that any two large Decimals like
1e40 and 1e999 are close.  In the Decimal world these
aren't infinite.

--
nosy: +skrah

___
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



[issue24311] urllib2.urlopen() through proxy fails when HTTPS URL contains port number

2015-05-28 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24311
___
___
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-28 Thread Paul Moore

Paul Moore added the comment:

Looks OK to me.

I assume the differences between the math and cmath code and tests is because 
cmath uses Argument Clinic and math doesn't, and cmath uses unittest.main 
whereas math adds the suites manually? As far as I can see, that's what's going 
on.

--
nosy: +paul.moore

___
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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-05-28 Thread Florian Bruhin

Changes by Florian Bruhin python@the-compiler.org:


--
nosy: +The Compiler

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24294
___
___
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-28 Thread Tal Einat

Tal Einat added the comment:

Indeed, those are major reasons for differences.

I avoided using Argument Clinic for math.isclose() because there is a pending 
conversion patch for the entire math module and I didn't want to cause 
unnecessary merge conflicts.

Is Paul's okay enough for me to commit this, or should we also get an okay from 
one of the three people listed next to the math module on the experts index?

--

___
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



[issue8232] webbrowser.open incomplete on Windows

2015-05-28 Thread Brandon Milam

Brandon Milam added the comment:

I went ahead and took the assert statement out and added support for vista 
using a union of sets for both the 32 bit and 64 bit locations.

--
Added file: http://bugs.python.org/file39533/webbrowserfix3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8232
___
___
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-28 Thread Arfrever Frehtes Taifersar Arahesis

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


--
nosy: +Arfrever

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



[issue24312] miniDOM._write_data() give a vague error message when the argument isn't of type str

2015-05-28 Thread Eric V. Smith

Eric V. Smith added the comment:

As a rule, we don't put in checks like this. There are an untold number of 
places where such checks could be added. I suspect the new typing module will 
be a better way to catch these types of errors.

Does the problem not occur with 3.5?

--
nosy: +eric.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24312
___
___
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-28 Thread Brett Cannon

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


--
nosy: +brett.cannon

___
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



[issue24314] irrelevant cross-link in documentation of user-defined functions

2015-05-28 Thread July Tikhonov

New submission from July Tikhonov:

https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy

There is a table of special attributes of user-defined functions. The 
__name__ attribute name is a link, but it leads to something quite irrelevant: 
the description of __name__ attribute of imported modules.

In Doc/reference/datamodel.rst, there is nothing special about __name__ 
attribute, so it looks like some random spasm of Sphinx creating links here and 
there. My knowledge of rst is not sufficient to suppress it.

--
assignee: docs@python
components: Documentation
messages: 244301
nosy: docs@python, july
priority: normal
severity: normal
status: open
title: irrelevant cross-link in documentation of user-defined functions
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24314
___
___
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-28 Thread Brett Cannon

Brett Cannon added the comment:

My personal plan was to get issue #23810 finished, make sure it worked, and 
then expose a public API for declaring module deprecations which used the 
private API under the hood. I'm hoping to get #23810 done this Friday and then 
we can talk about how we may want to expose a function in the warnings module 
for deprecating modules.

--

___
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



[issue8232] webbrowser.open incomplete on Windows

2015-05-28 Thread Brandon Milam

Brandon Milam added the comment:

On second thought no type testing is required if sets are used because the 
union will take out duplicates anyways and so I removed the type testing and 
left in the set union code.

--
Added file: http://bugs.python.org/file39534/webbrowserfix3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8232
___
___
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-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dfa0288c91fd by Yury Selivanov in branch '3.5':
Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc.
https://hg.python.org/cpython/rev/dfa0288c91fd

New changeset 99dcca3466d3 by Yury Selivanov in branch 'default':
Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc.
https://hg.python.org/cpython/rev/99dcca3466d3

--

___
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



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

2015-05-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 09327f653ec5 by Yury Selivanov in branch '3.4':
asyncio: Drop some useless code from tasks.py.
https://hg.python.org/cpython/rev/09327f653ec5

New changeset adf72cffceb7 by Yury Selivanov in branch '3.5':
asyncio: Drop some useless code from tasks.py.
https://hg.python.org/cpython/rev/adf72cffceb7

New changeset 9c0a00247021 by Yury Selivanov in branch 'default':
asyncio: Drop some useless code from tasks.py.
https://hg.python.org/cpython/rev/9c0a00247021

--

___
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



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

2015-05-28 Thread Eric Snow

Eric Snow added the comment:

I had a similar concern, Nick, but don't think I did anything that would have 
broken the frame hiding logic.  That said, I did not take stacklevel for 
warnings into account.

--
nosy: +eric.snow

___
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



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

2015-05-28 Thread Yury Selivanov

New submission from Yury Selivanov:

See issue 24017 for details.

--
assignee: yselivanov
components: Library (Lib)
files: abcs.patch
keywords: patch
messages: 244305
nosy: gvanrossum, ncoghlan, scoder, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: collections.abc: Coroutine should be derived from Awaitable
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39535/abcs.patch

___
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



[issue24312] miniDOM._write_data() give a vague error message when the argument isn't of type str

2015-05-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agree with Eric. And the error message doesn't look lying.

--
nosy: +serhiy.storchaka
resolution:  - rejected
stage:  - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24312
___
___
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-28 Thread Yury Selivanov

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


--
dependencies: +collections.abc: Coroutine should be derived from Awaitable

___
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-28 Thread Yury Selivanov

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


--
dependencies: +collections.abc: Coroutine should be derived from Awaitable

___
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-28 Thread Yury Selivanov

New submission from Yury Selivanov:

Stefan,

This patch should solve the problem with types.coroutine accepting only pure 
python generator functions.

The approach is, however, slightly different from what you've proposed.  
Instead of having a wrapper class (delegating .throw, .send etc to a wrapped 
object), we now simply check if the returned value of the wrapped function is 
an instance of collections.abc.Coroutine.  Issue 24315 enables duck typing for 
coroutines, so if a cython-based coroutine implements all coroutine abstract 
methods, it will automatically pass types.coroutine.

--
assignee: yselivanov
components: Library (Lib)
files: coroutine.patch
keywords: patch
messages: 244315
nosy: gvanrossum, ncoghlan, scoder, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: Fix types.coroutine to accept objects from Cython
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39536/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



[issue24317] Change installer Customize default to match quick settings

2015-05-28 Thread Steve Dower

New submission from Steve Dower:

(This is a reminder to myself, unless someone gets a patch in sooner than I get 
to it.)

Currently if you click Customize in the installer and then Next/Install 
without changing any settings, you get a default per-machine installation. 
However, if you click the Install Now button at the start, you get a default 
per-user installation.

The customize settings default should be changed to do a per-user install. We 
also need logic in the BA to enable Precompile Standard Library automatically 
when the all-users setting is enabled, otherwise people will miss that option.

--
assignee: steve.dower
components: Windows
messages: 244316
nosy: steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Change installer Customize default to match quick settings
type: behavior
versions: Python 3.5, Python 3.6

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



[issue24318] Make profile-opt the default Make target?

2015-05-28 Thread Skip Montanaro

New submission from Skip Montanaro:

In a discussion on python-ideas about some computed goto stuff, Greg Smith 
brought up compilation with profile-opt, which I'd never heard of. I asked 
Greg about it and he enlightened me. Looking around, I saw no mention of this 
make target except in the Makefile itself, and a small what's new note for 
Python 2.6. I was only looking on the 2.7 branch, but aside from a bug fix 
mention in Misc/NEWS for Python 3.4, it doesn't seem to feature more 
prominently there.

It would seem to be stable. Should it perhaps be the default when available 
(presuming the proper configure tests can be written)? Alternatively, it could 
be featured more prominently in the build instructions. I've attached a simple 
patch to README for that.

--
components: Build
files: README.diff
keywords: easy, patch
messages: 244317
nosy: skip.montanaro
priority: normal
severity: normal
status: open
title: Make profile-opt the default Make target?
versions: Python 2.7, Python 3.6
Added file: http://bugs.python.org/file39537/README.diff

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



[issue23895] python socket module fails to build on Solaris when -zignore is in LDFLAGS

2015-05-28 Thread Andrew Stormont

Andrew Stormont added the comment:

The -z ignore option is actually exposing issues that could cause a problem at 
runtime.  If the socket module were imported and libsocket/libnsl hadn't 
already been loaded (i.e pulled in by the loader as a dependency of another 
module) the loader would fail due to unresolved symbols.

This problem would not effect Linux because all of the socket stuff is in libc, 
which is not the case on Solaris.  Today it doesn't cause a problem because 
most other things are already pulling in libsocket and libnsl before the socket 
module is loaded, but there's no guarantee that will always be the case.

For the sake of correctness it should be fixed, and I would suggest later 
making -z ignore the default on Solaris.

I will see if I can find somebody else to review the patch.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23895
___
___
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-28 Thread Yury Selivanov

Yury Selivanov added the comment:

Stefan,


I've already committed fixes for:

1. getawaitablefunc / aiternextfunc / getaiterfunc - unaryfunc
2. strange code in tasks.py doing coro = iter(coro) is now removed


I've also opened a couple of new issues (with patches for a review):

1. abc.Coroutine derived from abc.Awaitable: issue 24315
2. types.coroutine() to support Cython objects: issue 24316


I'll reply to some of your messages below:

 Another question: is it ok if Cython implements and uses the tp_as_async 
 slot in all Py3.x versions (3.2+)? It shouldn't hurt, [..]

I think it's totally OK, given that you can workaround the drawback you 
mentioned.


 Can't your Coroutine object return itself from its __await__, and implement 
 __next__?  Like genobject in CPython simply returns self from its __iter__.

 That was my first try, sure, and it mostly worked. It has a drawback,
 though: it's an incomplete implementation of the Iterator protocol. It's
 still (mostly) an Iterator, but not an Iterable, so it depends on how you
 use it whether you notice or not, and whether it works at all with other
 code or not. There's a test for a failing next(coro) in your test suite,
 for example, which would then not fail in Cython. [..]

I think if next(cython_coro) does not fail is acceptable.  It's not ideal, but
the purpose of Cython is to make Python code as fast as possible, so I'd try
to avoid having any kind of thin wrappers around Cyhton coroutines.

--
dependencies: +Fix types.coroutine to accept objects from Cython

___
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



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

2015-05-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It would be better to skip _frozen_importlib frames automatically instead of 
forcing end users to use special API.

--
nosy: +serhiy.storchaka

___
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



[issue18233] SSLSocket.getpeercertchain()

2015-05-28 Thread Dustin Oprea

Dustin Oprea added the comment:

Forget it. This project is dead.

Dustin
On May 28, 2015 11:58 AM, Jeroen Ruigrok van der Werven 
rep...@bugs.python.org wrote:


 Jeroen Ruigrok van der Werven added the comment:

 Given that cryptography.io is fast becoming the solution for dealing with
 X.509 certificates on Python, I would like to add my vote to add my vote
 for this feature. Right now, getting the full chain in DER is what I am
 missing to complete a task at work.

 --
 nosy: +asmodai

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


--

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



[issue18233] SSLSocket.getpeercertchain()

2015-05-28 Thread Dustin Oprea

Dustin Oprea added the comment:

Disregard. I thought this was something else.

--

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



[issue23903] Generate PC/python3.def by scraping headers

2015-05-28 Thread Steve Dower

Steve Dower added the comment:

It might be nice to have a test that tries to import all of the stable ABI at 
build time so that the buildbots break if someone adds a new API and doesn't 
think about what they've done.

As an aside, it'd be nice for the script to take the version numbers as args so 
we can integrate it into the MSBuild steps (which already know the version) and 
avoid having to update this each time we update the Python version.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23903
___
___
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-28 Thread Stefan Krah

Stefan Krah added the comment:

 It's inherently floating point based.

Except for floor() and ceil() though.  The wording in the PEP
under non-float types made me think that something similar
was intended here.

Personally I'm fine with math being float-only.

--

___
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



[issue24270] PEP 485 (math.isclose) implementation

2015-05-28 Thread Stefan Krah

Stefan Krah added the comment:

Also, I must say that returning inf in sqrt() bothers me much less
than the assertion that two numbers with a gigantic relative error
have a relerr of 1e-9.

--

___
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



[issue24309] string.Template should be using str.format and/or deprecated

2015-05-28 Thread R. David Murray

R. David Murray added the comment:

Yes, I'm sure there is a lot of code that uses string.Template, partly because 
I've used it in at least three different projects for three different customers 
;)

If you are willing to write a patch that might get superseded by Serhiy's code 
(if he decides to write it :), then I say go for it.  I'm not sure what 
coverage is like on the Template code (not that coverage by itself is 
enough!)...you might want to add some more tests to make *sure* we aren't 
breaking backward compatibility.

But, we should see what Barry thinks :)

And yeah, that line 146 thing is probably due to the unicode coercion issues 
with string formatting for which there are (I believe) more than one open issue 
in this tracker (the most recent one was in the warnings module, I think).

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24309
___
___
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-28 Thread R. David Murray

R. David Murray added the comment:

All python3 ints are what used to be long ints in python2, so the code that 
recognized short ints no longer exists.  Do the numpy types implement 
__index__?  It looks like json doesn't check for __index__, and I wonder if it 
should.

--
nosy: +r.david.murray

___
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



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

2015-05-28 Thread Stefan Behnel

Stefan Behnel added the comment:

Thanks Yury, I'll give it a try ASAP.

--

___
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



[issue24319] Crash during make coverage-report

2015-05-28 Thread Skip Montanaro

New submission from Skip Montanaro:

While trying out some of the auxiliary make targets on an openSUSE
12.2 system, I got a segfault during the test phase of the
coverage-report target. Several Python processes were running as part
of the test when the crash occurred. The resulting crash causes the
rest of the test process(es) to hang. Ctl-C is required to get back to
a shell prompt.

Here's the traceback reported in the terminal window:

...
  File /home/skipm/3rdParty/python/cpython/Lib/json/scanner.py, line 38 in 
_scan_once
  File /home/skipm/3rdParty/python/cpython/Lib/json/decoder.py, line 185 in 
JSONObject
  File /home/skipm/3rdParty/python/cpython/Lib/json/scanner.py, line 38 in 
_scan_once
  ...
Traceback (most recent call last):
  File /home/skipm/3rdParty/python/cpython/Lib/runpy.py, line 170, in 
_run_module_as_main
__main__, mod_spec)
  File /home/skipm/3rdParty/python/cpython/Lib/runpy.py, line 85, in _run_code
exec(code, run_globals)
  File /home/skipm/3rdParty/python/cpython/Lib/test/__main__.py, line 3, in 
module
regrtest.main_in_temp_cwd()
  File /home/skipm/3rdParty/python/cpython/Lib/test/regrtest.py, line 1560, 
in main_in_temp_cwd
main()
  File /home/skipm/3rdParty/python/cpython/Lib/test/regrtest.py, line 738, in 
main
raise Exception(Child error on {}: {}.format(test, result[1]))
Exception: Child error on test_json: Exit code -11
^CException ignored in: module 'threading' from 
'/home/skipm/3rdParty/python/cpython/Lib/threading.py'
Traceback (most recent call last):
  File /home/skipm/3rdParty/python/cpython/Lib/threading.py, line 1297, in 
_shutdown
t.join()
  File /home/skipm/3rdParty/python/cpython/Lib/threading.py, line 1063, in 
join
self._wait_for_tstate_lock()
  File /home/skipm/3rdParty/python/cpython/Lib/threading.py, line 1079, in 
_wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt
make: *** [coverage-report] Interrupt

I noticed that while it crashes reproducibly, it's not always in the
same place. Here's a traceback from a crash in test_exceptions.py:

...
  File /home/skipm/3rdParty/python/cpython/Lib/test/test_exceptions.py, line 
476 in f
  File /home/skipm/3rdParty/python/cpython/Lib/test/test_exceptions.py, line 
476 in f
  File /home/skipm/3rdParty/python/cpython/Lib/test/test_exceptions.py, line 
476 in f
  ...
Traceback (most recent call last):
  File /home/skipm/3rdParty/python/cpython/Lib/runpy.py, line 170, in 
_run_module_as_main
__main__, mod_spec)
  File /home/skipm/3rdParty/python/cpython/Lib/runpy.py, line 85, in _run_code
exec(code, run_globals)
  File /home/skipm/3rdParty/python/cpython/Lib/test/__main__.py, line 3, in 
module
regrtest.main_in_temp_cwd()
  File /home/skipm/3rdParty/python/cpython/Lib/test/regrtest.py, line 1560, 
in main_in_temp_cwd
main()
  File /home/skipm/3rdParty/python/cpython/Lib/test/regrtest.py, line 738, in 
main
raise Exception(Child error on {}: {}.format(test, result[1]))
Exception: Child error on test_exceptions: Exit code -11
^CException ignored in: module 'threading' from 
'/home/skipm/3rdParty/python/cpython/Lib/threading.py'
Traceback (most recent call last):
  File /home/skipm/3rdParty/python/cpython/Lib/threading.py, line 1297, in 
_shutdown
t.join()
  File /home/skipm/3rdParty/python/cpython/Lib/threading.py, line 1063, in 
join
self._wait_for_tstate_lock()
  File /home/skipm/3rdParty/python/cpython/Lib/threading.py, line 1079, in 
_wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt

I've attached the output of pgrep showing the Python processes which
were left running. Here's the stack trace from the core file:

# 0
raise () from /lib64/libc.so.6
# 1
abort () from /lib64/libc.so.6
# 2
Py_FatalError (msg=0x775528 Py_EndInterpreter: not the last thread) at 
Python/pylifecycle.c:1374
# 3
Py_EndInterpreter (tstate=0x25b41c0) at Python/pylifecycle.c:826
# 4
run_in_subinterp (self=0x7f9dd8b9d9a8, args=0x7f9dd8b92e80) at 
/home/skipm/3rdParty/python/cpython/Modules/_testcapimodule.c:2627
# 5
PyCFunction_Call (func=0x7f9dd8babd38, args=0x7f9dd8b92e80, kwds=0x0) at 
Objects/methodobject.c:109
# 6
call_function (pp_stack=0x7fffc68bda98, oparg=1) at Python/ceval.c:4653
# 7
PyEval_EvalFrameEx (f=0x260ae08, throwflag=0) at Python/ceval.c:3198
# 8
_PyEval_EvalCodeWithName (_co=0x7f9dd8c5bc00, globals=0x7f9dd8c9ffc8, 
locals=0x7f9dd8c9ffc8, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at 
Python/ceval.c:3964
# 9
PyEval_EvalCodeEx (_co=0x7f9dd8c5bc00, globals=0x7f9dd8c9ffc8, 
locals=0x7f9dd8c9ffc8, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3985
#10
PyEval_EvalCode (co=0x7f9dd8c5bc00, globals=0x7f9dd8c9ffc8, 
locals=0x7f9dd8c9ffc8) at Python/ceval.c:777
#11
run_mod (mod=0x264dfb8, filename=0x7f9dd8c67eb0, globals=0x7f9dd8c9ffc8, 
locals=0x7f9dd8c9ffc8, flags=0x7fffc68bfe80,