[issue22161] Remove unsupported code from ctypes

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



[issue22161] Remove unsupported code from ctypes

2014-08-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 034a5f15561d by Serhiy Storchaka in branch '3.4':
Issue #22161: Conformed arguments type checks in ctype to actually supported
http://hg.python.org/cpython/rev/034a5f15561d

New changeset 06cf4044a11a by Serhiy Storchaka in branch 'default':
Issue #22161: Conformed arguments type checks in ctype to actually supported
http://hg.python.org/cpython/rev/06cf4044a11a

--
nosy: +python-dev

___
Python tracker 

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



[issue21777] Separate out documentation of binary sequence methods

2014-08-08 Thread Nick Coghlan

Nick Coghlan added the comment:

Merged after reviews from Zach & Ezio.

Zach, Ezio - if there are any other refactorings from the reviews that you'd 
like to pursue, consider pulling them out to separate issues so we don't forget 
about them.

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



[issue21777] Separate out documentation of binary sequence methods

2014-08-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e750d2b44c1d by Nick Coghlan in branch '3.4':
Issue #21777: separate docs for binary sequence methods
http://hg.python.org/cpython/rev/e750d2b44c1d

New changeset e205bce4cc0a by Nick Coghlan in branch 'default':
Merge #21777 from 3.4
http://hg.python.org/cpython/rev/e205bce4cc0a

--
nosy: +python-dev

___
Python tracker 

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



[issue14105] Breakpoints in debug lost if line is inserted; IDLE

2014-08-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I moved the BREAK tag configuration to PyShell.PyShellEditorWindow, which adds 
breakpoint support by subclassing EditorWindow. I wrapped the code in a 
function so we can also unconfig BREAK text colorizing. This might be desired 
when colored line numbers indicating breakpoints are added.

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



[issue14105] Breakpoints in debug lost if line is inserted; IDLE

2014-08-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 76ca8569a04c by Terry Jan Reedy in branch '2.7':
Issue #14105: Stop removing breakpoints from Idle editors.
http://hg.python.org/cpython/rev/76ca8569a04c

New changeset d775fa9a9767 by Terry Jan Reedy in branch '3.4':
Issue #14105: Stop removing breakpoints from Idle editors.
http://hg.python.org/cpython/rev/d775fa9a9767

--
nosy: +python-dev

___
Python tracker 

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



[issue22147] PosixPath() constructor should not accept strings with embedded NUL bytes

2014-08-08 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> needs patch

___
Python tracker 

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



[issue22147] PosixPath() constructor should not accept strings with embedded NUL bytes

2014-08-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This sounds like a reasonable request indeed.

--
components: +Library (Lib)
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



[issue22165] Empty response from http.server when directory listing contains invalid unicode

2014-08-08 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
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

2014-08-08 Thread Martin Panter

Martin Panter added the comment:

Just about the broken docs link: I was trying to find a permanent version of 
the docs to link to. The usual docs page links to “Old versions” 
, but top link there, 3.4.1, does not 
seem to be available.

--

___
Python tracker 

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



[issue22139] python windows 2.7.8 64-bit did not install

2014-08-08 Thread Andreas Richter

Andreas Richter added the comment:

Ok, complete uninstallation of 2.7.8 and then reinstalling did give me the new 
executable. In my use case I do not register extensions or add python to the 
path so I did not expect anything to be left over as "registration" of 2.7.5 
previously, but I guess it was registered somewhere.
Thanks for checking, sorry. It might be nice to be able to get a zip file of 
the binaries instead of and msi file.

--

___
Python tracker 

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



[issue22139] python windows 2.7.8 64-bit did not install

2014-08-08 Thread Andreas Richter

Andreas Richter added the comment:

Well I know I tried the installation and uninstallation multiple times. I also 
deleted the binaries and did a repair. Each time the old binaries came back. So 
I suppose there could be an old registered msi database be getting in the way. 
But since the non-binary files (like all the py files and libraries and so on) 
are of the right version I would doubt that. But I can check again. What steps 
should I do to "remove this bad source of binary files?"

--

___
Python tracker 

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



[issue8503] smtpd SMTPServer does not allow domain filtering

2014-08-08 Thread Milan Oberkirch

Changes by Milan Oberkirch :


Added file: http://bugs.python.org/file36325/issue8503v2.patch

___
Python tracker 

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



[issue22027] RFC 6531 (SMTPUTF8) support in smtplib

2014-08-08 Thread Milan Oberkirch

Changes by Milan Oberkirch :


Added file: 
http://bugs.python.org/file36324/smtplib_smtputf8_issue21725-dependentV2.patch

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-08-08 Thread Milan Oberkirch

Changes by Milan Oberkirch :


Added file: http://bugs.python.org/file36323/issue21725v5.2.patch

___
Python tracker 

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



[issue22175] improve test_faulthandler readability with dedent

2014-08-08 Thread Xavier de Gaye

Changes by Xavier de Gaye :


Added file: http://bugs.python.org/file36322/test_faulthandler.diff

___
Python tracker 

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



[issue22175] improve test_faulthandler readability with dedent

2014-08-08 Thread Xavier de Gaye

New submission from Xavier de Gaye:

'test_faulthandler.patch' uses dedent to have triple-quoted strings in indented 
form. This allows viewing the source code with the folding tools available with 
some editors.

'test_faulthandler.diff' is the result of 'hg diff --ignore-all-space' and may 
be used to ensure that the changes made by the patch only affect the 
presentation of test_faulthandler.py.

--
components: Library (Lib)
files: test_faulthandler.patch
keywords: patch
messages: 225091
nosy: haypo, xdegaye
priority: normal
severity: normal
status: open
title: improve test_faulthandler readability with dedent
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36321/test_faulthandler.patch

___
Python tracker 

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



[issue22174] property doc fixes

2014-08-08 Thread R. David Murray

R. David Murray added the comment:

The docstring discussion is correct in the context.  property can easily be 
used to create a read only property because when used as a decorator the 
function that follows the decorator call is passed to it as fget, *and it 
copies the docstring from the function into the created property*.

The 'then' is indeed redundant (if kept should properly be set of by commas, 
but there is no reason to keep it).

'turns the voltage' is still part of the previous sentence.  Read it as "create 
read-only properties easily using property() as a decorator as follows...[this 
example] turns the voltage() method into a..."  Your reformulation is, however, 
clearer.

The comma in the 'fget is a function' sentence is in the correct place.  "and 
fdel a function for del'ing" is phrase...I forget the formal name for the type 
of phrase.  It's analogous to the structure of this sentence: "She forgot to 
bring not only her lunch, but also her wallet, to work".  However, the comma 
after 'value' should technically be a semicolon.  Although correct, I think the 
whole sentence would read better if it instead said "fget is a function for 
getting an attribute value, fset is a function for setting an attribute value, 
and fdel is a function for del'ing an attribute."

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



[issue22171] stack smash when using ctypes/libffi to access union

2014-08-08 Thread Wesley Kerfoot

Wesley Kerfoot added the comment:

Description:
python 2.7.8 fails with a 'stack smashing detected' error and aborts when 
trying to access a C union using ctypes/libffi

Steps to reproduce: see the attached shell script which reproduces the issue on 
Ubuntu 13.10 and Arch Linux

Also fails with clang instead of gcc.

OS: Linux frege 3.15.8-1-ARCH #1 SMP PREEMPT Fri Aug 1 08:51:42 CEST 2014 
x86_64 GNU/Linux
python2 version: 2.7.8
libffi version (OS wide version): 3.1-2
gcc version: 4.9.1
clang version: 3.4.2

Here is the PKGBUILD file Arch uses 
https://projects.archlinux.org/svntogit/packages.git/tree/python2/trunk/PKGBUILD?id=c319b32ada1506cf2bd48acc50649ae77a696c53

I have also reported this bug on their tracker since I am not sure if this is a 
bug in ctypes or libffi or both: https://bugs.archlinux.org/task/41502

--
Added file: http://bugs.python.org/file36320/crash.sh

___
Python tracker 

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



[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-08 Thread Matej Cepl

Matej Cepl added the comment:

I meant, please comment on the code.

--

___
Python tracker 

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



[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-08 Thread Matej Cepl

Matej Cepl added the comment:

Whole package with tests has been uploaded to PyPI as 
https://pypi.python.org/pypi/urllib2_prior_auth/

The code for this module is on 
http://luther.ceplovi.cz/git/python-http_basic_auth.git/

--

___
Python tracker 

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



[issue22174] property doc fixes

2014-08-08 Thread diana

Changes by diana :


Added file: http://bugs.python.org/file36319/Screen Shot 2014-08-08 at 4.44.07 
PM.png

___
Python tracker 

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



[issue22174] property doc fixes

2014-08-08 Thread diana

New submission from diana:

The property docs are a bit funky.

https://docs.python.org/3/library/functions.html#property

1) docstrings have zero to do with making a read-only property. It currently 
says:

"If given, doc will be the docstring of the property attribute. Otherwise, the 
property will copy fget‘s docstring (if it exists). This makes it possible to 
create read-only properties easily using property() as a decorator:"

2) The 'then' in this sentence is awkward (and incorrect English).

"If then c is an instance of C, c.x will invoke the getter, c.x = value will 
invoke the setter and del c.x the deleter."

3) This sentence is missing a beginning.

"turns the voltage() method into a “getter” for a read-only attribute with the 
same name."

4) This sentence has an extra comma (after del'ing):

"fget is a function for getting an attribute value, likewise fset is a function 
for setting, and fdel a function for del’ing, an attribute."

Attached is a patch with minimal changes to the property docs, addressing the 
above four issues. Okay, that's not entirely true -- I did add an example usage 
because the current docs don't actually show using a property attribute.

>>> p = Parrot()
>>> p.voltage
10

I've also attached an "after" screenshot of the docs in case it helps with 
review.

Cheers,

--diana

--
assignee: docs@python
components: Documentation
files: property_docs.patch
keywords: patch
messages: 225086
nosy: diana, docs@python
priority: normal
severity: normal
status: open
title: property doc fixes
versions: Python 3.5
Added file: http://bugs.python.org/file36318/property_docs.patch

___
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

2014-08-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The latest x.y docs are available at docs.python.org/x.y, such as
https://docs.python.org/3.4/faq/gui.html

I was not aware of this undocumented method of the undocumented tkapp class.  
It is not available on Windows, and the FAQ should say so. From 
Modules/_tkinter.c:

 /* Tcl_CreateFileHandler() changed several times; these macros deal with the  
messiness.  In Tcl 8.0 and later, it is not available on Windows (and on  Unix, 
only because Jack added it back); when available on Windows, it only applies to 
sockets. */

Current _tkinter only supports 8.4+. The messiness still appears in the asyncio 
design.

'createfile' does not appear on the pydoc page for tkinter; directly using 
createfilehandle seems to be the only access.

--
nosy: +serhiy.storchaka, terry.reedy

___
Python tracker 

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



[issue22153] There is no standard TestCase.runTest implementation

2014-08-08 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +ezio.melotti, michael.foord

___
Python tracker 

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



[issue22147] PosixPath() constructor should not accept strings with embedded NUL bytes

2014-08-08 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +pitrou

___
Python tracker 

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



[issue22139] python windows 2.7.8 64-bit did not install

2014-08-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I downloaded the 2.7.8 64-bit msi, installed over 2.7.7, and indeed got 2.7.8, 
which inports hmac fine.

Andreas, did you have 2.7.5/6 installed  before? If so, I strongly suspect that 
the installer did not run (correctly). There might be an error log somewhere, 
but the likely fix is to remove your current 2.7.z and re-try 2.7.8 install, 
possibly after re-downloading. I once had to do something similar and there 
have been similar reports on python-list.

--
nosy: +terry.reedy
title: python windows 2.7.8 64-bit wrong binary version -> python windows 2.7.8 
64-bit did not install

___
Python tracker 

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



[issue10572] Move test sub-packages to Lib/test

2014-08-08 Thread Zachary Ware

Zachary Ware added the comment:

Here's a patch that moves the ctypes tests.  On this one, I remembered to patch 
Makefile.pre.in; my sqlite3 patch will need the equivalent change as well.

--
Added file: http://bugs.python.org/file36317/issue10572-ctypes.diff

___
Python tracker 

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



[issue21039] pathlib strips trailing slash

2014-08-08 Thread Ian Cordasco

Changes by Ian Cordasco :


--
nosy: +icordasc

___
Python tracker 

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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-08 Thread Zachary Ware

Zachary Ware added the comment:

Done.  Thank you for the reviews, Serhiy (and my apologies about all the spam 
with bad patches earlier today).

--
assignee:  -> zach.ware

___
Python tracker 

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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fc99cf3615bb by Zachary Ware in branch '3.4':
Issue #22060: Clean up/simplify test_ctypes, use test discovery
http://hg.python.org/cpython/rev/fc99cf3615bb

New changeset 748fb6d622e8 by Zachary Ware in branch 'default':
Closes #22060: Merge with 3.4
http://hg.python.org/cpython/rev/748fb6d622e8

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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Please commit.

--

___
Python tracker 

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



[issue10572] Move test sub-packages to Lib/test

2014-08-08 Thread Zachary Ware

Zachary Ware added the comment:

Here's an updated patch to move the sqlite3 tests.  It's a large patch because 
it simplifies things by renaming all of the test methods from "Checkxxx" to 
"testxxx".  The test files are also renamed to fit the usual pattern.

--
Added file: http://bugs.python.org/file36316/issue10572-sqlite3.diff

___
Python tracker 

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



[issue14534] Add method to mark unittest.TestCases as "do not run".

2014-08-08 Thread Wei Wu

Changes by Wei Wu :


Added file: http://bugs.python.org/file36315/01438f18ee18.diff

___
Python tracker 

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



[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2014-08-08 Thread Mark Ribau

Mark Ribau added the comment:

Adding Python v2.7 as also exhibiting this behavior. 

Some people over on Stack Overflow have done some things to work around the 
issue via subclassing, but I'm not sure their solutions are "correct", so much 
as have useful side effects. (For example, when only the server has a key/cert 
and the client does not, how is that handled for reuse?)

http://stackoverflow.com/questions/12164470/python-ftp-tls-connection-issue

--
nosy: +Mark.Ribau
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



[issue22148] frozen.c should #include instead of "importlib.h"

2014-08-08 Thread Brett Cannon

Brett Cannon added the comment:

Unfortunately switching to angle brackets breaks on other platforms, e.g. OS X 
using Clang:

Python/frozen.c:5:10: error: 'importlib.h' file not found with  
include; use "quotes" instead
#include 
 ^
 "importlib.h"
1 error generated.
make: *** [Python/frozen.o] Error 1

Is there a change you want to propose in our configure or Makefile instead?

--
status: open -> pending

___
Python tracker 

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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-08 Thread Zachary Ware

Zachary Ware added the comment:

Maybe this one is actually right...

--
Added file: http://bugs.python.org/file36314/issue22060.v2.diff

___
Python tracker 

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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-08 Thread Zachary Ware

Changes by Zachary Ware :


Removed file: http://bugs.python.org/file36313/issue22060.v2.diff

___
Python tracker 

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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-08 Thread Zachary Ware

Changes by Zachary Ware :


Removed file: http://bugs.python.org/file36312/issue22060.v2.diff

___
Python tracker 

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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-08 Thread Zachary Ware

Changes by Zachary Ware :


Added file: http://bugs.python.org/file36313/issue22060.v2.diff

___
Python tracker 

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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-08 Thread Zachary Ware

Changes by Zachary Ware :


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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-08 Thread Zachary Ware

Zachary Ware added the comment:

In pre-commit testing, I realized I was getting skips that I shouldn't have 
been getting, and it turns out that I screwed up both setUpModule functions 
from the previous patch.  New patch fixes test_loading and test_find to use the 
skipTest method instead of skip decorators, so the necessary variables are 
actually set when they're looked for.  I also combined the setUpModule in 
test_find with the setUp method of the TestOpenGL_libs into a setUpClass 
classmethod, which makes things a little simpler and cleaner.

Since I was in there anyway, I went ahead and fixed your point about 
test.support.verbose.  I had not thought about that issue previously.

I'll go ahead and commit later today unless something else jumps out as being 
wrong.

--
Added file: http://bugs.python.org/file36312/issue22060.v2.diff

___
Python tracker 

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



[issue22170] Typo in iterator doc

2014-08-08 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report!

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
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



[issue22170] Typo in iterator doc

2014-08-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 35db84720d8d by Ezio Melotti in branch '3.4':
#22170: avoid printing newlines twice in tutorial example.
http://hg.python.org/cpython/rev/35db84720d8d

New changeset 79e469ae13b7 by Ezio Melotti in branch 'default':
#22170: merge with 3.4.
http://hg.python.org/cpython/rev/79e469ae13b7

--
nosy: +python-dev

___
Python tracker 

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



[issue22173] Update lib2to3.tests and test_lib2to3 to use test discovery

2014-08-08 Thread Zachary Ware

Changes by Zachary Ware :


Removed file: http://bugs.python.org/file36310/test_lib2to3_discovery.diff

___
Python tracker 

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



[issue22173] Update lib2to3.tests and test_lib2to3 to use test discovery

2014-08-08 Thread Zachary Ware

Changes by Zachary Ware :


Added file: http://bugs.python.org/file36311/test_lib2to3_discovery.diff

___
Python tracker 

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



[issue22173] Update lib2to3.tests and test_lib2to3 to use test discovery

2014-08-08 Thread Zachary Ware

New submission from Zachary Ware:

The attached patch updates lib2to3.tests and the test.test_lib2to3 script to 
use test discovery.  It also re-enables lib2to3.tests.test_all_fixers with a 
"cpu" resource guard.  That test has been failing since at least 3.2, but was 
never run anyway.  To allow it to pass, the patch adds "from __future__ import 
print_function" to lib2to3.main and lib2to3.tests.pytree_idempotency.

--
components: 2to3 (2.x to 3.x conversion tool), Tests
files: test_lib2to3_discovery.diff
keywords: patch
messages: 225072
nosy: zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Update lib2to3.tests and test_lib2to3 to use test discovery
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36310/test_lib2to3_discovery.diff

___
Python tracker 

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



[issue22170] Typo in iterator doc

2014-08-08 Thread R. David Murray

R. David Murray added the comment:

The comma means print doesn't add a newline to what is printed.  This is 
correct because the lines read from the file already have a newline at the end. 
 I can see how this example becomes a little confusing in a tutorial section on 
iterators, but as Mark said, if you try it, you find out that it works, and if 
you play with removing the comma you learn things about how python works with 
files (I don't remember how much of that is covered earlier in the tutorial).

In python3 this is clearer, because the equivalent line uses end='', making it 
clearer that it is intentional and meaningful.

Except...that in the python3 tutorial it currently *doesn't* use end='', so 
that example is in fact wrong and needs to be fixed :)

--
nosy: +r.david.murray
stage:  -> needs patch
type: enhancement -> behavior
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



[issue22167] iglob() has misleading documentation (does indeed store names internally)

2014-08-08 Thread R. David Murray

R. David Murray added the comment:

IMO the documentation isn't *wrong*, just misleading :)

What it is saying is that *your program* doesn't have to store the full list 
returned by iglob before being able to use it (ie: iglob doesn't return a 
list).  It says nothing about what resources are used internally, other than an 
implied contract that there is *some* efficiency over calling glob; which, as 
explained above, there is.  The fact that the implementation uses lots of 
memory if any single directory is large is then a performance bug, which can 
theoretically be fixed in 3.5 using scandir.

The reason iglob was introduced, if you check the revision history, is that 
glob used to call itself recursively for each sub-directory, which meant it 
held *all* of the files in *all* of the scanned tree in memory at one time.  It 
is literally true that the difference between glob and iglob is that with iglob 
your program doesn't have to store the full list of matches from all 
subdirectories, but talking about "your program" is not something we typically 
do in python docs, it is implied.

Perhaps in 2.7/3.4 we can mention in the module docs that at most one 
directory's worth of data will be held in memory during the globbing process, 
but it feels a little weird to document an implementation detail like that.  
Still, if someone can come up with improved wording for the docs, we can add it.

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



[issue22167] iglob() has misleading documentation (does indeed store names internally)

2014-08-08 Thread Roy Smith

Roy Smith added the comment:

How about something like this:

Note: The current iglob() implementation is optimized for the case of many 
files distributed in a large directory tree.  Internally, it iterates over the 
directory tree, and stores all the names from each directory at once.  This 
will lead to pathologically inefficient behavior when any individual directory 
has a large number of files in it.

--

___
Python tracker 

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



[issue21777] Separate out documentation of binary sequence methods

2014-08-08 Thread Nick Coghlan

Nick Coghlan added the comment:

I think this is done now - absent any major objections, I'll push it live in a 
couple of days time.

--
stage: patch review -> commit review

___
Python tracker 

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



[issue21777] Separate out documentation of binary sequence methods

2014-08-08 Thread Nick Coghlan

Nick Coghlan added the comment:

v5 has all the review comments I accepted as being in scope addressed, 
including the restoration/addition of the notes about returning the object 
unchanged for center(), ljust(), rjust() and zfill() when the field width is 
less than or equal to the length of the string.

--
Added file: 
http://bugs.python.org/file36309/separate_binary_sequence_docs_v5.diff

___
Python tracker 

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



[issue22172] Local files shadow system modules, even from system modules

2014-08-08 Thread Nick Coghlan

Nick Coghlan added the comment:

This is not new behaviour. It's just normal system shadowing:

$ python test.py 
Traceback (most recent call last):
  File "test.py", line 1, in 
import collections
  File "/usr/lib64/python2.7/collections.py", line 9, in 
from operator import itemgetter as _itemgetter, eq as _eq
ImportError: cannot import name itemgetter

Avoiding that behaviour is what the new isolated mode is for:

$ ~/devel/py34/python -I test.py 
$

--
nosy: +ncoghlan
resolution:  -> not a bug
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



[issue22172] Local files shadow system modules, even from system modules

2014-08-08 Thread Daniel Thomas

New submission from Daniel Thomas:

In Python 3.4 (but not 3.2 or 2.7) when a system module does an import then 
files with the same name in the directory of the original python script which 
match that name are used.

E.g.
With a directory containing:
test.py:
#!/usr/bin/env python3
from collections import OrderedDict
print('do stuff')

operator.py:
#!/usr/bin/env python3
print('EXPLOIT!')

Running test.py will cause:
EXPLOIT!
Traceback (most recent call last):
  File "./test.py", line 4, in 
from collections import OrderedDict
  File "/usr/lib/python3.4/collections/__init__.py", line 11, in 
from operator import itemgetter as _itemgetter, eq as _eq
ImportError: cannot import name 'itemgetter'


While test.py is perfectly innocent it is in the same directory as the nasty 
operator.py and test.py makes no reference at all to operator.py but when 
'collections' is imported it imports from operator which is resolved to 
operator.py in the local directory

This is a security vulnerability because it is possible to verify that a python 
script is safe to run by reading its code and then on running it find that 
other code is implicitly loaded by the system libraries which is never 
referenced in the original file or part of any of the standard libraries.

It is also rather confusing but a related issue is already filed for that in 
issue21202.
This is similar to the standard name shadowing trap 
http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-name-shadowing-trap
 but now applies to other files in the source directory in a way which it 
didn't in previous versions of python. I suspect this was introduced in python 
3.3 through changes to the import system and __init__.py becoming optional but 
I don't have a 3.3 install to check that with.


sys.path here is: ['/auto/homes/drt24/pythontest', '/usr/lib/python3.4', 
'/usr/lib/python3.4/plat-x86_64-linux-gnu', '/usr/lib/python3.4/lib-dynload', 
'/usr/local/lib/python3.4/dist-packages', '/usr/lib/python3/dist-packages']
Running Python 3.4.0-0ubuntu2 on Ubuntu 14.04.1 LTS with Linux 3.13.0-32-generic

--
components: Interpreter Core
messages: 225065
nosy: drt24
priority: normal
severity: normal
status: open
title: Local files shadow system modules, even from system modules
type: security
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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

But this doesn't matter. The patch LGTM.

--

___
Python tracker 

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



[issue22170] Typo in iterator doc

2014-08-08 Thread Mark Lawrence

Mark Lawrence added the comment:

The comma is needed to prevent blank newlines being printed.  Please try it for 
yourself.

--
nosy: +BreamoreBoy

___
Python tracker 

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