[issue7994] object.__format__ should reject format strings

2010-02-26 Thread Eric Smith
Eric Smith e...@trueblade.com 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

[issue8023] bug in s.append(x)

2010-02-26 Thread ughacks
New submission from ughacks ugha...@yahoo.com: 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

[issue8023] bug in s.append(x)

2010-02-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue7242] Forking in a thread raises RuntimeError

2010-02-26 Thread Zsolt Cserna
Zsolt Cserna zsolt.cse...@morganstanley.com 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

[issue7242] Forking in a thread raises RuntimeError

2010-02-26 Thread Zsolt Cserna
Zsolt Cserna zsolt.cse...@morganstanley.com 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. -- ___

[issue8023] bug in s.append(x)

2010-02-26 Thread ughacks
ughacks ugha...@yahoo.com 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 rep...@bugs.python.org

[issue7573] Python build issue on Ubuntu 9.10

2010-02-26 Thread instigate_team
instigate_team narine_martiros...@instigatedesign.com 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

[issue8023] bug in s.append(x)

2010-02-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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:

[issue7573] Python build issue on Ubuntu 9.10

2010-02-26 Thread Brian Curtin
Brian Curtin cur...@acm.org 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 rep...@bugs.python.org

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

2010-02-26 Thread Alex Willmer
Alex Willmer a...@moreati.org.uk added the comment: On 26 February 2010 03:20, Matthew Barnett rep...@bugs.python.org 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

[issue8024] upgrade to Unicode 5.2?

2010-02-26 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com 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

[issue7573] Position independent include of Python.h

2010-02-26 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org 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

[issue8024] upgrade to Unicode 5.2?

2010-02-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com 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

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

2010-02-26 Thread Florent Xicluna
New submission from Florent Xicluna florent.xicl...@gmail.com: import io; fake = io.StringIO(); fake.write('boo') Traceback (most recent call last): File stdin, line 1, in module TypeError: string argument expected, got 'str' -- components: Library (Lib) messages: 100156 nosy: flox,

[issue8020] Crash in Py_ADDRESS_IN_RANGE macro

2010-02-26 Thread Matt Bandy
Matt Bandy matt.ba...@thq.com 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

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

2010-02-26 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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

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

2010-02-26 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com 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 stdin, line 1, in module File ./py2trunk/Lib/_pyio.py, line 1559, in write

[issue8020] Crash in Py_ADDRESS_IN_RANGE macro

2010-02-26 Thread Tim Peters
Tim Peters tim.pet...@gmail.com 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

[issue8020] Crash in Py_ADDRESS_IN_RANGE macro

2010-02-26 Thread Matt Bandy
Matt Bandy matt.ba...@thq.com 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

[issue8020] Crash in Py_ADDRESS_IN_RANGE macro

2010-02-26 Thread Tim Peters
Tim Peters tim.pet...@gmail.com 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 rep...@bugs.python.org

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

2010-02-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com 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

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

2010-02-26 Thread A.M. Kuchling
A.M. Kuchling li...@amk.ca 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=60094r2=60350. I don't know if this

[issue7242] Forking in a thread raises RuntimeError

2010-02-26 Thread Greg Jednaszewski
Greg Jednaszewski jednaszew...@gmail.com 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.

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

2010-02-26 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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

[issue4111] Add Systemtap/DTrace probes

2010-02-26 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com 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

[issue4111] Add Systemtap/DTrace probes

2010-02-26 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com 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

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

2010-02-26 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com 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

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

2010-02-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2010-02-26 Thread Ilya Sandler
Ilya Sandler ilya.sand...@gmail.com 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.