[issue17483] Can not tell urlopen not to check the hostname for https connections.

2013-03-30 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Here is an approach to solve this. I think, going this way is safe. I shall 
append with the tests and docs.

--
Added file: http://bugs.python.org/file29610/17483-v1-notests-nodocs.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17483
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17578] Update devguide for 3.2 in security-fix-only mode

2013-03-30 Thread Ned Deily

New submission from Ned Deily:

The attached patch updates the Developer's Guide to reflect the changes in the 
development process now that the 3.2 branch has closed for bug fixes and has 
moved to security-fix-only status.

--
components: Devguide
files: devguide_32_to_security_mode.patch
keywords: patch
messages: 185548
nosy: ezio.melotti, ned.deily
priority: normal
severity: normal
stage: patch review
status: open
title: Update devguide for 3.2 in security-fix-only mode
Added file: http://bugs.python.org/file29611/devguide_32_to_security_mode.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17578
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15533] subprocess.Popen(cwd) documentation

2013-03-30 Thread Ned Deily

Ned Deily added the comment:

Note, that test_executable_without_cwd now fails when the tests are run from an 
installed Python.  See Issue17046.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15533
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2013-03-30 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +mark.dickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17576
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17555] Creating new processes after importing multiprocessing.managers consumes more and more memory

2013-03-30 Thread Charles-François Natali

Charles-François Natali added the comment:

Richard, your patch is indeed better, and fixes the problem.
With a test it should be ready to go in.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17555
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5038] urrlib2/httplib doesn't reset file position between requests

2013-03-30 Thread Anthony Kong

Changes by Anthony Kong anthony.hw.k...@gmail.com:


--
nosy: +Anthony.Kong

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5038
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17573] add ElementTree XML processing benchmark to benchmark suite

2013-03-30 Thread Stefan Behnel

Stefan Behnel added the comment:

Ok, but an lxml benchmark is independent from this patch then. I updated it to 
only use cElementTree, with the additional --etree-module option and also a 
--no-accelerator option for advanced usage.

Another thing I did is to split the actual benchmark code into three: one that 
does parse-process-serialise, one that only does process-serialise, and one 
that does only generate-serialise. The intention is to also represent the use 
case of just getting stuff out, instead of always getting everything in through 
the parser.

--
Added file: http://bugs.python.org/file29612/add_et_benchmark.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17573
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1944] Documentation for PyUnicode_AsString (et al.) missing.

2013-03-30 Thread Mark Lawrence

Mark Lawrence added the comment:

Is it worth applying the patch given the complete rewrite of unicode for 3.3 
via PEP393?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1944
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17579] socket module in 2.7.4 raises error instead of gaierror in 2.7.3

2013-03-30 Thread Matthias Klose

New submission from Matthias Klose:

forwarded from https://launchpad.net/bugs/+bug/1154599

this seems to be changed behavior in 2.7.4. is it intended?

$ cat lookup.py 
#!/usr/bin/python
import sys, socket
names = [slashdot.org, foowhi.com]
if len(sys.argv)  1:
   names = sys.argv[1:]
for iname in names:
try:
result = socket.getaddrinfo(iname, None, 0, 0, socket.SOCK_STREAM,
socket.AI_CANONNAME)
for (fam, stype, proto, cname, sockaddr) in result:
sys.stdout.write(cname=%s, sockaddr=%s\n % (cname, sockaddr))
except socket.gaierror as error:
sys.stderr.write(%s failed lookup % iname)

$ python lookup.py # 2.7.3
cname=slashdot.org, sockaddr=('216.34.181.45', 0)
foowhi.com failed lookup

$ python lookup.py # 2.7.4
cname=slashdot.org, sockaddr=('216.34.181.45', 0)
Traceback (most recent call last):
  File lookup.py, line 9, in module
socket.AI_CANONNAME)
socket.error: [Errno 2] No such file or directory

--
components: Library (Lib)
messages: 185553
nosy: benjamin.peterson, doko
priority: release blocker
severity: normal
status: open
title: socket module in 2.7.4 raises error instead of gaierror in 2.7.3
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17579
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6627] threading.local() does not work with C-created threads

2013-03-30 Thread Mark Lawrence

Mark Lawrence added the comment:

msg116747 suggests wording for a doc patch.  Could this be applied and this 
issue closed?  msg117029 talks about a potential feature request.  Was this 
ever discussed?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6627
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1159051] Handle corrupted gzip files with unexpected EOF

2013-03-30 Thread Matthias Klose

Matthias Klose added the comment:

another test case failure with this patch:
https://launchpad.net/ubuntu/+archive/test-rebuild-20130329/+build/4416983

reproducible with feedparser 5.1.3 from pypi, on x86 (but not x86_64).

ERROR: test_gzip_struct_error (__main__.TestCompression)
--
Traceback (most recent call last):
  File ./feedparsertest.py, line 433, in test_gzip_struct_error
f = 
feedparser.parse('http://localhost:8097/tests/compression/gzip-struct-error.gz')
  File /build/buildd/feedparser-5.1.2/feedparser/feedparser.py, line 3836, in 
parse
data = gzip.GzipFile(fileobj=_StringIO(data)).read()
  File /usr/lib/python2.7/gzip.py, line 253, in read
while self._read(readsize):
  File /usr/lib/python2.7/gzip.py, line 323, in _read
self._read_eof()
  File /usr/lib/python2.7/gzip.py, line 340, in _read_eof
crc32, isize = struct.unpack(II, self._read_exact(8))
  File /usr/lib/python2.7/gzip.py, line 189, in _read_exact
raise EOFError(Compressed file ended before the 
EOFError: Compressed file ended before the end-of-stream marker was reached

--
Ran 4237 tests in 5.190s

FAILED (errors=1)

Exception happened during processing of request from ('127.0.0.1', 43939)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1159051
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5717] os.defpath includes unix /bin on windows

2013-03-30 Thread Mark Lawrence

Mark Lawrence added the comment:

The code is still the same in 3.3.1rc1.  Is this an opportunity to get this 
committed as it's a one line patch?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5717
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17580] ctypes: ARM hardfloat argument corruption calling functions with many float arguments

2013-03-30 Thread David Schneider

New submission from David Schneider:

This issue affects C functions with many float/double arguments called through 
ctypes on ARM using the hardfloat ABI (i.e. the standard distribution for the 
raspberry pi uses hard-float).

Calling a C function using ctypes on ARM hard-float that takes a large number 
of float arguments (more than 16 floats or more than 8 doubles) corrupts the 
first float/double arguments passed on the stack to the called function. 

To check the issue run the following commands on an ARM hard-float system:
make
python bug.py

A patch for this issue has been accepted into libffi.

--
components: ctypes
files: ctypes_arm.tar
messages: 185557
nosy: bivab
priority: normal
severity: normal
status: open
title: ctypes: ARM hardfloat argument corruption calling functions with many 
float arguments
type: behavior
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file29613/ctypes_arm.tar

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17580
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-30 Thread anatoly techtonik

anatoly techtonik added the comment:

 them as CPython implementation details and not part of the language definition

What is the formal language definition of locals() then? What behavior and 
functionality of locals() should be supported by all Python implementations? 
For a potential language developer, what should locals() calls return to be 
compatible with this Python definition?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17579] socket module in 2.7.4 raises error instead of gaierror in 2.7.3

2013-03-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Not really intended I think. Can you try to bisect to find out the responsible 
changeset?

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17579
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17579] socket module in 2.7.4 raises error instead of gaierror in 2.7.3

2013-03-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(by the way, I can't reproduce here)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17579
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17579] socket module in 2.7.4 raises error instead of gaierror in 2.7.3

2013-03-30 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I can't reproduce it.

$ ./python lookup.py 
slashdot.org failed lookup
foowhi.com failed lookup

Are you sure it's not some Ubuntu/Debian patch?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17579
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17453] logging.config.fileConfig error

2013-03-30 Thread Vinay Sajip

Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:


--
nosy:  -vinay.sajip

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17453
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17538] Document XML Vulnerabilties

2013-03-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 91bb6d7ae833 by Christian Heimes in branch '2.7':
Issue 17538: Document XML vulnerabilties
http://hg.python.org/cpython/rev/91bb6d7ae833

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17533] test_xpickle fails with cannot import name precisionbigmemtest or cannot import name _2G

2013-03-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset de48977f9289 by Benjamin Peterson in branch '2.7':
fall back when an old test_support doesn't have various data and functions 
(closes #17533)
http://hg.python.org/cpython/rev/de48977f9289

--
nosy: +python-dev
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17533
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17579] socket module in 2.7.4 raises error instead of gaierror in 2.7.3

2013-03-30 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17579
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12271] panel.h is not found even if it's installed on various flavours of SUSE

2013-03-30 Thread Matthias Klose

Matthias Klose added the comment:

hard coding ncurses seems to be wrong, as in most cases, you do want ncursesw.

--
nosy: +doko

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12271
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9305] Don't use east/west of UTC in date/time documentation

2013-03-30 Thread Mark Lawrence

Mark Lawrence added the comment:

Well, we have a patch and it's been discussed here and on #7229, so can we take 
this forward?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9305
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17581] _ssl fails building on OS X Tiger

2013-03-30 Thread Antoine Pitrou

New submission from Antoine Pitrou:

The _ssl module has failed building (on 3.4) on OS X Tiger for a long time:
http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/6075/steps/test/logs/stdio

Given the error messages, and given how old OS X Tiger is (according to Google, 
the system OpenSSL is 0.9.7), I'm inclined to think it is because of missing 
features on the system OpenSSL.

Is there any point in supporting OS X Tiger in 3.4? Should the _ssl module be 
updated to use conditionals for new (i.e.  7 years old) OpenSSL features?

--
components: Build, Extension Modules
messages: 185566
nosy: hynek, ned.deily, pitrou, ronaldoussoren
priority: normal
severity: normal
status: open
title: _ssl fails building on OS X Tiger
type: compile error
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17581
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-30 Thread Ned Batchelder

Ned Batchelder added the comment:

I would say it something like this:

The dictionary returned by locals() is an accurate snapshot of the local 
namespace at the time it is called.  After the call returns, changes to one may 
or may not be reflected in the other.  The dictionary may change unpredictably 
after the call, and how it does is implementation-specific.Holding a 
reference to the dictionary may produce surprising effects.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11965] Simplify context manager in os.popen

2013-03-30 Thread Mark Lawrence

Mark Lawrence added the comment:

So is _wrap_close obsolete or not?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11965
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17581] _ssl fails building on OS X Tiger

2013-03-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 02f9335b7efb by Antoine Pitrou in branch 'default':
Issue #17581: try to fix building on old OpenSSL versions
http://hg.python.org/cpython/rev/02f9335b7efb

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17581
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17581] _ssl fails building on OS X Tiger

2013-03-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad9effdc0ac3 by Antoine Pitrou in branch 'default':
Further compiling fixes (issue #17581)
http://hg.python.org/cpython/rev/ad9effdc0ac3

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17581
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17581] _ssl fails building on OS X Tiger

2013-03-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, some of the features here are relatively new (they are only 3 years old), 
so it makes sense to conditionally enable them. The question remains of whether 
Tiger is an useful target to support, though.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17581
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5717] os.defpath includes unix /bin on windows

2013-03-30 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Release candidates are separate from the main branch and only get critical 
patches selected by release manager. Changes usually reuire a new .rc.

This seems to have fallen thru the crack between Brian and Tim. 

I suspect that the next line about (win) 'ce' is obsolete if still present.

--
versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5717
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17581] _ssl fails building on OS X Tiger

2013-03-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This is fixed. I'll let other people settle the support issue.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17581
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17582] xml.etree.ElementTree does not preserve whitespaces in attributes

2013-03-30 Thread Daniele Varrazzo

New submission from Daniele Varrazzo:

XML defines the following chars as whitespace [1]::

S ::= (#x20 | #x9 | #xD | #xA)+

However the chars are not properly escaped into attributes, so they are 
converted into spaces as per attribute-value normalization [2]

 data = '\x09\x0a\x0d\x20'
 data
'\t\n\r '

 import  xml.etree.ElementTree as ET
 e = ET.Element('x', attr=data)
 s = ET.tostring(e)
 s
'x attr=\t#10;\r  /'

 e1 = ET.fromstring(s)
 data1 = e1.attrib['attr']
 data1 == data
False

 data1
' \n  '

cElementTree suffers of the same bug::

 import  xml.etree.cElementTree as cET
 cET.fromstring(cET.tostring(cET.Element('a', attr=data))).attrib['attr']
' \n  '

but not the external library lxml.etree::

 import lxml.etree as LET
 LET.fromstring(LET.tostring(LET.Element('a', attr=data))).attrib['attr']
'\t\n\r '

The bug is analogous to #5752 but it refers to a different and independent 
module. Proper escaping should be added to the _escape_attrib() function into 
/xml/etree/ElementTree.py (and equivalent for cElementTree).

[1] http://www.w3.org/TR/REC-xml/#white
[2] http://www.w3.org/TR/REC-xml/#AVNormalize

--
components: Library (Lib), XML
messages: 185574
nosy: piro
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree does not preserve whitespaces in attributes
versions: Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17582
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-30 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I also think 'free variable' should be replace by 'nonlocal name'.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values

2013-03-30 Thread Daniele Varrazzo

Daniele Varrazzo added the comment:

Added separate issue #17582 as ElementTree implementation doesn't depend on 
whatever causes the bug in xml.dom.minidom.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5752
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17551] Windows - accessing drive with nothing mounted forces user interaction

2013-03-30 Thread Bob Alexander

Bob Alexander added the comment:

Thanks Terry. I agree that it's a bug.

And, in the future I'll be more careful about trimming the history from
my messages  :-)

Bob

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17551
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17578] Update devguide for 3.2 in security-fix-only mode

2013-03-30 Thread Ezio Melotti

Ezio Melotti added the comment:

LGTM, except for a small inconsistency: the dir of the default clone is 
called 3.x in the committing page, but default in the FAQ about null merge. 
 The one in the FAQ should be renamed 3.x.

--
stage: patch review - commit review
type:  - enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17578
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14146] IDLE: source line in editor doesn't highlight when debugging

2013-03-30 Thread Todd Rovito

Todd Rovito added the comment:

Here is a backtrace from PDB:

- self.sync_source_line()
  
/Volumes/SecurePython3/cpython/py34/Lib/idlelib/Debugger.py(211)sync_source_line()
- self.flist.gotofileline(filename, lineno)
  /Volumes/SecurePython3/cpython/py34/Lib/idlelib/FileList.py(46)gotofileline()
- edit.gotoline(lineno)
 /Volumes/SecurePython3/cpython/py34/Lib/idlelib/EditorWindow.py(694)gotoline()
- self.center()

The offending code seems to be in EditorWindow.py:gotoline()

def gotoline(self, lineno):
if lineno is not None and lineno  0:
self.text.mark_set(insert, %d.0 % lineno)
self.text.tag_remove(sel, 1.0, end)
self.text.tag_add(sel, insert, insert +1l)
self.center()

Next I am going to write a small program to try and reproduce the bug so I can 
file with the TCL/TK folks.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14146
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17533] test_xpickle fails with cannot import name precisionbigmemtest or cannot import name _2G

2013-03-30 Thread Ezio Melotti

Ezio Melotti added the comment:

Benjamin, the fix you committed still has the _1G vs. _1M typo.

--
status: closed - open
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17533
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17581] _ssl fails building on OS X Tiger

2013-03-30 Thread Ned Deily

Ned Deily added the comment:

Thanks for fixing the break.  As time goes on, active support of 10.4 Tiger 
becomes less important but having the buildbot there is an inexpensive way to 
test backward compatibility, issues that might also arise on other platforms.  
For 2.7.x and 3.2.x, we still produce 32-bit binary installers that support 
10.3 and later systems.  For 3.3.x, the released 32-bit binary installer 
support now only supports 10.5 and later.  However, the daily DMG building 
still produces the 10.3 variant for 3.3 and I still occasionally build and test 
those variants.  I know there are still some users of these older systems out 
there as I see bug reports about them to other projects (e.g. MacPorts).  If we 
reach a point where it becomes more difficult to fully support 10.4, we can 
revisit the question.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17581
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14146] IDLE: source line in editor doesn't highlight when debugging

2013-03-30 Thread Todd Rovito

Todd Rovito added the comment:

I created a small test program trying to reproduce the problem on Windows 7, 
Python 3.4, and TK 8.6.  Unfortunately it works fine and each line is 
highlighted as a user presses ctrl-B.  I got the select code straight from 
IDLE.  Any other ideas Roger?  This might be an IDLE bug after all.

from tkinter import *

class SelectTest:
def __init__(self):
self.mainwin = Tk()
# Create a text widget
# idle creates the text widget like this
#self.text = text = MultiCallCreator(Text)(text_frame, **text_options)
self.textbox = Text(self.mainwin, width=80, height=10)
self.textbox.pack()

# Add some text
self.textbox.insert(INSERT, line 1: Select some text\n)
self.textbox.insert(INSERT, line 2: Select some text\n)
self.textbox.insert(INSERT, line 3: Select some text\n)
self.textbox.insert(INSERT, line 4: Select some text\n)

# Add the binding
self.textbox.bind(Control-Key-b, self.select_just_like_idle)
# just in case caps lock is on
self.textbox.bind(Control-Key-B, self.select_just_like_idle)
self.lineno = 1

def select_just_like_idle(self, event):
print(Select just like idle was called)
if self.lineno is not None and self.lineno  0:
self.textbox.mark_set(insert, %d.0 % self.lineno)
self.textbox.tag_remove(sel, 1.0, end)
self.textbox.tag_add(sel, insert, insert +1l)
self.lineno = self.lineno + 1


if __name__ == __main__:
# Start the program
selectIDLETest = SelectTest()
selectIDLETest.mainwin.mainloop()

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14146
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17578] Update devguide for 3.2 in security-fix-only mode

2013-03-30 Thread Ned Deily

Ned Deily added the comment:

Committed in http://hg.python.org/devguide/rev/e125591a5f12

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17578
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue935117] pkgutil doesn't understand case-senseless filesystems

2013-03-30 Thread Éric Araujo

Éric Araujo added the comment:

With the advent of implicit namespace packages in 3.3, I don’t know if anything 
in pkgutil will be done for this use case.

(BTW is it normal that pkgutil.extend_path is not at least doc-deprecated?)

--
nosy: +eric.araujo, eric.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue935117
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-30 Thread Éric Araujo

Éric Araujo added the comment:

Terry: agreed.

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17533] test_xpickle fails with cannot import name precisionbigmemtest or cannot import name _2G

2013-03-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset be0586ebb842 by Benjamin Peterson in branch '2.7':
G - M (closes #17533)
http://hg.python.org/cpython/rev/be0586ebb842

--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17533
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17453] logging.config.fileConfig error

2013-03-30 Thread Éric Araujo

Éric Araujo added the comment:

Unless the 2.7 configparser docs mention that two quotes are parsed as an empty 
string, I think this is an implementation accident, should not be relied upon 
and 3.x should not be changed to match it.  Values in configparser files are 
not Python strings: we write root, not root.

--
nosy: +eric.araujo
versions:  -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17453
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15494] Move test/support.py into a test.support subpackage

2013-03-30 Thread Éric Araujo

Éric Araujo added the comment:

FWIW I have no principled opinion about big vs. small test.support module, as 
this is purely internal code.

The reasons for this proposal as I understand them are:
- One module for script helpers, one module for package creation, etc. are not 
bad.
- We don’t really want to spend time and thought cleaning up test.support, but 
it be good to stop adding to the mess.
- Making it easier to find that some function already exists (e.g. script 
helpers weren’t known by all core devs) would be good.

ISTM that moving support.py to support/__init__.py and moving script_helper.py 
and friends to support/*.py is a quick and efficient way to address these 
points and make our lives a little easier:
- Script helpers, package helpers, etc. continue to be in their own file.
- Time is not lost trying to do an upfront cleanup of test.support.
- Developers looking at the test.support package are more likely to have a look 
at the dosctrings of the other helper modules than they do currently, and thus 
don’t reinvent the same helpers.

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15494
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2013-03-30 Thread Éric Araujo

Éric Araujo added the comment:

The first commit does something fishy with tests: 
http://hg.python.org/cpython/rev/e30bcce5c634#l3.1

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15627
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15494] Move test/support.py into a test.support subpackage

2013-03-30 Thread Ezio Melotti

Ezio Melotti added the comment:

FWIW the reason why I proposed to add assert_python_ok to test.support, is that 
from my point of view it's just one of the many *test* support utilities 
defined in test.support.  I think that from Nick's point of view, 
assert_python_ok is just one of the many *script* support utilities defined in 
script_helper.
Since I'm not familiar with the other utilities of script_helper, it seemed 
logical to me to have it where I expect all the other general utilities to be 
(i.e. test.support), but I figured out that Nick has a point too.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15494
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17435] threading.Timer.__init__() should use immutable argument defaults for args and kwargs

2013-03-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2698920eadcd by R David Murray in branch '3.3':
Issue #17435: Don't use mutable default values in Timer.
http://hg.python.org/cpython/rev/2698920eadcd

New changeset 8c15e57830dd by R David Murray in branch 'default':
Merge #17435: Don't use mutable default values in Timer.
http://hg.python.org/cpython/rev/8c15e57830dd

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17435
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17435] threading.Timer.__init__() should use immutable argument defaults for args and kwargs

2013-03-30 Thread R. David Murray

R. David Murray added the comment:

Thanks, Denver.

I'm choosing not to backport it to 2.7, but that can be done later if someone 
finds it worth doing.

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
versions:  -Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17435
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-30 Thread R. David Murray

R. David Murray added the comment:

The problem with using 'nonlocal' is that it would naturally be read as 'those 
names referenced in a nonlocal statement', which I don't think is the case.  
Maybe 'non-local', to differentiate it from the keyword?

I'm attaching a patch incorporating my understanding of the suggestions made so 
far.

--
keywords: +patch
nosy: +r.david.murray
Added file: http://bugs.python.org/file29614/locals_doc.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17390] display python version on idle title bar

2013-03-30 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Edmond: please fill in, sign, and send by your preferred method a PSF 
Contributor Agreement
http://www.python.org/psf/contrib/contrib-form/
(back up a level for more explanation)

For a patch more complicated than this, the CA would now be required before 
applying a patch of yours.

--
assignee:  - terry.reedy
versions: +Python 2.7, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17390] display python version on idle title bar

2013-03-30 Thread Edmond Burnett

Edmond Burnett added the comment:

Terry, 

I submitted my contributor form on March 15th, and received the confirmation, 
but it has not yet been applied to my account.

I saw some discussion on one of the mailing lists of there being a potential 
backlog due to the PyCon sprints, so I just assumed that I was still waiting in 
the queue. If there is someone in particular I should contact at this point, 
I'm happy to do this.

Thanks,
Edmond

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2013-03-30 Thread Brett Cannon

Brett Cannon added the comment:

It cleans up the run_unittest() call. You can check the file and see that the 
missing classes are actually not in the module anymore.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15627
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6653] Potential memory leak in multiprocessing

2013-03-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Richard, do you think this is an actual concern?

--
nosy: +pitrou, sbt
versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6653
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17390] display python version on idle title bar

2013-03-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 74d9a9507019 by Terry Jan Reedy in branch '3.3':
Issue #17390: Display Python version on Idle title bar. Patch by Edmond Burnett.
http://hg.python.org/cpython/rev/74d9a9507019

New changeset e0f66c924544 by Terry Jan Reedy in branch 'default':
Merge from 3.3: Issue #17390
http://hg.python.org/cpython/rev/e0f66c924544

New changeset 225022955c65 by Terry Jan Reedy in branch '2.7':
Issue #17390: Display Python version on Idle title bar. Patch by Edmond Burnett.
http://hg.python.org/cpython/rev/225022955c65

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2818] pulldom cannot handle xml file with large external entity properly

2013-03-30 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +christian.heimes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2818
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17580] ctypes: ARM hardfloat argument corruption calling functions with many float arguments

2013-03-30 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17580
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17390] display python version on idle title bar

2013-03-30 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Can you find the place where the editor title is set? I am currently thinking 
of something like

Python x.y.z: xxx.py (directory path)  # or
Python x.y.z Editor: xxx.y (path)


I am guessing that the reason to put the file name at the beginning is in case 
the path is so long that the end gets cut off.

(Let's give the secretary a couple more weeks to catch up.)

--
stage: commit review - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17577] Add lookahead/peek wrapper to itertools

2013-03-30 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Added file: http://bugs.python.org/file29615/peekiter.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17577
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17583] IDLE HOWTO

2013-03-30 Thread Amit Saha

New submission from Amit Saha:

I would like to propose a new HOWTO discussing IDLE from a user's perspective. 
I feel that the current documentation at 
http://docs.python.org/3/library/idle.html is not sufficient to be pointed to a 
newbie programmer or someone who wants to teach his/her students to IDLE. For 
example, being an experienced person myself, I didn't know how to start IDLE on 
Linux! Whether it was a separate package, or whether it was already installed 
(That may be my own shortcoming, but never the less).

I started a document this morning which can be seen here [1]. The source is 
here[2]

[1] http://amitsaha.github.com/site/notes/articles/idle/article.html
[2] http://amitsaha.github.com/site/notes/_sources/articles/idle/article.txt

I am putting up my hand to write the HOWTO and maintain it for 2.7 and 3.3+. 

Comments?

--
components: IDLE
messages: 185600
nosy: Amit.Saha
priority: normal
severity: normal
status: open
title: IDLE HOWTO
type: enhancement
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17583
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-30 Thread Terry J. Reedy

Terry J. Reedy added the comment:

/non-local/Non-local/ If we add the hyphen, perhaps we should add 'non-global' 
also.

Thanks for the concrete draft. It is definitely an improvement.

The last sentence is somewhat redundant with the second. The problem with the 
last sentence is that it only said that changes to the dict might not propagate 
back the the namespace, while is is also true that changes to the namespace 
might or might not propagate to the dict. The new second sentence says both. In 
addition, I somewhat disagree with 'should not modify'. A person could have a 
perfectly good reason to do so, but they should not expect propagation of the 
changes. So I am tempted to drop the last sentence. On the other hand, 
'undefined' should be somewhere.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6653] Potential memory leak in multiprocessing

2013-03-30 Thread Richard Oudkerk

Richard Oudkerk added the comment:

I don't think this is a bug -- processes started with fork() should nearly 
always be exited with _exit().  And anyway, using sys.exit() does *not* 
guarantee that all deallocators will be called.  To be sure of cleanup at exit 
you could use (the undocumented) multiprocessing.util.Finalize().

Note that Python 3.4 on Unix will probably offer the choice of using 
os.fork()/os._exit() or _posixsubprocess.fork_exec()/sys.exit() for 
starting/exiting processes on Unix.

Sturla's scheme for doing reference counting of shared memory is also flawed 
because reference counts can fall to zero while a shared memory object is in a 
pipe/queue, causing the memory to be prematurely deallocated.

I think a more reliable scheme would be to use fds created using shm_open(), 
immediately unlinking the name with shm_unlink().  Then one could use the 
existing infrastructure for fd passing and let the operating system handle the 
reference counting.  This would prevent leaked shared memory (unless the 
process is killed in between shm_open() and shm_unlink()).  I would like to add 
something like this to multiprocessing.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6653
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2013-03-30 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am presuming 2.7 has same problem since it has same code.

The patch appears to give PyShell.close a return value it did not have before. 
Perhaps remove the return?

I am slightly puzzled: self.pollinterval is 50 (millisecs). If reducing the 
wait from 100 to 1 makes the problem constant, why does reducing it to 0 make 
it go away? What have I misunderstood?

Trying to test on Windows in a 3.3 build, I get the following with or without 
the patch:

 exit()
Traceback (most recent call last):
  File pyshell#1, line 1, in module
exit()
  File D:\Python\dev\py33\lib\site.py, line 380, in __call__
raise SystemExit(code)
SystemExit: None

def __call__(self, code=None):
# Shells like IDLE catch the SystemExit, but listen when
# stdin wrapper is closed.
try:
fd = -1
if hasattr(sys.stdin, fileno):
fd = sys.stdin.fileno()
if fd != 0:
# Don't close stdin if it wraps fd 0
sys.stdin.close()
except:
pass
raise SystemExit(code)

---
bare excepts are evil

 import sys
 hasattr(sys.stdin, fileno)
True
 sys.stdin.fileno
built-in method fileno of PseudoInputFile object at 0x02893C08
 sys.stdin.fileno()
Traceback (most recent call last):
  File pyshell#3, line 1, in module
sys.stdin.fileno()
io.UnsupportedOperation: fileno

The problem is that PseudoInputFile subclasses PseudoFile which now subclasses 
TestIOBase without overriding .fileno(), which raises the above. This is from 
#9290.

Bottom line: I believe quit() and exit() are broken in the current 2.7, 3.2, 
and 3.3 rc's. I will report a possible quick fix on pydev.

--
nosy: +terry.reedy
versions: +Python 2.7, Python 3.4 -Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17577] Add lookahead/peek wrapper to itertools

2013-03-30 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Another possible way to go is to expand the existing tee() object to support 
__getitem__ and __bool__ methods.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17577
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2013-03-30 Thread Terry J. Reedy

Terry J. Reedy added the comment:

After reading the doc for IOBase.fileno: Return the underlying file descriptor 
(an integer) of the stream if it exists. An OSError is raised if the IO object 
does not use a file descriptor. I decided that the bug is in the assumptions 
made by site.py.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17584] collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-30 Thread Byron Ruth

Changes by Byron Ruth b...@devel.io:


--
components: Library (Lib)
nosy: bruth
priority: normal
severity: normal
status: open
title: collections.Iterator __subclasshook__ does not check if next() is 
callable
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17584] collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-30 Thread Byron Ruth

New submission from Byron Ruth:

Consider:

```python
class A(object):
def __init__(self):
self.r = iter(range(5))
def __iter__(self):
return self
@property
def next(self):
return next(self.r)
```

The `next` method is a property, however:

```python
from collections import Iterator
a = A()
isinstance(a, Iterator) # True
next(a) # TypeError: 'int' object is not callable
```

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17584] collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-30 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry, this isn't bug.  The design of ABCs are to check for the existence to 
required named; none of them verify the signature.

--
nosy: +rhettinger
resolution:  - wont fix
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17577] Add lookahead/peek wrapper to itertools

2013-03-30 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Added file: http://bugs.python.org/file29616/peekiter.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17577
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17577] Add lookahead/peek wrapper to itertools

2013-03-30 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


Removed file: http://bugs.python.org/file29615/peekiter.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17577
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17584] collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-30 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage:  - committed/rejected

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14146] IDLE: source line in editor doesn't highlight when debugging

2013-03-30 Thread Roger Serwy

Roger Serwy added the comment:

It's definitely a bug with Tk. Whenever the Text widget loses focus, the 
selection highlighting goes away. The following example code brings up a 
focused text box with selected text. Clicking the button switches focus to the 
button itself and then back to the text widget. During that focus change, the 
selection highlight goes away.

from tkinter import *
main = Tk()
text = Text(main, width=40, height=10, wrap=char)
text.pack()
text.insert(INSERT, .join(map(str, range(100
text.tag_add(SEL, 1.0, end)
text.focus_set()
def jump():
text.after(500, btn.focus_set)
text.after(1000, text.focus_set)
btn = Button(main, text=Click me, command=jump)
btn.pack()
main.mainloop()


One possible solution would be to use the FocusOut and FocusIn events 
to substitute the sel tag with a custom tag so that the highlight remains 
when losing focus, and then replace it with the sel tag when gaining focus.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14146
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17583] IDLE HOWTO

2013-03-30 Thread Todd Rovito

Todd Rovito added the comment:

I think it is a great idea.

The Python documentation is written with restructured text.  See the Python 
Developer's Guide here:
http://docs.python.org/devguide/documenting.html

Restructured text is not difficult please let me know if you need help I would 
be glad to assist.

What you have is a good start but it will have to be reformatted then submitted 
as a patch so it can be committed.  In addition you have to complete a Python 
Contributor Agreement.  Please spend a little time looking over the Python 
Developer's Guide.  Thanks.

--
nosy: +Todd.Rovito

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17583
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17583] IDLE HOWTO

2013-03-30 Thread Roger Serwy

Roger Serwy added the comment:

I agree that improving IDLE's docs would make it easier to learn and use. There 
is a tangentially related issue: #16893.

--
assignee:  - docs@python
components: +Documentation
nosy: +docs@python, roger.serwy
versions: +Python 2.7, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17583
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17584] collections.Iterator __subclasshook__ does not check if next() is callable

2013-03-30 Thread Byron Ruth

Byron Ruth added the comment:

Understood. I am not sure it is appropriate to follow-up with a question here, 
but would this be a downstream issue? My understanding of the iterator protocol 
is that is assumes the __iter__ and next methods are implements. In the 
example, the next method is defined as a property, but is still identified as 
an iterator. This seems an incorrect _behavior_ somewhere, although I may have 
assumed the incorrect place.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6649] idlelib/rpc.py missing exit status on exithook

2013-03-30 Thread Roger Serwy

Changes by Roger Serwy roger.se...@gmail.com:


--
assignee:  - roger.serwy
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6649
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17506] Improve IDLE news handling

2013-03-30 Thread Roger Serwy

Roger Serwy added the comment:

This is related to #17221. I agree that news items need to be consolidated in 
both Misc/NEWS and Lib/idlelib/NEWS.txt.

--
nosy: +roger.serwy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17506
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17546] Document the circumstances where the locals() dict get updated

2013-03-30 Thread R. David Murray

R. David Murray added the comment:

Hmm.  Perhaps the last sentence could be ... because changes to the local dict 
propagating to the local namespace cannot be relied upon to either happen or 
not happen.  That would make it less redundant, since it would essentially be 
referencing the previous statement in the specific case of the consequences of 
modification.

The original included the caution against modifying it, and I think it is valid 
because of the inconsistent behavior.  Perhaps it could be weakened to it is 
not a good idea to modify?

--
title: Document the circumstances where the locals() dict gets  updated - 
Document the circumstances where the locals() dict get updated

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17206] Py_XDECREF() expands its argument multiple times

2013-03-30 Thread Illia Polosukhin

Illia Polosukhin added the comment:

Updated patch - removed old code and addded tests to _testcapimoudule.c as 
Amaury suggested.

Amaury, why do you mention -R flag (from what I see it does hash 
randomization)? I would expect some flag, that would enforce memory leakage 
issues to fail test.

--
Added file: http://bugs.python.org/file29617/17206-2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17546] Document the circumstances where the locals() dict get updated

2013-03-30 Thread anatoly techtonik

anatoly techtonik added the comment:

 ... cannot be relied upon to either happen or not happen...

IMHO this phrase is from Advanced English course.

 The original included the caution against modifying it, and I think it is
valid because of the inconsistent behavior.
 Perhaps it could be weakened to it is not a good idea to modify?

Ambiguity already adds fear and uncertainty. Just explaining the
consequences would be good style for the technical doc.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com