[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Swapnil Talekar

New submission from Swapnil Talekar swapnil...@gmail.com:

In the attached program, the total memory consumption of the process, goes up 
each time a new subinterpreter imports a bunch of modules. When the 
subinterpreter is shutdown with Py_EndInterpreter, the memory consumed with 
import of modules is not returned back. Hence the amount of memory consumed 
keeps increasing with each loop. It goes up from about 8MB to about 11MB after 
few loops. Strangely it doesn't rise any further.

I have tested this only for Python 2.6.5

--
components: Interpreter Core
files: test_subinterpreter.c
messages: 133292
nosy: amaury.forgeotdarc, benjamin.peterson, christian.heimes, eric.araujo, 
grahamd, haypo, loewis, ncoghlan, pitrou, python-dev, swapnil
priority: normal
severity: normal
status: open
title: Memory leak in sub-interpreters
type: resource usage
versions: Python 2.6
Added file: http://bugs.python.org/file21577/test_subinterpreter.c

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Is this the same as #222684?

--
nosy: +ezio.melotti

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Swapnil Talekar

Swapnil Talekar swapnil...@gmail.com added the comment:

No. This is not the same as #222684?

--

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Swapnil Talekar

Changes by Swapnil Talekar swapnil...@gmail.com:


Added file: http://bugs.python.org/file21579/large_import.py

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Indeed, the code looks similar, but #222684 seems to be fixed, and doesn't use 
PyImport_ImportModule, so maybe the leak is there.

--

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



[issue222684] Memory leak creating sub-interpreters

2011-04-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

For the record, the changeset was 433458651eb4

--
nosy: +amaury.forgeotdarc

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



[issue11757] test_subprocess.test_communicate_timeout_large_ouput failure on select(): negative timeout?

2011-04-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Le vendredi 08 avril 2011 à 05:34 +, Charles-Francois Natali a
écrit :
 Charles-Francois Natali neolo...@free.fr added the comment:
 
  You may also patch poll_poll().
 
 
 Poll accepts negative timeout values, since it's the only way to
 specify an infinite wait (contrarily to select which can be passed
 NULL).

Oh, I didn't know. In this case, is my commit 3664fc29e867 correct? I
think that it is, because without the patch, subprocess may call poll()
with a negative timeout, and so it is no more a timeout at all.

If I am correct, it is a real bug. Should it be fixed in Python 2.7, 3.1
and 3.2? ... Hum, it looks like communicate() timeout was introduced in
Python 3.3: c4a0fa6e687c. This commit has no reference to an issue: it
is the issue #5673. And as it was already written in msg130851, the doc
is wrong: the doc indicates that the feature was introduced in 3.2, but
it is 3.3 only. The change is not documented in Misc/NEWS.

--

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



[issue5673] Add timeout option to subprocess.Popen

2011-04-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I fixed a bug in _communicate_with_poll(): raise an error if the endtime-time() 
is negative. If poll() is called with a negative timeout, it blocks until it 
gets an event.

New changeset 3664fc29e867 by Victor Stinner in branch 'default':
Issue #11757: subprocess ensures that select() and poll() timeout = 0
http://hg.python.org/cpython/rev/3664fc29e867

By the way, the doc modified by [c4a0fa6e687c] is still wrong: the timeout 
feature was introduced in 3.3, not in 3.2. And the change is not documented in 
Misc/NEWS.

@Reid Kleckner: Can you fix that? (I reopen this issue to not forget)

--
nosy: +haypo
status: closed - open

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



[issue11629] Reference implementation for PEP 397

2011-04-08 Thread Gertjan Klein

Changes by Gertjan Klein gkl...@xs4all.nl:


--
nosy: +gklein

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



[issue11629] Reference implementation for PEP 397

2011-04-08 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Is it possible to add tl;dr chapter to this document. I am especially 
interested in extensive logging (to debug problems etc.)

--

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



[issue5996] abstract class instantiable when subclassing dict

2011-04-08 Thread Nadeem Vawda

Changes by Nadeem Vawda nadeem.va...@gmail.com:


--
nosy: +nadeem.vawda

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

I've looked at the code for Python 3, and there isn't anything there that
prevents this from happening there, either. So the fix should be applied
to 3.2 and 3.3 as well.

An alternative approach would be to limit the size of the cache, so that
the caller doesn't need to explicitly clear the cache. Something along
the lines of functools.lru_cache() should do the trick. I don't think
it'll be possible to use lru_cache() itself, though - it doesn't provide
a mechanism to invalidate cache entries when they become stale (and in
any case, it doesn't exist in 2.7).

--
nosy: +nadeem.vawda
stage:  - needs patch
type:  - resource usage
versions: +Python 3.2, Python 3.3

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



[issue11804] expat parser not xml 1.1 (breaks xmlrpclib)

2011-04-08 Thread Panos Christeas

New submission from Panos Christeas x...@hellug.gr:

The expat library (in C level) is not xml 1.1 compliant, meaning that
it won't accept characters \x01-\x08,\x0b,\x0c and \x0e-\x1f .
At the same time, ElementTree (or custom XML creation, such as in 
xmlrpclib.py:694) allow these characters to pass through. They will get blocked 
on the receiving side.
Since 2.7, the expat library is the default parser for xml-rpc, so it
this is a regression, IMHO. According to the network principal, we should
accept these characters gracefully.

The attached test script demonstrates that we're not xml 1.1 compliant (but 
instead enforce the more strict 1.0 rule)

References:
http://bugs.python.org/issue5166
http://en.wikipedia.org/wiki/Valid_characters_in_XML

--
components: XML
files: expat-test.py
messages: 133301
nosy: xrg
priority: normal
severity: normal
status: open
title: expat parser not xml 1.1 (breaks xmlrpclib)
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file21580/expat-test.py

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



[issue11794] Backport new logging docs to 2.7

2011-04-08 Thread Vinay Sajip

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


--
assignee: docs@python - vinay.sajip
nosy: +vinay.sajip

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



[issue11571] Turtle window pops under the terminal on OSX

2011-04-08 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

On 07 Apr, 2011,at 07:03 PM, Alexander Belopolsky rep...@bugs.python.org 
wrote:

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

While you are at it, can you also fix the same issue with python -m tkinter?
 
Sure, I can add a hack to that module as well.

Ronald

--
Added file: http://bugs.python.org/file21581/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___htmlbodydivbrbrOn 07 Apr, 2011,at 07:03 PM, Alexander Belopolsky 
lt;rep...@bugs.python.orggt; wrote:brbr/divdivblockquote 
type=citediv class=msg-quotediv class=_stretchbr
Alexander Belopolsky lt;a href=mailto:belopol...@users.sourceforge.net; 
_mce_href=mailto:belopol...@users.sourceforge.net;belopol...@users.sourceforge.net/agt;
 added the comment:br
br
While you are at it, can you also fix the same issue with python -m 
tkinter?/div/div/blockquotespannbsp;/span/divdivspanSure, I 
can add a hack to that module as 
well./span/divdivspanbr/span/divdivspanRonald/span/divdivblockquote
 type=citediv class=msg-quotediv class=_stretchspan style=color: 
rgb(0, 0, 0); span style=color: rgb(0, 51, 153); font 
class=Apple-style-span color=#00 face=Helvetica, Arial, 
sans-serifbr/font/span/span/div/div/blockquote/div/body/html
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11794] Backport new logging docs to 2.7

2011-04-08 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 6fb033af9310 by Vinay Sajip in branch '2.7':
Issue #11794: Reorganised logging documentation.
http://hg.python.org/cpython/rev/6fb033af9310

--
nosy: +python-dev

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



[issue11794] Backport new logging docs to 2.7

2011-04-08 Thread Vinay Sajip

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


--
resolution:  - fixed
status: open - closed

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



[issue3136] [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers

2011-04-08 Thread Matt Joiner

Changes by Matt Joiner anacro...@gmail.com:


--
nosy: +anacrolix

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Putting in a size limit is reasonable.  We did this for fnmatch not that long 
ago (issue 7846).  That was in fact the inspiration for lru_cache.

--
nosy: +r.david.murray

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Simplify the test and set the default timeout to 15 min.

--
Added file: http://bugs.python.org/file21582/regrtest_timeout-3.patch

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-08 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file21575/regrtest_timeout-2.patch

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-08 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Victor's reasons for wanting per-test timeout rather than per-file seem sound. 
Need to review the patch to see how much extra complexity it actually 
introduces (although on a casual reading the new custom result object it 
introduces is trivially simple, so not a maintenance burden).

--

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

As a first guess, I would suspect that this is just badly fragmenting the heap 
and we aren't freeing up any arenas to pass back to the OS.

--

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

The fact that the leak doesn't grow seems to confirm Nick supposition.

Close as invalid?

--
nosy: +jcea

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Most builtin modules keep static references to common objects: exceptions, 
types, co.  These references are currently never freed, but are reused by all 
sub-interpreters.
It the memory usage stays stable, even after many calls to 
Py_NewInterpreter()/Py_EndInterpreter(), this is not a bug!

--

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

With the current implementation of faulthandler.dump_tracebacks_later(), use a 
timeout per function means create a new thread for each function (the thread is 
interrupted and exits when the test is done).

Quick benchmark with test_io on Linux (lowest real time of 3 runs):

- time ./python Lib/test/regrtest.py -v (with timeout): 1 min 3 sec
- time ./python Lib/test/regrtest.py -v, without timeout: 1 min 3 sec
- time ./python Lib/test/test_io.py (without timeout): 1 min 3 sec

test_io have 403 tests and 8 are skipped, so it looks like the creation of ~400 
threads is really fast on Linux! test_io is one of the biggest test suite I 
think.

--

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



[issue11804] expat parser not xml 1.1 (breaks xmlrpclib)

2011-04-08 Thread Antoine Pitrou

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


--
nosy: +loewis

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Please don't add everyone in existence to the nosy list.

--

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
nosy:  -benjamin.peterson

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I did a similar test on Windows: test_io takes ~19.1 sec with and without 
timeout. If I look closer, the timeout overhead (call a thread per function 
call) is 112 µs per function call. The average duration of a test is 48 ms 
(47,750 µs), so the overhead is 0,2%. I am not sure of these numbers (it is 
difficult to get reliable numbers, especially in a VM), but I'm sure that the 
overflow is very low.

--

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy:  -eric.araujo
versions:  -Python 2.6

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



[issue11751] Increase distutils.filelist test coverage

2011-04-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

FYI, I currently only have sporadic Internet access, moreover with SSH blocked, 
and I want to wait for the merge of distutils2 into the stdlib before I commit 
some fixes, so don’t worry if this sits for a while.

--

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



[issue5309] packaging doesn't parallelize extension module compilation

2011-04-08 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
title: setup.py doesn't parallelize extension module compilation - packaging 
doesn't parallelize extension module compilation

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



[issue11794] Backport new logging docs to 2.7

2011-04-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Great stuff!

--
nosy: +eric.araujo

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



[issue11803] Memory leak in sub-interpreters

2011-04-08 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

I think this is a non-issue. Closing.

If you have a testcase proving real leaks in a current release, reopen.

--
resolution:  - invalid
status: open - closed

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



[issue5996] abstract class instantiable when subclassing dict

2011-04-08 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo
versions: +Python 3.3 -Python 2.6

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



[issue11781] test/test_email directory does not get installed by 'make install'

2011-04-08 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

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



[issue11785] email subpackages documentation problems

2011-04-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

See also http://sphinx.pocoo.org/domains.html#directive-py:currentmodule

--
nosy: +eric.araujo

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



[issue11785] email subpackages documentation problems

2011-04-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 Besides, the Doc/library/email-examples.rst is not a module and it
 uses :mod:`email`: xxx

Not a problem.  “:mod:” is not “.. module::”.  See above link.

--

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



[issue11787] File handle leak in TarFile lib

2011-04-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

A try/except/finally construct would probably work.

--
nosy: +eric.araujo

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



[issue11795] Better core dev guidelines for committing submitted patches

2011-04-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

+1

--
nosy: +eric.araujo
versions: +3rd party

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



[issue11770] inspect.dir_static

2011-04-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Would it respect __dir__?

--
nosy: +eric.araujo

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



[issue11764] inspect.getattr_static code execution w/ class body as non dict

2011-04-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Andreas:  metaclass.__prepare__ can return any mapping object.  See 
http://docs.python.org/dev/reference/datamodel#customizing-class-creation

--
nosy: +eric.araujo

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



[issue11770] inspect.dir_static

2011-04-08 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

No. It would return all members accessible to getattr_static (which is 
completely unrelated to what __dir__ may or may not return). Also calling 
__dir__ would mean code execution, and the point of these functions is to avoid 
this where possible.

--

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



[issue11764] inspect.getattr_static code execution w/ class body as non dict

2011-04-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I shot too fast, you were right.  The mapping returned by __prepare__ is used 
during class creation, but __dict__ on the instance is a basic dict afterwards 
(not sure the doc is clear, I tested it in a shell).

--

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo, rhettinger

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



[issue11797] 2to3 does not correct reload

2011-04-08 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

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



[issue11797] 2to3 does not correct reload

2011-04-08 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
assignee:  - benjamin.peterson
nosy: +benjamin.peterson

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



[issue11764] inspect.getattr_static code execution w/ class body as non dict

2011-04-08 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

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



[issue11700] mailbox.py proxy updates

2011-04-08 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

(Hrmpf, it seems a ' class y(io.RawIOBase):' line has been 
swallowed in at least Roundup.)

So here is the rewritten .yeah-2.diff. 
It drops the ._trackpos stuff once again due to problems with 
position tracking in case of failures, i.e. to go that path to the 
end a whole bunch of try..catch would have been necessary. 
So this is very expensive but let's hope the OS VFS is smarter 
than we are so that this ends up as two mostly no-op syscalls. 
:-(

I added more tests (i'm absolutely convinced that the tests i've 
found in test_mailbox.py really find all the cutting edges ;). 
On my box this is clean. 
(It's again a rewrite so it needs at least another review before 
i would ship that out, on the other hand.)

--
Added file: http://bugs.python.org/file21583/11700.yeah-2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11700
___diff --git a/Lib/mailbox.py b/Lib/mailbox.py
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -1864,97 +1864,137 @@
 Message with MMDF-specific properties.
 
 
-class _ProxyFile:
-A read-only wrapper of a file.
+class _ProxyFile(io.RawIOBase):
+A io.RawIOBase inheriting read-only wrapper for a seekable file.
+It supports __iter__() and the context-manager protocol.
+
+def __init__(self, file, pos=None):
+If pos is not None then the file will keep track of its position.
+io.RawIOBase.__init__(self)
+self._file = file
+self._pos = file.tell() if pos is None else pos
+self._close = True
+self._is_open = True
 
-def __init__(self, f, pos=None):
-Initialize a _ProxyFile.
-self._file = f
-if pos is None:
-self._pos = f.tell()
+def _set_noclose(self):
+Subclass hook - use to avoid closing internal file object.
+self._close = False
+
+def _closed_check(self):
+Raise ValueError if not open.
+if not self._is_open:
+raise ValueError('I/O operation on closed file')
+
+def close(self):
+if self._close:
+self._close = False
+self._file.close()
+del self._file
+self._is_open = False
+
+@property
+def closed(self):
+return not self._is_open
+
+def flush(self):
+raise io.UnsupportedOperation('flush')
+
+def _read(self, size, read_method, readinto_arg=None):
+if size is None or size  0:
+size = -1
+self._file.seek(self._pos)
+if not readinto_arg:
+result = read_method(size)
 else:
-self._pos = pos
+if size  len(readinto_arg):
+del readinto_arg[size:]
+result = read_method(readinto_arg)
+if result  len(readinto_arg):
+del readinto_arg[result:]
+self._pos = self._file.tell()
+return result
 
-def read(self, size=None):
-Read bytes.
+def readable(self):
+self._closed_check()
+return True
+
+def read(self, size=-1):
+self._closed_check()
+if size is None or size  0:
+return self.readall()
 return self._read(size, self._file.read)
 
-def read1(self, size=None):
-Read bytes.
-return self._read(size, self._file.read1)
+def readinto(self, by_arr):
+self._closed_check()
+return self._read(len(by_arr), self._file.readinto, by_arr)
 
-def readline(self, size=None):
-Read a line.
+def readall(self):
+self._closed_check()
+self._file.seek(self._pos)
+if hasattr(self._file, 'readall'):
+result = self._file.readall()
+else:
+dl = []
+while 1:
+i = self._file.read(8192)
+if len(i) == 0:
+break
+dl.append(i)
+result = b''.join(dl)
+self._pos = self._file.tell()
+return result
+
+def readline(self, size=-1):
+self._closed_check()
 return self._read(size, self._file.readline)
 
-def readlines(self, sizehint=None):
-Read multiple lines.
+def readlines(self, sizehint=-1):
 result = []
 for line in self:
 result.append(line)
-if sizehint is not None:
+if sizehint = 0:
 sizehint -= len(line)
 if sizehint = 0:
 break
 return result
 
+def seekable(self):
+self._closed_check()
+return True
+
+def seek(self, offset, whence=0):
+self._closed_check()
+if whence == 1:
+self._file.seek(self._pos)
+self._pos = self._file.seek(offset, whence)
+return self._pos
+
+def tell(self):
+self._closed_check()
+return self._pos
+
+def writable(self):
+   

[issue11770] inspect.dir_static

2011-04-08 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

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



[issue11796] list and generator expressions in a class definition fail if expression condition refers to a class variable

2011-04-08 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

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



[issue11792] asyncore module print to stdout

2011-04-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Some guidance on print vs. warnings vs. logging on 
http://docs.python.org/dev/howto/logging#when-to-use-logging

--
nosy: +eric.araujo

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



[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-08 Thread Nadeem Vawda

Changes by Nadeem Vawda nadeem.va...@gmail.com:


--
nosy: +nadeem.vawda

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

Patch for 3.3 and 3.2

--
keywords: +patch
Added file: http://bugs.python.org/file21584/filecmp-lru-cache-3.3.diff

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

Patch for 2.7.

--
Added file: http://bugs.python.org/file21585/filecmp-lru-cache-2.7.diff

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



[issue11796] list and generator expressions in a class definition fail if expression condition refers to a class variable

2011-04-08 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Nadeem Vawda

Changes by Nadeem Vawda nadeem.va...@gmail.com:


--
stage: needs patch - patch review

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-08 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

Oops, there was a typo in the 2.7 patch (import _thread instead of
import thread). Corrected patch attached.

--
Added file: http://bugs.python.org/file21586/filecmp-lru-cache-2.7.diff

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



[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2011-04-08 Thread Charles-Francois Natali

Charles-Francois Natali neolo...@free.fr added the comment:

 Check also this:

 http://bugs.python.org/issue11740

You should indicate it as duplicate.

--

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



[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2011-04-08 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

I have no idea how I should do this. If you explain to me, how it should be 
done, I'll be happy to do this from now on :-)

--

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-08 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 I did a similar test on Windows: test_io takes ~19.1 sec with and
 without timeout.

You may want to test with test_argparse.

--

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



[issue4877] xml.parsers.expat ParseFile() causes segmentation fault when passed a closed file object

2011-04-08 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

I concur. Attaching a refreshed patch (against current 2.7 branch) along with a 
unittest.

--
nosy: +santa4nt
Added file: http://bugs.python.org/file21587/issue4877.patch

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



[issue11740] difflib html diff takes extremely long

2011-04-08 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
resolution:  - duplicate
status: open - closed
superseder:  - dreadful performance in difflib: ndiff and HtmlDiff

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



[issue5166] ElementTree and minidom don't prevent creation of not well-formed XML

2011-04-08 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
nosy: +santa4nt

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



[issue11804] expat parser not xml 1.1 (breaks xmlrpclib)

2011-04-08 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
nosy: +santa4nt

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



[issue5907] repr of time.struct_time type does not eval

2011-04-08 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

 Or whether to change it at all. It's hard to imagine that
 applications may rely on that aspect of the behavior - they
 have to use eval, after all.

I would like to see this fixed.  When working in interactive session, I find 
myself adding [:] to struct_time objects because otherwise I cannot copy the 
result and paste it back to CLI session.

Actually, the bigger problem for me is that struct_time repr is too verbose 
with repeated tm_ prefixes distracting from the data I want to see.  Chances 
are I will continue adding [:] or [:6] when I inspect struct_time values even 
if this issue gets fixed.

Overall I am +0 on fixing this.

--
assignee: belopolsky - 
priority: normal - low
stage:  - needs patch
versions: +Python 3.3 -Python 3.2

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



[issue11388] Implement MutableSequence.clear()

2011-04-08 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue9904] Cosmetic issues that may warrant a fix in symtable.h/c

2011-04-08 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

Terry, Nick - is it OK to commit a fix for the comments?

--

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-08 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

If Torsten does not have time for this i'll do that next.
I hate this useless Punycode (but for nameprep),
so it's exactly the right thing for me to do next in 2011.
Unless someone complains.
I've not looked at formataddr/parseaddr, so that's a motivation.
Torsten?

--
nosy: +sdaoden

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



[issue5907] repr of time.struct_time type does not eval

2011-04-08 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

I have a feeling that a successful resolution of issue 1820 will make things 
simpler for this one, since time.struct_time uses structseq.

--
nosy: +santa4nt

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



[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2011-04-08 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
nosy: +santa4nt

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



[issue11466] getpass.getpass doesn't close tty file

2011-04-08 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

Future Buddha to Guru..
Future Buddha to Guru..
My code is like a two-wheeled indian Bullet, royal purple.
Wouldn't you agree with that?

--

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-08 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I believe Torsten is interested, but he can of course speak for himself.

Just to make sure you are aware: Python has a built in idna codec, so this 
should be a fairly simple patch.

--

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



[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2011-04-08 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Filip, you can look at the changed Benjamin made. One needs to be OP or have 
admin privileges to change the headers.

Could you reupload your patch to this issue?

--
versions: +Python 3.3 -Python 3.2

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



[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2011-04-08 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

Here it is.

--
keywords: +patch
Added file: http://bugs.python.org/file21588/11740.patch

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



[issue11796] list and generator expressions in a class definition fail if expression condition refers to a class variable

2011-04-08 Thread Jonathan Hartley

Jonathan Hartley tart...@tartley.com added the comment:

Is also exhibited by other class variable being used in the 'output' clause of 
the list comprehension:

 class C:
... x = 3
... z = [z*x for z in range(4)]
Traceback (most recent call last):
  File stdin, line 1, in module
  File stdin, line 3, in C
  File stdin, line 3, in listcomp

--
nosy: +jonathan.hartley
versions: +Python 3.1

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



[issue11796] list and generator expressions in a class definition fail if expression condition refers to a class variable

2011-04-08 Thread Andreas Stührk

Changes by Andreas Stührk andy-pyt...@hammerhartes.de:


--
nosy: +Trundle

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



[issue9904] Cosmetic issues that may warrant a fix in symtable.h/c

2011-04-08 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I would say yes (if you are sure changes are correct) unless Nick speaks up to 
say he wants to review first.

--

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



[issue11796] list and generator expressions in a class definition fail if expression condition refers to a class variable

2011-04-08 Thread Raymond Hettinger

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


--
nosy: +rhettinger

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-08 Thread Torsten Becker

Torsten Becker torsten.bec...@gmail.com added the comment:

I was about to look into this over the weekend, but of course I don't
want to steal your fun, Steffen. :)

--

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Le vendredi 08 avril 2011 à 17:31 +, Antoine Pitrou a écrit :
 Antoine Pitrou pit...@free.fr added the comment:
 
  I did a similar test on Windows: test_io takes ~19.1 sec with and
  without timeout.
 
 You may want to test with test_argparse.

Oh... test_argparse has 1608 test! Benchmark on Linux:
- without timeout: 18.931 sec
- with timeout/function call: 19.436 sec

So on this test suite, the overhead is 2.7%. The current timeout
implementation has an overhead near 0% on the same test suite (I tried
to compute the overhead, but I found -0.2% which looks wrong :-)).

I'm too lazy to start Windows for another benchmark tonight.

--

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



[issue5755] -Wstrict-prototypes is valid for Ada/C/ObjC but not for C++

2011-04-08 Thread Jon Parise

Changes by Jon Parise j...@indelible.org:


--
nosy: +jon

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



[issue11747] unified_diff function product incorrect range information

2011-04-08 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

@Tim: was it your intention that difflib track gnu diff?

I am on the fence with this issue. Without input from Tim other than the doc, I 
am tempted to call this a feature request and retitle it Make unified_diff 
match gnu diff for [] input. The docs do not reference external definitions 
for context-diff and unified-diff. The entry for unified-diff does not give a 
format for the @@ control lines. So the current behavior cannot be said to 
violate the doc spec.

On the other hand, putting random garbage on @@ lines would clearly be a bug, 
so the doc must be taken as referencing some external definition, even if vague.
 
https://secure.wikimedia.org/wikipedia/en/wiki/Diff#Unified_format
says Unified context diffs were originally developed by Wayne Davison in 
August 1990 (in unidiff which appeared in Volume 14 of comp.sources.misc). 
Richard Stallman added unified diff support to the GNU Project's diff utility 
one month later,. So using gnu diff as a standard is not unreasonable. (But 
did it give 0,0 for null files from the beginning?)

Now looking practically. If nothing but patch programs ever read and act on the 
control blocks, then, say Ray, a change would neither hurt nor be of any use. 
If any Python code does look, then a change could break code. I would in any 
case be reluntant to change 2.7. 

But if this is treated as a feature request and only 3.3 swere changed, then we 
would have to document the change:
Version changed 3.3: for empty lists, the @@ block specification was changed 
from 1,0 to 0,0, which is pretty close to adding useless noise.
3.0 would have been the best time to make this change.

--
nosy: +terry.reedy, tim_one
stage:  - patch review

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



[issue11805] package_data only allows one glob per-package

2011-04-08 Thread Erik Bray

New submission from Erik Bray erik.m.b...@gmail.com:

In distutils the package_data option can be supplied a list of glob patterns 
for each package.  distutils2 currently only supports one glob per package.

This could easily be fixed by simply allowing more than one `package_name = 
pattern` value in the package_data option.  For example:

package_data =
mypackage = templates/*.html
mypackage = static/css/*.css
mypackage.subpackage = templates/*.html
...

--
assignee: tarek
components: Distutils2
hgrepos: 16
messages: 133346
nosy: alexis, eric.araujo, erik.bray, tarek
priority: normal
severity: normal
status: open
title: package_data only allows one glob per-package
type: behavior

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



[issue11754] Changed test to check calculated constants in test_string.py

2011-04-08 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I do not understand 'circular'. The change is from 'attribute exists' to 
'attribute has correct value'. If any are changed, I would think all should be 
changed.

--
nosy: +terry.reedy

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



[issue4877] xml.parsers.expat ParseFile() causes segmentation fault when passed a closed file object

2011-04-08 Thread Bryce Verdier

Bryce Verdier bryceverd...@gmail.com added the comment:

Modified patch to remove PyErr_SetString() as it doesn't do anything. Patch 
looks good to me otherwise and ran without issue.

--
Added file: http://bugs.python.org/file21589/issue4877.patch

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



[issue11804] expat parser not xml 1.1 (breaks xmlrpclib)

2011-04-08 Thread Ezio Melotti

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


--
nosy: +ezio.melotti

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



[issue4877] xml.parsers.expat ParseFile() causes segmentation fault when passed a closed file object

2011-04-08 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

You mean, PyErr_Clear()?

--

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



[issue4877] xml.parsers.expat ParseFile() causes segmentation fault when passed a closed file object

2011-04-08 Thread Bryce Verdier

Bryce Verdier bryceverd...@gmail.com added the comment:

Yes I did. Sorry.

--

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



[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2011-04-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Issue5907 would benefit of this change.
Unfortunately, structseq constructors already have keyword arguments; they are 
equivalent to def __new__(cls, sequence, dict=NULL).
OTOH these keywords arguments are not documented anywhere.

I suggest to change the constructor to something equivalent to:
def __new__(cls, sequence=NULL, dict=NULL, *, field1=NULL,  field2=NULL)

--
nosy: +amaury.forgeotdarc

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



[issue5907] repr of time.struct_time type does not eval

2011-04-08 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc amaur...@gmail.com:


--
dependencies: +Enhance Object/structseq.c to match namedtuple and tuple api

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



[issue11776] types.MethodType() params and usage is not documented

2011-04-08 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

All the types in the types module are, being types, potentially callable to 
produce instances of that type. But they are in types rather than builtins 
precisely because it is not expected that they be called directly. They are 
bound to names in types primarily for isinstance checks, and possibly 
issubclass checks. So none of their signatures are documented in types. It 
would be an anomaly to add something special for MethodType. So my first 
impulse is to close this. Do you have a source for your statement?

--
nosy: +terry.reedy
type: behavior - feature request

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



[issue11776] types.MethodType() params and usage is not documented

2011-04-08 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Message is classified as spam. I am not sure if you see it.

--

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



[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2011-04-08 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

Also see issue 11698

--
assignee: jackdied - rhettinger

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



[issue5907] repr of time.struct_time type does not eval

2011-04-08 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

Also see issue11698

--
assignee:  - rhettinger
nosy: +rhettinger

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



[issue11782] email.generator.Generator.flatten() fails

2011-04-08 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The error message suggests that somehow a str string has gotten mixed in with 
the bytes. Something like '\n' or ' '?

Steffen, if you want to help track this down:
1. What is a minimal msgdata that gives the same error; post it.
2. Add 'print(payload)' before line 304: self._fp.write(payload)
and perhaps further back to see what the offending string is and where it comes 
from.

--
nosy: +terry.reedy

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



[issue3831] Multiprocessing: Expose underlying pipe in queues

2011-04-08 Thread Matt Joiner

Changes by Matt Joiner anacro...@gmail.com:


--
nosy: +anacrolix

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



[issue3831] Multiprocessing: Expose underlying pipe in queues

2011-04-08 Thread Matt Joiner

Matt Joiner anacro...@gmail.com added the comment:

I look forward to this, or something similar. Inspiration can be taken from 
Golangs's select behaviour on channels.

select {
case i1 = -c1:
print(received , i1,  from c1\n)
case c2 - i2:
print(sent , i2,  to c2\n)

default:
print(no communication\n)
}

--

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



[issue11796] list and generator expressions in a class definition fail if expression condition refers to a class variable

2011-04-08 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Devs are aware that there is an exception to the general rule for the 'for' 
clause. There is a technical reason why the exception is possible, though I 
have forgotten it.

Since you already know that changing the general behavior has been rejected, 
are you asking that the exception be removed (for consistency) , so that your 
first example would fail? If so, that will be rejected also.

I am changing this to a doc issue in case you or someone else wishes to suggest 
a doc improvement.

The solution to the limitation on generator expressions, of course, is to write 
out the generator one is trying to abbreviate.

def clipper(max):
for i in range(5):
if i  max:
yield i

class Foo:
x = 3
y = list(clipper(x))

print(Foo.y)
# [0, 1, 2]

--
assignee:  - docs@python
components: +Documentation -Interpreter Core
nosy: +docs@python, terry.reedy
stage:  - needs patch
versions: +Python 3.3

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



  1   2   >