[issue17971] Weird interaction between Komodo Python debugger C module & Python 3

2013-05-15 Thread Eric Promislow
Eric Promislow added the comment: I found a workaround in our debugger code, so you can lower the priority on this, or even mark it "Wontfix", although I still think the frame stack is getting messed up. One thing about our debugger, it essentially runs all the Python code in a

[issue17971] Weird interaction between Komodo Python debugger C module & Python 3

2013-05-13 Thread Eric Promislow
Eric Promislow added the comment: I'm running it inside gdb to see if I can figure it out. I don't see a way of isolating this from the whole product. -- ___ Python tracker <http://bugs.python.o

[issue17971] Weird interaction between Komodo Python debugger C module & Python 3

2013-05-13 Thread Eric Promislow
New submission from Eric Promislow: While much of Komodo's source code has been released under MIT/GPL/LGPL, the Python debugger hasn't, so I can't post it here. We can work out an arrangement later, although it might not be necessary once I describe the problem: Komodo&#x

[issue17568] re: Infinite loop with repeated empty alternative

2013-03-28 Thread Eric Promislow
New submission from Eric Promislow: >>> import re >>> p = re.compile(r'^(?:\\"|.|)*?"', re.S|re.M) >>> s = 'sub foo {\n\tprint "\n\t\tbar\n\t\t";\n}\n' >>> m = p.findall(s) Python doesn't return. Dropping the

[issue13723] Regular expressions: (?:X|\s+)*$ takes a long time

2012-01-06 Thread Eric Promislow
New submission from Eric Promislow : This regular expression takes a few seconds to be evaluated against any text: (.*?)((?:X|\s+)*)$ This reg ex is much faster: (.*?)((?:X|\s)*)$ To be fair, Ruby's performance with the first regex is the same as Python's. PHP and JavaScript bo

[issue12878] io.StringIO doesn't provide a __dict__ field

2011-09-01 Thread Eric Promislow
New submission from Eric Promislow : I see that going from Python 3.1.1 to 3.1.2 instances of io.StringIO no longer have a __dict__ field. Why? Is this to make them unpicklable? -- components: IO messages: 143344 nosy: ericp priority: normal severity: normal status: open title

[issue10204] exec string fails with trailing whitespace

2010-10-26 Thread Eric Promislow
New submission from Eric Promislow : The following code throws an exception in Python 3.1 (and 3.2 alpha), but runs with 2.x: >>> exec('if True:\nprint("Hello")\n\n') Traceback (most recent call last): File "", line 1, in File "&quo

[issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function

2010-07-16 Thread Eric Promislow
Eric Promislow added the comment: David, that won't work for a reason I'll get into in a bit. I would drop the priority of this ... Komodo has a had a Python debugger since late 2000, we only fixed updating variables while debugging (using the variable viewer) yesterday, and rece

[issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function

2010-07-16 Thread Eric Promislow
Eric Promislow added the comment: Thanks for the response. Note that our use case *is* to implement Python-console functionality, but sometimes we do this in the context of a currently running Python program, inside a function. That's why I wrote the repro that way.

[issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function

2010-07-16 Thread Eric Promislow
Eric Promislow added the comment: I've modified the bug status so anyone can read it. You don't need an account to read ActiveState bugs, only to add or comment on one. Please note that I closed bug http://bugs.activestate.com/show_bug.cgi?id=87405, as we're now w

[issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function

2010-07-16 Thread Eric Promislow
New submission from Eric Promislow : Similar to bug http://bugs.python.org/issue5215 which found a workaround in pdb. Here I want to use code.InteractiveInterpreter to modify code interactively (see Komodo bug http://bugs.activestate.com/show_bug.cgi?id=87405 ) I can do this at the top-level

[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-22 Thread Eric Promislow
Eric Promislow added the comment: I'm working on a debugger, trying to identify instances of old-style classes in Python 2, and any class in Python 3. The getattr formulation will work, but because I already need to maintain an "is_v3" flag, I might as well use it here. As a sid

[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-22 Thread Eric Promislow
New submission from Eric Promislow : Title should be self-explanatory. -- components: 2to3 (2.x to 3.0 conversion tool) messages: 101543 nosy: ericp severity: normal status: open title: 2to3 doesn't convert 'types.InstanceType' to 'object&#

[issue6537] string.split shouldn't split on non-breaking spaces

2009-07-21 Thread Eric Promislow
Eric Promislow added the comment: Thanks. For the record, I want textwrap.TextWrapper(..., break_long_words=False) or it will break after a non-breaking space if that gives an optimum length. -- status: closed -> open ___ Python tracker &l

[issue6537] string.split shouldn't split on non-breaking spaces

2009-07-21 Thread Eric Promislow
New submission from Eric Promislow : ActivePython 2.6.1.1 ... >>> a = u"abc\x0adef" >>> a.split() [u'abc', u'def'] >>> "\x0a" is a non-breaking space. This behavior means we can't easily use split() to reflow text.

[issue6506] lib2to3 fails to convert 'thread' when not followed by a period

2009-07-17 Thread Eric Promislow
Eric Promislow added the comment: Understood. Could the tool emit a warning when it encounters something like this? -- ___ Python tracker <http://bugs.python.org/issue6

[issue6506] lib2to3 fails to convert 'thread' when not followed by a period

2009-07-17 Thread Eric Promislow
New submission from Eric Promislow : Given this code: import thread print thread $ python ActivePython 2.6.1.1 (ActiveState Software Inc.) based on Python 2.6.1 (r261:67515, Dec 5 2008, 13:58:38) [MSC v.1500 32 bit (Intel)] on win32 >>> from lib2to3.main import main >>> pr

[issue6496] 2to3 generates "from urllib.parse import pathname2url"

2009-07-17 Thread Eric Promislow
Eric Promislow added the comment: Not in Sridar's patch, but 'pathname2url' is also misspelled as 'pahtname2url' in the MAPPING struct. -- nosy: +ericp ___ Python tracker <http

[issue6126] Python 3 pdb: shows internal code, breakpoints don't work

2009-06-02 Thread Eric Promislow
Eric Promislow added the comment: Similar problem with 3.1rc1: C:\...>c:\Python31rc1\python.exe -m pdb hello01.py --Return-- > c:\python31rc1\lib\encodings\cp437.py(19)encode()->b'Hello' -> return codecs.charmap_encode(input,self.errors,encoding_map)[0] (Pdb) b 2 *** Bl

[issue6126] Python 3 pdb: shows internal code, breakpoints don't work

2009-05-27 Thread Eric Promislow
New submission from Eric Promislow : I have a simple test file, test01.py, with this output: $ cat test01.py #!/usr/bin/env python print("Line 1") print("Line 2") print("Line 3") $ $ # Now try debugging it. $ python3.0 -mpdb test01.py --Return-- > /home/eri