[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread STINNER Victor

STINNER Victor added the comment:

@Alex: you should open a new issue for isclose.

--

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread Ethan Furman

Ethan Furman added the comment:

If there is a complex number version it will live in cmath, not math.

--

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread Neil Girdhar

Neil Girdhar added the comment:

Nice work Alexander.  I believe what's left is for it to work with complex 
numbers.

--
nosy: +neil.g

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I am attaching a quick implementation of math.isclose in C.  It may not cover 
all corner cases correctly, but that should be easy to fix.

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

___
Python tracker 

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



[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2015-03-05 Thread Ben Hoyt

Ben Hoyt added the comment:

Updated version of the patch after Victor's code review of scandir-7 and a 
couple of his comments offline. Full commit log is available on my GitHub 
project in posixmodule_scandir_main.c if anyone's interested. Again, I haven't 
looked closely at the docs or tests yet, but hopefully the C code is getting 
pretty close now!

KNOWN ISSUE: There's a reference leak in the POSIX version (found with "python 
-m test -R 3:2 test_os"). I'm a Windows guy and this is my first serious Python 
C extension code, so I'm not sure the best way to track this down. Would 
someone like to either point out the bug :-) or help me with how to track this 
down?

--

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2015-03-05 Thread Paul Bryan

Changes by Paul Bryan :


--
nosy: +pbryan

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Didn't Guido veto the idea of math.py?

In my opinion, isclose() is way too simple to justify refactoring.

If math.py is ever deemed to be a good idea, it should be vetted and 
implemented on its own merits on not use PEP 485 as a backdoor.

--
nosy: +belopolsky, gvanrossum

___
Python tracker 

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



[issue22936] traceback module has no way to show locals

2015-03-05 Thread Mark Lawrence

Mark Lawrence added the comment:

msg237320 "...so I'm *NOT* entirely convinced..."? :)

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue20557] Use specific asserts in io tests

2015-03-05 Thread Mark Lawrence

Mark Lawrence added the comment:

LGTM.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue20556] Use specific asserts in threading tests

2015-03-05 Thread Mark Lawrence

Mark Lawrence added the comment:

Cut and paste error?

 if verbose:
@@ -110,17 +110,17 @@
 for t in threads:
 t.join()
 self.assertTrue(not t.is_alive())
+self.assertFalse(t.is_alive())

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue23597] Allow easy display of local variables in log messages?

2015-03-05 Thread Robert Collins

Robert Collins added the comment:

Yes, for debugging etc this can be very useful. I suggest further extending the 
new traceback interface to allow a filtering/transform hook of some sort, to 
allow folk more granular control than just repr overloading.

--
nosy: +rbcollins

___
Python tracker 

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



[issue23596] gzip argparse interface

2015-03-05 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, but we need to add tests for the current CLI to make sure 
that we don't break anything when we apply gzip-argparse-cli.patch. See 
Lib/test/test_tarfile.py and Lib/test/test_calendar.py for example CLI tests.

--
nosy: +berker.peksag
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue20548] Use specific asserts in warnings and exceptions tests

2015-03-05 Thread Mark Lawrence

Mark Lawrence added the comment:

LGTM.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue22936] traceback module has no way to show locals

2015-03-05 Thread Nick Coghlan

Nick Coghlan added the comment:

I just filed issue #23597 as a potential further follow-up to this, which would 
be to also add support for displaying local variables directly to the logging 
module.

However, that has some additional security implications, so I'm entirely 
convinced it's a good idea yet. See the new RFE for more details.

--
dependencies: +traceback: add a new thin class storing a traceback without 
storing local variables

___
Python tracker 

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



[issue23597] Allow easy display of local variables in log messages?

2015-03-05 Thread Nick Coghlan

Changes by Nick Coghlan :


--
dependencies: +traceback module has no way to show locals

___
Python tracker 

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



[issue23597] Allow easy display of local variables in log messages?

2015-03-05 Thread Nick Coghlan

New submission from Nick Coghlan:

Issue #22936 added support for easily displaying local variables in tracebacks 
to the unittest and traceback modules.

Would it be worth also making this capability readily available in the logging 
APIs that display traceback messages?

The main argument against it is that automatically logging local variables in 
tracebacks is a *really* good way to introduce sensitive information leaks into 
your log messages. "Safe repr" type objects (which automatically mask sensitive 
details in __repr__()) can mitigate this, but we don't provide such an object 
in the standard library (not even for bytes, bytearray or str, which are the 
typical containers for potentially sensitive data like passwords).

--
messages: 237319
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Allow easy display of local variables in log messages?
versions: Python 3.5

___
Python tracker 

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



[issue23593] Update Windows and OS X installer OpenSSL to 1.0.2

2015-03-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e74e2ce81a1c by Ned Deily in branch '2.7':
Issue #23593: fix Misc/NEWS entries
https://hg.python.org/cpython/rev/e74e2ce81a1c

New changeset da3fe5fda078 by Ned Deily in branch '3.4':
Issue #23593: fix Misc/NEWS entries
https://hg.python.org/cpython/rev/da3fe5fda078

New changeset 8ef4f75a8018 by Ned Deily in branch 'default':
Issue #23593: fix Misc/NEWS entries
https://hg.python.org/cpython/rev/8ef4f75a8018

--
nosy: +python-dev

___
Python tracker 

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



[issue23593] Update Windows and OS X installer OpenSSL to 1.0.2

2015-03-05 Thread Ned Deily

Ned Deily added the comment:

[Sorry, incorrect issue number in the commit messages!]

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

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

New changeset 73aa2f168c5a by Ned Deily in branch 'default':
Issue #23594: merge 3.4
https://hg.python.org/cpython/rev/73aa2f168c5a

--

___
Python tracker 

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



[issue23594] Wrong variable name in traceback

2015-03-05 Thread Ned Deily

Changes by Ned Deily :


--
Removed message: http://bugs.python.org/msg237316

___
Python tracker 

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



[issue23594] Wrong variable name in traceback

2015-03-05 Thread Roundup Robot

Roundup Robot added the comment:

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

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

New changeset 73aa2f168c5a by Ned Deily in branch 'default':
Issue #23594: merge 3.4
https://hg.python.org/cpython/rev/73aa2f168c5a

--
nosy: +python-dev

___
Python tracker 

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



[issue23591] Add IntFlags

2015-03-05 Thread Ethan Furman

Changes by Ethan Furman :


--
assignee:  -> ethan.furman

___
Python tracker 

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



[issue23596] gzip argparse interface

2015-03-05 Thread Antony Lee

New submission from Antony Lee:

The attached patch reimplements gzip's already existing command-line interface 
using argparse, both to provide command-line help and to avoid manual argument 
parsing.

--
components: Library (Lib)
files: gzip-argparse-cli.patch
keywords: patch
messages: 237315
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: gzip argparse interface
versions: Python 3.5
Added file: http://bugs.python.org/file38353/gzip-argparse-cli.patch

___
Python tracker 

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



[issue22936] traceback module has no way to show locals

2015-03-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b4a26b28f5b3 by Robert Collins in branch 'default':
Issue #22936: Allow showing local variables in unittest errors.
https://hg.python.org/cpython/rev/b4a26b28f5b3

--

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-05 Thread Demian Brecht

Changes by Demian Brecht :


Added file: http://bugs.python.org/file38352/issue12319_1.patch

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-05 Thread Demian Brecht

Demian Brecht added the comment:

Also note that this patch includes the changes in #23350 as it's directly 
relevant.

--

___
Python tracker 

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



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-05 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> patch review
type: behavior -> resource usage
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-05 Thread Demian Brecht

Changes by Demian Brecht :


--
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-05 Thread Demian Brecht

Demian Brecht added the comment:

I hit "submit" a little too soon.

The intention of the patch is to adhere to all aspects of Transfer-Encoding as 
specified in the RFC and to make best guesses as to encoding that should be 
used based on the data type of the given body.

This will break backwards compatibility for cases where users are manually 
chunking the request bodies prior to passing them in and explicitly setting the 
Transfer-Encoding header. Additionally, if Transfer-Encoding was previously 
specified, but not chunked, the patch will automatically chunk the body.

Otherwise, the patch should only be additive.

--
keywords: +needs review, patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file38351/issue12319.patch

___
Python tracker 

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



[issue23592] SIGSEGV on interpreter shutdown, with daemon threads running wild

2015-03-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Yes, daemon threads are really dangerous because they may keep running while 
the interpreter has started releasing critical resources. Things have improved 
in 3.x compared to 2.x, though.

--
nosy: +pitrou

___
Python tracker 

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-05 Thread Steve Dower

Steve Dower added the comment:

Added a patch that disables the invalid parameter handler in new_threadstate() 
so that all Python threads are protected from termination.

_PyVerify_fd is still moved into fileutils.c, but _Py_BEGIN/END_SUPPRESS_IPH 
and _Py_VERIFY_FD are gone. For VC14, _PyVerify_fd simply calls _get_osfhandle 
and checks the result.

As it's a hack, I haven't updated any documentation to draw attention to this, 
but I hope this is simpler enough that we can get Windows builds going again.

--
Added file: http://bugs.python.org/file38350/23524_hack.patch

___
Python tracker 

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



[issue22936] traceback module has no way to show locals

2015-03-05 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-05 Thread Demian Brecht

Demian Brecht added the comment:

I've attached a patch that implements full Transfer-Encoding support for 
requests as specified in RFC 7230.

--

___
Python tracker 

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



[issue22936] traceback module has no way to show locals

2015-03-05 Thread Robert Collins

Changes by Robert Collins :


Added file: http://bugs.python.org/file38349/issue-22936-5.patch

___
Python tracker 

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



[issue22936] traceback module has no way to show locals

2015-03-05 Thread Robert Collins

Changes by Robert Collins :


Removed file: http://bugs.python.org/file38348/issue-22936-5.patch

___
Python tracker 

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



[issue22936] traceback module has no way to show locals

2015-03-05 Thread Robert Collins

Robert Collins added the comment:

And the unittest patch.

--
Added file: http://bugs.python.org/file38348/issue-22936-5.patch

___
Python tracker 

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



[issue20876] python -m test test_pathlib fails

2015-03-05 Thread Isaac Schwabacher

Isaac Schwabacher added the comment:

Fixed a truncated line in the patch.

--
Added file: http://bugs.python.org/file38347/test_support.patch

___
Python tracker 

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



[issue21483] Skip os.utime() test on NFS?

2015-03-05 Thread Isaac Schwabacher

Isaac Schwabacher added the comment:

...and fixed a spot where git diff + copy/paste truncated a long line.  
/sheepish

--
Added file: http://bugs.python.org/file38346/test_import.patch

___
Python tracker 

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



[issue4896] Faster why variable manipulation in ceval.c

2015-03-05 Thread STINNER Victor

STINNER Victor added the comment:

> Where do we find "Antoine's suite of benchmarks"?

https://hg.python.org/benchmarks

--

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread Ethan Furman

Ethan Furman added the comment:

I have no problem with having Python versions, but we should not remove 
anything from the C implementation -- at a minimum they should be good for 
testing against.

--
nosy: +ethan.furman

___
Python tracker 

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



[issue23491] PEP 441 - Improving Python Zip Application Support

2015-03-05 Thread Paul Moore

Paul Moore added the comment:

There have been no further comments for a while now. Could this be committed by 
someone?

--

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread STINNER Victor

STINNER Victor added the comment:

We may add tests on fsum() with nan:

assert fsum([nan, nan, nan]) == nan
assert fsum([nan, 1.0, inf]) == nan
assert fsum([nan, 1.0, -inf]) == nan

--

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread STINNER Victor

STINNER Victor added the comment:

I didn't benchmark the overhead of the patch on "import math" (Python startup 
time)

--

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-05 Thread STINNER Victor

New submission from STINNER Victor:

To implement the PEP 485 (math.isclose), I proposed to split the math module 
into two parts: _math (C) and math (py). The current C module is renamed to 
_math and a new "math" module implementd in Python is added. The math module 
contains "from _math import *".

Attached patch implements this idea.

math.py contains the Python implementation of the following functions:

- degrees
- fsum
- factorial
- radians

I propose to add these functions to "document" the implementation of these 
functions, I don't want to use the Python implementation by default.

Maybe _math.degrees() and _math.radians() can be removed, the Python 
implementation is enough.

I'm not sure that the C implementation of factorial() is much faster, since 
most part of the C code calls Python functions (boxing/unboxing). But it's 
probably better to keep the C implementation :-)

I don't understand how _factorial_partial_product() decide to divide the 
computation using the number of bits. Does it make sense to compute the number 
of bits in Python, since the Python int type has no limit? (only memory)

The C and Python implementations are tested by test_math.

math.py cannot be used alone: it requires floor(), isfinite(), isinf() and 
isnan() functions of the _math module. The "try: import _math except 
ImportError: pass" is only useful for unit tests.

TODO: remove SIZEOF_LONG from math.py.

We may rename Module/mathmodule.c to Module/_mathmodule.c, but it's not 
convinient to generate a patch if a file is renamed.

--
files: math.patch
keywords: patch
messages: 237300
nosy: haypo, mark.dickinson
priority: normal
severity: normal
status: open
title: Split the math module into _math (C) + math (py)
versions: Python 3.5
Added file: http://bugs.python.org/file38345/math.patch

___
Python tracker 

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



[issue4896] Faster why variable manipulation in ceval.c

2015-03-05 Thread Mark Lawrence

Mark Lawrence added the comment:

Where do we find "Antoine's suite of benchmarks"?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue22936] traceback module has no way to show locals

2015-03-05 Thread Robert Collins

Robert Collins added the comment:

No worries. BTW there is one more patch needed to close this issue - adding the 
feature to unittest. I'm working that up now.

--

___
Python tracker 

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



[issue23594] Wrong variable name in traceback

2015-03-05 Thread Ned Deily

Changes by Ned Deily :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Unupdated source file in traceback

___
Python tracker 

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



[issue8087] Unupdated source file in traceback

2015-03-05 Thread Robert Collins

Robert Collins added the comment:

Storing a marker in module objects which can be used to validate the linecache 
is a good idea. timestamp isn't appropriate because of modules loaded from zips 
or dynamic generation. I'd suggest we make it something opaque - we get source 
code by asking the loader for it anyway - if we make all source code loading go 
through the loader, then file based loaders can use a timestamp, zip based ones 
can shortcircuit or use a reference to the containing zip's file metadata or 
whatever.

--
nosy: +rbcollins

___
Python tracker 

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



[issue23594] Wrong variable name in traceback

2015-03-05 Thread Ezio Melotti

Ezio Melotti added the comment:

#8087

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue23594] Wrong variable name in traceback

2015-03-05 Thread R. David Murray

R. David Murray added the comment:

This is a duplicate of an existing issue but I don't have time to find the 
issue.  It's not a trivial problem to fix, though now that the import system is 
in python it may be possible.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue23594] Wrong variable name in traceback

2015-03-05 Thread Jeff Zemla

Jeff Zemla added the comment:

In 3), "not" should be "now"

--

___
Python tracker 

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



[issue23594] Wrong variable name in traceback

2015-03-05 Thread Jeff Zemla

New submission from Jeff Zemla:

I've found a rather simple bug in the default CPython implementation on Mac OS 
X 10.9.5

1) Create a new .py file containing:

def a():
print q

x=5


2) Open Python and run using execfile() then a(). Receive error as expected:

  File "test.py", line 2, in a
print q
NameError: global name 'q' is not defined

3) Edit file so that "print q" is not "print x", and save.

4) Run a() (Do not use execfile!)

5) Error:

  File "test.py", line 2, in a
print x
NameError: global name 'q' is not defined

EXPECTED: Traceback should say "print q" NOT "print x". It is reading from the 
file. Actually, the error in the file has been corrected-- it is the copy of 
the program in memory that is faulty.


Python 2.7.5 (default, Mar  9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin

--
components: Macintosh
messages: 237293
nosy: Jeff Zemla, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Wrong variable name in traceback
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue22906] PEP 479: Change StopIteration handling inside generators

2015-03-05 Thread Ethan Furman

Changes by Ethan Furman :


--
stage: patch review -> test needed

___
Python tracker 

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



[issue23593] Update Windows and OS X installer OpenSSL to 1.0.2

2015-03-05 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +zach.ware

___
Python tracker 

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



[issue23476] SSL cert verify fail for "www.verisign.com"

2015-03-05 Thread Donald Stufft

Donald Stufft added the comment:

It was merged to the 2.7 branch, so it'll be released as part of 2.7.10.

--

___
Python tracker 

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



[issue23476] SSL cert verify fail for "www.verisign.com"

2015-03-05 Thread John Nagle

John Nagle added the comment:

Will this be applied to the Python 2.7.9 library as well?

--

___
Python tracker 

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



[issue23476] SSL cert verify fail for "www.verisign.com"

2015-03-05 Thread Ned Deily

Ned Deily added the comment:

Issue23593 opened to request Windows and OS X installer OpenSSL updates to 1.0.2

--
nosy: +ned.deily

___
Python tracker 

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



[issue23593] Update Windows and OS X installer OpenSSL to 1.0.2

2015-03-05 Thread Alex Gaynor

Alex Gaynor added the comment:

+1 on this -- for pyca/cryptography we're also making this leap in our next 
release.

--
nosy: +alex

___
Python tracker 

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



[issue23593] Update Windows and OS X installer OpenSSL to 1.0.2

2015-03-05 Thread Donald Stufft

Changes by Donald Stufft :


--
nosy: +dstufft

___
Python tracker 

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



[issue23551] IDLE to provide menu options for using PIP

2015-03-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Yes, this would complement your checker patch from last summer.  It would solve 
the issue of how to tell or help people, especially beginners, install packages 
to run with the checker.

Idea for the package manager: include an option to duplicate a set of installed 
packages from one version to another. A recent SO question (paraphrased): 
"Started with 2.7, installed multiple packages, added 3.4, can't use packages.  
HOW???"  Current answer, with easily missed details, something like: "Packages 
must be installed for each version.  Use PIP to make requirements.txt (sp?) 
package list from 2.7 and use that to install same to 3.4."  Nicer answer: use 
option that gets details right.  Perhaps list could be checked for availability 
in 3.4.  Or displayed in text widget to be edited.

I look forward to your proposal.

--

___
Python tracker 

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



[issue23593] Update Windows and OS X installer OpenSSL to 1.0.2

2015-03-05 Thread Ned Deily

New submission from Ned Deily:

Per the discussion in Issue23476, the installers should be updated to use 
OpenSSL 1.0.2 to solve the shortest trust path issue documented there.

--
components: Build
messages: 237287
nosy: ned.deily, steve.dower
priority: normal
severity: normal
stage: patch review
status: open
title: Update Windows and OS X installer OpenSSL to 1.0.2
versions: Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-05 Thread STINNER Victor

STINNER Victor added the comment:

I close the issue as wont fix. I may workaround the bug during Python 
finalization if more users report this issue.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-05 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

Ahh...ok, then please post the changes. I want to burn autotools enough right 
now; I doubt that redoing those changes would ease my anger. :)

--

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-05 Thread Cyd Haselton

Cyd Haselton added the comment:

I can...

./configure --prefix=/usr/python --enable-shared --without-ensurepip

...but configure didn't set up pyconfig.h correctly with those options. There 
are some changes I had to make post-configure to pyconfig.h and others when I 
initially built python...see this link: 
https://code.google.com/p/python-for-android/wiki/CrossCompilingPython
specifically the part about manually editing pyconfig.h

--

___
Python tracker 

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



[issue23592] SIGSEGV on interpreter shutdown, with daemon threads running wild

2015-03-05 Thread A. Skrobov

New submission from A. Skrobov:

I'm observing that this line of code:

https://hg.python.org/cpython/file/ec9bffc35cad/Python/ceval.c#l3010

-- causes a SIGSEGV on interpreter shutdown, after running some really 
convoluted Python code with daemon threads running wild.

At the time of the crash, tstate->frame==NULL, and tstate->curexc_type points 
to an exceptions.UnboundLocalError

I can reliably reproduce the crash, but unfortunately I cannot provide a 
standalone reproducer.

I'm speculating that this case is due to some daemon threads carrying on 
running while their variables are being destroyed from underneath them.


The traceback is probably of little use, but adding it nevertheless:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x4dc15940 (LWP 10317)]
0x004d5c00 in PyEval_EvalFrameEx (f=0xc0da70, throwflag=0) at 
Python/ceval.c:3010
3010if (tstate->frame->f_exc_type != NULL)
(gdb) bt   
#0  0x004d5c00 in PyEval_EvalFrameEx (f=0xc0da70, throwflag=0) at 
Python/ceval.c:3010
#1  0x004d6db2 in PyEval_EvalCodeEx (co=0x2be1d510, 
globals=0x2b9c62f0, locals=0x0, args=0x2f6e9bf8, argcount=2, 
kws=0x2f6e9c08, kwcount=0, defs=0x2be2fb78, defcount=1, closure=0x0)
at Python/ceval.c:3267
#2  0x004d9ac9 in fast_function (func=0x2be37648, 
pp_stack=0x4dc13c90, n=2, na=2, nk=0) at Python/ceval.c:4131
#3  0x004d96d8 in call_function (pp_stack=0x4dc13c90, oparg=1) at 
Python/ceval.c:4056
#4  0x004d4258 in PyEval_EvalFrameEx (f=0x2f6e9a60, throwflag=0) at 
Python/ceval.c:2681
#5  0x004d6db2 in PyEval_EvalCodeEx (co=0x2be26250, 
globals=0x2b9c62f0, locals=0x0, args=0x2ac81f48, argcount=2, 
kws=0x2ac81f58, kwcount=0, defs=0x2be2fe88, defcount=1, closure=0x0)
at Python/ceval.c:3267
#6  0x004d9ac9 in fast_function (func=0x2be39108, 
pp_stack=0x4dc14230, n=2, na=2, nk=0) at Python/ceval.c:4131
#7  0x004d96d8 in call_function (pp_stack=0x4dc14230, oparg=1) at 
Python/ceval.c:4056
#8  0x004d4258 in PyEval_EvalFrameEx (f=0x2ac81db8, throwflag=0) at 
Python/ceval.c:2681
#9  0x004d99af in fast_function (func=0x2ee97840, 
pp_stack=0x4dc14620, n=1, na=1, nk=0) at Python/ceval.c:4121
#10 0x004d96d8 in call_function (pp_stack=0x4dc14620, oparg=0) at 
Python/ceval.c:4056
#11 0x004d4258 in PyEval_EvalFrameEx (f=0xc47fe0, throwflag=0) at 
Python/ceval.c:2681
#12 0x004d99af in fast_function (func=0x2be396f0, 
pp_stack=0x4dc14a10, n=1, na=1, nk=0) at Python/ceval.c:4121
#13 0x004d96d8 in call_function (pp_stack=0x4dc14a10, oparg=0) at 
Python/ceval.c:4056
#14 0x004d4258 in PyEval_EvalFrameEx (f=0x2f67bdf0, throwflag=0) at 
Python/ceval.c:2681
#15 0x004d6db2 in PyEval_EvalCodeEx (co=0x2be26880, 
globals=0x2b9c62f0, locals=0x0, args=0x2ef75fd8, argcount=1, kws=0x0, 
kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3267
#16 0x0056346e in function_call (func=0x2be395a0, 
arg=0x2ef75fb0, kw=0x0) at Objects/funcobject.c:526
#17 0x0042182c in PyObject_Call (func=0x2be395a0, 
arg=0x2ef75fb0, kw=0x0) at Objects/abstract.c:2529
#18 0x0042c0d0 in instancemethod_call (func=0x2be395a0, 
arg=0x2ef75fb0, kw=0x0) at Objects/classobject.c:2602
#19 0x0042182c in PyObject_Call (func=0x2eec5060, 
arg=0x2aacf060, kw=0x0) at Objects/abstract.c:2529
#20 0x004d8ceb in PyEval_CallObjectWithKeywords (func=0x2eec5060, 
arg=0x2aacf060, kw=0x0) at Python/ceval.c:3904
#21 0x0052358b in t_bootstrap (boot_raw=0x2fab9d78) at 
./Modules/threadmodule.c:614
#22 0x00342f00677d in start_thread () from /lib64/libpthread.so.0
#23 0x00342e4d49ad in clone () from /lib64/libc.so.6

--
components: Interpreter Core
messages: 237283
nosy: A. Skrobov
priority: normal
severity: normal
status: open
title: SIGSEGV on interpreter shutdown, with daemon threads running wild
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error

2015-03-05 Thread Davin Potts

Davin Potts added the comment:

Doing cleanup:  This was marked as out of date in 2010 but somehow escaped 
being marked closed.  Closing now.

--
nosy: +davin
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue6461] multiprocessing: freezing apps on Windows

2015-03-05 Thread Davin Potts

Davin Potts added the comment:

The original issue now appears addressed in the docs (thanks goes to Stuart and 
Jesse) though it was not explicitly tracked here as a patch file.

The follow-on secondary issue from spongebob (if that is your real name) could 
not be reproduced by Richard.

This issue should have been marked closed->resolved some time ago.

--
nosy: +davin
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-05 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

So...you didn't make the changes by hand? Could you just post whatever you 
passed to configure?

--

___
Python tracker 

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



[issue20147] multiprocessing.Queue.get() raises queue.Empty exception if even if an item is available

2015-03-05 Thread Davin Potts

Changes by Davin Potts :


--
status: open -> closed

___
Python tracker 

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



[issue20147] multiprocessing.Queue.get() raises queue.Empty exception if even if an item is available

2015-03-05 Thread Davin Potts

Davin Potts added the comment:

This same issue came up recently in issue23582.  Really, it should have been 
addressed in this issue here first and issue23582 marked as a duplicate of this 
one but these things don't always happen in a synchronous or apparently-linear 
fashion.

Adding to what is captured in issue23582, specifically referring to the points 
raised here in this issue:
1. A call to put does not mean that the data put on the queue is 
instantly/atomically available for retrieval via get.  Situations where a call 
to put is immediately followed by a non-blocking call to get are asking for a 
race-condition -- this is a principal reason for having blocking calls with 
timeouts.
2. A call to get resulting in an Empty exception of course does not mean that 
the queue is forevermore empty, only that the queue is empty at the moment the 
call to get was made -- the facility for trapping the Empty and trying again to 
get more data off the queue provides welcome flexibility on top of the use of 
blocking/non-blocking calls with/without timeouts.
3. A call to empty is, as indicated in the documentation, not to be considered 
reliable because of the semantics in coordinating the queue's state and data 
between processes/threads.
4. Alexei's contributions to this issue are very nearly identical to what is 
discussed in issue23582 and are addressed well there.
5. As to using a timeout value too small to be effective (i.e. < 2e-6), really 
this is one example of the larger concern of choosing an appropriate timeout 
value.  In the proposed patch, ensuring that a call to self._poll is made no 
matter what might potentially buy additional time for the data to be synced and 
made available (admittedly a happy result, but a fragile, inadvertent win) but 
it does not address the rest of how get, put, and the others work nor will it 
necessarily solve the issue being raised here.

In Alexei's example, changing the call to get from a non-blocking call to a 
blocking call with a reasonably small timeout will reliably ensure that 
everything put on the queue can and will be gotten back by the rest of that 
code.

In multiprocessing, we have queues to help us make data available to and across 
processes and threads alike -- we must recognize that coordinating data across 
distinct processes (especially) takes a non-zero amount of time -- hence we 
have the tools of blocking as well as non-blocking calls both with or without 
timeouts to properly implement robust code in these situations.

--
nosy: +davin
resolution:  -> not a bug
stage:  -> resolved
superseder:  -> multiprocessing.Queue.get is not getting all the items in the 
queue

___
Python tracker 

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



[issue22906] PEP 479: Change StopIteration handling inside generators

2015-03-05 Thread Ethan Furman

Ethan Furman added the comment:

Oh, and my tests ran on Ubuntu 13.04 (GNU/Linux 3.8.0-22-generic x86_64).

--

___
Python tracker 

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



[issue22906] PEP 479: Change StopIteration handling inside generators

2015-03-05 Thread Ethan Furman

Ethan Furman added the comment:

Thanks, Neil, for catching that.

I did run the entire test suite with the patch, and nothing new broke, so it 
would seem the patch is at least benign.  :)

--
nosy: +ethan.furman

___
Python tracker 

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



[issue22255] Multiprocessing freeze_support raises RuntimeError

2015-03-05 Thread Davin Potts

Davin Potts added the comment:

Updates to both cx-freeze and multiprocessing in the meantime may likely have 
addressed this since this issue was first reported.  Granted, diagnosing issues 
with cx-freeze are best directed to the cx-freeze project -- that is perhaps 
where this issue should be opened instead.

Can this issue still be reproduced?  If so, a short example would be much 
appreciated.

--
nosy: +davin
status: open -> pending
type: crash -> behavior

___
Python tracker 

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



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-05 Thread Patrick Miller

Patrick Miller added the comment:

This is also in the 2.7.x branch.  Same patch.

--

___
Python tracker 

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



[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-05 Thread Jack O'Connor

Jack O'Connor added the comment:

Got it, thanks for the heads up.

--

___
Python tracker 

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



[issue23591] Add IntFlags

2015-03-05 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue23476] SSL cert verify fail for "www.verisign.com"

2015-03-05 Thread Christian Heimes

Christian Heimes added the comment:

The Windows binaries of Python 2.7.9 are compiled with OpenSSL 1.0.1j. The 
feature is only available in OpenSSL > 1.0.2. The next version of Python must 
be compiled with 1.0.2 or better. Otherwise the bug pops up again.

--

___
Python tracker 

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



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-05 Thread Patrick Miller

Patrick Miller added the comment:

Shout out to amaury for a much simpler recreator :-)

Checked to see if the int conversion suffered the same problem... it does not 
as it is structured somewhat differently.  Note that it DOES do the proper 
DECREF (missing in PyFloat_AsDouble).


result = nb->nb_int(integral);
if (!result || PyLong_CheckExact(result))
return (PyLongObject *)result;
if (!PyLong_Check(result)) {
PyErr_Format(PyExc_TypeError,
 "__int__ returned non-int (type %.200s)",
 result->ob_type->tp_name);
Py_DECREF(result);
return NULL;
}

--

___
Python tracker 

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



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-05 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Simple script to reproduce the issue:

import sys, time
class C(object):
  def __float__(self):
return ""
for x in range(1):
  try:
time.sleep(C())
  except TypeError:
pass
  if x % 1000 == 0:
print(sys.getrefcount(""))

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue23591] Add IntFlags

2015-03-05 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here is preliminary implementation of IntFlags (no docs). This is an int 
subclass purposed to represent a set of integer flags. It supports named 
constants (as IntEnum), supports bitwise operations (&, |, ~) and has funny str 
and repr. See discussion on Python-Ideas [1].

The patch includes tests and few examples of using IntFlags in the stdlib.

[1] http://comments.gmane.org/gmane.comp.python.ideas/32267

--
components: Library (Lib)
files: intflags.patch
keywords: patch
messages: 237269
nosy: barry, eli.bendersky, ethan.furman, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add IntFlags
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38344/intflags.patch

___
Python tracker 

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-05 Thread Steve Dower

Steve Dower added the comment:

Happy to discuss further. I'll try and get a new patch done today that disables 
the handler for any threads Python creates a thread state for. The change to 
_Py_VERIFY_FD will still be there, but the begin/end suppress will go (using 
the verify function to protect CRT calls can go completely once we are prepared 
to force people to build with VC14, but I want to avoid that for as long as 
possible while we transition).

Also notice that Verify_fd is a race condition but was the best solution 
available at the time. I'm keen to see it go.

As far as a better solution goes, I've discussed this in depth with the main 
CRT developer at Microsoft and there won't be one. The best concession I could 
get was the thread local handler so we can disable it locally rather than 
process wide.

--

___
Python tracker 

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



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-05 Thread Patrick Miller

Patrick Miller added the comment:

Here's a simple recreator... It returns a 100-meg string instead of a float.  
The memory is leaked each time through the loop

--
Added file: http://bugs.python.org/file38343/recreate.tar

___
Python tracker 

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



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-05 Thread Patrick Miller

New submission from Patrick Miller:

There is a reference counting error in PyFloat_AsDouble.

When the function calls the nb_float conversion, if the method does not return 
an actual float object, an exception is set, but the object is not collected.

--- Objects/floatobject.c   2014-10-08 04:18:15.0 -0400
+++ Objects/floatobject.c.patched   2015-03-05 09:17:15.171455648 -0500
@@ -214,6 +214,7 @@
 if (fo == NULL)
 return -1;
 if (!PyFloat_Check(fo)) {
+Py_DECREF(fo);
 PyErr_SetString(PyExc_TypeError,
 "nb_float should return float object");
 return -1;

--
components: Interpreter Core
files: floatobject.c-patch
messages: 237266
nosy: Patrick Miller
priority: normal
severity: normal
status: open
title: Potential leak in PyFloat_AsDouble.  Refcount error.
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file38342/floatobject.c-patch

___
Python tracker 

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



[issue22936] traceback module has no way to show locals

2015-03-05 Thread Ezio Melotti

Ezio Melotti added the comment:

You are right -- I didn't notice the versionadded in the docs.
Sorry for the noise.

--

___
Python tracker 

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



[issue23551] IDLE to provide menu options for using PIP

2015-03-05 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

Hi,
I would like to work on this. Give me a day or two to come up with my design 
plan, for feedback.
Let me know please if this feature addition is being considered.

--
nosy: +sahutd

___
Python tracker 

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-05 Thread STINNER Victor

STINNER Victor added the comment:

> Since we're doing alpha 2 this weekend, I'm keen to get this fix in.

I would prefer a quick&dirty fix: disable "IFD" checks for all threads by 
default. We will find a better fix for the next release. IMO we should discuss 
this issue more to check if there is no nicer option.

--

___
Python tracker 

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



[issue23581] unittest.mock.MagicMock doesn't support matmul (@) operator

2015-03-05 Thread Saimadhav Heblikar

Changes by Saimadhav Heblikar :


--
nosy: +sahutd

___
Python tracker 

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-05 Thread STINNER Victor

STINNER Victor added the comment:

I reviewed 23524_2.patch. I vote -1 on the patch.

--

___
Python tracker 

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



[issue22936] traceback module has no way to show locals

2015-03-05 Thread Nick Coghlan

Nick Coghlan added the comment:

It's only the new APIs just introduced in issue #17911 that changed to kwonly 
arguments.

We missed that they should really be kwonly in the original review, but it 
become more obvious in this patch, as it added a second feature toggle to 
indicate whether or not to capture the locals.

--

___
Python tracker 

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



[issue23589] Redundant sentence in FAQ

2015-03-05 Thread Ezio Melotti

Ezio Melotti added the comment:

I think the first sentence could be improved, even though it's correct.
A superficial reading might give the impression that function variables are 
implicitly global, or that only the variables inside a function are global, 
especially if the reader is not familiar with the term "referenced".
Swapping the two sentences and talking first about assignment might be enough 
to make clear that the other sentence is talking about variables that are only 
read/accessed by the function but not defined/assigned.
The paragraph can also be rephrased to say that Python can freely access 
variables from outer scopes, but that "global" is required to assign a new 
value to a global variable, and that variables defined inside a function are 
local.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-05 Thread Cyd Haselton

Cyd Haselton added the comment:

I understand; I haven't made the edits to these files but the edits are needed 
in order for the Android build to work properly.

How do you want me to handle them? I can post the expected values here as a 
diff, or just as plain text...?

--

___
Python tracker 

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



[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-05 Thread STINNER Victor

STINNER Victor added the comment:

Debug mode:
https://docs.python.org/dev/library/asyncio-dev.html#asyncio-debug-mode

--

___
Python tracker 

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



[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-05 Thread STINNER Victor

STINNER Victor added the comment:

Did you read the latest doc? You should also use the -Wd command line
option to see resource warnings.

--

___
Python tracker 

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



[issue2292] Missing *-unpacking generalizations

2015-03-05 Thread Neil Girdhar

Neil Girdhar added the comment:

Removed dead code.  Awaiting code review! :)

--
Added file: http://bugs.python.org/file38341/starunpack35.diff

___
Python tracker 

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



[issue23589] Redundant sentence in FAQ

2015-03-05 Thread Yongzhi Pan

Yongzhi Pan added the comment:

Updated diff as Raymond's wording.

--
Added file: http://bugs.python.org/file38340/faq_fix_1.diff

___
Python tracker 

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



[issue23589] Redundant sentence in FAQ

2015-03-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

How about:

In Python, variables that are only referenced inside a function are implicitly
global.  If a variable is assigned a value anywhere within the function's
body, it's assumed to be a local unless explicitly declared as global.

--
nosy: +rhettinger

___
Python tracker 

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



[issue14544] Limit "global" keyword name conflicts in language spec to those enforced by CPython

2015-03-05 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> needs patch
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue23476] SSL cert verify fail for "www.verisign.com"

2015-03-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Uh, the comment is already there. I don't know how I missed that. Sorry.

--

___
Python tracker 

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



[issue23579] Amazon.com links

2015-03-05 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority: normal -> low

___
Python tracker 

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



[issue14544] Limit "global" keyword name conflicts in language spec to those enforced by CPython

2015-03-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1 for the proposed change.   It should add there is also an enforced (and 
obvious) restriction that the variable not have been declared nonlocal.

--
nosy: +rhettinger

___
Python tracker 

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



  1   2   >