[issue7245] better Ctrl-C support in pdb (program can be resumed)

2010-02-26 Thread Ilya Sandler
Ilya Sandler added the comment: Another iteration of the patch. Now sigint_handler will generate KeyboardInterrupts when pdb is in the commandloop I think this guarantees consistent "Ctrl-C interrupts the current pdb action" behavior and the program is still resumable. The "commands" command

[issue7449] A number tests "crash" if python is compiled --without-threads

2010-02-26 Thread STINNER Victor
STINNER Victor added the comment: Comments about nothreads.patch. There are unrelated changes: Lib/test/test_xmlrpc.py: -p = xmlrpclib.ServerProxy(URL, transport=t) +p = xmlrpclib.ServerProxy('http:', transport=t) Lib/test/test_macostools.py (working copy) -try: -

[issue6631] urlparse.urlunsplit() can't handle relative files (for urllib*.open()

2010-02-26 Thread Senthil Kumaran
Senthil Kumaran added the comment: The bug here seems to me that urllib.urlopen() should not allow a relative file path like the one specified. f='./rel/path/to/file.html urllib2's behavior seems proper that it is raising an Exception. According to the RFCs the local files are to be acceessed

[issue4111] Add Systemtap/DTrace probes

2010-02-26 Thread Dave Malcolm
Dave Malcolm added the comment: Attached is the patch I'm currently applying in Fedora 13 to Python 3. The patch is actually against the 3.1.1 tarball, rather than SVN; sorry (swamped with post-pycon tasks here), as that's what I've been testing this work against. The patch is somewhat diffe

[issue4111] Add Systemtap/DTrace probes

2010-02-26 Thread Dave Malcolm
Dave Malcolm added the comment: At Red Hat we've done some work on this feature. I'm sorry for not updating this issue, I was swamped with tasks both pre-PyCon and during the event; I did show the following to various folks at PyCon; I attempted to find Skip at PyCon but was unsuccessful) U

[issue7100] test_xmlrpc: global name 'stop_serving' is not defined

2010-02-26 Thread R. David Murray
R. David Murray added the comment: Having looked at this code for another reason, I suspect that the stop_serving change was an attempt to handle a possible hang in the test, and that the py2 code simply doesn't try to handle that possible hang. Note that you can simulate the hang by having

[issue7242] Forking in a thread raises RuntimeError

2010-02-26 Thread Greg Jednaszewski
Greg Jednaszewski added the comment: I spent some time working on and testing a unit test as well. It's the same basic idea as Zsolt Cserna's, but with a slightly different approach. See 7242_unittest.diff. My unittest fails pre-patch and succeeds post-patch. However, I still have reservat

[issue7100] test_xmlrpc: global name 'stop_serving' is not defined

2010-02-26 Thread A.M. Kuchling
A.M. Kuchling added the comment: The stop_serving() code was only added on the Py3k branch in rev59424. It was removed in rev60350, which is a merge commit; the diff is http://svn.python.org/view/python/branches/py3k/Lib/test/test_xmlrpc.py?r1=60094&r2=60350. I don't know if this is a merging

[issue8025] TypeError: string argument expected, got 'str'

2010-02-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > TypeError: can't write str to text stream > > Is it better? There is the same ambiguity in http://docs.python.org/library/io.html "text" is not defined. And "string" is often used incorrectly. -- nosy: +amaury.forgeotdarc _

[issue8020] Crash in Py_ADDRESS_IN_RANGE macro

2010-02-26 Thread Tim Peters
Tim Peters added the comment: Cool! Python has a long history of catering to feeble compilers too ;-), so using function locals is fine. Speed matters more than obscurity here. -- ___ Python tracker

[issue8020] Crash in Py_ADDRESS_IN_RANGE macro

2010-02-26 Thread Matt Bandy
Matt Bandy added the comment: Sorry, I should have been more precise. I did use static for the variable I declared at file scope. Looking at the disassembly again also reminded me of something I should have mentioned in the original bug report: at least when using Visual C++ 2008, in the re

[issue8020] Crash in Py_ADDRESS_IN_RANGE macro

2010-02-26 Thread Tim Peters
Tim Peters added the comment: Whatever works best. Unsure what you mean by "global", though, because it's not a C concept. File-scope variables in C can have internal or external linkage; to get internal linkage, so that lifetime analysis is effective without needing (roughly speaking) cros

[issue8025] TypeError: string argument expected, got 'str'

2010-02-26 Thread Florent Xicluna
Florent Xicluna added the comment: The error is slightly different with _pyio: >>> import _pyio as io; fake = io.StringIO(); fake.write('boo') Traceback (most recent call last): File "", line 1, in File "./py2trunk/Lib/_pyio.py", line 1559, in write s.__class__.__name__) TypeError: can

[issue8025] TypeError: string argument expected, got 'str'

2010-02-26 Thread Ezio Melotti
Ezio Melotti added the comment: The problem is in Modules/_io/stringio.c, in stringio_write. The error message still uses the py3k wording where 'string' means unicode string. The error should say "unicode argument expected, got 'str'". There might be similar mistakes around. -- nosy:

[issue8020] Crash in Py_ADDRESS_IN_RANGE macro

2010-02-26 Thread Matt Bandy
Matt Bandy added the comment: I tried this out in VC++ 2008 with the new temporary as both a global variable and a local. At least for VC++, Amaury is correct -- the compiler is generating the store to the global even though it is never read, so making it a local instead does save an instruc

[issue8025] TypeError: string argument expected, got 'str'

2010-02-26 Thread Florent Xicluna
New submission from Florent Xicluna : >>> import io; fake = io.StringIO(); fake.write('boo') Traceback (most recent call last): File "", line 1, in TypeError: string argument expected, got 'str' -- components: Library (Lib) messages: 100156 nosy: flox, pitrou priority: normal severit

[issue8024] upgrade to Unicode 5.2?

2010-02-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Have you checked how big the structural changes are between 5.2 and 5.1. If we only have to rerun the makeunicodedata.py script, then I'd be +1 on going with 5.2. Otherwise, I think it's better to wait another release before upgrading to the then latest

[issue7573] Position independent include of Python.h

2010-02-26 Thread Stefan Krah
Stefan Krah added the comment: instigate_team, you said earlier that you have no warnings if you change the include sequence according to the documentation. Unless you provide a concrete example where the position dependent include of Python.h makes building _impossible_ (as opposed to being a m

[issue8024] upgrade to Unicode 5.2?

2010-02-26 Thread Florent Xicluna
Florent Xicluna added the comment: Excerpt of the release note: http://www.unicode.org/versions/Unicode5.2.0/ The Unicode Standard, Version 5.2, adds 6,648 characters and significantly improves the documentation of conformance requirements for the specification of normalization forms, canonic

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-26 Thread Alex Willmer
Alex Willmer added the comment: On 26 February 2010 03:20, Matthew Barnett wrote: > Added file: http://bugs.python.org/file16375/issue2636-20100226.zip This is now uploaded to PyPI http://pypi.python.org/pypi/regex/0.1.20100226 -- Alex Willmer http://moreati.org.uk/b

[issue7573] Python build issue on Ubuntu 9.10

2010-02-26 Thread Brian Curtin
Brian Curtin added the comment: That solution will work if you have 1 file or 1000 files. The note on the documentation is very clear on what has to happen. -- nosy: +brian.curtin ___ Python tracker __

[issue8023] bug in s.append(x)

2010-02-26 Thread Mark Dickinson
Mark Dickinson added the comment: > So s.append(x) just copies the pointer, not the actual value. Yes, that's a reasonable way to think about it (though the term 'reference' seems to more popular than 'pointer' in this context). It matches the implementation, too: internally, a list is repre

[issue7573] Python build issue on Ubuntu 9.10

2010-02-26 Thread instigate_team
instigate_team added the comment: This is a solution in case if an application contains only several files, where I can control the includes consequence. But if application has many files, directories, in this case the hierarchy of the files includes can not be traced. -- ___

[issue8023] bug in s.append(x)

2010-02-26 Thread ughacks
ughacks added the comment: Thank you for kind explanation. So s.append(x) just copies the pointer, not the actual value. It is a little tricky to know that. -- ___ Python tracker _

[issue7242] Forking in a thread raises RuntimeError

2010-02-26 Thread Zsolt Cserna
Zsolt Cserna added the comment: I've run unittest with both patched and vanilla versions of python 2.6.4 and I confirm that it fails when it's run by vanilla on solaris 8, but passes on the patched version. -- ___ Python tracker

[issue7242] Forking in a thread raises RuntimeError

2010-02-26 Thread Zsolt Cserna
Zsolt Cserna added the comment: There's a bundled unittest in test_httpservers which actually fails if this patch is not applied. See the unittest attached. Unfortunatelly RuntimError is raised in the child process after fork() so I cannot re-raise it to the parent, instead I send a message

[issue8023] bug in s.append(x)

2010-02-26 Thread Mark Dickinson
Mark Dickinson added the comment: This is a bug in your code, rather than in Python. A simpler example, for the purposes of explanation: >>> root, total = [0], [] >>> total.append(root) >>> total # good so far [[0]] >>> root[0] = 1 # modify root >>> total # note that total changes here! [[

[issue8023] bug in s.append(x)

2010-02-26 Thread ughacks
New submission from ughacks : Dear, I am using $ python -V Python 2.6.4 on Ubuntu 9.10 I met a serious bug in s.append(x) operation. If I append a list into another list, there is a change of content. In the following code, [2,-2,0,0] is replaced with [-2,-2,0,0] after s.append(x) operaton.

[issue7994] object.__format__ should reject format strings

2010-02-26 Thread Eric Smith
Eric Smith added the comment: I haven't looked at the patch, but: Thanks for the the additional tests. Missing unicode was definitely a mistake. str(w[0].message) is an improvement. The PEP is out of date in many respects. I think it's best to note that in the PEP and continue to keep the do