[issue1641] asyncore delayed calls feature

2010-05-10 Thread Josiah Carlson
Josiah Carlson 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. -- ___ Python tracke

[issue8684] improvements to sched.py

2010-05-10 Thread Josiah Carlson
New submission from Josiah Carlson : 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 should make maintenance a bit easie

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

2010-05-10 Thread srid
Changes by srid : -- 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

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

2010-05-10 Thread srid
New submission from srid : 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 Modules/gcmodule.c:240 240 if

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

2010-05-10 Thread Antoine Pitrou
New submission from Antoine Pitrou : 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 immediately befo

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Tests -Library (Lib) stage: needs patch -> patch review ___ Python tracker ___ ___ Python-b

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou 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 __

[issue8550] Expose SSL contexts

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I uploaded the latest patch at http://codereview.appspot.com/1124044 -- ___ Python tracker ___ ___ P

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Matthew Brett
Matthew Brett 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 scipy and numpy

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou 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", which is quite mo

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

2010-05-10 Thread Antoine Pitrou
New submission from Antoine Pitrou : 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: zliberrors.patch keywords:

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou 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 there be) a

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Matthew Brett
Matthew Brett added the comment: Hi, > Antoine Pitrou 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 dat

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

2010-05-10 Thread Christoph Gohlke
Christoph Gohlke 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. -- ver

[issue8679] write a distutils to distutils2 converter

2010-05-10 Thread Tarek Ziadé
Tarek Ziadé added the comment: lib2to3 can be used as a framework for this feature -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue8680] Add a sandbox in Distutils2

2010-05-10 Thread Tarek Ziadé
New submission from Tarek Ziadé : 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 -- assignee: tarek components: D

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou 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 the top-level d

[issue8678] crashers in rgbimg

2010-05-10 Thread Martin v . Löwis
Martin v. Löwis 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 ___ __

[issue8679] write a distutils to distutils2 converter

2010-05-10 Thread Tarek Ziadé
New submission from Tarek Ziadé : 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 components: Distutils2 message

[issue8678] crashers in rgbimg

2010-05-10 Thread Brett Cannon
New submission from Brett Cannon : 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 patch from the page

[issue8642] json.loads description

2010-05-10 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r81059. -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker ___ __

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

2010-05-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks for the report. Fixed in r81057. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-10 Thread Martin v . Löwis
Martin v. Löwis 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 rather drop PY_SSIZE_T c

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

2010-05-10 Thread Michael Foord
Michael Foord added the comment: Committed revision 81055. -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou 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: +loewis __

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-10 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- dependencies: +audioop module needs an int -> Py_ssize_t upgrade nosy: +mark.dickinson ___ Python tracker ___ __

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-10 Thread Antoine Pitrou
New submission from Antoine Pitrou : 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 Modules/_gdbmmodule.c Mo

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

2010-05-10 Thread John J Lee
John J Lee 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 in RFC 2965, and this bug

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

2010-05-10 Thread John J Lee
John J Lee added the comment: Didn't bother changing docstring to comment, since that would be inconsistent with rest of module. -- ___ Python tracker ___ __

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

2010-05-10 Thread John J Lee
Changes by John J Lee : Added file: http://bugs.python.org/file17285/issue3704.patch ___ Python tracker ___ ___ Python-bugs-list mailing list U

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

2010-05-10 Thread John J Lee
John J Lee 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 __all__, FWLTW. -- ___

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

2010-05-10 Thread Daniel Urban
New submission from Daniel Urban : 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 2.x. -- assi

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

2010-05-10 Thread R. David Murray
R. David Murray 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 for cases where you

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

2010-05-10 Thread R. David Murray
Changes by R. David Murray : -- priority: high -> critical ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[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 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 $ ./python.exe -m timeit -s "s

[issue8675] audioop module needs an int -> Py_ssize_t upgrade

2010-05-10 Thread Mark Dickinson
New submission from Mark Dickinson : 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 someone wanting to ge

[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 : Added file: http://bugs.python.org/file17284/issue8425-tests.diff ___ Python tracker ___ ___ Python-bugs-list

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

2010-05-10 Thread Tim Chase
Tim Chase 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 the specified int/float/bool

[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 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 additional tests shortly. -- Add

[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 added the comment: The answer is almost certainly "no". -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bug

[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 : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[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 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 adding items that are not in the la

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Mark Dickinson
Mark Dickinson 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 another issue for the in

[issue1285086] urllib.quote is too slow

2010-05-10 Thread Tres Seaver
Tres Seaver 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 requests. Short-circuit

[issue2982] more tests for pyexpat

2010-05-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm not a xml* modules user but I've tried to apply the patch against the trunk and it seems it still works. -- nosy: +effbot, giampaolo.rodola, loewis versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 __

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

2010-05-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: what is this "raise_on_bad" additional argument? -- nosy: +amaury.forgeotdarc ___ Python tracker ___ _

[issue7040] test_smtplib fails on os x 10.6

2010-05-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Closed as duplicate of issue7037. -- nosy: +giampaolo.rodola resolution: -> duplicate status: open -> closed ___ Python tracker ___

[issue8490] asyncore test suite

2010-05-10 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue8490] asyncore test suite

2010-05-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Committed in r81043 (trunk) and r81044 (3.2). Thanks for your comments. -- assignee: josiahcarlson -> giampaolo.rodola components: +Tests resolution: -> fixed stage: -> committed/rejected versions: +Python 2.7, Python 3.2 _

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Tomas Hoger
Tomas Hoger added the comment: > Do you have any Python examples that failed to trigger the overflow > on your platform? No, I've not really tried to create some, as I found it while looking into similar checks added to rgbimg module (which is dead and removed upstream now) in the same commit

[issue4256] optparse/argparse: provide a simple way to get a programmatically useful list of options

2010-05-10 Thread R. David Murray
R. David Murray added the comment: zsh's completion system is completely programmable. I looks like it would be pretty easy to add generic 'python script' support widgets(*) using this hidden option, and probably other neat tricks as well. Something that would make it even more useful for z

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Mark Dickinson
Mark Dickinson added the comment: Okay, it looks to me as though all those 'int' lengths should really be 'Py_ssize_t'. I don't think that's something we can change in 2.6, though; probably not in 2.7 either, since we're getting too close to the release. It can and should be changed in py3

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2010-05-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: This is now committed as r81041. I've also removed the long description from what's new file, as you were suggesting. The other two patches should be adapted for 3.2. -- ___ Python tracker

[issue8256] TypeError: bad argument type for built-in operation

2010-05-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The patch is wrong: _PyUnicode_AsString(Py_None) should not return "utf8"! I suggest that since PyOS_Readline() write the prompt to stderr, the conversion uses the encoding of stderr. -- nosy: +amaury.forgeotdarc ___

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Mark Dickinson
Mark Dickinson added the comment: Unless you have an explicit exploit, I think the 'type' should be 'behavior' rather than 'security'. -- stage: -> unit test needed type: security -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patch. I agree that undefined behaviour (e.g., from signed overflow) should be avoided where at all possible. Do you have any Python examples that failed to trigger the overflow on your platform? If so, it would be useful to add them to Lib/t

[issue8618] test_winsound fails when no playback devices configured

2010-05-10 Thread Brian Curtin
Changes by Brian Curtin : -- title: test_winsound failing on Windows Server 2008 -> test_winsound fails when no playback devices configured ___ Python tracker ___ ___

[issue8256] TypeError: bad argument type for built-in operation

2010-05-10 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'll try to code a small test this evening. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue8256] TypeError: bad argument type for built-in operation

2010-05-10 Thread R. David Murray
R. David Murray added the comment: Victor, you've been dealing with Python's default encoding lately, care to render an opinion on the correct fix for this bug? @Filip: the patch will need a unit test, which will also help with assessing the validity of the fix. -- nosy: +haypo

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Tomas Hoger
New submission from Tomas Hoger : SVN commit r64114 added integer overflow checks to multiple modules. Checks added to audioop module are incorrect and can still be bypassed: http://svn.python.org/view/python/trunk/Modules/audioop.c?r1=64114&r2=64113 - audioop_tostereo - should be fine, but r

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

2010-05-10 Thread John J Lee
John J Lee added the comment: I'll upload a patch when I'm back home (bugs.python.org went down yesterday). Will turn docstring into comment. -- ___ Python tracker ___ _

[issue7879] Too narrow platform check in test_datetime

2010-05-10 Thread Andrej Krpic
Changes by Andrej Krpic : -- components: +Windows type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue8673] configure script doesn't recognize 10.5 SDK correctly

2010-05-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: Cool, thanks. I'll check this later this week. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue8673] configure script doesn't recognize 10.5 SDK correctly

2010-05-10 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry; r81004, rather. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue8673] configure script doesn't recognize 10.5 SDK correctly

2010-05-10 Thread Mark Dickinson
Mark Dickinson added the comment: I think this was fixed in r80969, but confirmation would be good. -- nosy: +mark.dickinson ___ Python tracker ___ __

[issue8577] test_distutils fails if srcdir != builddir

2010-05-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: I intend to forward port the fix to 3.2 in the near future, to avoid missing real issues when I do updates to the platform support for OSX. -- ___ Python tracker

[issue8577] test_distutils fails if srcdir != builddir

2010-05-10 Thread Roumen Petrov
Roumen Petrov added the comment: Hmm, this issue was fixed before. My be restore of 2.6 distutils ignore those fixes. It is good to compare current Lib/distutils/sysconfig.py with version from Dec 2009 . -- nosy: +rpetrov ___ Python tracker

[issue8510] update to autoconf2.65

2010-05-10 Thread Roumen Petrov
Roumen Petrov added the comment: I don't have access to source so my comment will be based only on diffs from above mentioned revisions. r80969: - AC_LANG_PROGRAM ... with main function in body . It is legal as I don't know C compiler that fail to compile code like ...int main() { int main() {

[issue8673] configure script doesn't recognize 10.5 SDK correctly

2010-05-10 Thread Ronald Oussoren
New submission from Ronald Oussoren : I got a build error when building the 2.7b2 installers because the MacOS module couldn't be build. That turns out to be caused by an issue in the configure script: for some reason the check for the 10.5 SDK gives the wrong answer (both with and without bui