[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-03-16 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

Here's a patch for python 2.7.  test cases pass but it could use review to see 
if I missed any free()s.

--
keywords: +patch
Added file: 
http://bugs.python.org/file24882/malloc-import-pathbufs-py27.001.diff

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



[issue2486] Recode (parts of) decimal module in C

2012-03-16 Thread Ramchandra Apte

Ramchandra Apte maniandra...@gmail.com added the comment:

If issue7652 finishes. There's no point in fixing this bug.

--
nosy: +ramchandra.apte

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



[issue14207] ElementTree.ParseError - needs documentation and consistent CPy implementations

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset b76fa310e73d by Eli Bendersky in branch 'default':
Issue #14207: the ParseError exception raised by _elementtree was made
http://hg.python.org/cpython/rev/b76fa310e73d

--
nosy: +python-dev

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



[issue14207] ElementTree.ParseError - needs documentation and consistent CPy implementations

2012-03-16 Thread Eli Bendersky

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


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

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



[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

To note in the tracker, the original 2.6 code was changed in Issue 2254 and the 
relevant changeset is c6c4398293bd

I find, Glenn's suggestion a possibly okay solution for PATH_INFO problem, 
keeping in tact the security issue the the previous change dealt with.

--

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



[issue14009] Clearer documentation for cElementTree

2012-03-16 Thread Eli Bendersky

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

Éric, what stops us from closing this issue?

Given Ezio and Fred's feedback, I don't object to indexing cET in 3.3 - I guess 
it can't hurt.

--

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



[issue14328] Add keyword-only parameter support to PyArg_ParseTupleAndKeywords

2012-03-16 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

Attached is r3 of my patch incorporated Benjamin's suggestions.

 I want #14325 to go in first.

Why do you care?  If I get signoff before 14325 does please explain to me why I 
should wait.  They don't touch the same lines; should be a clean merge no 
matter who goes first.

--
Added file: http://bugs.python.org/file24883/larry.parsekwonly.diff.3.txt

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



[issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 84e4d76bd146 by Eli Bendersky in branch '3.2':
Issue #9257: clarify the events iterparse accepts
http://hg.python.org/cpython/rev/84e4d76bd146

New changeset 00c7142ee54a by Eli Bendersky in branch 'default':
Issue #9257: clarify the events iterparse accepts
http://hg.python.org/cpython/rev/00c7142ee54a

--
nosy: +python-dev

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



[issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings

2012-03-16 Thread Eli Bendersky

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


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

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



[issue12908] Update dev-in-a-box for new coverage steps

2012-03-16 Thread Eli Bendersky

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


--
nosy:  -eli.bendersky

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



[issue14127] add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds

2012-03-16 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

Updated patch incorporating only one of Antoine's latest suggestions.  Please 
see my reply on Reitveld for r3 as to why I skipped two of your three 
suggestions.

--
Added file: http://bugs.python.org/file24884/larry.st_mtime_ns.patch.4.txt

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



[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

Actually no.  I revert back my previous statement. Meddling with splitpath 
breaks all the tests.

--

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



[issue13709] Capitalization mistakes in the documentation for ctypes

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset d2460ff173ff by Eli Bendersky in branch 'default':
Issue #13709: some fixes to the ctypes documentation. In addition to fixing
http://hg.python.org/cpython/rev/d2460ff173ff

--
nosy: +python-dev

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



[issue13709] Capitalization mistakes in the documentation for ctypes

2012-03-16 Thread Eli Bendersky

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

Fixed in 3.3

I don't think this is important enough to spend time on backporting.

--
resolution:  - fixed
stage: needs patch - commit review
status: open - closed
versions: +Python 3.3

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



[issue2486] Recode (parts of) decimal module in C

2012-03-16 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

No, this should be closed.

--

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



[issue14320] set.add can return boolean indicate newly added item

2012-03-16 Thread Matt Joiner

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

Is there still some value to at least exposing this in the C API, per the 
precedents I mentioned? 

The patch also contains some adjustment to the set_add_entry/set_add_key 
abstraction dance, and some future proofing of PySet_Add return values that 
have merit on their own.

--

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



[issue14333] queue unittest errors

2012-03-16 Thread Matt Joiner

New submission from Matt Joiner anacro...@gmail.com:

$ python3.3 -m unittest test.test_queue

Generates errors in the unit test code of the form

AttributeError: 'BaseQueueTest' object has no attribute 'type2test'

--
components: Tests
messages: 156006
nosy: anacrolix, benjamin.peterson, rhettinger
priority: normal
severity: normal
status: open
title: queue unittest errors
type: behavior
versions: Python 3.3

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



[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Glenn Linderman

Glenn Linderman v+pyt...@g.nevcal.com added the comment:

I'm not sure what tests break or why, I suppose it is the ones for the security 
patch.  I'm not sure which code you are referring to... the code in msg122259 I 
tested only cursorily, the (different) code in issue 13893 is what I'm running 
today, and so has been tested more heavily, but I haven't run the regression 
tests (haven't figured out how).

The latter code fixes the _url_collapse_path_split function, instead of working 
around it, which the code in msg122259 tries to do.

I would be highly interested if it fails any tests, and why, and would be glad 
to help analyze and fix.

--

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



[issue2486] Recode (parts of) decimal module in C

2012-03-16 Thread Mark Dickinson

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


--
resolution:  - rejected
status: open - closed

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



[issue8739] Update to smtpd.py to RFC 5321

2012-03-16 Thread Michele Orrù

Michele Orrù maker...@gmail.com added the comment:

David: yes, I did. About two weeks ago.
Probably I'll take a look to those issues :)

--

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



[issue8739] Update to smtpd.py to RFC 5321

2012-03-16 Thread Michele Orrù

Michele Orrù maker...@gmail.com added the comment:

David, can you tag this issue as dependency for issue14261 ?

--

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



[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset bab9f29c93fd by Senthil Kumaran in branch '2.7':
2.7 - Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem
http://hg.python.org/cpython/rev/bab9f29c93fd

New changeset 88c86869ce92 by Senthil Kumaran in branch '3.2':
closes issue10484 - Fix the http.server's cgi PATH_INFO handling problem
http://hg.python.org/cpython/rev/88c86869ce92

New changeset 13c44ad094b4 by Senthil Kumaran in branch 'default':
closes issue10484 - Fix the http.server's cgi PATH_INFO handling problem
http://hg.python.org/cpython/rev/13c44ad094b4

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

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



[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

I treated this as a regression from 2.6. A cgi url with 
/cgi-bin/hello.py/hello/world would have PATH_INFO as '/hello/world' 
I saw some apache specs saying that it should be 'hello/world', but I relied on 
python2.6's behavior with had initial '/'.

Glenn, I referred to Lib/test/test_httpservers.py.

Thanks for raising this and other issues (and patches)!

--

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



[issue10487] http.server doesn't process Status header from CGI scripts

2012-03-16 Thread Senthil Kumaran

Changes by Senthil Kumaran sent...@uthcode.com:


--
assignee:  - orsenthil

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



[issue10487] http.server doesn't process Status header from CGI scripts

2012-03-16 Thread Senthil Kumaran

Changes by Senthil Kumaran sent...@uthcode.com:


--
superseder:  - Make CGIHTTPServer capable of redirects (and status other than 
200)

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



[issue10485] http.server fails when query string contains addition '?' characters

2012-03-16 Thread Senthil Kumaran

Changes by Senthil Kumaran sent...@uthcode.com:


--
assignee:  - orsenthil

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



[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Glenn Linderman

Glenn Linderman v+pyt...@g.nevcal.com added the comment:

In reviewing my code in this area, I also see that in addition to fixing 
_url_collapse_path_split, I override the location that uses it, which is the 
is_cgi function.  Here is my code for the override, which actually creates a 
proper PATH_INFO string:

def is_cgi(self):
Test whether self.path corresponds to a CGI script.

Returns True and updates the cgi_info attribute to the tuple
(dir, rest) if self.path requires running a CGI script.
Returns False otherwise.

If any exception is raised, the caller should assume that
self.path was rejected as invalid and act accordingly.

The default implementation tests whether the normalized url
path begins with one of the strings in self.cgi_directories
(and the next character is a '/' or the end of the string).



splitpath = server._url_collapse_path_split(self.path)
# more processing required due to possible PATHINFO parts
# not clear above function really does what is needed here,
# nor just how general it is!
splitpath = '/'.join( splitpath ).split('/', 2 )
head = '/' + splitpath[ 1 ]
tail = splitpath[ 2 ]
if head in self.cgi_directories:
self.cgi_info = head, tail
return True
return False

I have no idea what applications might depend on the improper handling of 
PATH_INFO that the current code is performing, so that is why I applied my fix 
for that in my overridden code, rather than in the server.py source file.

It may be that the actual fix for this issue is in the overridden code above 
(but the fix to _url_collapse_path_split also seemed necessary, there was a 
corner case that it did incorrectly, but after 16 months, I couldn't tell you 
what that corner case was, any more.

Yes, the biggest issue here was the regression from 2.6, the security fix 
seemed to break the PATH_INFO feature.

--

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



[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Glenn Linderman

Glenn Linderman v+pyt...@g.nevcal.com added the comment:

Senthil, the patch you submitted breaks the encapsulation of cgi_directories -- 
this should be changeable per particular application via subclassing or 
assignment, but you've built those directories into the code.  Perhaps you 
should take a look at my code for is_cgi (which I was trying to post while you 
were posting the patches, sorry I was slow).

Perhaps there should be one more test, which actually changes the 
cgi_directories, and tests a few more things, to prove that the code does not 
hard code those directories (it shouldn't).

--
status: closed - open

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



[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Glenn Linderman

Glenn Linderman v+pyt...@g.nevcal.com added the comment:

Another issue with the patch, is that it doesn't do .. and . collapsing on the 
PATH_INFO part of the path.

It is possible for a path like

/cgi-bin/script.py/../../plain-file.html

to be passed to the server.  I guess the question is if it should serve 
plain-file.html or if it should pass ../../plain-file.html to script.py as 
its PATH_INFO. I would think the former would be appropriate.  I would have to 
do research to determine if some standard states otherwise.

--

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



[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Glenn Linderman

Glenn Linderman v+pyt...@g.nevcal.com added the comment:

I just tested what Apache does with such a path as 
/cgi-bin/script.py/../../plain-file.html, and it serves the plain-file.html.

--

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



[issue14202] The docs of xml.dom.pulldom are almost nonexistent

2012-03-16 Thread Florian Mladitsch

Changes by Florian Mladitsch florian.mladit...@googlemail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file24885/xml.dom.pulldom.rst.patch

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



[issue14133] improved PEP 409 implementation

2012-03-16 Thread Nick Coghlan

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

With the decision on whether or not to suppress the context moved out to a 
separate flag, I think we need to allow it. Requiring that the flag be False 
*and* that the context also be None gets us back to asking the question of why 
the flag doesn't work when the context is set to a different value. That 
question was part of the genesis of the Ellipsis-as-sentinel approach in the 
original 409 implementation.

I wouldn't stress too much about the formatting though. Perhaps note in the 
suppress context docs that the output can get *very* noisy if you turn it off 
when both cause and context are set, so while it does display all the exception 
information, the default output isn't going to be very easy to read.

--

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



[issue14334] Invalid free in _PyUnicode_Ready()

2012-03-16 Thread Stefan Krah

New submission from Stefan Krah stefan-use...@bytereef.org:

Hi -- I'm getting a segfault running the attached crasher.py script.
Valgrind traces it down to an Invalid free() / delete / delete[] in
_PyUnicode_Ready().

Reproduce:
==

Rev: 870c0ef7e8a2
Build: ./configure --without-pymalloc CFLAGS=-O0 -g  make

$ ./python crasher.py 
Segmentation fault


$ valgrind --db-attach=yes --suppressions=./Misc/valgrind-python.supp ./python 
crasher.py
==3476== Memcheck, a memory error detector
==3476== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==3476== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==3476== Command: ./python crasher.py
==3476== 
==3476== Invalid free() / delete / delete[]
==3476==at 0x4C2748D: free (vg_replace_malloc.c:366)
==3476==by 0x44763C: _PyUnicode_Ready (unicodeobject.c:1405)
==3476==by 0x44ACF8: PyUnicode_FromFormatV (unicodeobject.c:2500)
==3476==by 0x4A1CF4: PyErr_Format (errors.c:621)
==3476==by 0x42F8FE: type_getattro (typeobject.c:2551)
==3476==by 0x43493A: wrap_binaryfunc (typeobject.c:4317)
==3476==by 0x550008: wrapper_call (descrobject.c:1067)
==3476==by 0x532C93: PyObject_Call (abstract.c:2150)
==3476==by 0x49012B: PyEval_CallObjectWithKeywords (ceval.c:3920)
==3476==by 0x54F136: wrapperdescr_call (descrobject.c:309)
==3476==by 0x532C93: PyObject_Call (abstract.c:2150)
==3476==by 0x491A1E: ext_do_call (ceval.c:4355)
==3476==  Address 0x4 is not stack'd, malloc'd or (recently) free'd
==3476==

--
components: Interpreter Core
files: crasher.py
messages: 156017
nosy: haypo, loewis, skrah
priority: high
severity: normal
stage: needs patch
status: open
title: Invalid free in _PyUnicode_Ready()
type: crash
versions: Python 3.3
Added file: http://bugs.python.org/file24886/crasher.py

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



[issue14202] The docs of xml.dom.pulldom are almost nonexistent

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 172630a3e6d8 by Eli Bendersky in branch '3.2':
Issue #14202: Greatly enhance the documentation of xml.dom.pulldom.
http://hg.python.org/cpython/rev/172630a3e6d8

New changeset 5d118a154ba3 by Eli Bendersky in branch 'default':
Issue #14202: Greatly enhance the documentation of xml.dom.pulldom.
http://hg.python.org/cpython/rev/5d118a154ba3

--
nosy: +python-dev

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



[issue14202] The docs of xml.dom.pulldom are almost nonexistent

2012-03-16 Thread Eli Bendersky

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

I committed the patch after some minor modifications, to 3.2 and 3.3

Florian, thanks for the contribution!

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

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



[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 9fc456ac20cf by Jean-Paul Calderone in branch 'default':
Issue #14325: Stop using python lists, capsules, and the garbage collector to 
deal with PyArg_Parse* cleanup.
http://hg.python.org/cpython/rev/9fc456ac20cf

--
nosy: +python-dev

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



[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Jean-Paul Calderone

Changes by Jean-Paul Calderone invalid@example.invalid:


--
resolution:  - fixed
status: open - closed

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



[issue11379] Remove lightweight from minidom description

2012-03-16 Thread Eli Bendersky

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

Éric, what else would you like to do here?

--

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



[issue14334] Invalid free in _PyUnicode_Ready()

2012-03-16 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

3.2 also crashes. 2.7 runs fine. So it's certainly not related
to the new Unicode API.

--
versions: +Python 3.2

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



[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Eli Bendersky

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

This is cool! Any benchmark / speedup data?

--
nosy: +eli.bendersky

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



[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Jean-Paul Calderone

Jean-Paul Calderone invalid@example.invalid added the comment:

If it's a bit faster, that'd be a nice win, but I didn't benchmark.  I'm 
primarily interested in correctness in the PyPy case (PyPy re-uses this code), 
and I think CPython benefits from the slightly simplified code as well.

If you do any benchmarks, I'd love to hear the results, though. :)

--

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



[issue14128] _elementtree should expose types and factory functions consistently with ElementTree

2012-03-16 Thread Eli Bendersky

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

The TreeBuilder constructor in _elemettree doesn't accept arguments, contrary 
to the documentation. Added a (currently marked as failing) test.

--

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



[issue14334] Crash: getattr(type, '__getattribute__')(type, type)

2012-03-16 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

I've traced it down to this line:

 getattr(type, '__getattribute__')(type, type)
Segmentation fault


Setting to 'normal', since there are apparently more of these.

--
priority: high - normal
title: Invalid free in _PyUnicode_Ready() - Crash: getattr(type, 
'__getattribute__')(type, type)

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



[issue11379] Remove lightweight from minidom description

2012-03-16 Thread Éric Araujo

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

I’ll soon have a revised version of my patch to address your feedback.

--

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



[issue14320] set.add can return boolean indicate newly added item

2012-03-16 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

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



[issue14335] Reimplement multiprocessing's ForkingPickler using dispatch_table

2012-03-16 Thread sbt

New submission from sbt shibt...@gmail.com:

The attached patch reimplements ForkingPickler using the new dispatch_table 
attribute.

This allows ForkingPickler to subclass Pickler (implemented in C) instead of 
_Pickler (implemented in Python).

--
components: Library (Lib)
files: mp_forking_pickler.patch
keywords: patch
messages: 156028
nosy: sbt
priority: normal
severity: normal
status: open
title: Reimplement multiprocessing's ForkingPickler using dispatch_table
type: performance
versions: Python 3.3
Added file: http://bugs.python.org/file24887/mp_forking_pickler.patch

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



[issue14334] Crash: getattr(type, '__getattribute__')(type, type)

2012-03-16 Thread Amaury Forgeot d'Arc

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

One-line crasher:
  type.__getattribute__(type, type)
Python 2.7 does not crash reliably, but is not exempt from the bug:
  type.__getattribute__(type, 1.1j)

--
nosy: +amaury.forgeotdarc

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



[issue14009] Clearer documentation for cElementTree

2012-03-16 Thread Éric Araujo

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

I will commit the patch, keeping the indexing in 3.3 as agreed.  I just moved 
to a new city, so today is paperwork day but in the evening or tomorrow I’ll do 
Python work :)

--
versions: +Python 3.3

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



[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-16 Thread Matt Joiner

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

This changeset has broken something. All I get is a confusing backtrace ending 
with:

  File /home/matt/src/python-torrent/torrent/bencode.py, line 15, in encode
yield from encode(k)
AttributeError: 'list_iterator' object has no attribute 'send'

Backing out the changeset, and there is no problem. Let me know if there's some 
way to provide more information.

--
nosy: +anacrolix

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



[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-16 Thread Benjamin Peterson

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

2012/3/16 Matt Joiner rep...@bugs.python.org:

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

 This changeset has broken something. All I get is a confusing backtrace 
 ending with:

  File /home/matt/src/python-torrent/torrent/bencode.py, line 15, in encode
    yield from encode(k)
 AttributeError: 'list_iterator' object has no attribute 'send'

 Backing out the changeset, and there is no problem. Let me know if there's 
 some way to provide more information.

Try removing all the pycs.

--

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



[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-16 Thread Benjamin Peterson

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

Nevermind, I think I see the problem.

2012/3/16 Benjamin Peterson rep...@bugs.python.org:

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

 2012/3/16 Matt Joiner rep...@bugs.python.org:

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

 This changeset has broken something. All I get is a confusing backtrace 
 ending with:

  File /home/matt/src/python-torrent/torrent/bencode.py, line 15, in encode
    yield from encode(k)
 AttributeError: 'list_iterator' object has no attribute 'send'

 Backing out the changeset, and there is no problem. Let me know if there's 
 some way to provide more information.

 Try removing all the pycs.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue14230
 ___

--

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



[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-16 Thread Benjamin Peterson

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

Can you possibly create a small example that fails?

--

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



[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts

2012-03-16 Thread sbt

sbt shibt...@gmail.com added the comment:

_eintr_retry is currently unused.  The attached patch removes it.

If it is retained then we should at least add a warning that it does not 
recalculate timeouts.

--
keywords: +patch
Added file: http://bugs.python.org/file24888/mp_remove_eintr_retry.patch

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



[issue14202] The docs of xml.dom.pulldom are almost nonexistent

2012-03-16 Thread Éric Araujo

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

Thanks to you both, the new docs are greatly better!

Eli, why not backporting to 2.7 too?  It has the same rules and should get the 
same attention as 3.2.

BTW, when you nest class/method directives, you needn’t repeat the class name 
in the method directives:

  .. class:: DOVEventStream(stream, etc)

 .. method:: getEvent(blah)

A few nits you may want to avoid in future patches:
- The constants in the methods doc don’t use data markup
- s/ie./i.e./
- I’d say “Unicode string”, not “unicode string” (referring to the 
concept/standard, not the old class)

--

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



[issue14334] Crash: getattr(type, '__getattribute__')(type, type)

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset b7bad204b34f by Benjamin Peterson in branch '3.2':
check to make sure the attribute is a string (#14334)
http://hg.python.org/cpython/rev/b7bad204b34f

New changeset e44591015cf0 by Benjamin Peterson in branch 'default':
merge 3.2 (#14334)
http://hg.python.org/cpython/rev/e44591015cf0

--
nosy: +python-dev

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



[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-16 Thread Mark Shannon

Mark Shannon m...@hotpy.org added the comment:

The magic number has not been updated

Patch attached.

--
Added file: http://bugs.python.org/file24889/magic.patch

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



[issue14316] Broken link in grammar.rst

2012-03-16 Thread Éric Araujo

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

Thanks for the catch!  A little detective work finds that grammar.rst started 
as a copy of PEP 306, where the link’s target is 
http://www.python.org/sf/676521 a.k.a. http://bugs.python.org/issue676521

I can fix this later if nobody does it before me.

--
nosy: +brett.cannon, eric.araujo

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



[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset c0a6569fdad6 by Benjamin Peterson in branch 'default':
in 72556ff86828, I should have updated the magic as well as the comment (#14230)
http://hg.python.org/cpython/rev/c0a6569fdad6

--

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



[issue14319] cleanup index switching mechanism on packaging.pypi

2012-03-16 Thread Éric Araujo

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


--
nosy: +eric.araujo
versions: +3rd party, Python 3.3

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



[issue14318] clarify may not in time.steady docs

2012-03-16 Thread Éric Araujo

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


--
nosy: +haypo

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



[issue14275] pysetup create doesn't handle install requirements

2012-03-16 Thread Éric Araujo

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


--
stage:  - needs patch
versions: +3rd party -Python 2.6, Python 2.7

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



[issue14322] More test coverage for hmac

2012-03-16 Thread Éric Araujo

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

Thanks for the patch.  Could you rewrite it using self.assert* methods instead 
of asserts?

I’m not an hmac expert, so you may have to wait a bit for another core 
developer to see and commit the patch.

--
nosy: +eric.araujo
title: More test coverage for hmac.py - More test coverage for hmac

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



[issue14311] ConfigParser does not parse utf-8 files with BOM bytes

2012-03-16 Thread Éric Araujo

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

Could you paste the exact code that fails?  In 3.2+ there is a read_something 
method that takes an encoding argument, so that should work for example.

--
nosy: +eric.araujo

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



[issue14334] Crash: getattr(type, '__getattribute__')(type, type)

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset d1cf6008a565 by Benjamin Peterson in branch '2.7':
check to make sure the attribute is a string (#14334)
http://hg.python.org/cpython/rev/d1cf6008a565

--

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



[issue14330] do not use the host python for cross builds

2012-03-16 Thread Éric Araujo

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

+   case $$MAKEFLAGS in *s*) quiet=-s; esac; \
Should be quiet=-q.  make -s → setup.py -q

--
nosy: +eric.araujo

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



[issue14334] Crash: getattr(type, '__getattribute__')(type, type)

2012-03-16 Thread Benjamin Peterson

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

It doesn't crash for me anymore.

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

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



[issue14332] difflib.ndiff appears to ignore linejunk argument

2012-03-16 Thread Éric Araujo

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

Unfortunately Python 2.6 only gets fixes for security bugs now, not regular 
bugs.  Can you reproduce the problem with 2.7 or 3.2?

--
nosy: +eric.araujo, terry.reedy
versions:  -Python 2.6

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



[issue14317] index.simple module lacking in distutils2

2012-03-16 Thread Éric Araujo

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


--
resolution: wont fix - out of date
stage:  - committed/rejected
versions: +3rd party -Python 2.6

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



[issue14202] The docs of xml.dom.pulldom are almost nonexistent

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 1a740ea4f2a1 by Eli Bendersky in branch '3.2':
Issue #14202: some additional doc fixes
http://hg.python.org/cpython/rev/1a740ea4f2a1

New changeset b2e27f21760e by Eli Bendersky in branch 'default':
Issue #14202: some additional doc fixes
http://hg.python.org/cpython/rev/b2e27f21760e

--

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



[issue14202] The docs of xml.dom.pulldom are almost nonexistent

2012-03-16 Thread Eli Bendersky

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

Éric, thanks for the comments - all fixed.

As for 2.7, it's just laziness really. Committing to both 3.2 and 3.3 is 
trivial since it's a simple merge. For 2.7 it's more complicated since it's an 
unrelated branch, and the code samples have to be fixed as well (the current 
ones use Python 3.x syntax).

So I wouldn't object for someone to backport it to 2.7, but I don't deem it 
very important. If it was a bug fix, I would bother, but for documentation... 
not really :-)

--

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



[issue2377] Replace __import__ w/ importlib.__import__

2012-03-16 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Thanks to everyone for the reviews. I'm moving house tomorrow and I suspect 
Andrea wants me to take a little Python break so I might not get to the reviews 
before a2, but I will definitely get to them an merged by a3.

--

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



[issue14296] Compilation error on CentOS 5.8

2012-03-16 Thread Hervé Coatanhay

Hervé Coatanhay herve.coatan...@gmail.com added the comment:

I still have the exact same error

Maybe change should be:

#if !defined(CPU_ALLOC)  defined(HAVE_SCHED_SETAFFINITY)
#undef HAVE_SCHED_SETAFFINITY
#endif

it seems CPU_ALLOC first appeared in glibc 2.7

--

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



[issue14317] index.simple module lacking in distutils2

2012-03-16 Thread Pierre Lecointre

Pierre Lecointre pi.lecoin...@gmail.com added the comment:

Un grand merci pour cette réponse !
La substitution index par pypi a fonctionné.

Bon week-end

2012/3/15 Alexis Metaireau rep...@bugs.python.org


 Alexis Metaireau ale...@notmyidea.org added the comment:

 The APIs of distutils2 have changed. the index module is now named
 pypi.

 So, doing something like::

 from distutils2.pypi.simple import Crawler

 should work.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue14317
 ___


--

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



[issue14334] Crash: getattr(type, '__getattribute__')(type, type)

2012-03-16 Thread Amaury Forgeot d'Arc

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

well, on 2.6 and 2.7 the following has weird output and crashes:

def test(obj):
try:
type(obj).__getattribute__(obj, (1,))
except AttributeError as e:
print(e)
class C:
pass
test(str)
test(C)
test(C())

--
status: closed - open

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



[issue14296] Compilation error on CentOS 5.8

2012-03-16 Thread Benjamin Peterson

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

2012/3/16 Hervé Coatanhay rep...@bugs.python.org:

 Hervé Coatanhay herve.coatan...@gmail.com added the comment:

 I still have the exact same error

 Maybe change should be:

 #if !defined(CPU_ALLOC)  defined(HAVE_SCHED_SETAFFINITY)
 #undef HAVE_SCHED_SETAFFINITY
 #endif

Right you are. Try now.

--

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



[issue14296] Compilation error on CentOS 5.8

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 17980cb07625 by Benjamin Peterson in branch 'default':
fix condition (#14296)
http://hg.python.org/cpython/rev/17980cb07625

--

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



[issue14261] Cleanup in smtpd module

2012-03-16 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
dependencies: +Update to smtpd.py to RFC 5321
stage:  - needs patch

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



[issue14202] The docs of xml.dom.pulldom are almost nonexistent

2012-03-16 Thread Éric Araujo

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

I understand :)  I’ll do it.  I value doc as much as code, it’s also delivered 
faster to the users, and there are a lot of Python 2 users out there, so 
porting doc fixes to 2.7 is really worth it.

--
assignee: docs@python - eric.araujo
status: closed - open
versions: +Python 2.7

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



[issue14334] Crash: getattr(type, '__getattribute__')(type, type)

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 3d4d52e47431 by Benjamin Peterson in branch '2.7':
check for string attribute names in old-style classes (closes #14334)
http://hg.python.org/cpython/rev/3d4d52e47431

--
stage: needs patch - committed/rejected
status: open - closed

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



[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

I'm getting a leak since this revision:

./configure --without-pymalloc CFLAGS=-O0 -g  make
valgrind --db-attach=yes --suppressions=./Misc/valgrind-python.supp 
--leak-check=full ./python leak.py

==32303== 16 bytes in 1 blocks are definitely lost in loss record 3 of 2,489
==32303==at 0x4C27878: malloc (vg_replace_malloc.c:236)
==32303==by 0x41DDB0: PyMem_Malloc (object.c:1841)
==32303==by 0x4A72BF: vgetargskeywords (getargs.c:1432)
==32303==by 0x4A6E1C: PyArg_ParseTupleAndKeywords (getargs.c:1301)
==32303==by 0x55D1C8: float_new (floatobject.c:1557)
==32303==by 0x42B643: type_call (typeobject.c:708)
==32303==by 0x532A9F: PyObject_Call (abstract.c:2150)
==32303==by 0x491483: do_call (ceval.c:4260)
==32303==by 0x490A33: call_function (ceval.c:4063)
==32303==by 0x48BD49: PyEval_EvalFrameEx (ceval.c:2662)
==32303==by 0x48EA11: PyEval_EvalCodeEx (ceval.c:3414)
==32303==by 0x482FC6: PyEval_EvalCode (ceval.c:771)

--
nosy: +skrah
status: closed - open

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



[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Here's leak.py.

--
Added file: http://bugs.python.org/file24890/leak.py

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



[issue12568] Add functions to get the width in columns of a character

2012-03-16 Thread Éric Araujo

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

eo

--
nosy: +benjamin.peterson, eric.araujo, lemburg

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



[issue12568] Add functions to get the width in columns of a character

2012-03-16 Thread Éric Araujo

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


--
Removed message: http://bugs.python.org/msg156059

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



[issue14328] Add keyword-only parameter support to PyArg_ParseTupleAndKeywords

2012-03-16 Thread Benjamin Peterson

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

Shouldn't using vgetargs1 with '$' in the format string just be an error? 
vgetargs1 doesn't know anything about keyword arguments.

--

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



[issue14332] Better explain junk concept in difflib doc

2012-03-16 Thread Terry J. Reedy

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

I reproduced the observed behavior in 3.3.0a.
However, I am rather sure it is not a bug.
In any case, linejunk is not ignored. Passing 'lambda x: 1/0' causes 
ZeroDivisionError, proving that it gets called.

The body of ndiff(linejunk,charjunk,a,b) is
return Differ(linejunk, charjunk).compare(a, b)
Differ only uses the linejunk parameter here
cruncher = SequenceMatcher(self.linejunk, a, b)

SequenceMatcher uses the first parameter, isjunk, in the internal .__chain_b 
method to segregate (not remove) items expected to be common in order to speed 
up the .find_longest_match method. Read the docstring for that method (and 
possibly the code) to see how it affects matching. The main intent of the *junk 
parameters is to speed up matching to find differences, not to mask 
differences. It does, however, affect output of the .*ratio methods.

The doc string for ndiff says The default is None, and is recommended; as of 
Python 2.3, an adaptive notion of noise lines is used that does a good job on 
its own. That is a good idea.

That said, I think the doc (and docstrings) should explain the notion of junk 
elements and what 'ignoring' them means. In particular, I think a couple of 
sentences should be added after The idea is to find the longest contiguous 
matching subsequence that contains no “junk” elements (the Ratcliff and 
Obershelp algorithm doesn’t address junk). The quotes around junk indicate 
that it is being used with a non-standard, module specific meaning. What is it? 
And what does 'ignore' (used several times later in the doc) mean?

Tim, I think we may need your help here since 'junk' is your label for your 
concept and I am not sure I understand well enough to articulate it. (For one 
thing, given that the common heuristic was apparently meant to replace at 
least the linejunk version version of junk, I do not understand why 
.get_longest_match treats 'junk' and 'common' items differently, other than 
that the two concepts are apparently not the same.)

--
assignee:  - docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, eli.bendersky
stage:  - needs patch
title: difflib.ndiff appears to ignore linejunk argument - Better explain 
junk concept in difflib doc
versions: +Python 2.7, Python 3.2, Python 3.3

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



[issue14309] Deprecate time.clock()

2012-03-16 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

STINNER Victor wrote:
 
 STINNER Victor victor.stin...@gmail.com added the comment:
 
 time.clock() has been in use for ages in many many scripts.
 We don't want to carelessly break all those.
 
 I don't want to remove the function, just mark it as deprecated to
 avoid confusion. It will only be removed from the next major Python.

Why ? There's no other single function providing the same functionality,
so it's not even a candidate for deprecation.

Similar functionality is available via several different functions,
but that's true for a lot functions in th stdlib.

--

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



[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Glenn Linderman

Glenn Linderman v+pyt...@g.nevcal.com added the comment:

Senthil, from you patch, I discovered where the test_httpservers.py lives, and 
added 

'/cgi-bin/file1.py/../../a': ('/', 'a'),

to a local copy, and it worked fine against whatever version of the server and 
tests it was running against... but that was in test_url_collapse_path_split 
... I haven't figured out the full environment of the testing, or even if it 
launches an HTTP SERVER or only unittests particular functions within it, but 
it seems that that particular test is just testing the one function.  I'm not 
clear on where the tests actually test the activities of is_cgi or the creation 
of PATH_INFO, if that occurs. What time I've spent working with Python can be 
characterized as 99% application, 0.999% Python source to figure out how things 
work (or fail), .001% test environment (just now). So I'm pretty ignorant of 
the test environment, although I've spent 30+ years programming, only about 4 
has been in Python, and that not full time.

It is not clear to me, though, that the test you added:

'/cgi-bin/file1.py/PATH-INFO': ('/cgi-bin', 'file1.py/PATH-INFO'),

should be the expected results of _url_collapse_path_split... 

I would expect 

'/cgi-bin/file1.py/a/b/c/../../d': ('/cgi-bin/file1.py/a', 'd'),

but I don't think it would, with your present patch. It looks like it would 
return ('/cgi-bin', 'file1.py/a/b/c/../../d') which reintroduces the security 
problem: the '..' stuff has not been processed. I haven't applied your patch to 
actually run it, this is just from inspection, and I may have missed something.

--

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



[issue14313] zipfile does not unpack files from archive (files extracted have zero length)

2012-03-16 Thread Glenn Linderman

Glenn Linderman v+pyt...@g.nevcal.com added the comment:

While Amaury's comment is no doubt true, shouldn't z.read raise an exception if 
it encounters an unsupported compression type?

--
nosy: +v+python

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



[issue14332] Better explain junk concept in difflib doc

2012-03-16 Thread Weronika Patena

Weronika Patena pat...@gmail.com added the comment:

Ah, I see. True, the ndiff docstring doesn't actually explain what junk IS - I 
was just engaging in wishful thinking and assuming it did the thing I wanted.  
A better explanation would help.

--

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



[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset d08f0f3ab23e by Benjamin Peterson in branch 'default':
plug memory leak (closes #14325)
http://hg.python.org/cpython/rev/d08f0f3ab23e

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

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



[issue14245] float rounding examples in FAQ are outdated

2012-03-16 Thread Terry J. Reedy

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

The last version in the message above looks good to me. Ready to markup and 
apply?

--
keywords: +patch
nosy: +terry.reedy
stage:  - patch review

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



[issue14250] for string patterns regex.flags is never equal to 0

2012-03-16 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage: needs patch - patch review

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



[issue14336] Difference between pickle implementations for function objects

2012-03-16 Thread sbt

New submission from sbt shibt...@gmail.com:

When pickling a function object, if it cannot be saved as a global the C 
implementation falls back to using copyreg/__reduce__/__reduce_ex__.

The comment for the changeset which added this fallback claims that it is for 
compatibility with the Python implementation.  See

   http://hg.python.org/cpython/rev/c6753db9c6af

However, the current python implementations do not have any such fallback.

This affects both 2.x and 3.x.

For example

Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on 
win32
Type help, copyright, credits or license for more information.
 import pickle, cPickle, copy_reg
 def f():
...   pass
...
 _f = f
 del f
 copy_reg.pickle(type(_f), lambda obj: (str, (FALLBACK,)))
 cPickle.dumps(_f)
c__builtin__\nstr\np1\n(S'FALLBACK'\np2\ntp3\nRp4\n.
 pickle.dumps(_f)
Traceback (most recent call last):
  File stdin, line 1, in module
  File c:\Python27\lib\pickle.py, line 1374, in dumps
Pickler(file, protocol).dump(obj)
  File c:\Python27\lib\pickle.py, line 224, in dump
self.save(obj)
  File c:\Python27\lib\pickle.py, line 286, in save
f(self, obj) # Call unbound method with explicit self
  File c:\Python27\lib\pickle.py, line 748, in save_global
(obj, module, name))
pickle.PicklingError: Can't pickle function f at 0x0299A470: it's not found 
as __main__.f

I don't know what should be done.  I would be tempted to always fall back to 
copyreg/__reduce__/__reduce_ex__ when save_global fails (not just for function 
objects) but that might make error messages less helpful.

--
components: Library (Lib)
messages: 156069
nosy: sbt
priority: normal
severity: normal
status: open
title: Difference between pickle implementations for function objects
type: behavior
versions: Python 2.7, Python 3.3

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



[issue14297] Custom string formatter doesn't work like builtin str.format

2012-03-16 Thread Terry J. Reedy

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

We know that string.Formatter does not properly duplicate str.format.
#13598 is specifically about use of {}.
Search string Formatter for other related issues.

--
nosy: +terry.reedy
resolution:  - duplicate
status: open - closed
superseder:  - string.Formatter doesn't support empty curly braces {}

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



[issue14337] test_builtin: refleaks

2012-03-16 Thread Stefan Krah

New submission from Stefan Krah stefan-use...@bytereef.org:

I don't see immediately why, but since 3877bf2e323 test_builtin and
a couple of other tests leak in refcounting mode:


hg up 8a5742b7a14d
make distclean  ./configure --with-pydebug  make
./python -m test -uall -R ::  test_builtin
[1/1] test_builtin
beginning 9 repetitions
123456789
.
1 test OK.
[154630 refs]


hg up 3877bf2e323
make distclean  ./configure --with-pydebug  make
./python -m test -uall -R :: test_builtin
[1/1] test_builtin
beginning 9 repetitions
123456789
.
test_builtin leaked [880, 880, 880, 880] references, sum=3520
1 test failed:
test_builtin
[163380 refs]

--
components: Tests
messages: 156071
nosy: benjamin.peterson, skrah
priority: normal
severity: normal
status: open
title: test_builtin: refleaks
type: resource usage
versions: Python 3.3

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



[issue14337] test_builtin: refleaks

2012-03-16 Thread Benjamin Peterson

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

Yes, see 9e7f6ddc0d76 for the fix.

--
resolution:  - out of date
status: open - closed

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



[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-03-16 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

It looks like MAXPATHLEN is 4096 on our systems.  The offending code that 
caused a stack overflow segfault shows over 100 Python/import.c function calls 
in its backtrace.

--

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



[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +giampaolo.rodola

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



[issue14306] try/except block is both efficient and expensive?

2012-03-16 Thread Terry J. Reedy

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

I think it would be sufficient to add ' if no exceptions are raised' to the 
first sentence. The example that follows in the entry clarifies the 
implications of cheap to try, expensive to catch.

--
keywords: +patch
nosy: +terry.reedy

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



[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread R. David Murray

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

Thanks for the patch.

I think this is fine.

An alternate approach would be to introduce the concept of a state (like 
imaplib has), have a list of which commands are allowed in which state, and 
implement the check in the command processing function, but that may not be 
worth it at smtpd's current level of complexity.

One change I'd like to see in the patch (and test): postfix in this case 
responds:

  503 Error: send HELO/EHLO first

And I think that is more useful than the text 'Bad sequence of commands'.

--
nosy: +r.david.murray
stage:  - patch review

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



  1   2   >