[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-07-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10953/localstofast.patch ___ Python tracker <[EMAIL PROTECTED]> ___

[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-07-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10707/localstofast.patch ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-07-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- assignee: -> amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3415] Interpreter error when running a script under debugger control

2008-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This issue is a duplicate of issue2378; the patch attached there corrects this problem. I will commit it tonight. -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> UnboundLocalError wh

[issue2523] binary buffered reading is quadratic

2008-07-21 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Selon "Martin v. Löwis" <[EMAIL PROTECTED]>: > > Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > > I don't understand the second loop (where n is given). If n is given, > there should be only a single read operation, using > > max

[issue3353] make built-in tokenizer available via Python C API

2008-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: IMO the "struct tok_state" should not be part of the API, it contains too many implementation details. Or maybe as an opaque structure. -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL

[issue3353] make built-in tokenizer available via Python C API

2008-07-21 Thread Fredrik Lundh
Fredrik Lundh <[EMAIL PROTECTED]> added the comment: There are a few things in the struct that needs to be public, but that's nothing that cannot be handled by documentation. No need to complicate the API just in case. ___ Python tracker <[EMAIL PROTECTED]> <

[issue2620] Multiple buffer overflows in unicode processing

2008-07-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: The patch looks good to me. ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-

[issue3208] function annotation for builtin and C function

2008-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: PyCFunctionObject has indeed no way to store annotations. This could be useful for extension module writers. The PyMethodDef structure could grow a "ml_annotations" member. A patch is welcome! -- nosy: +amaury.forgeotdarc reso

[issue3387] undefined array passed to CryptGenRandomBytes

2008-07-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- assignee: -> amaury.forgeotdarc nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3396] rlcompleter can't autocomplete members of callable objects

2008-07-21 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: I don't understand. I tried the following: Python 2.6b2+ (trunk:65167M, Jul 21 2008, 09:51:48) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>

[issue3366] Add gamma and error functions to math module

2008-07-21 Thread nirinA raseliarison
nirinA raseliarison <[EMAIL PROTECTED]> added the comment: here is an attempt to make erf, erfc, lgamma and tgamma accessible from math module. erf and erfc are crude translation of the code pointed out by Daniel Stutbach. lgamma is also taken from sourceware.org, but doesn't use the reentrant ca

[issue3396] rlcompleter can't autocomplete members of callable objects

2008-07-21 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Selon Facundo Batista <[EMAIL PROTECTED]>: > > Then I wrote "int". Then I pressed TAB. Nothing happened. I pressed TAB > again, and the following appeared: > > >>> int > int( intern( This is not the point. The problem is when you type "in

[issue3366] Add gamma and error functions to math module

2008-07-21 Thread nirinA raseliarison
nirinA raseliarison <[EMAIL PROTECTED]> added the comment: and this is the header. it is stolen from glibc. Added file: http://bugs.python.org/file10955/math_private.h ___ Python tracker <[EMAIL PROTECTED]> _

[issue3373] sys recursion limit a lot shorter on trunk?

2008-07-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-

[issue1758146] Crash in PyObject_Malloc

2008-07-21 Thread Graham Dumpleton
Graham Dumpleton <[EMAIL PROTECTED]> added the comment: I know the discussions more or less says this, but I want to add some additional information. For the record, the reason that mod_python crashes with 'Invalid thread state for this thread' when Py_DEBUG is defined in part relates to: h

[issue3396] rlcompleter can't autocomplete members of callable objects

2008-07-21 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Ah, sorry, missed that point. Ok, I included this change and now it works ok. Also worked a little that code (change the name of the variable "object", used extend() for a list instead of adding to itself, and removed a comparison from a lo

[issue1758146] Crash in PyObject_Malloc

2008-07-21 Thread Franco DiRosa
Franco DiRosa <[EMAIL PROTECTED]> added the comment: "Also, that Py_DEBUG check effectively says that if you use simplified GIL API for a particular thread against the first interpreter, you are prohibited from creating additional thread states for that thread." I found that you cannot create

[issue1758146] Crash in PyObject_Malloc

2008-07-21 Thread Franco DiRosa
Franco DiRosa <[EMAIL PROTECTED]> added the comment: By the way. I switched to using the GIL functions on the main interpreter and everything works great now. It is a better solution to use the GIL functions because I also had my own code that prevented dead lock from occuring when a python

[issue3409] ElementPath.Path.findall problem with unicode input

2008-07-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- assignee: -> effbot nosy: +effbot ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue1758146] Crash in PyObject_Malloc

2008-07-21 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Graham, I appreciate the history of sub-interpreters and how entrenched they are. Changing those practises requires a significant investment. This is an important factor to consider. The other factor is the continuing maintenance and developmen

[issue3381] `./configure --enable-framework --enable-universalsdk` fails because of change in r63997

2008-07-21 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: This bug should be re-opened. The patch to configure.in wasn't quite right. I'm attaching a slight fix. `autoconf`ing removes one level of square brackets in the 'sed' command to create $tgt. (Q about the issue tracker: I'm unable to change the "

[issue3381] `./configure --enable-framework --enable-universalsdk` fails because of change in r63997

2008-07-21 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Reopening. Yes, "Status" is settable only by Developers, but as a committer, you should certainly have that privilege. -- nosy: +georg.brandl status: closed -> open ___ Python tracker <[EMAIL PROTECT

[issue2960] bsddb/test/test_replication.py bus error, segfault, assertion error, pass

2008-07-21 Thread Jesús Cea Avión
Jesús Cea Avión <[EMAIL PROTECTED]> added the comment: Are you using a python pydebug version?. Can you reproduce the issue with a no "pydebug" python interpreter? ___ Python tracker <[EMAIL PROTECTED]> __

[issue2960] bsddb/test/test_replication.py bus error, segfault, assertion error, pass

2008-07-21 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: using a python trunk optimized (non-debug) build and pybsddb r530: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Berkeley DB 4.7.25: (May 15, 2008) bsddb.db.version(): (4, 7, 25) bsddb.db.__version__: 4.7.2d

[issue3387] undefined array passed to CryptGenRandomBytes

2008-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed as r65174 and r65175. (for trunk, I had to change PyBytes_AS_STRING into PyString_AS_STRING) Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROT

[issue2523] binary buffered reading is quadratic

2008-07-21 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: >> max(buffer_size, n-avail) > > I mimicked the original logic rather than rethink the algorithm. I'm not > totally > sure what motivates the original logic but the purpose seems to be that > non-blocking streams can return at least a few

[issue3366] Add gamma and error functions to math module

2008-07-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Thanks for the patch! I probably won't get to this properly until after 2.6 final, but it won't get lost. It seems like there's pretty good support for adding these functions. By the way, there's already a setup in Python 2.6 (ad 3.0) for

[issue1481296] long(float('nan'))!=0L

2008-07-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: I still think this is the wrong solution, and should be fixed before 2.6; long(float('nan')) should raise ValueError. As Alexander points out, this fits much better with the IEEE 754 standard, and also with the C99 standard. It also just

[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed as r65177. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue1481296] long(float('nan'))!=0L

2008-07-21 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: -- priority: normal -> critical status: closed -> open ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue1481296] long(float('nan'))!=0L

2008-07-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Assigning to me; I'd like to check in the new fix for 2.6/3.0, but I'll give it a couple of weeks for any objections to surface first. -- assignee: -> marketdickinson versions: +Python 2.6, Python 3.0 -Python 2.5 _

[issue1767370] Make xmlrpc use HTTP/1.1 and keepalive

2008-07-21 Thread Mark Harrison
Mark Harrison <[EMAIL PROTECTED]> added the comment: There's a one-line change necessary in BaseHTTPServer.py. s/socketserver/SocketServer/ on this line: +socketserver.StreamRequestHandler.__init__(self, request, client_address, parent) +SocketServer.StreamRequestHandler.__init_

[issue3366] Add gamma and error functions to math module

2008-07-21 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Since we're not in a hurry for Py2.7 and 3.1, I would like to this kicked around a bit on the newsgroup and in numpy forums (personally, I would also post a pure python equivalent to the ASPN cookbook for further commentary). There are

[issue3369] memory leak in floatobject.c

2008-07-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Fixed in r65179. I modified the patch slightly to include the "infinity" check, and to change "if(s_buffer)" to the slightly more explicit "if (s_buffer != NULL)". Thanks! -- resolution: -> fixed status: open -> closed _

[issue2523] binary buffered reading is quadratic

2008-07-21 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le lundi 21 juillet 2008 à 21:18 +, Martin v. Löwis a écrit : > IIUC, a read of the full requested size would achieve exactly that: on a > non-blocking stream (IIUC), a read will always return > min(bytes_available, bytes_requested). Hmm,

[issue3344] IDLE - use enumerate instead of zip(count(), ...)

2008-07-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- assignee: -> kbk ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-lis

[issue3366] Add gamma and error functions to math module

2008-07-21 Thread Daniel Stutzbach
Daniel Stutzbach <[EMAIL PROTECTED]> added the comment: On Mon, Jul 21, 2008 at 5:34 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > There are several different approximations to choose from. Each of > them has their own implications for speed and accuracy. FWIW, the current patch dynamicall

[issue3423] DeprecationWarning message applies to wrong context with exec()

2008-07-21 Thread Greg Hazel
New submission from Greg Hazel <[EMAIL PROTECTED]>: exec()ing a line which causes a DeprecationWarning causes the warning to quote the file exec() occurs in instead of the string. Demonstration of the issue: http://codepad.org/aMTYQgN5 -- components: None messages: 70129 nosy: ghazel s

[issue3359] add 'rbU' mode to open()

2008-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Did you look at the io.open() function? It's a new module in python2.6, but also the builtin "open" in py3k! """ * On input, if newline is None, universal newlines mode is enabled. Lines in the input can end in '\n', '\r', or

[issue3366] Add gamma and error functions to math module

2008-07-21 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: It would be nice if we knew the error bounds for each of the approximation methods. Do we know how the coefficients were generated? When switching from one method to another, it might be nice to have a range where the results slowly blen

[issue672115] Assignment to __bases__ of direct object subclasses

2008-07-21 Thread lorph
lorph <[EMAIL PROTECTED]> added the comment: Is anyone still working on this? It seems like an oddity of python that has been a stumbling block for me to create a super reload. I've found that i am able to bypass this problem by creating the following definition: class object(object):pass Howe

[issue672115] Assignment to __bases__ of direct object subclasses

2008-07-21 Thread Michael Hudson
Michael Hudson <[EMAIL PROTECTED]> added the comment: Another 3 and a bit years on I still think my comment http://bugs.python.org/msg14169 is the crux of the issue. It's even relevant to your class object(object): pass hack! I'm not at all likely to work on this any time soon myself. ___

[issue3417] make the fix_dict fixer smarter

2008-07-21 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: I think the proper way to address this is via the confidence levels that Rodrigo Bernardo Pimentel is adding for his Summer of Code project. The idea is that you'll be able to say "let me inspect any changes where the fixer is less than X% conf

[issue1767370] Make xmlrpc use HTTP/1.1 and keepalive

2008-07-21 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: We would need the copyright holder of the patch to submit a contributor form. Would that be possible? -- nosy: +loewis ___ Python tracker <[EMAIL PROTECTED]>

[issue2275] urllib2 header capitalization

2008-07-21 Thread Senthil
Senthil <[EMAIL PROTECTED]> added the comment: Sorry for the delay and my miss in further communication on this issue. I would like to take this issue in two fronts for its closure. 1) Issue with headers .capitalize() vs .title() 2) Documenting the Interface With respect to point 1), I assume t

[issue2620] Multiple buffer overflows in unicode processing

2008-07-21 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: Commited to trunk. r65182. This still needs backporting to release25-maint. (and release24-maint if anyone is maintaining that) -- keywords: +patch versions: +Python 3.0 -Python 2.6 ___ Python