[issue25523] Correct "a" article to "an" article

2015-11-01 Thread Martin Panter

Martin Panter added the comment:

Thanks everyone for the comments. Serhiy’s points:

I did this by using “grep” and then manually editing all of the appropriate 
lines. So they were not generated by a script, but because it is a fairly 
mindless process I could have made human mistakes.

In multiprocessing.rst, socket.rst, I removed “a” because I thought it matched 
the surrounding text, e.g. it already says nearby “If . . . then OSError is 
raised”, rather than “an OSError is raised”. I find the documentation uses both 
forms in many places, so I just try to keep things consistent with the nearby 
text.

In 3.2.rst, I thought it should be plural: “total_ordering() will use existing 
equality and inequality methods”. I could reword it to something like “will use 
an existing equality and inequality method” if you prefer. Either way seems 
valid to me.

In HISTORY, I removed “a” from “. . . is passed ill-formed input” because it 
seemed better (similar to “is passed hot water”). But “an ill-formed input” 
should also be fine if people prefer.

_hashopenssl.c: “have a its own definition” is nonsense, hence I removed “a”.

“An SMTP”: See Emanuel and David. The rest of the page uses “an SMTP”, while I 
only found two instances of “a SMTP”, which I made consistent.

Externally-supplied decimaltestdata: I did wonder about this. Looking at the 
history, I saw other local changes, but now I notice most are in a special 
“extra.decTest” file. Anyway, as Mark says it is okay I will let my changes go 
ahead for the time being.

David: I have incorporated your suggestion for test_discovery.py into my local 
patch.

--

___
Python tracker 

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



[issue22450] urllib doesn't put Accept: */* in the headers

2015-11-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> What do you think, Raymond

Before dismissing this, we should get a better understanding of why "Accept: 
*/*" is so widely used in practice.

Here's what we know so far:
* The header made a difference to the Facebook Graph API.
* Curl (a minimalist) includes "Accept: */*", Host, and User-Agent.
* Firefox includes "*/*" at the end of its list of acceptable types.
* Kenneth Reitz's requests module uses "Accept: */*" by default.
* The poolmanager in urllib3 uses "Accept: */*" by default and has a comment 
that that and the "Host" header are both needed by proxies.
* I'm also seeing "Accept: */*" in book examples as well.  See 
https://books.google.com/books?id=fVuWayXLdYIC=PA22 and 
http://doc.bonfire-project.eu/R1/api/example-session.html

--

___
Python tracker 

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



[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Strange bug. I can't attach any file.

--

___
Python tracker 

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



[issue25528] Attempt to further increase test coverage of calendar module

2015-11-01 Thread Rohit Mediratta

New submission from Rohit Mediratta:

Opened to submit a patch.

- make patchcheck succeeded
- full testsuite succeeded
- Old coverage 
   Lib/calendar.py 375 5486%   511, 519, 541, 608-699, 703
- New coverage
   Lib/calendar.py 375 5186%   608-699, 703

--
components: Tests
files: mywork.patch
keywords: patch
messages: 253836
nosy: Rohit Mediratta
priority: normal
severity: normal
status: open
title: Attempt to further increase test coverage of calendar module
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file40916/mywork.patch

___
Python tracker 

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



[issue25522] IDLE: warn if save-as name matches stdlib name

2015-11-01 Thread Laura Creighton

Laura Creighton added the comment:

Do we need a full path name here as well?  Probably not.

--

___
Python tracker 

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



[issue25514] better startup error messages in IDLE when stdlib modules shadowed

2015-11-01 Thread Laura Creighton

Laura Creighton added the comment:

can I send a file

--
type: behavior -> enhancement
versions:  -Python 3.4
Added file: http://bugs.python.org/file40915/dia2.py

___
Python tracker 

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



[issue25523] Correct "a" article to "an" article

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I had pointed to some of changes not because they look wrong to me, but for the 
case if there are human mistakes. After your acknowledgement all LGTM.

--
stage: patch review -> commit review

___
Python tracker 

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



[issue22450] urllib doesn't put Accept: */* in the headers

2015-11-01 Thread Martin Panter

Martin Panter added the comment:

According to all the HTTP 1.1 RFCs, having */* at the end means you accept any 
other content type if none of the higher priority ones are available (otherwise 
you risk a 406 Not Acceptable error). So that explains why Firefox has */* 
tacked on.

Requests copied from Curl: 
. Similarly, it is in 
urllib3 “because that’s what cURL had by default”. Brief discussion at 
, where they 
decided to leave things as they already were.

So all roads seem to lead to Curl. Curl’s “initial revision” (Dec 1999) had 
“Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*”, which was 
changed to “Accept: */*” in  in 
2004. I don’t see any reasons given. I just left a question on Git Hub about 
this, so maybe we might get some sort of answer.

Wget also includes “Accept: */*”. But it gives no explanations either, and it 
was present right from the “initial revision” also in Dec 1999 (presumably 
Source Forge started about then).

--

___
Python tracker 

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



[issue25228] Regression in cookie parsing with brackets and quotes

2015-11-01 Thread Martin Panter

Martin Panter added the comment:

Adding Guido and Antoine, who committed the security fix as 9e765e65e5cb in 2.7 
and 5cfe74a9bfa4 in 3.2. Perhaps you are able to help decide if the proposal 
here would affect the original security report. Basically this issue (as well 
as #22758 and #22983) are complaining that 3.2’s cookie parsing became too 
strict. People would like to parse subsequent cookie “morsels” if an earlier 
one is considered invalid, rather than aborting the parse completely.

All I can find out about the security report is from 
 and 
, but that doesn’t explain the test cases 
with square brackets in the cookie names.

RFC 6265 says double quotes (") are not meant to be sent by the server, but the 
client should tolerate them without any special handling (different to Python’s 
handling and earlier specs, which parse a special double-quoted string syntax). 
One potential problem that comes to mind is that the current patch blindly 
searches for the next semicolon “;”, which would not be valid inside a 
double-quoted string, e.g. name="some;value".

Python behaviour:

* Before the 3.2 security fix, square brackets and double quotes caused 
truncation of the cookie value, but subsequent cookies were still parsed in 
most cases

* The security fix prevents parsing of subsequent cookies (either on purpose or 
as a side effect)

* The HttpOnly and Secure support in 3.3+ (Issue 16611) prevents parsing of the 
cookie morsel with the offending square bracket or double quote. This is 
proposed for 3.2 backport in Issue 22758.

* Square brackets are now allowed in 3.2+ thanks to Issue 22931. So 3.2 should 
truncate the original test case at the double quote, while 3.3+ drops the 
offending cookie.

The current patch proposed here appears to solve Issue 22983 (permissive 
parsing) in general. If the current cookie does not match the syntax, it is 
skipped, by falling back to a search for a semicolon “;”. So I am inclined to 
close Issue 22983 as a duplicate of this issue.

And Tim, I understand your main interest in Issue 22758 is that parsing aborts 
for things like "a=value1; HttpOnly; b=value2". If this patch were ported to 
3.2 it should also fix that for free.

Pathangi: did you see my review comment about unnecessary backslashes? I also 
left another comment today.

--
nosy: +gvanrossum, pitrou

___
Python tracker 

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



[issue25522] IDLE: warn if save-as name matches stdlib name

2015-11-01 Thread Laura Creighton

Laura Creighton added the comment:

I'm not sure about "Neither you nor Python will be able to import 
the stdlib."  Depending on what the file is, you may be able to import
it later.  I'd prefer:

"If you run Python in this directory, your version of 
will be used instead of the one in the standard library.  This may cause Idle 
to behave strangely, or possibly not run at all."

--

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2015-11-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> 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



[issue25527] Invalid (... and confusing) warning raised by 2to3 regarding repeat

2015-11-01 Thread Antony Lee

New submission from Antony Lee:

$ echo 'from numpy import repeat\nrepeat(2, 3)' | 2to3 -
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: No files need to be modified.
RefactoringTool: Warnings/messages while refactoring:
RefactoringTool: ### In file  ###
RefactoringTool: Line 2: You should use 'operator.mul(2, 3)' here.

numpy.repeat(2, 3) returns np.array([2, 2, 2]) but 2to3 confuses it with the 
old operator.repeat.  It may be impossible to resolve in general which function 
the author wanted to call but perhaps the warning should only be raised if the 
operator module is imported at some point?  (or clarify the error message)

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 253835
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Invalid (... and confusing) warning raised by 2to3 regarding repeat
versions: Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25228] Regression in cookie parsing with brackets and quotes

2015-11-01 Thread Pathangi Jatinshravan

Pathangi Jatinshravan added the comment:

Just saw the code review comments now, didn't know that there was a separate 
section for code review comments until now. Will take a look and implement them.

--

___
Python tracker 

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



[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-11-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e27c589e1c6a by Serhiy Storchaka in branch '3.4':
Issue #25510: fileinput.FileInput.readline() now returns b'' instead of ''
https://hg.python.org/cpython/rev/e27c589e1c6a

New changeset 321b34824020 by Serhiy Storchaka in branch '3.5':
Issue #25510: fileinput.FileInput.readline() now returns b'' instead of ''
https://hg.python.org/cpython/rev/321b34824020

New changeset 4f0e293e6eb0 by Serhiy Storchaka in branch 'default':
Issue #25510: fileinput.FileInput.readline() now returns b'' instead of ''
https://hg.python.org/cpython/rev/4f0e293e6eb0

--
nosy: +python-dev

___
Python tracker 

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



[issue25228] Regression in cookie parsing with brackets and quotes

2015-11-01 Thread Pathangi Jatinshravan

Pathangi Jatinshravan added the comment:

New patch with code review comments incorporated.

--
Added file: http://bugs.python.org/file40919/patch_review.diff

___
Python tracker 

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



[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry for my bad wording. I wasn't going to blame or insult anybody.

--

___
Python tracker 

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



[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-11-01 Thread Larry Hastings

Larry Hastings added the comment:

I think it's about time to think about releasing 3.5.1.  But since this bug is 
marked as a "release blocker", 3.5.1 cannot be released until this is fixed.  
Arguably I can't even really make a schedule for 3.5.1 until it's fixed, or at 
least I'm reasonably confident I know when it'll be fixed.

Any idea when this might be fixed?

--
nosy: +larry

___
Python tracker 

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



[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Ryosuke for your contribution.

--
resolution:  -> fixed
stage: commit review -> 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



[issue18973] Use argparse in the calendar module

2015-11-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9f8b5053e30d by Serhiy Storchaka in branch 'default':
Issue #18973: Command-line interface of the calendar module now uses argparse
https://hg.python.org/cpython/rev/9f8b5053e30d

--
nosy: +python-dev

___
Python tracker 

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



[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And it looks there was a special decision to not deprecate optparse.

--

___
Python tracker 

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



[issue25228] Regression in cookie parsing with brackets and quotes

2015-11-01 Thread Guido van Rossum

Guido van Rossum added the comment:

I'm coming at this without much context (I don't recall the original issue)
but IIUC from a security POV, lenient parsing is unsafe -- it could allow
an attacker to modify a cookie (or part of a cookie -- I'm unclear on the
correct terminology here) and that's what we're trying to avoid.

--

___
Python tracker 

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



[issue18973] Use argparse in the calendar module

2015-11-01 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Serhiy, welcome.

--

___
Python tracker 

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



[issue25083] Python can sometimes create incorrect .pyc files

2015-11-01 Thread Brett Cannon

Brett Cannon added the comment:

Nope, I think you probably have everyone who might be interested in looking at 
fixing this on the issue, tzickel. Just a matter of someone taking the interest 
and initiative to fix this in Python 2.7.

--

___
Python tracker 

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



[issue18973] Use argparse in the calendar module

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you SilentGhost and Stéphane for your review.

--
resolution:  -> fixed
stage: patch review -> 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



[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-01 Thread Stefan Krah

Stefan Krah added the comment:

First of all, the premise "exports > 0" in your example looks wrong
to me.  The deallocation process for the first view should start precisely when 
it no longer has any exports.

In fact, the check for "exports > 0" is for the case when
memoryview.release() is called from the Python level.


Secondly, even if it did happen (show the code path leading
to that!), BufferError would be set in memory_clear() and the
garbage collector would throw a FatalError, i.e. step 5+ would
not be reached.


Lastly, I don't find it very diplomatic to use language like "Deallocation 
scheme for memoryview is complex and unsafe. It
crashes with chained memoryviews..." when you don't seem to
a test case or a clear concept of how the alleged bug should
occur.

--
resolution:  -> not a bug
stage: patch review -> 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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-11-01 Thread Cyd Haselton

Cyd Haselton added the comment:

Key note: it looks like the config option --with-hash-algorithm does nothing; 
python is still built with the siphash hash algorithim even though I specified 
fnv and, in pyconfig.h:

/* Define hash algorithm for str, bytes and memoryview. SipHash24: 1, FNV: 2,
   externally defined: 0 */
#define Py_HASH_ALGORITHM 2

What's the correct way to build with fnv as the hash algorithm?

--

___
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-11-01 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

Are there no binaries?

Pretty sure it isn't your device. I'd think a compiler issue. What are you 
using, and what version?

You have insane determination! :D

On November 1, 2015 8:34:21 AM CST, Cyd Haselton  wrote:
>
>Cyd Haselton added the comment:
>
>GDB debugging isn't going to happen any time soon; all of the gdb tests
>fail.
>I re-compiled with the --with-pydebug option, thinking that would help,
>but it won't build; I get the following error when the newly built
>python starts to build packages:
>
>Debug memory block at address p=0xb6003070: API 'a'
>795107700 bytes originally requested
>The 3 pad bytes at p-3 are not all FORBIDDENBYTE (0xfb):
>at p-3: 0x2f *** OUCH
>at p-2: 0x00 *** OUCH
>at p-1: 0x00 *** OUCH
> Because memory is corrupted at the start, the count of bytes requested
>   may be bogus, and checking the trailing pad bytes may segfault.
>The 4 pad bytes at tail=0xe56491e4 are Segmentation fault
>generate-posix-vars failed
>
>Additional things I've attemptedto try to resolve the test_hash
>failure, based on this  bug report
>(https://mail.python.org/pipermail/python-bugs-list/2015-March/267442.html)
>1) compiling with -mno-unaligned-access
>2) compiling with FNV as the default hash algorithm.
>
>Neither worked. At this point I am at a loss and am beginning to think
>there may be a problem with my device.  Any suggestions are welcome.
>
>--
>
>___
>Python tracker 
>
>___

--

___
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-11-01 Thread Cyd Haselton

Cyd Haselton added the comment:

Pretty sure there are binaries, but the python binary can't build its own 
modules.

I'm using GCC 4.9.2 on Android L...which means it is a PIE and that Python is 
being built as a PIE

--

___
Python tracker 

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



[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is a difference between optparse and other deprecated module. Other 
modules are deprecated if they are too buggy or bad-designed to be fixed and 
there are stable standard or third-party modules that provides similar 
functionality. But looking on a number of open issues for argparse it seems 
that optparse is more stable and has less bugs than more powerful argparse.

Having experience with converting many modules from optparse to argparse or 
reviewing converting patches, I can say that not always the conversion can be 
done without loss. For example there is a difference in formatting descriptions.

I think that optparse should be supported in the stdlib for very long time. -1 
for non-pending warning. Don’t have an opinion about pending warning.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25464] Tix HList header_exists should be "exist"

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It looks as a bug in Tix. All other Tcl, Tk and Tix commands (except 
"assemblecode") use "exists", and "header exists" is documented. Perhaps we 
should workaround this bug. But I doubt about renaming header_exists to 
header_exist.

As for tests, I'm working on writing tests for Tix. The progress is slow 
because Tix provides a lot of classes with a lot of commands and options, but I 
hope to finish the work before releasing 3.6. We can commit the patch for this 
issue without tests, just add a reminder in test_tix.py.

--

___
Python tracker 

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



[issue25083] Python can sometimes create incorrect .pyc files

2015-11-01 Thread tzickel

tzickel added the comment:

TL:DR
Python 2 forgot to do I/O error checking when reading .py files from disk. On 
some rare situations this can bite Python in the ass and cause it to bork .pyc 
files.

Checked python 3, it checks the I/O in a different / better way.

Next python 2.7 is out in 1.5 month, I really want this fix to get in, did I 
forgot to nose some developer who can help out ?

--

___
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-11-01 Thread Cyd Haselton

Cyd Haselton added the comment:

GDB debugging isn't going to happen any time soon; all of the gdb tests fail.
I re-compiled with the --with-pydebug option, thinking that would help, but it 
won't build; I get the following error when the newly built python starts to 
build packages:

Debug memory block at address p=0xb6003070: API 'a'
795107700 bytes originally requested
The 3 pad bytes at p-3 are not all FORBIDDENBYTE (0xfb):
at p-3: 0x2f *** OUCH
at p-2: 0x00 *** OUCH
at p-1: 0x00 *** OUCH
Because memory is corrupted at the start, the count of bytes requested
   may be bogus, and checking the trailing pad bytes may segfault.
The 4 pad bytes at tail=0xe56491e4 are Segmentation fault
generate-posix-vars failed

Additional things I've attemptedto try to resolve the test_hash failure, based 
on this  bug report 
(https://mail.python.org/pipermail/python-bugs-list/2015-March/267442.html)
1) compiling with -mno-unaligned-access
2) compiling with FNV as the default hash algorithm.

Neither worked. At this point I am at a loss and am beginning to think there 
may be a problem with my device.  Any suggestions are welcome.

--

___
Python tracker 

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



[issue25530] ssl: OP_NO_SSLv3 should always be set unless a user specifically asks for it

2015-11-01 Thread Alex Gaynor

New submission from Alex Gaynor:

SSLv3 is broken, both _create_unverified_context and create_default_context 
turn it off, but we should make all contexts turn it off, like we do for SSLv2.

A patch is attached.

--
components: Library (Lib)
files: sslv3.diff
keywords: needs review, patch, security_issue
messages: 253868
nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou
priority: normal
severity: normal
status: open
title: ssl: OP_NO_SSLv3 should always be set unless a user specifically asks 
for it
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40920/sslv3.diff

___
Python tracker 

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



[issue25531] greenlet header file is missing inside virtualenv

2015-11-01 Thread Alexey Borzenkov

Alexey Borzenkov added the comment:

Just wanted to clarify that greenlet.h is not missing in virtualenv, but 
headers seem to be installed in venv/include/site/python3.5, when only 
venv/include is considered for includes when building extensions. It is not 
specific to OSX and it is trivial to reproduce on Linux too.

--
nosy: +snaury

___
Python tracker 

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



[issue25531] greenlet header file is missing inside virtualenv

2015-11-01 Thread R. David Murray

R. David Murray added the comment:

Greenlet isn't part of python, so what bug in CPython are you reporting?  It 
sounds like you should be reporting this to the greenlet folks.

--
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



[issue25083] Python can sometimes create incorrect .pyc files

2015-11-01 Thread Meador Inge

Meador Inge added the comment:

I started poking at the patch a little and have a few comments.

My understanding of the issue comments is that the read error actually happens 
when reading in the *source* file and *not* the bytecode file.  This happens 
because 'ferror' is not checked after receiving an EOF and thus we think we 
just have an empty source file.  I can understand how creating a reproducible 
test case for this error path would be very difficult.

So, checking for errors with 'ferror' definitely seems reasonable, but why do 
it in the tokenizer code?  I already see several places in 'fileobject.c' that 
do similar checks.  For example, in 'get_line' I see:

   while ( buf != end && (c = GETC(fp)) != EOF ) {
  ...
   }
   if (c == EOF) {
  if (ferror(fp) && errno == EINTR) {
 ...
  }
   }

As such, wouldn't handling this error case directly in 
'Py_UniversalNewlineFgets' similar to the above code be more appropriate?

--

___
Python tracker 

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



[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No, I have not more information. My supposition is based on indirect evidence 
in msg225052. I suppose there was more recent discussion in 2014.

--

___
Python tracker 

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



[issue25243] decouple string-to-boolean logic from ConfigParser.getboolean and offer as separate function

2015-11-01 Thread Joshua Bronson

Joshua Bronson added the comment:

My friend @novalis_dt and I worked up a patch for this including tests 
(attached). First time working with the CPython codebase but hope it's a 
reasonable start.

Here's a preview:

~> ./python.exe 

 Python 3.6.0a0 (default:9f8b5053e30d+, Nov  1 2015, 18:38:37)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> trues = ['true', 'yes', 'on', '1']
>>> [bool.from_config_str(i) for i in trues]
[True, True, True, True]
>>> falses = ['false', 'no', 'off', '0', '']
>>> [bool.from_config_str(i) for i in falses]
[False, False, False, False, False]


I would be happy to try to make any additional changes necessary (including 
changing ConfigParser.getboolean to use the new method) if there is interest.

Thanks!

--
keywords: +patch
nosy: +novalis_dt
Added file: http://bugs.python.org/file40923/bool_from_config_str.patch

___
Python tracker 

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



[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-01 Thread Chris Withers

New submission from Chris Withers:

The following results in an infinite loop:

>>> from inspect import unwrap
>>> from unittest.mock import call
>>> unwrap(call)

This can occur when you use doctest.DocTestSuite to load doc tests from a 
module where unittest.mock.call has been imported.

--
components: Library (Lib)
keywords: 3.5regression
messages: 253885
nosy: cjw296, michael.foord, ncoghlan, yselivanov
priority: normal
severity: normal
status: open
title: infinite loop when running inspect.unwrap over unittest.mock.call
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread R. David Murray

R. David Murray added the comment:

I can't remember the timing...was that PEP accepted before we made 
DeprecationWarnings off by default?  It sounds like it probably was, based on 
the phrasing.

--

___
Python tracker 

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



[issue25464] Tix HList header_exists should be "exist"

2015-11-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

If tkinter and IDLE are some places installed without tix, then it it not 
usable.

What about the suggestion for a revised patch?

--

___
Python tracker 

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



[issue18010] pydoc search chokes on import errors

2015-11-01 Thread Martin Panter

Martin Panter added the comment:

Here is a test case. I had to insert a temporary directory into sys.path, based 
off my patch in Issue 25184. Let me know if it doesn’t look too evil :)

--
nosy: +martin.panter
stage: test needed -> patch review
Added file: http://bugs.python.org/file40924/pydoc_search_onerror.v2.patch

___
Python tracker 

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



[issue25523] Correct "a" article to "an" article

2015-11-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d8ff13414deb by Martin Panter in branch '3.4':
Issue #25523: Correct "a" article to "an" article
https://hg.python.org/cpython/rev/d8ff13414deb

New changeset e279ab6753fd by Martin Panter in branch '3.5':
Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5
https://hg.python.org/cpython/rev/e279ab6753fd

New changeset 2347271172b3 by Martin Panter in branch '3.5':
Issue #25523: Further a-to-an corrections new in 3.5
https://hg.python.org/cpython/rev/2347271172b3

New changeset 96e61bb7f6e9 by Martin Panter in branch 'default':
Issue #25523: Merge a-to-an corrections from 3.5
https://hg.python.org/cpython/rev/96e61bb7f6e9

--
nosy: +python-dev

___
Python tracker 

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



[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread R. David Murray

R. David Murray added the comment:

Oh, and as far as bugs because it is powerful...optparse has had time to have 
its bugs fixed, so having bugs in the newer features of argparse is not 
surprising, really.  We just need to get the fixes committed.

--

___
Python tracker 

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



[issue25523] Correct "a" article to "an" article

2015-11-01 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> fixed
stage: commit review -> 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



[issue25529] Provide access to the validated certificate chain in ssl module

2015-11-01 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou

___
Python tracker 

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



[issue25041] document AF_PACKET socket address format

2015-11-01 Thread Camilla Montonen

Camilla Montonen added the comment:

Thank you very much for the feedback, Martin and Berker!
I'll start working on the revised patch.

--

___
Python tracker 

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



[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-11-01 Thread R. David Murray

R. David Murray added the comment:

I will work on it this week, should have something committed before the end of 
next weekend.

--

___
Python tracker 

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



[issue25388] tokenizer crash/misbehavior -- heap use-after-free

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Stack trace:

#0  ascii_decode (start=0xa72f2008 "", end=0xf891 , dest=) at 
Objects/unicodeobject.c:4795
#1  0x08100c0f in PyUnicode_DecodeUTF8Stateful (s=s@entry=0xa72f2008 "", 
size=size@entry=1490081929, errors=errors@entry=0x81f4303 "replace", 
consumed=consumed@entry=0x0)
at Objects/unicodeobject.c:4871
#2  0x081029c7 in PyUnicode_DecodeUTF8 (s=0xa72f2008 "", size=1490081929, 
errors=errors@entry=0x81f4303 "replace") at Objects/unicodeobject.c:4743
#3  0x0815179a in err_input (err=0xbfffec04) at Python/pythonrun.c:1352
#4  0x081525cf in PyParser_ASTFromFileObject (arena=0x8348118, errcode=0x0, 
flags=, ps2=0x0, ps1=0x0, start=257, enc=0x0, 
filename=0xb7950e00, fp=0x8347fb0)
at Python/pythonrun.c:1163
#5  PyRun_FileExFlags (fp=0x8347fb0, filename_str=0xb79e2eb8 "vuln.py", 
start=257, globals=0xb79e3d8c, locals=0xb79e3d8c, closeit=1, flags=0xbfffecec) 
at Python/pythonrun.c:916
#6  0x08152744 in PyRun_SimpleFileExFlags (fp=0x8347fb0, filename=, closeit=1, flags=0xbfffecec) at Python/pythonrun.c:396
#7  0x08063919 in run_file (p_cf=0xbfffecec, filename=0x82eda10 L"vuln.py", 
fp=0x8347fb0) at Modules/main.c:318
#8  Py_Main (argc=argc@entry=2, argv=argv@entry=0x82ed008) at Modules/main.c:768
#9  0x0805f345 in main (argc=2, argv=0xbfffee44) at ./Programs/python.c:69

At #2 PyUnicode_DecodeUTF8 is called with s="" and size=1490081929. size is 
err->offset, and err->offset is set only in parsetok() in Parser/parsetok.c. 
This is the tokenizer bug.

Minimal reproducer:

./python -c 'with open("vuln.py", "wb") as f: f.write(b"\x7f\x00\n\xfd\n")
./python vuln.py

The crash is gone if comment out the code at the end of decoding_fgets() that 
tests UTF-8.

--
nosy: +benjamin.peterson, serhiy.storchaka

___
Python tracker 

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



[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Martin for your review and for initial investigation.

--
resolution:  -> fixed
stage: patch review -> 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



[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-11-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ce8c850a52d4 by Serhiy Storchaka in branch '3.5':
Issue #25395: Fixed crash when highly nested OrderedDict structures were
https://hg.python.org/cpython/rev/ce8c850a52d4

New changeset bd6bfa5fe203 by Serhiy Storchaka in branch 'default':
Issue #25395: Fixed crash when highly nested OrderedDict structures were
https://hg.python.org/cpython/rev/bd6bfa5fe203

--
nosy: +python-dev

___
Python tracker 

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



[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

I don't think we should care about breaking backward compatibility here. Most 
code tests end-of-files with "not line" or "len(line) == 0", and this work with 
fixed fileinput as well as with broken. That is why we have received this bug 
report now, after many years since releasing 3.0.

--
assignee:  -> serhiy.storchaka
stage: test needed -> commit review
versions: +Python 3.4, Python 3.6

___
Python tracker 

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



[issue18973] Use argparse in the calendar module

2015-11-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue25529] Provide access to the validated certificate chain in ssl module

2015-11-01 Thread Cory Benfield

New submission from Cory Benfield:

I’m currently working on adding support for HPKP to the Requests and urllib3 
modules. HPKP (HTTP Public Key Pinning), specified in RFC 7469, is an extension 
to HTTP that allows a web server to specify a whitelist of public keys that are 
valid for TLS certificates on that domain. This prevents a rogue certificate 
authority from issuing a certificate that would be trusted by a browser and 
would allow a man-in-the-middle attack on a domain (as happened to Google in 
2013[0]).

Right now, the draft version of the support I have will only work when you use 
PyOpenSSL for your TLS needs, not the standard library. This is because to get 
HPKP to work I need access to the validated certificate chain: that is, the 
certificate chain that OpenSSL has built and validated for the TLS connection. 
I also need to be able to work with those certificates in order to extract 
their public keys. The standard library’s ssl module does not expose any of 
this functionality.

To get this to work with the standard library, I would require the following 
things from the standard library:

1. The ability to access the validated certificate chain. This requires saving 
off the certificate each time the OpenSSL verify callback is called. This is an 
easy enough change to make.
2. The ability to extract the public key from the saved certificates. This 
could be done by extending the logic used for getpeercert() to provide a 
DER-encoded ASN.1 representation of the public key in the dictionary, and then 
using that representation for each cert in the peer cert chain.

The motivation for making this available in the standard library would be pip. 
Right now python.org and all its subdomains (including pypi.python.org) are 
HPKP-enabled. Making this support available in the standard library would 
ensure that all pip installations are safe from man-in-the-middle attacks on 
its packaging infrastructure. Without it, a number of third-party packages 
would be required to add this security. In particular, pip could distribute a 
HPKP preload value for pypi.python.org, which would ensure that pip is truly 
invulnerable to MITM TLS attacks via malicious attackers coercing a CA to 
provide TLS certificates for *.python.org.

I’m happy to do the work required to provide this functionality, but I’d only 
like to start work if people believe there’s a likelihood of getting it merged.

[0]: 
https://nakedsecurity.sophos.com/2013/01/08/the-turktrust-ssl-certificate-fiasco-what-happened-and-what-happens-next/

--
components: Library (Lib)
messages: 253864
nosy: Lukasa
priority: normal
severity: normal
status: open
title: Provide access to the validated certificate chain in ssl module
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue25455] Some repr implementations don't check for self-referential structures

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The general solution is to make PyObject_Repr to detect recursive calls (as 
reprlib.recursive_repr does).

The straightforward way is to use thread local identity set. It can be 
implemented as a dict that maps id(obj) -> obj (creates an int object for key 
for every call, requires about 40-80 bytes for recurse level), or as 
specialized hash table (see Modules/hashtable.c) (faster, requires about 12-24 
bytes for recurse level).

The fastest solution would be to set special flag inside proceeded object. For 
now general object has no place for such flag, but we can add it to GC head. On 
64-bit this would increase the size of GC head from 24 to 32 bytes, on 32-bit 
there is a free place in 16-bytes GC head.

However the performance can be not critical here, because in any case repr() 
creates new object (resulting string). Using thread local hash table can be 
enough. In any case the patch will be enough complex to target it 3.6 only.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-11-01 Thread R. David Murray

R. David Murray added the comment:

Ah, I misunderstood the bug report.  Yes, this should be OK (I hope :).

--

___
Python tracker 

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



[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-11-01 Thread Chris Angelico

Changes by Chris Angelico :


--
nosy: +Rosuav

___
Python tracker 

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



[issue25531] greenlet header file is missing inside virtualenv

2015-11-01 Thread kracekumar ramaraju

New submission from kracekumar ramaraju:

I am using OSX 10.10.5 (14F27) and Python 3.5. Python 3.5 was installed via 
brew.
When greenlet is installed inside virtualenv using py3.5 header files are
missing inside /path/to/venv/include/python3.5m. As a result uwsgi is unable to 
build with asyncio support

~  brew info python3
python3: stable 3.5.0 (bottled), HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python3/3.4.3 (4721 files, 82M)
Poured from bottle
/usr/local/Cellar/python3/3.4.3_2 (5948 files, 98M)
Built from source
/usr/local/Cellar/python3/3.5.0 (3573 files, 61M) *
Poured from bottle
From: 
https://github.com/Homebrew/homebrew/blob/master/Library/Formula/python3.rb
==> Dependencies
Build: xz , pkg-config 
Required: openssl 
Recommended: readline , sqlite , gdbm , xz 
Optional: homebrew/dupes/tcl-tk


Steps to reproduce
--
1. Create a venv

$/tmp  python3.5 -m virtualenv venv_bug

2. Install greenlet
$/tmp  . venv_bug/bin/activate
(venv_bug)$/tmp  pip install greenlet
Collecting greenlet
  Using cached greenlet-0.4.9.tar.gz
Building wheels for collected packages: greenlet
  Running setup.py bdist_wheel for greenlet
  Complete output from command /private/tmp/venv_bug/bin/python3.5 -c "import 
setuptools;__file__='/private/var/folders/xk/8lhz2_j91_3758cc65stj5z4gn/T/pip-build-sxtdlufe/greenlet/setup.py';exec(compile(open(__file__).read().replace('\r\n',
 '\n'), __file__, 'exec'))" bdist_wheel -d 
/var/folders/xk/8lhz2_j91_3758cc65stj5z4gn/T/tmpf6g8rwt_pip-wheel-:
  running bdist_wheel
  running build
  running build_ext
  building 'greenlet' extension
  creating build
  creating build/temp.macosx-10.10-x86_64-3.5
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common 
-dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes 
-I/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/include/python3.5m
 -c greenlet.c -o build/temp.macosx-10.10-x86_64-3.5/greenlet.o
  creating build/lib.macosx-10.10-x86_64-3.5
  clang -bundle -undefined dynamic_lookup 
build/temp.macosx-10.10-x86_64-3.5/greenlet.o -o 
build/lib.macosx-10.10-x86_64-3.5/greenlet.cpython-35m-darwin.so
  installing to build/bdist.macosx-10.10-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.macosx-10.10-x86_64
  creating build/bdist.macosx-10.10-x86_64/wheel
  copying build/lib.macosx-10.10-x86_64-3.5/greenlet.cpython-35m-darwin.so -> 
build/bdist.macosx-10.10-x86_64/wheel
  running install_headers
  creating build/bdist.macosx-10.10-x86_64/wheel/greenlet-0.4.9.data
  creating build/bdist.macosx-10.10-x86_64/wheel/greenlet-0.4.9.data/headers
  copying greenlet.h -> 
build/bdist.macosx-10.10-x86_64/wheel/greenlet-0.4.9.data/headers
  running install_egg_info
  running egg_info
  creating greenlet.egg-info
  writing top-level names to greenlet.egg-info/top_level.txt
  writing greenlet.egg-info/PKG-INFO
  writing dependency_links to greenlet.egg-info/dependency_links.txt
  writing manifest file 'greenlet.egg-info/SOURCES.txt'
  warning: manifest_maker: standard file '-c' not found

  reading manifest file 'greenlet.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'greenlet.egg-info/SOURCES.txt'
  Copying greenlet.egg-info to 
build/bdist.macosx-10.10-x86_64/wheel/greenlet-0.4.9-py3.5.egg-info
  running install_scripts
  Traceback (most recent call last):
File "", line 1, in 
File 
"/private/var/folders/xk/8lhz2_j91_3758cc65stj5z4gn/T/pip-build-sxtdlufe/greenlet/setup.py",
 line 101, in 
  **setuptools_args)
File 
"/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py",
 line 148, in setup
  dist.run_commands()
File 
"/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py",
 line 955, in run_commands
  self.run_command(cmd)
File 
"/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py",
 line 974, in run_command
  cmd_obj.run()
File 
"/private/tmp/venv_bug/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 
213, in run
  archive_basename = self.get_archive_basename()
File 
"/private/tmp/venv_bug/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 
161, in get_archive_basename
  impl_tag, abi_tag, plat_tag = self.get_tag()
File 
"/private/tmp/venv_bug/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 
155, in get_tag
  assert tag == supported_tags[0]
  AssertionError

  
  Failed building wheel for greenlet
Failed to build greenlet
Installing collected packages: greenlet
  Running setup.py install for greenlet
Successfully installed greenlet-0.4.9

3. Install uWSGI
(venv_bug)$  /tmp  CFLAGS="-I/tmp/venv_bug/include/python3.5m" 
UWSGI_PROFILE="asyncio" pip install uwsgi
Collecting uwsgi
  

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread John Hagen

John Hagen added the comment:

@martin.panter My new patch fixes Lib/test_optparse.py by suppressing the 
warning like test_imp does as you suggested.

@serhiy.storchaka I don't have a strong preference that it be a 
DeprecationWarning vs. PendingDeprecationWarning since to me, both get the 
point across to the end-user to avoid it.  I do, however, feel that it is 
important raise some kind of warning since it seems clear from the docs that is 
deprecated.

In my new patch I changed the type of warning to a PendingDeprecationWarning, 
as there seems to be at least some notion that optparse is a special case.  I 
don't have a strong opinion about which type of deprecation warning is used.

My new patch works when test_optparse.py is run with -Werror on 3.6.0a0.

--
Added file: 
http://bugs.python.org/file40921/optparse_and_test_deprecationwarning.patch

___
Python tracker 

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



[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread John Hagen

Changes by John Hagen :


Removed file: http://bugs.python.org/file40913/optparse_deprecationwarning.patch

___
Python tracker 

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



[issue25464] Tix HList header_exists should be "exist"

2015-11-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree. Leave the name 'header_exists', consistent with all others, pass 
'exist', and add a comment.  Optional: report the bug upstream if there are tix 
maintainers somewhere.

Serhiy, my question about the status of tix is really whether I can use it in 
IDLE, since it is not now.

--

___
Python tracker 

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



[issue25464] Tix HList header_exists should be "exist"

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Serhiy, my question about the status of tix is really whether I can use it in 
> IDLE, since it is not now.

I can't say anything. But be aware that Tix is optional and likely is not 
installed on Linux. Maintainers should add new dependence to IDLE package in 
every distribution.

--

___
Python tracker 

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



[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread R. David Murray

R. David Murray added the comment:

My sense is that most of the open argparse bugs are *because* of the increased 
power (that is, they aren't, with a few exceptions, in the fundamental bits 
that optparse does as well).  And the issues are open because no one is 
maintaining that module, either :(.  There is one non-committer who has done a 
lot of work on the patches, we should probably evaluate offering him commit 
privileges.

That said, I don't have a strong opinion on the deprecation-or-not myself.

--

___
Python tracker 

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



[issue25474] Weird behavior when setting f_trace in a context manager

2015-11-01 Thread Xavier de Gaye

Xavier de Gaye added the comment:

This is an artefact that occurs as the result of raising an exception in the 
local trace function.

Disassembling the first case of failure of as_context.py with the attached 
script gives the following:

  9   0 LOAD_GLOBAL  0 (context)
  3 CALL_FUNCTION0 (0 positional, 0 keyword pair)
  6 SETUP_WITH  20 (to 29)

 10   9 STORE_FAST   0 (two)

 11  12 LOAD_GLOBAL  1 (print)
 15 LOAD_CONST   1 ('two')
 18 LOAD_FAST0 (two)
 21 CALL_FUNCTION2 (2 positional, 0 keyword pair)
 24 POP_TOP
 25 POP_BLOCK
 26 LOAD_CONST   0 (None)
>>   29 WITH_CLEANUP
 30 END_FINALLY

 12  31 LOAD_GLOBAL  1 (print)
 34 LOAD_CONST   2 ('TWO')
 37 LOAD_FAST0 (two)
 40 CALL_FUNCTION2 (2 positional, 0 keyword pair)
 43 POP_TOP
 44 LOAD_CONST   0 (None)
 47 RETURN_VALUE

The __raise() local trace function is invoked on line 10 upon executing the 
STORE_FAST bytecode (this can be confirmed by running foo() under the control 
of pdb).  The exception raised by __raise() causes the assignement to 'two' to 
fail, hence the tracebacks in as_context.py.  This does not seem to be a bug in 
python.

--
nosy: +xdegaye
Added file: http://bugs.python.org/file40922/as_context_dis.py

___
Python tracker 

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



[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread Martin Panter

Martin Panter added the comment:

Serhiy, do you have a link or more information about this decision? Looking 
around at previous discussions, this is what I found: limiting to pending 
deprecation: ; not 
bothering with any code warning: 
. But the PEP was 
never updated as suggested in that last thread.

FWIW I have never used optparse. I do find argparse useful, but having bugs due 
to being “powerful” is not necessarily a good thing.

--

___
Python tracker 

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



[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-01 Thread Chris Withers

Chris Withers added the comment:

A naive solution is to chat unittest.mock._Call's __getattr__ to be as follows:

def __getattr__(self, attr):
if attr == '__wrapped__':
raise AttributeError('__wrapped__')
if self.name is None:
return _Call(name=attr, from_kall=False)
name = '%s.%s' % (self.name, attr)
return _Call(name=name, parent=self, from_kall=False)

...but I'm not sure that's the right thing to do.

inspect.unwrap is trying to catch this loop, but the implementation fails for 
cases where f.__wrapped__ is generative, as in the case of Mock and _Call.

I suspect both modules need a fix, but not sure what best to suggest.

--

___
Python tracker 

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



[issue23749] asyncio missing wrap_socket (starttls)

2015-11-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Guido, Victor, any thoughts about the (proto-)patch?

--

___
Python tracker 

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



[issue25531] greenlet header file is missing inside virtualenv

2015-11-01 Thread Kracekumar Ramaraj

Kracekumar Ramaraj added the comment:

I have attached the link to greenlet issue as well. The issue seems to be with 
distutils/setuptools.

--

___
Python tracker 

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



[issue24379] operator.subscript

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The are is a reference loop:

global instance -> type -> method -> module globals -> global instance

Since an instance doesn't have GC head if __slots__ is empty, the loop can't be 
broken.

A workaround is to add a stub element to __slots__:

__slots__ = ('__stub__',)

But operator.subscript is not the only class that causes a reference leak. Any 
class with empty __slots__ can create a loop and cause a leak.

--

___
Python tracker 

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



[issue25523] Correct "a" article to "an" article

2015-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch with additional changes.

--
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open
Added file: http://bugs.python.org/file40925/a-an_2.patch

___
Python tracker 

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



[issue19407] PEP 453: update the "Installing Python Modules" documentation

2015-11-01 Thread Jon Snoo

Jon Snoo added the comment:

The link to the "quick recommendations section" in the Python 2.7 and 3.3 docs 
is broken. It appears that the PPUG has changed the path from

https://python-packaging-user-guide.readthedocs.org/en/latest/current.html

to

https://python-packaging-user-guide.readthedocs.org/en/latest/current/

Also, should the "Installing Python Modules" in Python 2.7.9 and 2.7.10 be the 
same as the one in Python 3.4? After all, pip is included in Python 2.7.9+, 
isn't it?

--
nosy: +Jon Snoo

___
Python tracker 

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



[issue24931] _asdict breaks when inheriting from a namedtuple

2015-11-01 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue24379] operator.subscript

2015-11-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 83fa2e9b0038 by Raymond Hettinger in branch 'default':
Issue #24379:  Revert the operator.subscript patch (dccc4e63aef5) pending 
resolution of the related refcnt leak.
https://hg.python.org/cpython/rev/83fa2e9b0038

--

___
Python tracker 

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



[issue24379] operator.subscript

2015-11-01 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: rhettinger -> 
priority: high -> normal

___
Python tracker 

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



[issue14119] Ability to adjust queue size in Executors

2015-11-01 Thread Alexander Mohr

Alexander Mohr added the comment:

adding support for internal queue size is critical to avoid chewing through all 
your memory when you have a LOT of tasks.  I just hit this issue myself.  If we 
could have a simple parameter to set the max queue size this would help 
tremendously!

--
nosy: +thehesiod

___
Python tracker 

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