[issue1285086] urllib.quote is too slow

2010-05-10 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: I can only reiterate that Zope apps can call 'urllib.quote' dozens, hundreds, even thousands of times on a single request: the reason for the original bug report was that 'urllib.quote' was showing up frequently on profiling output for such

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Yes, writing portable tests turns out to be tricky; I also don't want to write tests based on int that'll fail when/if Py_ssize_t is substituted. Applied the patch (with a couple of minor changes) in r81045 through r81048. I'll open

[issue8425] a -= b should be fast if a is a small set and b is a large set

2010-05-10 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The problem is apparently due to the fact that small_set -= large_set iterates over the large set removing entries from small_set while more efficient small_set - large_set builds a new set iterating over a small_set and

[issue8425] a -= b should be fast if a is a small set and b is a large set

2010-05-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8425 ___

[issue8425] a -= b should be fast if a is a small set and b is a large set

2010-05-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The answer is almost certainly no. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8425 ___

[issue8425] a -= b should be fast if a is a small set and b is a large set

2010-05-10 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On the second thought, it is possible to preserve set identity and avoid iteration over a large set. See issue8425a.diff attached. It looks like the unit tests don't check identity preservation. I will submit

[issue8666] Allow ConfigParser.get*() to take a default value

2010-05-10 Thread Tim Chase
Tim Chase python.l...@tim.thechases.com added the comment: The raise_on_bad (I'm ambivalent on the name, but if you come up with a better name, I'd be fine with changing it) allows you to differentiate between an option that isn't provided, and one that is provided, but can't be converted to

[issue8425] a -= b should be fast if a is a small set and b is a large set

2010-05-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Added file: http://bugs.python.org/file17284/issue8425-tests.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8425 ___

[issue8675] audioop module needs an int - Py_ssize_t upgrade

2010-05-10 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: The audioop module still uses 'int' for most of its sizes; it would be better if it used 'Py_ssize_t' instead, so that data aren't artificially limited to 2Gb on 64-bit systems. Converting ought to be a fairly straightforward task for

[issue8425] a -= b should be fast if a is a small set and b is a large set

2010-05-10 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Note that issue8425a.diff leaves small_set.difference_update(large_dict) unoptimized: $ ./python.exe -m timeit -s s = {1}; l = dict.fromkeys(range(1000)); s.difference_update(l) 1000 loops, best of 3: 842 usec per loop $

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2010-05-10 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- priority: high - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4768 ___ ___

[issue8666] Allow ConfigParser.get*() to take a default value

2010-05-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Rather than a raise_on_bad option, it seems to me it would be better to code a try/except clause in cases where you want the default even if there is an error converting the data in the file. I would expect such cases to be rare, except

[issue8676] Py3k Built-in Exceptions documentation mentions the raise statement of 2.x

2010-05-10 Thread Daniel Urban
New submission from Daniel Urban urban.dani...@gmail.com: In the documentation of the exceptions (http://docs.python.org/dev/py3k/library/exceptions) there is a sentence: The associated value is the second argument to the raise statement. But in py3k there is a different raise statement than in

[issue3704] cookielib doesn't handle URLs with / in parameters

2010-05-10 Thread John J Lee
John J Lee jj...@users.sourceforge.net added the comment: Just re-read your comment, Tres. Since when do docstrings determine whether a stdlib function is public? If it's documented in the docs, it's public. If not, it's not. This function isn't, so it's not public. It's also not in

[issue3704] cookielib doesn't handle URLs with / in parameters

2010-05-10 Thread John J Lee
Changes by John J Lee jj...@users.sourceforge.net: Added file: http://bugs.python.org/file17285/issue3704.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3704 ___

[issue3704] cookielib doesn't handle URLs with / in parameters

2010-05-10 Thread John J Lee
John J Lee jj...@users.sourceforge.net added the comment: Didn't bother changing docstring to comment, since that would be inconsistent with rest of module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3704

[issue3704] cookielib doesn't handle URLs with / in parameters

2010-05-10 Thread John J Lee
John J Lee jj...@users.sourceforge.net added the comment: FWIW, the certain semantics that request_path promises are 1. that it returns the RFC 2965 request-URI (which has never been true -- it returns the path component of the request-URI instead) and 2. that that request-URI is as defined

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-10 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: This is a list of extension modules making use of one of the # format codes (s#, y#, etc.) without defining PY_SSIZE_T_CLEAN, and therefore being 64-bit unclean: Modules/audioop.c Modules/_cursesmodule.c Modules/_elementtree.c

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- dependencies: +audioop module needs an int - Py_ssize_t upgrade nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8677 ___

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The documentation says that sometimes in the future Py_ssize_t will be the default, so we may also need some kind of transition period for non-complying third-party extensions; first with warnings and then with errors perhaps. -- nosy:

[issue8303] python -m unittest -h and python -m unittest discover -h message slightly incorrect

2010-05-10 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Committed revision 81055. -- resolution: - accepted stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8303

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-10 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I personally don't think that a transition period would be a useful thing to have, in particular not if it goes like this: - in version A, require use of PY_SSIZE_T_CLEAN - in version A+1, make use of PY_SSIZE_T_CLEAN redundant So I'd

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8677 ___

[issue8676] Py3k Built-in Exceptions documentation mentions the raise statement of 2.x

2010-05-10 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Thanks for the report. Fixed in r81057. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8676

[issue8642] json.loads description

2010-05-10 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r81059. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8642

[issue8678] crashers in rgbimg

2010-05-10 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: Red Hat found some crashers in the rgbimg module along with a proposed patch: https://bugzilla.redhat.com/show_bug.cgi?id=541698 . Since the patch was sent to the PSRT privately before the bugs were announced, it should be fine to take the

[issue8679] write a distutils to distutils2 converter

2010-05-10 Thread Tarek Ziadé
New submission from Tarek Ziadé ziade.ta...@gmail.com: write a script that converts a distutils or setuptools based setup.py script into a distutils2 one. This script will need to parse the AST and generate a new setup.py, using a few transformation rules. -- assignee: tarek

[issue8678] crashers in rgbimg

2010-05-10 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: As a security fix, it probably applies to 2.5 and 2.6 as well. -- nosy: +loewis versions: +Python 2.5, Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8678

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: After a bit of debugging, it seems your data is not actually a complete zlib stream (*). What did you generate it with? (*) in technical terms, the zlib never returns Z_STREAM_END when decompressing your data. The decompressobj ignores it, but

[issue8680] Add a sandbox in Distutils2

2010-05-10 Thread Tarek Ziadé
New submission from Tarek Ziadé ziade.ta...@gmail.com: Add a sandbox in distutils2, so all installation steps can be recorded or controlled. Usage example: a dry-run mode that prevents anything to be written on the disk but just reports. See setuptools.sandbox for example --

[issue8679] write a distutils to distutils2 converter

2010-05-10 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: lib2to3 can be used as a framework for this feature -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8679 ___

[issue7833] Bdist_wininst installers fail to load extensions built with Issue4120 patch

2010-05-10 Thread Christoph Gohlke
Christoph Gohlke cgoh...@uci.edu added the comment: The bdist_wininst and DLL build issues also exist in Python 2.7b2. A patch against svn trunk is attached. The pywin32 v214 package fails as reported earlier when built with Python 2.7b2. It installs and functions when built with this patch.

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Matthew Brett
Matthew Brett matthew.br...@gmail.com added the comment: Hi, Antoine Pitrou pit...@free.fr added the comment: After a bit of debugging, it seems your data is not actually a complete zlib stream (*). What did you generate it with? (*) in technical terms, the zlib never returns

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for the debugging. The stream comes from within a matlab 'mat' file. I maintain the scipy matlab file readers; the variables within these files are zlib compressed streams. So this would be a Matlab issue, right? Is there (should

[issue8681] Make the zlib module emit more detailed error messages

2010-05-10 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: This is a patch to use our own error descriptions when the zlib doesn't provide anything in particular. It would have made issue8672 easier to diagnose for the reporter (and for us). -- components: Extension Modules files:

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I also think we should improve the zlib module's error messages. I've added a patch in issue8681 for that. With that patch, the message you'd've encountered would have been Error -5 while decompressing data: incomplete or truncated stream,

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Matthew Brett
Matthew Brett matthew.br...@gmail.com added the comment: Thanks for the debugging.  The stream comes from within a matlab 'mat' file.  I maintain the scipy matlab file readers; the variables within these files are zlib compressed streams. So this would be a Matlab issue, right? Yes, except

[issue8550] Expose SSL contexts

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I uploaded the latest patch at http://codereview.appspot.com/1124044 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8550 ___

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, it turned out to be quite easy indeed. Here is a patch adding a test. -- keywords: +patch Added file: http://bugs.python.org/file17288/zlib-8672.patch ___ Python tracker rep...@bugs.python.org

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Tests -Library (Lib) stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8672 ___

[issue8682] _ssl.c uses PyWeakref_GetObject but doesn't incref result

2010-05-10 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: PyWeakref_GetObject() returns a borrowed reference, which can therefore become invalid at any time (especially when the GIL gets released). This provides a way to crash the interpreter deliberately. The returned reference should be incref'ed

[issue8683] HPUX Segmentation Fault in Modules/gcmodule.c -- if (!gc_list_is_empty(from)) {

2010-05-10 Thread srid
New submission from srid sridh...@activestate.com: Platform: HP-UX B.11.22 U ia64 Python: 2.7 trunk GDB output when running built `python` binary: Program received signal SIGSEGV, Segmentation fault (si_code: 1). 0x402a2510:1 in gc_list_merge (from=0x148, to=0x148) at

[issue8683] HPUX Segmentation fault in Modules/gcmodule.c -- if (!gc_list_is_empty(from)) {

2010-05-10 Thread srid
Changes by srid sridh...@activestate.com: -- nosy: +pitrou title: HPUX Segmentation Fault in Modules/gcmodule.c -- if (!gc_list_is_empty(from)) { - HPUX Segmentation fault in Modules/gcmodule.c -- if (!gc_list_is_empty(from)) { ___ Python tracker

[issue8684] improvements to sched.py

2010-05-10 Thread Josiah Carlson
New submission from Josiah Carlson josiahcarl...@users.sourceforge.net: This patch is against Python trunk, but it could be easily targeted for Python 3.2 . It is meant to extract the scheduler updates from issue1641 without mucking with asyncore. It's reach is reduced and simplified, which

[issue1641] asyncore delayed calls feature

2010-05-10 Thread Josiah Carlson
Josiah Carlson josiahcarl...@users.sourceforge.net added the comment: Some prodding from Giampaolo got me to pull out and simplify the sched.py changes here: issue8684 . That should be sufficient to add scheduling behavior into async socket servers or otherwise. --

<    1   2