[issue22155] Out of date code example for tkinter's createfilehandler

2015-05-17 Thread Martin Panter

Martin Panter added the comment:

Here is a patch which moves the documentation from the FAQ into a new section 
at the bottom of the main “tkinter” reference manual page, and updates it. I 
also mentioned lack of Windows support. Let me know what you think!

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file39402/file-handlers.patch

___
Python tracker 

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



[issue24195] Add `Executor.filter` to concurrent.futures

2015-05-17 Thread Ram Rachum

Ram Rachum added the comment:

Okay, let me understand what the opinions of people are about this feature.

Ram Rachum: +1
Antoine Pitrou: -1
Nick Coghlan: Is that a +1 or a +0?
Ethan and Paul, you've participated but I didn't get your opinion on whether 
you want to see this feature go in. 

If there are more -1s than +1s we can close this ticket.

--

___
Python tracker 

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



[issue24216] Typo in bytes.join/bytearray.join documentation

2015-05-17 Thread Dmitry Kazakov

New submission from Dmitry Kazakov:

This

if there are any values in iterable that are note bytes-like objects

should be

if there are any values in iterable that are not bytes-like objects

Here's a micropatch...

--
assignee: docs@python
components: Documentation
files: bytes_join.diff
keywords: patch
messages: 243389
nosy: docs@python, vlth
priority: normal
severity: normal
status: open
title: Typo in bytes.join/bytearray.join documentation
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file39403/bytes_join.diff

___
Python tracker 

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



[issue24195] Add `Executor.filter` to concurrent.futures

2015-05-17 Thread Paul Moore

Paul Moore added the comment:

I'm not a heavy user of concurrent.futures, so I don't have a strong opinion. 
I've never felt a need for this function, though, so I guess I'm -0. A recipe 
in the docs would be good, though.

--

___
Python tracker 

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



[issue18323] 'GzipFile' object has no attribute 'extrastart'

2015-05-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As a workaround specify mode='r' for GzipFile.

--

___
Python tracker 

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



[issue23637] Warnings error with non-ascii chars.

2015-05-17 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



[issue23757] tuple function gives wrong answer when called on list subclass with custom __iter__

2015-05-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Raymond's patch LGTM. Here is updated patch with tests.

--
assignee:  -> rhettinger
keywords: +patch
stage: needs patch -> commit review
Added file: http://bugs.python.org/file39404/fix_list_to_tuple_2.diff

___
Python tracker 

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



[issue15809] 2.7 IDLE console uses incorrect encoding.

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 247f003b42ea by Serhiy Storchaka in branch '2.7':
Issue #15809: IDLE shell now uses locale encoding instead of Latin1 for
https://hg.python.org/cpython/rev/247f003b42ea

--
nosy: +python-dev

___
Python tracker 

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



[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2015-05-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that changes the generating of message IDs:

1. The datetime is taken with higher precision, 2 decimal digits after dot.
2. The datetime is written as Unix time in 0.01 second units, not as 
mmddHHMMSS. This is more compact and faster.
3. The random part is taken as the random integer in the range 0 from to 2**64, 
not from 0 to 10**5.

This increases the length of generated part of the ID from 26 to 39 characters 
in average. Perhaps in new releases we can use non-decimal or even 
non-alphanumeric characters in ID for compactness.

--
nosy: +barry
stage:  -> patch review
Added file: http://bugs.python.org/file39405/make_msgid_2.diff

___
Python tracker 

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



[issue20035] Clean up Tcl library discovery in Tkinter on Windows

2015-05-17 Thread Steve Dower

Steve Dower added the comment:

There's an MSBuild property that I set for release builds (either 
BuildForRelease or ReleaseBuild, not Configuration) that should exclude the 
preprocessor directive so we don't include an unnecessary full path. I can make 
that change later if you don't want to hold this patch up any longer though, as 
the rest looks fine to me. I don't know enough about Tix to comment on Serhiy's 
point.

--

___
Python tracker 

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



[issue24147] doublequote are not well recognized with Dialect class

2015-05-17 Thread Skip Montanaro

Skip Montanaro added the comment:

In your Mon class, you've left the doublequote parameter unset (it defaults to 
None). It completely overrides the default dialect. When no Dialect class is 
given, the default is csv.excel. Note that doublequote is set to True in 
csv.excel. In your second example, the reader starts with csv.excel, then 
selectively overrides the named attributes.

--
resolution:  -> not a bug
status: open -> closed
Added file: http://bugs.python.org/file39406/quotebug.py

___
Python tracker 

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



[issue24147] doublequote are not well recognized with Dialect class

2015-05-17 Thread Mik

Mik added the comment:

Ok Thanks.

But perhaps the documentation of csv.Dialect would be updated with the default 
parameters. If all attribute may be specified this would be indicated in the 
doc.

--

___
Python tracker 

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



[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

Looking at my mail store, it looks like one more more mail clients use a GUID 
for the messageid, which is 36 characters.  So 39 doesn't seem so bad.  There's 
even one that is 74 characters long.  There are also shorter ones, though, so 
compactifying the result wouldn't be a bad thing.

--

___
Python tracker 

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



[issue24147] Dialect class defaults are not documented.

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

Yes, I think the documentation should be improved.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, r.david.murray
resolution: not a bug -> 
stage:  -> needs patch
status: closed -> open
title: doublequote are not well recognized with Dialect class -> Dialect class 
defaults are not documented.
versions: +Python 3.4, Python 3.5 -Python 2.7

___
Python tracker 

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



[issue24216] Typo in bytes.join/bytearray.join documentation

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ba271f116f94 by R David Murray in branch '3.4':
#24216: fix typo
https://hg.python.org/cpython/rev/ba271f116f94

New changeset 91ac3040a28d by R David Murray in branch 'default':
Merge: #24216: fix typo
https://hg.python.org/cpython/rev/91ac3040a28d

--
nosy: +python-dev

___
Python tracker 

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



[issue24216] Typo in bytes.join/bytearray.join documentation

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

Thanks, Dmitry.

--
nosy: +r.david.murray
resolution:  -> fixed
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



[issue24211] Add RFC 6532 support to the email library

2015-05-17 Thread Maciej Szulik

Changes by Maciej Szulik :


--
nosy: +maciej.szulik

___
Python tracker 

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



[issue24147] Dialect class defaults are not documented.

2015-05-17 Thread Skip Montanaro

Skip Montanaro added the comment:

The defaults for the Dialect class are documented:

https://docs.python.org/2/library/csv.html#dialects-and-formatting-parameters

I think the problem is mostly that csv.Dialect must be subclassed. You can't 
use it directly, and if you subclass it as MiK did, you have to supply all the 
missing parameters. The default dialect is actually csv.excel, which does 
provide a suitable set of values for all attributes.

There actually might be a bug lurking in the code as well. The value of 
csv.Dialect.doublequote is None, which will evaluate to False in a boolean 
context. The module docstring has this to say about that attribute:

* doublequote - controls the handling of quotes inside fields.  When
True, two consecutive quotes are interpreted as one during read,
and when writing, each quote character embedded in the data is
written as two quotes

Since the valid values of that attribute are actually only True and False, 
using None as a default value is an invitation to problems. It appears in this 
case that's what happened.

csv.Dialect.__init__ doesn't seem to check that the overriding class properly 
sets all the required parameters. It checks to see if the class is Dialect. If 
not, and if the validate() call passes, all is assumed to be well. But digging 
a bit under the surface, it appears the validate step drops into C where the 
doublequote attribute of Dialog_Type is 0.

I'm not sure the bug should be fixed in 2.7, but it's worth taking a look at 
the 3.5 code to see if that validation step can be improved.

--

___
Python tracker 

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



[issue24211] Add RFC 6532 support to the email library

2015-05-17 Thread Maciej Szulik

Maciej Szulik added the comment:

David one small nit in docs, but otherwise the patch looks good, applies 
cleanly and works as expected.

--

___
Python tracker 

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



[issue24217] O_RDWR undefined in mmapmodule.c

2015-05-17 Thread Jeffrey Armstrong

New submission from Jeffrey Armstrong:

While compiling on Linux/x86 with Open Watcom, I've run into the following at 
link time in Modules/mmapmodule.c:

./Modules/mmapmodule.c(1223): Error! E1011: Symbol 'O_RDWR' has not been 
declared

The constant isn't defined because fcntl.h isn't included.  Looking at the top 
of the file, it appears that, for the Apple platform only, this header is 
included, but no others.

In order to support more runtime libraries outside of GNU libc, I would suggest 
including fcntl.h for all UNIX-y platforms, especially because the POSIX 
standard dictates that this constant be defined in fcntl.h.  I don't know how 
it finds its way in under GCC/GNU libc, but an explicit include might be better.

--
components: Extension Modules
files: mmapmodule.py3.5.0a3.diff
keywords: patch
messages: 243404
nosy: Jeffrey.Armstrong
priority: normal
severity: normal
status: open
title: O_RDWR undefined in mmapmodule.c
type: compile error
versions: Python 3.5
Added file: http://bugs.python.org/file39407/mmapmodule.py3.5.0a3.diff

___
Python tracker 

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



[issue20596] Support for alternate wcstok syntax for Windows compilers

2015-05-17 Thread Jeffrey Armstrong

Changes by Jeffrey Armstrong :


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



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2015-05-17 Thread Jeffrey Armstrong

Jeffrey Armstrong added the comment:

I thought, while I'm here reporting another bug, I'd bump this once more.

There is a patch here, and it corrects clearly broken code.  Should I mark this 
as "won't fix?"

--

___
Python tracker 

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



[issue24217] O_RDWR undefined in mmapmodule.c

2015-05-17 Thread Christian Heimes

Christian Heimes added the comment:

I think it's more portable with a #ifdef HAVE_FCNTL_H block around the include.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue24217] O_RDWR undefined in mmapmodule.c

2015-05-17 Thread Jeffrey Armstrong

Jeffrey Armstrong added the comment:

Indeed, I agree.  Let's try this new patch.

--
Added file: 
http://bugs.python.org/file39408/mmapmodule.py3.5.0a3.HAVE_FCNTL_H.diff

___
Python tracker 

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



[issue24217] O_RDWR undefined in mmapmodule.c

2015-05-17 Thread Jeffrey Armstrong

Changes by Jeffrey Armstrong :


Removed file: http://bugs.python.org/file39407/mmapmodule.py3.5.0a3.diff

___
Python tracker 

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



[issue24211] Add RFC 6532 support to the email library

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9f0d5e33230f by R David Murray in branch 'default':
#24211: Add RFC6532 support to the email library.
https://hg.python.org/cpython/rev/9f0d5e33230f

--
nosy: +python-dev

___
Python tracker 

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



[issue24212] Idle, 2.7, backport idlelib.__main__, enable py -m idlelib

2015-05-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The idea, obviously, is for python -m idlelib to also work on all systems.  
When this was requested as part of the discussion on another issue, I thought 
there was no idlelib.__main__ because __main__ did not work on 2.7.  Someone 
corrected me and the expectation of me and others was that the absence was just 
an easily corrected oversight.  Turns out not so.  I wanted to at least 
document that the backport is not trivial.  I am rather curious why the same 
code behaves so differently on 2.7.

--

___
Python tracker 

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



[issue22155] Out of date code example for tkinter's createfilehandler

2015-05-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Assuming that the details are correct, which I cannot check on Windows :-(, 
this looks good to me. If the tkinter doc is expanded and reorganized, that 
section might move but I cannot see a better place for it now. Martin, have you 
used that code (with Tkinter/tkinter) on both 2.7 and 3.x?  Serhiy, if you want 
me to apply this, after you check it, I will.

--

___
Python tracker 

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



[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2015-05-17 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

An increase of 13 characters doesn't seem so bad.

--

___
Python tracker 

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



[issue24211] Add RFC 6532 support to the email library

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

Thanks, Maciej.

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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2015-05-17 Thread R. David Murray

New submission from R. David Murray:

Now that I've committed issue 24211, we can also add SMTPUTF8 support to 
smptlib's send_message command.  See attached patch.

--
files: send_message_smtputf8.patch
keywords: patch
messages: 243413
nosy: r.david.murray
priority: normal
severity: normal
stage: patch review
status: open
title: Also support SMTPUTF8 in smtplib's send_message method.
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file39409/send_message_smtputf8.patch

___
Python tracker 

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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2015-05-17 Thread R. David Murray

Changes by R. David Murray :


--
components: +email
nosy: +barry

___
Python tracker 

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



[issue16314] Support xz compression in distutils

2015-05-17 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue22155] Out of date code example for tkinter's createfilehandler

2015-05-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm not sure that this is right place to document these functions (they are 
methods of undocumented class), but the patch looks correct to me.

If you will commit the patch, Terry, note that tkinter should be replaced with 
Tkinter in 2.7.

--

___
Python tracker 

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



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2015-05-17 Thread Zachary Ware

Zachary Ware added the comment:

I'll try to have a look at this later today, but unfortunately can't
guarantee anything (I don't know C, MSI, or _msi very well).

--

___
Python tracker 

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



[issue24215] test_trace uses test_pprint

2015-05-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Since test files should no longer have test_main, test_trace should no longer 
look for one.  (And indeed, test_trace itself should be converted, which looks 
trivial.) The offending line is
  cmd='from test import test_pprint; test_pprint.test_main()'):
The use of 'test_main' is just a convenience; it could just as well be 
'trace_main'.  But there is no need to put anything extra in the traced file.  
The following works for me on on 3.4.3
  cmd='import unittest, test.test_pprint;'
  'unittest.main(test.test_pprint, exit=False)'):

This solves the problem of this issue, but the tracing takes about 10 of 14.5 
seconds total, An alternative might be considered, but test_coverage is tied to 
the output from pprint run by unittest.  Alexander, can you suggest an 
alternate target and output test that would still fulfill the intent of the 
test?

--
nosy: +terry.reedy
stage:  -> needs patch

___
Python tracker 

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



[issue6598] calling email.utils.make_msgid frequently has a non-trivial probability of generating colliding ids

2015-05-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Currently the maximal length of local part is

14+1+len(str(2**16))+1+len(str(10**5-1)) == 26

With the patch it will be

len(str(2**31*100))+1+len(str(2**16))+1+len(str(2**64)) = 39

If encode all three numbers with hexadecimal, it will be

len('%x'%(2**31*100))+1+len('%x'%(2**16))+1+len('%x'%(2**64)) = 34

If encode their with base32:


math.ceil((31+math.log(100)/math.log(2))/5)+1+math.ceil(16/5)+1+math.ceil(64/5) 
= 27

Using base64 or base85 can be not safe, because message ID can be used as file 
name in case-insensitive file system.

--

___
Python tracker 

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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2015-05-17 Thread Maciej Szulik

Changes by Maciej Szulik :


--
nosy: +maciej.szulik

___
Python tracker 

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



[issue24219] Repeated integer in Lexical analysis/Integer literals section

2015-05-17 Thread Dmitry Kazakov

New submission from Dmitry Kazakov:

One of the integers under "Some examples of integer literals" is repeated twice:

7 21474836470o1770b100110111
3 79228162514264337593543950336 0o3770x1
  79228162514264337593543950336  0xdeadbeef

I believe this comes from the old docs: 
https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals
 (the L suffix was removed).

--
assignee: docs@python
components: Documentation
files: intliteral.diff
keywords: patch
messages: 243418
nosy: docs@python, vlth
priority: normal
severity: normal
status: open
title: Repeated integer in Lexical analysis/Integer literals section
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file39410/intliteral.diff

___
Python tracker 

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



[issue20098] email policy needs a mangle_from setting

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset df81f9b67736 by R David Murray in branch 'default':
#20098: add mangle_from_ policy option.
https://hg.python.org/cpython/rev/df81f9b67736

--
nosy: +python-dev

___
Python tracker 

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



[issue20098] email policy needs a mangle_from setting

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

Thanks, Milan.

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



[issue19678] smtpd.py: channel should be passed to process_message

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

At this point (3.5) we have settled on having process_message be required to 
have a **kwargs parameter in its signature in order to support new features 
(ex: enable_SMTPUTF8).  So the solution here would be to use inspect.signature 
to find out if process_message has a **kwargs parameter (kind=VAR_KEYWORD), and 
if so to supply a 'channel' keyword and value.

--
keywords: +easy
stage:  -> needs patch
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue22155] Out of date code example for tkinter's createfilehandler

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e8dd65c7fb6b by Terry Jan Reedy in branch '2.7':
Issue #22155: Add File Handlers subsection with createfilehandler to Tkinter
https://hg.python.org/cpython/rev/e8dd65c7fb6b

New changeset 1efcb7b6ec8a by Terry Jan Reedy in branch '3.4':
Issue #22155: Add File Handlers subsection with createfilehandler to tkinter
https://hg.python.org/cpython/rev/1efcb7b6ec8a

--
nosy: +python-dev

___
Python tracker 

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



[issue22155] Out of date code example for tkinter's createfilehandler

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8bd9da5635fe by Terry Jan Reedy in branch '3.4':
Issue #22155: News entry.
https://hg.python.org/cpython/rev/8bd9da5635fe

New changeset 850cbd54cc73 by Terry Jan Reedy in branch 'default':
Issue #22155: News entry.
https://hg.python.org/cpython/rev/850cbd54cc73

--

___
Python tracker 

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



[issue22155] Out of date code example for tkinter's createfilehandler

2015-05-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Martin, thanks for the nice patch.

--
assignee: docs@python -> terry.reedy
resolution:  -> fixed
stage: patch review -> 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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2015-05-17 Thread Maciej Szulik

Maciej Szulik added the comment:

David one small comment regarding typo in smtplib.py, but most importantly I'd 
suggest adding additional test case to cover the path (the newly added one) 
where you get a UnicodeEncodeError upon encoding from or to with UTF8 and then 
failing to find SMTPUTF8 on the server side. I see we already have test case to 
cover SMTPNotSupportedError but this covers just the case where the server does 
not have SMTPUTF8.

--

___
Python tracker 

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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

Oh, right, that's what I get for doing this at the end of a long chain of patch 
reviews :).  I added that code after I'd written the test and forgot to go back 
and test it.

--

___
Python tracker 

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



[issue24220] ast.Call signature changed

2015-05-17 Thread Matthias Bussonnier

New submission from Matthias Bussonnier:

The `ast.Call/_ast.Call` signature, changed on May 5th 
(https://hg.python.org/cpython/rev/95886) which causes some error in package 
using ast 
(https://bitbucket.org/pytest-dev/pytest/issue/744/pytest-assert-rewriting-broken-with-python#).
 There does not seem to be any docs in the what's new about the change, though 
http://bugs.python.org/issue24136 is suppose to track some docs change, so not 
complaining about that.

Could `ast` shims the old signature and raise a warning until 3.6, to give some 
time for package to adapt ?

--
components: Devguide
messages: 243427
nosy: ezio.melotti, mbussonn, willingc
priority: normal
severity: normal
status: open
title: ast.Call signature changed
type: behavior
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



[issue23757] tuple function gives wrong answer when called on list subclass with custom __iter__

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b6121a4afad7 by Raymond Hettinger in branch '2.7':
Issue #23757:  Only call the concrete list API for exact lists.
https://hg.python.org/cpython/rev/b6121a4afad7

--
nosy: +python-dev

___
Python tracker 

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



[issue23757] tuple function gives wrong answer when called on list subclass with custom __iter__

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c79530e08985 by Raymond Hettinger in branch '3.4':
Issue #23757:  Only call the concrete list API for exact lists.
https://hg.python.org/cpython/rev/c79530e08985

--

___
Python tracker 

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



[issue23757] tuple function gives wrong answer when called on list subclass with custom __iter__

2015-05-17 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc

2015-05-17 Thread Arnon Yaari

Changes by Arnon Yaari :


--
nosy: +wiggin15

___
Python tracker 

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



[issue20769] Reload() description is unclear

2015-05-17 Thread Arnon Yaari

Changes by Arnon Yaari :


--
nosy: +wiggin15

___
Python tracker 

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



[issue12485] textwrap.wrap: new argument for more pleasing output

2015-05-17 Thread Arnon Yaari

Changes by Arnon Yaari :


--
nosy: +wiggin15

___
Python tracker 

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



[issue19737] Documentation of globals() and locals() should be improved

2015-05-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

My succinct version:

Return the dictionary implementing the current module namespace. For code 
within functions, this is set when the function is defined and remains the same 
regardless of where a function is called.

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



[issue20895] Add bytes.empty_buffer and deprecate bytes(17) for the same purpose

2015-05-17 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> out of date
stage:  -> resolved

___
Python tracker 

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



[issue19846] Python 3 raises Unicode errors with the C locale

2015-05-17 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue2571] can cmd.py's API/docs for the use of an alternate stdin be improved?

2015-05-17 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution: remind -> postponed
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



[issue16864] sqlite3.Cursor.lastrowid isn't populated when executing a SQL REPLACE statement

2015-05-17 Thread Alex Lord

Alex Lord added the comment:

There was a bunch of things wrong with that patch.

In addition to the issues you brought up in the review I was mixing up what the 
actual problem is

REPLACE INTO is an alias for INSERT OR REPLACE. INSERT OR REPLACE was correctly 
setting the lastrowid values but REPLACE INTO was not setting the last rowid 
value. I changed the documentation modifications to reflect this.

In addition I cleaned up the unit tests. The unit tests were kind of a mess 
because I was trying to figure out what the problem was and never refactored 
after getting a reproduction.

 I at first went down the path of making the tests use a for loop like you 
suggested

for statement in ["INSERT OR REPLACE", "REPLACE"]:
sql = "{} INTO test(id, unique_test) VALUES (?, ?)".format(
statement)
self.cu.execute(sql, (1, "foo"))
self.assertEqual(self.cu.lastrowid, 1)
self.cu.execute(sql, (1, "foo"))$
self.assertEqual(self.cu.lastrowid, 1) 

Which I don't think is as nice as a cleaned up unrolled version

self.cu.execute("INSERT OR REPLACE INTO test(id, unique_test) VALUES (?, 
?)", (1, "bar",))
self.assertEqual(self.cu.lastrowid, 1)
self.cu.execute("INSERT OR REPLACE INTO test(id, unique_test) VALUES (?, 
?)", (1, "bar",))
self.assertEqual(self.cu.lastrowid, 1)
self.cu.execute("REPLACE INTO test(id, unique_test) VALUES (?, ?)", (1, 
"bar",))
self.assertEqual(self.cu.lastrowid, 1)

I've created a patch that fixes all of the issues brought up in the code review 
and is just generally much cleaner.

--
Added file: http://bugs.python.org/file39411/sqlite_after_review_1.patch

___
Python tracker 

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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 30795a477f85 by R David Murray in branch 'default':
#24218: Add SMTPUTF8 support to send_message.
https://hg.python.org/cpython/rev/30795a477f85

--
nosy: +python-dev

___
Python tracker 

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



[issue24211] Add RFC 6532 support to the email library

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4a254750ad20 by R David Murray in branch 'default':
#24211: Add missing docs for SMTPUTF8 policy instance.
https://hg.python.org/cpython/rev/4a254750ad20

--

___
Python tracker 

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



[issue10170] Relationship between turtle speed setting and actual speed is not documented

2015-05-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

After looking at these results in relation to the qualitative 'speed' 
documentation, I cannot think of any any enhancement appropriate for turtle doc 
audience.  So I withdraw my request.

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

Thanks Maciej.

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



[issue24195] Add `Executor.filter` to concurrent.futures

2015-05-17 Thread Nick Coghlan

Nick Coghlan added the comment:

I'm now +1 on a recipe in the docs, -0 on a concrete method on Executor
that delegates to the map() method.

--

___
Python tracker 

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



[issue22155] Out of date code example for tkinter's createfilehandler

2015-05-17 Thread Martin Panter

Martin Panter added the comment:

For the record, I have used this code in 2.7 in the past (though I mainly use 
Python 3). The Python 2 version of the changes look fine to me.

--

___
Python tracker 

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



[issue10685] trace does not ignore --ignore-module

2015-05-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Tom, please sign the PSF Contributor Agreement
https://www.python.org/psf/contrib/
https://www.python.org/psf/contrib/contrib-form/

--

___
Python tracker 

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



[issue13866] {urllib, urllib.parse}.urlencode should not use quote_plus

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c7d82a7a9dea by R David Murray in branch 'default':
Issue #13866: add *quote_via* argument to urlencode.
https://hg.python.org/cpython/rev/c7d82a7a9dea

--
nosy: +python-dev

___
Python tracker 

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



[issue13866] {urllib, urllib.parse}.urlencode should not use quote_plus

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

Thanks everyone.

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



[issue4254] _cursesmodule.c callable update_lines_cols()

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

Looks to like there is nothing left to do here, so I'm closing it.

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



[issue16864] sqlite3.Cursor.lastrowid isn't populated when executing a SQL REPLACE statement

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

All lines need to be wrapped to <80 columns.

The idea behind the loop is this:

sql = "{} INTO test(id, unique_test) VALUES (?, ?)"
self.cu.execute(sql.format('INSERT OR REPLACE, (1, "foo")
for statement in ["INSERT OR REPLACE", "REPLACE"]:
with self.subTest(statement=statement):
self.cu.execute(sql.format(statement), (1, "foo"))
self.assertEqual(self.cu.lastrowid, 1) 

What this does is run *both* tests, even if one fails, and reports the results 
separately (labeled with 'statement='INSERT OR REPLACE', ect).

--

___
Python tracker 

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



[issue10598] Add test for curses haskey replacement

2015-05-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Here is what I meant, but I cannot test on Windows.  Mark, do you have *nix 
currently?

--
Added file: http://bugs.python.org/file39412/has_key.diff

___
Python tracker 

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



[issue24221] Clean-up and optimization for heapq siftup() and siftdown()

2015-05-17 Thread Raymond Hettinger

New submission from Raymond Hettinger:

The siftup() and siftdown() routines rearrange pointers in a list.  The 
generated code repeats the list object to ob_item lookup for each access.  This 
patch does that lookup only once per iteration.  It cleans up the code by 
replacing the PyList_GET_ITEM and PyList_SET_ITEM macros with normal array 
access (the usual way of presenting the algorithm).

This gives about a 5% speed-up using CLANG (timing heapify(data[:]) for n=1000 
goes from .3441 per iteration to .3299).   However on GCC-4.9, the same patch 
gives a 2% slow-down (disassembly shows that this patch triggers a register 
spill and load in the inner loop which is a bummer).

Since it speeds-up some builds and slows down others, I'm uncertain what to do 
with this one.  I like the way the code reads with array accesses but was 
aiming for a consistent win.   Am posting the patch here to collect thoughts on 
the subject and to not lose the work.

--
components: Extension Modules
files: heapitems5.diff
keywords: patch
messages: 243444
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Clean-up and optimization for heapq siftup() and siftdown()
type: performance
versions: Python 3.5
Added file: http://bugs.python.org/file39413/heapitems5.diff

___
Python tracker 

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



[issue24221] Clean-up and optimization for heapq siftup() and siftdown()

2015-05-17 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file39414/time_heapify.py

___
Python tracker 

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



[issue10598] Add test for curses haskey replacement

2015-05-17 Thread Mark Lawrence

Mark Lawrence added the comment:

Sorry, Windows 8.1 only.

--

___
Python tracker 

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



[issue24221] Clean-up and optimization for heapq siftup() and siftdown()

2015-05-17 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



[issue24222] Idle 2.7 -c, -r compile with print as function.

2015-05-17 Thread Terry J. Reedy

New submission from Terry J. Reedy:

C:\Users\Terry>py -2 -m idlelib.idle -c "print True"
>>> 
*** Error in script or command!
Traceback (most recent call last):
  File "", line 1
print True
 ^
SyntaxError: invalid syntax

https://stackoverflow.com/questions/30280525/python-idle-give-a-false-syntax-error
In answer, phihag points out that PyShell.py has future import and compiles with
  code = compile(source, filename, "exec")

The fix is to add dont_inherit=True.

--
assignee: terry.reedy
messages: 243446
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Idle 2.7 -c, -r compile with print as function.
type: behavior
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



[issue24223] argparse parsing bug

2015-05-17 Thread Bob Alexander

New submission from Bob Alexander:

Here is simple example of failure to parse arguments that should parse OK. In 
the following little program, the second from last line contains an aargument 
sequence that parses OK, but the last line should but doesn't.

import argparse
ap = argparse.ArgumentParser()
ap.add_argument("--option", action="store_true")
ap.add_argument("arg_1")
ap.add_argument("arg_2", nargs="?")
print("test 1:", ap.parse_args(["abc", "mmm", "--option"]))
print("test 2:", ap.parse_args(["abc", "--option", "mmm"]))

--
components: Library (Lib)
messages: 243447
nosy: bobjalex
priority: normal
severity: normal
status: open
title: argparse parsing bug
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue21337] Add tests for Tix

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eeea91d0506b by Zachary Ware in branch 'default':
Issue #21337: Add bare-bones Tix test
https://hg.python.org/cpython/rev/eeea91d0506b

--
nosy: +python-dev

___
Python tracker 

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



[issue21337] Add tests for Tix

2015-05-17 Thread Zachary Ware

Zachary Ware added the comment:

As a prerequisite for #20035, I've added the simplest test possible that just 
makes sure Tix is available on Windows.  I only added it on default as I don't 
have the facilities to test it properly on 2.7 and 3.4 on Windows (which is the 
only platform actually testing anything so far), but it should be simple enough 
to copy it over if anybody wants to or ever writes some real tests for Tix.

Leaving this issue open as some real tests would still be nice.

--

___
Python tracker 

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



[issue17239] XML vulnerabilities in Python

2015-05-17 Thread Martin Panter

Martin Panter added the comment:

I did a rough merge with current “default” (3.5 pre-release) branch so that I 
can have a closer look at this issue; see xmlbomb_20150518.patch for the 
result. There are some bits with Argument Clinit that need perfecting:

* Unsure how to convert the ElementTree.XMLParser.__init__() signature (varied 
depending on XML_BOMB_PROTECTION compile-time flag) to Argument Clinic. So I 
just hard-coded it as if XML_BOMB_PROTECTION is always enabled. Why do we have 
to have a variable signature in the first place?

* New pyexpat functions need porting to Argument Clinic.

--
versions: +Python 3.5
Added file: http://bugs.python.org/file39415/xmlbomb_20150518.patch

___
Python tracker 

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



[issue20035] Clean up Tcl library discovery in Tkinter on Windows

2015-05-17 Thread Zachary Ware

Zachary Ware added the comment:

I committed a presence test for Tix in #21337 that should catch problems with 
loading Tix after this patch.  There shouldn't be any problem though, we 
actually install Tix into Tcl/Tk whereas TIX_LIBRARY is (to my understanding) 
for helping Tcl/Tk find a Tix that it can't find itself.

Steve, I think I have BuildForRelease patched in properly; it works with 
BuildForRelease unset at least :)

--
Added file: http://bugs.python.org/file39416/issue20035.v7.diff

___
Python tracker 

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



[issue24223] argparse parsing (mingling --option and optional positional argument)

2015-05-17 Thread Martin Panter

Martin Panter added the comment:

I suggest this is a duplicate of Issue 15112. The same problem also happens 
with nargs="*", and that issue apparently has a patch to handle both cases.

For the record, this is the resulting error, and a demo that it works if the 
option comes before the positional arguments:

>>> print("test 2:", ap.parse_args(["abc", "--option", "mmm"]))
usage: [-h] [--option] arg_1 [arg_2]
: error: unrecognized arguments: mmm
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/proj/python/cpython/Lib/argparse.py", line 1729, in parse_args
self.error(msg % ' '.join(argv))
  File "/home/proj/python/cpython/Lib/argparse.py", line 2385, in error
self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
  File "/home/proj/python/cpython/Lib/argparse.py", line 2372, in exit
_sys.exit(status)
  File "/home/pythonstartup.py", line 345, in exit
raise SystemExit(code)
__main__.SystemExit: 2
>>> ap.parse_args(["--option", "abc", "mmm"])
Namespace(arg_1='abc', arg_2='mmm', option=True)

--
nosy: +vadmium
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> argparse: nargs='*' positional argument doesn't accept any 
items if preceded by an option and another positional
title: argparse parsing bug -> argparse parsing (mingling --option and optional 
positional argument)

___
Python tracker 

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



[issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional

2015-05-17 Thread Martin Panter

Martin Panter added the comment:

Closed Issue 24223 as a duplicate. I understand the patch here also fixes the 
case of an --option before an optional positional argument using nargs="?"; is 
that right?

--

___
Python tracker 

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



[issue24220] ast.Call signature changed

2015-05-17 Thread Carol Willing

Carol Willing added the comment:

Matthias, Did you wish to mark this issue for additional Documentation and as a 
behavior change request (warning of signature change until 3.6) in addition to 
Devguide?

I've summarized below some info from researching Matthias' original message. I 
see three questions to answer:
a) Should `ast` shim the old signature and raise a warning until 3.6?
b) What additional items should be added to Documentation or Porting Guide?
c) What items should be added to Devguide?

**Background**
Implementation of PEP 448 (Additional Unpacking Generalizations) changed the 
ast.Call/_ast.Call signature by removing two arguments (args, kwargs).

Testing errors are seen in existing code that does not take into account the 
signature change.['1'][1]

**Workaround**
Matthias' possible workaround for existing projects to check for version 3.5 or 
higher and adapt to two less arguments.['2'][2]

**Devguide addition**
Thomas Kluyver's supplementary information about AST use.['3'][3] Perhaps 
mention this in the AST section of the devguide. I recognize that typically the 
devguide does not reference external docs but this seems like it would be 
useful to future developers.


[1]: 
https://bitbucket.org/pytest-dev/pytest/issue/744/pytest-assert-rewriting-broken-with-python#
[2]: 
https://bitbucket.org/pytest-dev/pytest/pull-request/296/astcall-signature-changed-on-35/diff
[3]: https://greentreesnakes.readthedocs.org/en/latest/

--

___
Python tracker 

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



[issue23488] Random objects twice as big as necessary on 64-bit builds

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 16d0e3dda31c by Zachary Ware in branch 'default':
Issue #23488: Fix a syntax error on big endian platforms.
https://hg.python.org/cpython/rev/16d0e3dda31c

--

___
Python tracker 

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



[issue24220] ast.Call signature changed

2015-05-17 Thread Matthias Bussonnier

Matthias Bussonnier added the comment:

Hi Carol, 

> Matthias, Did you wish to mark this issue for additional Documentation and as 
> a behavior change request (warning of signature change until 3.6) in addition 
> to Devguide?

Hum, probably, I'm not super familiar with this bug tracker and it use, I've 
tried to select both Devguide and Docs now.

> a) Should `ast` shim the old signature and raise a warning until 3.6?

>From Guido's comment on linked issue, I guess not: 

> "There is no compatibility guarantee for the ast module"


> b) What additional items should be added to Documentation or Porting Guide?

I guess that Call api changed in the what's new. A link to a rough 
implementation that show how to get code compatible on 3.5 and below would be 
nice, it is kind of painful to iterate through the new AST structure and figure 
things out.

> c) What items should be added to Devguide?

I can talk to Thomas Kluyver tomorrow about merging green tree snake into the 
devguide, or maybe into ast docs. Would that be useful/more acceptable than 
linking to external docs ?

Thanks.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

___
Python tracker 

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



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 41281737d71a by Zachary Ware in branch '3.4':
Issue #21931: Fix error handling in msilib.FCICreate().
https://hg.python.org/cpython/rev/41281737d71a

New changeset cb0d1d86215e by Zachary Ware in branch 'default':
Closes #21931: Merge with 3.4
https://hg.python.org/cpython/rev/cb0d1d86215e

--
nosy: +python-dev
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



[issue24224] test_msilib is inadequate

2015-05-17 Thread Zachary Ware

New submission from Zachary Ware:

test_msilib doesn't test much and could do with good expansion.

Marked for 3.5, but 3.4 and 2.7 are just as barren if whoever takes this feels 
particularly ambitious.

--
components: Tests, Windows
keywords: easy
messages: 243458
nosy: steve.dower, tim.golden, zach.ware
priority: low
severity: normal
stage: needs patch
status: open
title: test_msilib is inadequate
type: behavior
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



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2015-05-17 Thread Zachary Ware

Changes by Zachary Ware :


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



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2015-05-17 Thread Zachary Ware

Zachary Ware added the comment:

It's a simple enough fix, so I went ahead and committed it.  Thanks for the 
patch!

I've created issue24224 to track the addition of tests to test_msilib (for more 
than just this issue).

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

___
Python tracker 

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



[issue24221] Clean-up and optimization for heapq siftup() and siftdown()

2015-05-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Perhaps the code will look simpler if introduce the macro 
_PyList_SWAP_ITEMS(list, i, j).

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23488] Random objects twice as big as necessary on 64-bit builds

2015-05-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Zachary for fixing this.

--

___
Python tracker 

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