[issue9517] Make test.script_helper more comprehensive, and use it in the test suite

2015-08-03 Thread Nick Coghlan

Nick Coghlan added the comment:

Berker committed the original patch to move the helper module, so adjusting the 
stage back to reflect the ongoing review on related issues.

--
keywords:  -easy
stage: commit review -> patch review

___
Python tracker 

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



[issue24595] InteractiveInterpreter always prints to stdout

2015-08-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There is also redirect_stderr, but not for stdin.  I am not sure what specific 
issue is left here, of if this should be closed.

--

___
Python tracker 

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



[issue17570] Improve devguide Windows instructions

2015-08-03 Thread Peter Lovett

Peter Lovett added the comment:

Also a similar change to patch.rst

./python.exe
should be:
PCbuild\\python.exe

--
Added file: http://bugs.python.org/file40124/issue17570-2.patch

___
Python tracker 

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



[issue12869] PyOS_StdioReadline is printing the prompt on stderr

2015-08-03 Thread Martin Panter

Martin Panter added the comment:

Results of experimenting on 3.6:

* The startup messages are written to standard error.
* The interactive interpreter prompts to the original standard error if 
Readline not used. But with Gnu Readline, prompts do go to the original 
standard output, as does other interactive Readline output (echoed input etc). 
This is what Albert reported.
* The interactive interpreter always reads from the original standard input, 
whether Readline is used or not.
* The displayhook() function always writes to the current sys.stdout, as 
documented.
* The excepthook() function always writes to the current sys.stderr, also as 
documented.
* The input() function is documented to prompt to sys.stdout, however see Issue 
1927 for some quirks with that.
* The input() function always reads from the current sys.stdin. The Readline 
library is only used if sys.stdin and sys.stdout are the original file 
descriptors.

I agree it would probably be more consistent for the interpreter prompt to go 
to standard output. It looks like stdout is inspected to determine whether 
Readline will be used, while stderr is not inspected. So it makes sense for the 
prompt to go to stdout.

However I disagree that it should go to a redirected stream, sys.stderr or 
sys.stdout, since sys.stdin does not affect input. But see Issue 17620, about 
redirecting sys.stdin.

--
nosy: +vadmium
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



[issue17570] Improve devguide Windows instructions

2015-08-03 Thread Peter Lovett

Peter Lovett added the comment:

Tiny change on case of Windows file 'mercurial.ini'
Although Windows is case-insensitive on filenames, the file itself is named in 
lowercase (I'm using TortoiseHg v3.4.2; I'm assuming older versions of 
TortoiseHg also name it in this way.)

--
nosy: +PeterLovett
Added file: http://bugs.python.org/file40123/issue17570.patch

___
Python tracker 

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



[issue24786] Changes in the devguide repository are not published online in HTML

2015-08-03 Thread R. David Murray

R. David Murray added the comment:

Huh.  I don't see a copyright, but I do see it if I do view source.  The fact 
that not all pages are updated is probably due to those pages not having any 
internal changes and therefore not being regenerated.  Someone would have to 
clear the build cache on the server to get all the pages to regenerate with the 
new copyright.

--

___
Python tracker 

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



[issue24778] mailcap.findmatch() ........ Shell Command Injection in filename

2015-08-03 Thread R. David Murray

R. David Murray added the comment:

Hmm.  I see.  The problem is that our desire to quote conflicts with mailcap's 
attempts to quote.

I now agree with you that run-mailcap's approach is correct, but creating a 
temporary alias is out of scope for findmatch.  That would need to be done by 
findmatch's caller.

I think we should add a documentation note about the problem and the solution.  
I don't see any reliable way to detect the problem and raise an error for the 
same reason that quoting doesn't work. (The aliasing can tolerate false 
positives; but, for backward compatibility reasons, an error detection function 
here cannot.)

It would be possible to add a helper for the aliasing to 3.6, but if someone 
wants to propose that they should open an new issue for the enhancement.

I'm

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



[issue24786] Changes in the devguide repository are not published online in HTML

2015-08-03 Thread Mark Lawrence

Mark Lawrence added the comment:

The copyright is right at the bottom of the page.  From the link given by Jesús 
on the very first page it now reads 2011-2015.  I clicked next but still 
2011-2014, next again 2011-2014, then gave up.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue24777] sys.getrefcount takes no arguments

2015-08-03 Thread Ankoor Patil

Ankoor Patil added the comment:

Thanks Berker Peksag.

--

___
Python tracker 

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



[issue24595] InteractiveInterpreter always prints to stdout

2015-08-03 Thread Martin Panter

Martin Panter added the comment:

Terry: perhaps you’re thinking of 

 :)

--
nosy: +vadmium

___
Python tracker 

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



[issue24754] argparse add_argument with action="store_true", type=bool should not crash

2015-08-03 Thread R. David Murray

Changes by R. David Murray :


--
stage:  -> resolved

___
Python tracker 

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



[issue24786] Changes in the devguide repository are not published online in HTML

2015-08-03 Thread R. David Murray

R. David Murray added the comment:

I see your change made on the 30th on the web.  I don't see where the copyright 
is displayed, so I can't confirm that one, but Brett's change on the second is 
there.

So, I don't see a bug here.

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



[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-03 Thread R. David Murray

R. David Murray added the comment:

Heh.  This was really bugging me.  I remembered it clearly, but I couldn't find 
an issue.  Thought maybe it was a comment in the code, but nope.  Google led me 
to this line in the docs: "It is no longer necessary to use the global tempdir 
variable."  Checking when that was last changed, it turns out it was by me in 
issue 10354, which is the issue containing the discussion that I was 
remembering, but that was about template.  

Nevertheless, I think the sentence in the docs itself could be considered a 
documentation deprecation.

Since you are arguing that it shouldn't be considered deprecated, I think we 
should get some more participants in the discussion.  I'm +.5 on explicitly 
documenting it as deprecated.  I'm adding a couple folks from issue 10354 who 
might have an opinion.

Note that if we do keep it in the main section, that sentence should still be 
deleted, since it looks like "it is no longer necessary" has been true now for 
longer than it *was* necessary.

--
nosy: +eric.smith, gregory.p.smith, rhettinger

___
Python tracker 

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



[issue24787] csv.Sniffer guesses "M" instead of \t or , as the delimiter

2015-08-03 Thread Skip Montanaro

Skip Montanaro added the comment:

How are you calling the sniff() method? Note that it takes a sample of the CSV 
file. For example, this works for me:

>>> f = open("sniff1.csv")
>>> dialect = csv.Sniffer().sniff(next(open("sniff1.csv")))
>>> dialect.delimiter 
','
>>> dialect.lineterminator
'\r\n'

where sniff1.csv is your Dataset 1. (I think for reliable operation you really 
want your sample to be a multiple of whole lines.)

--
nosy: +skip.montanaro

___
Python tracker 

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



[issue24021] Add docstring to urllib.urlretrieve

2015-08-03 Thread Robert Collins

Robert Collins added the comment:

Applied to 3.4 and up. Thanks for the patch.

--
nosy: +rbcollins
resolution:  -> fixed
stage: needs patch -> 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



[issue24021] Add docstring to urllib.urlretrieve

2015-08-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 659f5adc2354 by Robert Collins in branch '3.4':
Issue #24021: docstring for urllib.urlcleanup.
https://hg.python.org/cpython/rev/659f5adc2354

New changeset 6fd69aeb8a3b by Robert Collins in branch '3.5':
Issue #24021: docstring for urllib.urlcleanup.
https://hg.python.org/cpython/rev/6fd69aeb8a3b

New changeset 43ed41cdd3c2 by Robert Collins in branch 'default':
Issue #24021: docstring for urllib.urlcleanup.
https://hg.python.org/cpython/rev/43ed41cdd3c2

--
nosy: +python-dev

___
Python tracker 

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



[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-03 Thread Zbyszek Jędrzejewski-Szmek

Zbyszek Jędrzejewski-Szmek added the comment:

Updated version (based on issue-23725.patch from rbcollins):
- move tempdir description at the end of the main section, before Examples
- do not add my name second time in ACKS

--
Added file: http://bugs.python.org/file40122/issue-23725.patch

___
Python tracker 

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



[issue24021] Add docstring to urllib.urlretrieve

2015-08-03 Thread Peter Lovett

Peter Lovett added the comment:

Updated patch to 3.6
urlretrieve now has a decent docstring; this patch just adds a docstring to 
urlcleanup.

--
nosy: +PeterLovett
versions: +Python 3.6 -Python 2.7
Added file: http://bugs.python.org/file40121/issue-24021.patch

___
Python tracker 

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



[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-03 Thread Robert Collins

Robert Collins added the comment:

mktemp is clearly insecure. I'd just move the tmpdir up above the Deprecation 
section start

--

___
Python tracker 

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



[issue24787] csv.Sniffer guesses "M" instead of \t or , as the delimiter

2015-08-03 Thread Tiago Wright

New submission from Tiago Wright:

csv.Sniffer().sniff() guesses "M" for the delimiter of the first dataset below. 
The same error occurs when the "," is replaced by "\t". However, it correctly 
guesses "," for the second dataset.

---Dataset 1
Invoice File,Credit Memo,Amount Claimed,Description,Invoice,Message,
Sscanner ac15072911220.pdf,CM_15203,28714.32,MX Jan Feb,948198,,
Sscanner ac15072911221.pdf,CM 16148,15600,MX Unkwon,948199,,
Sscanner ac15072911230.pdf,CM 16148,33488,MX Cavalier,948200,Photos don't match 
the invoice
Sscanner ac15072911261.pdf,CM_14464,1713.6,MX Dutiful,948203,,
Sscanner ac15072911262.pdf,CM 16148,3114,MX Apr,948202,,
Sscanner ac15072911250.pdf,CM_14464,1232.28,MX Jan Feb,948208,,
Sscanner ac15072911251.pdf,CM_17491,15232,MX Unkwon,948207,,
Sscanner ac15072911253.pdf,CM_14464,11250,MX Cavalier,,,
Sscanner ac15072911253.pdf,CM_14464,11250,MX Dutiful,,,
Sscanner ac15072911253.pdf,CM_14464,11250,MX Apr,,,

--- Dataset 2---
Invoice File,Credit Memo,Amount Claimed,Description,Invoice,Message,
Sscanner ac15072911220.pdf,CM_15203,82.07,MX Jan Feb,948198,,
Sscanner ac15072911221.pdf,CM 16148,23.29,MX Unkwon,948199,,
Sscanner ac15072911230.pdf,CM 16148,88.55,MX Cavalier,948200,Photos don't match 
the invoice,
Sscanner ac15072911261.pdf,CM_14464,58.78,MX Dutiful,948203,,
Sscanner ac15072911262.pdf,CM 16148,52,MX Apr,948202,,
Sscanner ac15072911250.pdf,CM_14464,40.40,MX Jan Feb,948208,,
Sscanner ac15072911251.pdf,CM_17491,54.97,MX Unkwon,948207,,
Sscanner ac15072911253.pdf,CM_14464,4.08,MX Cavalier,,,
Sscanner ac15072911253.pdf,CM_14464,49.11,MX Dutiful,,,
Sscanner ac15072911253.pdf,CM_14464,18.28,MX Apr,,,

--
components: Extension Modules
messages: 247967
nosy: Tiago Wright
priority: normal
severity: normal
status: open
title: csv.Sniffer guesses "M" instead of \t or , as the delimiter
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



[issue24771] Cannot import _tkinter in Python 3.5 on Windows

2015-08-03 Thread Steve Dower

Steve Dower added the comment:

Rather than change the tcl and tk project files (which is not as easy as 
updating the Python projects - I spent an hour trying), I've added the 
vcruntime DLL to the MSI with tkinter.

Distutils has already been updated to not include it any more, and I really 
want to avoid having people depend on it since it could break the nice 
compatibility we have going now, but there's no easy way around it right now.

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



[issue24771] Cannot import _tkinter in Python 3.5 on Windows

2015-08-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e9f91d47c8ab by Steve Dower in branch '3.5':
Issue #24771: Adds vcruntime DLL to tcltk package
https://hg.python.org/cpython/rev/e9f91d47c8ab

New changeset 14dee84ab900 by Steve Dower in branch 'default':
Issue #24771: Adds vcruntime DLL to tcltk package
https://hg.python.org/cpython/rev/14dee84ab900

--
nosy: +python-dev

___
Python tracker 

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



[issue24754] argparse add_argument with action="store_true", type=bool should not crash

2015-08-03 Thread Douglas Bagnall

Douglas Bagnall added the comment:

Thanks paul.j3 and r.david.murray,

I see your points.

What led me to this was automatically generating command line options from a 
Gstreamer element, mapping
the Gstreamer property types to Python types. Then I special-cased the 
action="store_true" for the boolean ones and was surprised by the somewhat 
unclear error message.

As you suggest, paul.j3, "type" is in some ways an unfortunate choice of 
keyword for this, but it too late to change that.

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



[issue24759] Idle: add ttk widgets as an option

2015-08-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0511b1165bb6 by Terry Jan Reedy in branch '2.7':
Issue #24759: Revert 8203fc75b3d2.
https://hg.python.org/cpython/rev/0511b1165bb6

New changeset 06852194f541 by Terry Jan Reedy in branch '3.4':
Issue #24759: Revert 13a8782a775e.
https://hg.python.org/cpython/rev/06852194f541

New changeset 863e3cdbbabe by Terry Jan Reedy in branch '3.5':
Issue #24759: Merge with 3.4
https://hg.python.org/cpython/rev/863e3cdbbabe

New changeset 3bcb184b62f8 by Terry Jan Reedy in branch 'default':
Issue #24759: Merge with 3.5
https://hg.python.org/cpython/rev/3bcb184b62f8

--

___
Python tracker 

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



[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-03 Thread Zbyszek Jędrzejewski-Szmek

Zbyszek Jędrzejewski-Szmek added the comment:

I don't think tempdir should be removed. I just think it should not be used. So 
what about moving the description of tempdir to the end, as it was in the last 
patch, but calling the section "Other functions and variables".

--

___
Python tracker 

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



[issue24786] Changes in the devguide repository are not published online in HTML

2015-08-03 Thread Jesús Cea Avión

New submission from Jesús Cea Avión:

I change content and configuration in the devguide repository and I don't see 
the changes available in HTML in  even after 
some days.

--
assignee: docs@python
components: Documentation
messages: 247961
nosy: docs@python, jcea
priority: normal
severity: normal
status: open
title: Changes in the devguide repository are not published online in HTML

___
Python tracker 

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



[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-08-03 Thread Eric Snow

Eric Snow added the comment:

It's looking like the problem is in _odict_add_new_node.  If that's the case 
then I should be able to resolve this issue soon.

--

___
Python tracker 

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



[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-03 Thread Robert Collins

Robert Collins added the comment:

I can't find any reference to a discussion to deprecate tempdir outside of this 
issue. Nothing on python-dev/python-ideas/peps.

I can see that there's an argument that it should be deprecated, but AFAICT the 
idea to do so originated here. I'd like to see wider discussion though (because 
I don't think it makes sense to deprecate it) - its no more or less global than 
environment variables, its already here as a feature, and its not going to save 
us code maintenance or bugs if we do deprecate it - and if we are deprecating 
it, we should be issueing a PendingDeprecation warning at minimum.

How about we change the patch to not deprecate it, and either open a new 
ticket, or let folk that want to deprecate it raise that on the list?

--

___
Python tracker 

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



[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-03 Thread R. David Murray

R. David Murray added the comment:

Well, something is wrong, because if we are deprecating :data:`tmpdir` we 
shouldn't be cross referencing it from the non-deprecated docs.  The 
explanation of how the default value is calculated should be moved up to 
gettmpdir.

My understanding is that now that all functions accept a 'dir' parameter, the 
tmpdir global was deprecated because global state is bad, and if an application 
really wants to affect the global state it can use the one of the environment 
variables that are checked, which is more flexible.

--

___
Python tracker 

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



[issue23888] Fixing fractional expiry time bug in cookiejar

2015-08-03 Thread Robert Collins

Robert Collins added the comment:

Thanks for the patch.

--
nosy: +rbcollins
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



[issue23888] Fixing fractional expiry time bug in cookiejar

2015-08-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1c1c508d1b98 by Robert Collins in branch '3.4':
Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
https://hg.python.org/cpython/rev/1c1c508d1b98

New changeset 06406205ae99 by Robert Collins in branch '3.5':
Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
https://hg.python.org/cpython/rev/06406205ae99

New changeset 73902903d397 by Robert Collins in branch 'default':
Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
https://hg.python.org/cpython/rev/73902903d397

--
nosy: +python-dev

___
Python tracker 

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



[issue23888] Fixing fractional expiry time bug in cookiejar

2015-08-03 Thread Robert Collins

Changes by Robert Collins :


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



[issue22397] test_socket failure on AIX

2015-08-03 Thread R. David Murray

Changes by R. David Murray :


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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2015-08-03 Thread Robert Collins

Robert Collins added the comment:

So I'm confused. Is this applicable or not? Its in commit review, but there's 
discussion of politics here :(.

--
nosy: +rbcollins
status: open -> pending

___
Python tracker 

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



[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-03 Thread Robert Collins

Robert Collins added the comment:

I'm not 100% sure that tempfile.tempdir should be deprecated. Its much less 
convenient to control global behaviour with that. I agree that mktemp should be.

I've updated the patch though.

--
nosy: +rbcollins
Added file: http://bugs.python.org/file40120/issue-23725.patch

___
Python tracker 

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



[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-08-03 Thread Robert Collins

Changes by Robert Collins :


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



[issue22397] test_socket failure on AIX

2015-08-03 Thread STINNER Victor

STINNER Victor added the comment:

I'm not interested to investigate the issue on AIX. IMHO the feature is
just not supported by the kernel so there is nothing to investigate except
if you want to hack AIX kernel.

--
title: test_socket not running all tests on AIX -> test_socket failure on AIX

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-08-03 Thread Guido van Rossum

Guido van Rossum added the comment:

Thank you Ivan! I am going to commit this, it's much better than the two lines 
we had before. :-) There's still a lot of work left to do -- towards the end 
there are many classes without description. Maybe you and Daniel can divide up 
the work for those? We can always iterate (even during the release candidates 
and even after the 3.5.0 release).

--

___
Python tracker 

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



[issue24778] mailcap.findmatch() ........ Shell Command Injection in filename

2015-08-03 Thread Bernd Dietzel

Bernd Dietzel added the comment:

Exploid Demo wich works with quote() : 

>>> commandline,MIMETYPE=mailcap.findmatch(d, 'text/*', 
>>> filename=quote(';xterm;#.txt'))
>>> commandline
"less '';xterm;#.txt''"
>>> os.system(commandline)
### xterm starts

--

___
Python tracker 

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



[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-08-03 Thread Mark Roseman

Mark Roseman added the comment:

Screenshot extdlg.png shows result

--
Added file: http://bugs.python.org/file40119/extdlg.png

___
Python tracker 

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



[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-08-03 Thread Mark Roseman

Mark Roseman added the comment:

I've attached extdlg.patch, which changes the UI for the configure extensions 
dialog. 

In particular, it replaces the stacked tabs with a listbox on the left, with 
the details of each extension appearing in a labelframe on the right. The 
inside of the labelframe gets swapped in with pretty much the same thing that 
was in the dialog before.

This should be compatible with Tk 8.4, as ttk was not used.

--
keywords: +patch
Added file: http://bugs.python.org/file40118/extdlg.patch

___
Python tracker 

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-08-03 Thread Alessandro Cucci

Alessandro Cucci added the comment:

uploaded a new patch!

--
Added file: http://bugs.python.org/file40117/issue19475_v3.patch

___
Python tracker 

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



[issue24780] unittest assertEqual difference output foiled by newlines

2015-08-03 Thread R. David Murray

R. David Murray added the comment:

In this particular case the problem is the lack of a trailing newline on the 
input string.  It might be possible to improve the extended display algorithm 
by making sure there is a new line before the carrot line, but care must be 
taken to account for the cases where one string ends with newline and the other 
doesn't.  I think this problem only applies to strings that have no trailing 
newline.

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



[issue24778] mailcap.findmatch() ........ Shell Command Injection in filename

2015-08-03 Thread Bernd Dietzel

Bernd Dietzel added the comment:

@David
Thanks for the comment :-)

I think if you read the Documentation 
https://docs.python.org/2/library/mailcap.html
this may lead new programmers, wich may never heard of Shell Injections before, 
step by step directly to write insecure webbbrowsers and/or mail readers. At 
least there should be a warning in the docs !
   
You ask why run-mailcap do not use quotig, i believe because quoting is not an 
easy thing to do, i attached a demo ;-)

Thank you.

--
Added file: http://bugs.python.org/file40116/The Quote Problem.py

___
Python tracker 

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



[issue10708] Misc/porting should be folded into the development FAQ or the devguide

2015-08-03 Thread Paul Anton Letnes

Paul Anton Letnes added the comment:

I believe someone should also commit the following command:
hg rm Misc/porting
in the main python repository, since the contents of this file are now found in 
the devguide.

--

___
Python tracker 

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



[issue24778] mailcap.findmatch() ........ Shell Command Injection in filename

2015-08-03 Thread R. David Murray

R. David Murray added the comment:

In this case os.system is an appropriate API, because it mirrors the API of 
mailcap itself (that is, mailcap entries are shell commands).  

I'm not convinced there is a security bug here.  It seems to me that there are 
two cases: either the filename is determined by the program, in which case 
there is no security issue, or the filename comes from an external source, and 
the program will have had to *write it to the file system* before the mailcap 
command will do anything.  So the security hole, if any, will have happened 
earlier in the process.

Now, one can argue that the quoting should be done in order to preserve the 
meaning of an arbitrary filename.  Which would allay your concern even if I 
disagree that it is a real security bug :)

(I don't understand why run-mailcap uses an alias rather than correctly quoting 
the meta-characters.)

--
nosy: +r.david.murray
versions: +Python 3.4, 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



[issue24775] Python client failing to connect to server but completing as if successful

2015-08-03 Thread R. David Murray

R. David Murray added the comment:

If whatever change fixed this has not already been backported to 2.7, it is 
likely that whatever it was was deemed to complex for backport.  If someone can 
figure out what the fix was and propose a reasonable way to back port it, we 
would most likely do so.

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



[issue24647] Document argparse.REMAINDER as being equal to "..."

2015-08-03 Thread paul j3

paul j3 added the comment:

Also, argparse.PARSER  is '+...'

'? * +' have closely matched analogs in regex patterns.  '...' and '+...' do 
not.  So Python users will have an intuitive idea of what "nargs='*'" means.  
"nargs='...'" is not so obvious.

As a general rule, the document does not expose the values of module constants.

--
nosy: +paul.j3

___
Python tracker 

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



[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-08-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Is it possible to test from Python level?

--

___
Python tracker 

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



[issue24736] argparse add_mutually_exclusive_group do not print help

2015-08-03 Thread paul j3

paul j3 added the comment:

These two types of groups serve different purposes and aren't designed to nest 
or interact.

An argument group groups arguments in the help lines.  It does not affect 
parsing at all.  It can't be used to add a 'group' of arguments to another 
group.

A mutually exclusive group produces an error message during parsing, and 
modifies the usage line.  There isn't a way, in the current code, to nest 
groups of arguments (in some sort of 'any' or 'and' sense) within a mutually 
exclusive group.  It's 'xor' for all arguments.

--
nosy: +paul.j3

___
Python tracker 

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



[issue24739] allow argparse.FileType to accept newline argument

2015-08-03 Thread paul j3

paul j3 added the comment:

argparse.FileType serves 2 purposes

- handling filenames for simple quick shell-like scripts

- as a model for custom 'types', specifically one that uses a class to generate 
the desired type callable.

Other bug-issues show that it hasn't aged well.  It doesn't work nicely with 
the newer open/close context paradigm.  It needs changes to handle 'rb' and 
'wb' modes.

I suppose it could be modified to accept the full range of parameters that the 
modern 'open' takes:

open(file, mode='r', buffering=-1, encoding=None,
errors=None, newline=None, closefd=True, opener=None) 

either explicitly, or as a pass through **kwargs.

But it is also something that you could easily subclass or modify for your own 
purposes.

Or just accept the filenames as strings, and do your own open/close after 
parsing.  This gives you more control over when and how the files are opened.

--
nosy: +paul.j3

___
Python tracker 

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



[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-08-03 Thread R. David Murray

R. David Murray added the comment:

Your ping after a month is very appropriate.  It looks like yes, this is 
waiting for another review.  Based on the fact that the previous patches were 
reviewed by core devs and you have responded, I'm moving it to 'commit review', 
but I haven't looked at the patch myself.

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



[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-08-03 Thread Stefan Behnel

Stefan Behnel added the comment:

Regarding tests, it looks like iteration isn't currently tested at the C
level at all. At least, the xx test modules don't have any types that use
it. I can write one up next week, or add it to one of the existing types
(Xxo_Type?). Unlikely that I'll make the deadline for rc1 next weekend, though.

--

___
Python tracker 

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



[issue24754] argparse add_argument with action="store_true", type=bool should not crash

2015-08-03 Thread paul j3

paul j3 added the comment:

Right, the only arguments that a `store_true` Action class accepts are:

 option_strings, dest, default=False,required=False, help=None

parser.add_argument() massages its parameters a bit, and then uses the 'action' 
parameter to construct an Action subclass object with the other parameters.  
Depending on their needs the subclasses may set various defaults or omit 
certain parameters. And without a catchall '**kwargs', the result of providing 
an omitted parameter is this error message.

For 'store_true', a 'type' parameter is superfluous.  It doesn't take any 
arguments (it sets 'nargs=0'), so there aren't any arguments to convert with 
the 'type' function.  It's the Action's own 'default' and 'const' that provide 
the required False and True values.

Also 'bool' is not a meaningful 'type' - for any Action class.  There isn't a 
function in Python converts a string to a boolean.  'bool()' does not do this.  
Or rather, `bool(astr)' converts every string to True except the empty one.

I've seen this mistake before, assuming that 'type=bool' means 'I want the 
result to be a boolean'.  But the docs do say 

type= can take any callable that takes a single string argument and returns 
the converted value:

'type=float' means 'use float(astr) to convert astr', not 'the argument should 
be a float'.

The documentation is not clear about what parameters are valid for each Action 
type.  It indicates, in bits and pieces, that some parameters are meaningful 
for certain actions, and not useful for others.  One (version) even takes a 
parameter that others don't.  But I haven't seen many bugs - here or on 
StackOverflow - where this is an issue.

--
nosy: +paul.j3

___
Python tracker 

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



[issue24740] make patchcheck doesn't detect changes if commit is done first

2015-08-03 Thread R. David Murray

R. David Murray added the comment:

You can install the same (patchcheck-equivalent) hooks the repo uses in your 
local repo.  If this is not documented in the devguide it should be.  The hooks 
are publicly available (hg.python.org/hooks).  (It has been so long since I set 
this up for myself that I don't remember the steps precisely, but I'm sure I 
could figure it out by looking at my setup if someone needs the info.)

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



[issue24383] consider implementing __await__ on concurrent.futures.Future

2015-08-03 Thread Guido van Rossum

Guido van Rossum added the comment:

Sorry, there's no space in this issue for an answer.

--

___
Python tracker 

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



[issue24781] Improve UX of IDLE Highlighting configuration tab

2015-08-03 Thread Mark Roseman

Mark Roseman added the comment:

The squares next to foreground/background are placeholders for those controls I 
can't remember what they're called (colour wells?) where it shows the current 
colour, and clicking it brings up a colour picker allowing you to change. So 
separate ones for foreground/background rather than a radio button to say what 
you'll set and then a button to set it. Sorry for the confusion.

Any reason that you'd want to actually include a choice of ttk themes? Not sure 
that would really add anything positive to the overall UX (especially on Mac 
and Windows).

Worth discussing more about the name 'theme' (which seems to be common in other 
code editors) vs. 'text highlighting' vs. other alternatives.

Btw, is there a way to change the background colour and/or has that topic come 
up before?

--

___
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-08-03 Thread Ilia Kurenkov

Ilia Kurenkov added the comment:

Thanks for the feedback, folks. Adding the updated patch.

--
Added file: http://bugs.python.org/file40115/20362_py35.patch

___
Python tracker 

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



[issue24383] consider implementing __await__ on concurrent.futures.Future

2015-08-03 Thread Alex Grönholm

Alex Grönholm added the comment:

Why do you want to keep threads separate from asyncio? What's the downside here?
The use of helper functions is justifiable when integrating a third party 
framework or similar with asyncio, but standard library components should just 
integrate well with each other. Requiring boilerplate wrappers for such use 
seems unreasonable to me.

--

___
Python tracker 

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



[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-08-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you provide tests covering all branches (normalized exception, 
unnormalized exception, absent value, non-tuple value, empty tuple value, 
non-empty tuple value...) Stefan?

--
nosy: +serhiy.storchaka
stage: patch review -> test needed

___
Python tracker 

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



[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-08-03 Thread Yury Selivanov

Yury Selivanov added the comment:

> Any of the last two patches ("*_value") will fix it, with my preference on 
> the last one.

Stefan, the last patch looks good to me.  Do you think we can have a unittest 
for this?

--

___
Python tracker 

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



[issue24383] consider implementing __await__ on concurrent.futures.Future

2015-08-03 Thread Guido van Rossum

Guido van Rossum added the comment:

Every individual use case can be dealt with easily by adding simple helper
functions. I really want to keep async and threads separate. And it's no
coincidence that concurrent.futures is threadsafe; that's part of its spec.

--

___
Python tracker 

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



[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-08-03 Thread Guido van Rossum

Guido van Rossum added the comment:

Please try to make sure this is fixed before 3.5 rc 1.

--

___
Python tracker 

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



[issue24755] asyncio.wrap_future undocumented

2015-08-03 Thread Alex Grönholm

Changes by Alex Grönholm :


--
nosy: +alex.gronholm

___
Python tracker 

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



[issue24785] Document asyncio.futures.wrap_future()

2015-08-03 Thread Yury Selivanov

Changes by Yury Selivanov :


--
nosy: +yselivanov

___
Python tracker 

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



[issue24755] asyncio.wrap_future undocumented

2015-08-03 Thread Yury Selivanov

Changes by Yury Selivanov :


--
nosy: +yselivanov

___
Python tracker 

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



[issue24785] Document asyncio.futures.wrap_future()

2015-08-03 Thread Berker Peksag

Berker Peksag added the comment:

This is a duplicate of issue 24755.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> asyncio.wrap_future undocumented

___
Python tracker 

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



[issue24383] consider implementing __await__ on concurrent.futures.Future

2015-08-03 Thread Alex Grönholm

Alex Grönholm added the comment:

Created issue 24785 for the documentation of wrap_future().

--

___
Python tracker 

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



[issue24785] Document asyncio.futures.wrap_future()

2015-08-03 Thread Alex Grönholm

New submission from Alex Grönholm:

Since Python 3.5 will not support awaiting for concurrent.futures.Futures 
natively, one has to use the asyncio.futures.wrap_future() function in 
coroutines like this:

async def foo():
await wrap_future(executor.submit(...))

The wrap_future() function is, however, not mentioned in the asyncio 
documentation. It should be, in order for the standard library to provide the 
above crutch until proper support arrives in 3.6.

--
assignee: docs@python
components: Documentation
messages: 247924
nosy: alex.gronholm, docs@python
priority: normal
severity: normal
status: open
title: Document asyncio.futures.wrap_future()
type: enhancement
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



[issue24383] consider implementing __await__ on concurrent.futures.Future

2015-08-03 Thread Alex Grönholm

Alex Grönholm added the comment:

+1. It was specifically SQLAlchemy (but not limited to it -- there are many 
other blocking APIs) that made me look for a way to easily use threads with 
native coroutines.

The best workaround I've come up with:

from asyncio import wrap_future

async def foo():
await wrap_future(executor.submit(...))

But as I mentioned before, wrap_future() is nowhere to be found in the asyncio 
docs.

--

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-08-03 Thread Mark Shannon

Changes by Mark Shannon :


--
nosy: +Mark.Shannon

___
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-08-03 Thread Berker Peksag

Berker Peksag added the comment:

Sorry for my late response, Ilia. Your reply to my first question looks correct 
to me. Please send your updated patch and I'll apply.

--
assignee:  -> berker.peksag
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



[issue24784] Build fails --without-threads

2015-08-03 Thread Louis Dassy

New submission from Louis Dassy:

Build of default branch fails using --without-threads. I added the WITH_THREAD 
check around PyGILState_Check

--
components: Build
files: without-threads.patch
keywords: patch
messages: 247921
nosy: berker.peksag, louis.dassy, python-dev
priority: normal
severity: normal
status: open
title: Build fails --without-threads
type: compile error
versions: Python 3.6
Added file: http://bugs.python.org/file40114/without-threads.patch

___
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-08-03 Thread Arnon Yaari

Arnon Yaari added the comment:

* The removal of the 'kot' test is ok. That's what the fix is about. With 
longMessage set to False, we should only see the custom message, 'Message', and 
not the message about the regex that contains 'kot'.
* Please update the patch for 3.5 to use assertRegex and assertNotRegex in the 
assertMessages call. These are the new names. With the current patch, the tests 
throw deprecation warnings.

Other than that the patch looks good (I am not a committer, though, so I can't 
help further).

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



[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-08-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +giampaolo.rodola, gvanrossum, haypo

___
Python tracker 

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



[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-08-03 Thread Stefan Behnel

Stefan Behnel added the comment:

The fix wasn't applied yet, so the current code in 3.4 and later branches is 
still incorrect. Any of the last two patches ("*_value") will fix it, with my 
preference on the last one.

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