[issue9951] introduce bytes.hex method

2010-10-02 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9951 ___ ___ Python-bugs-list mailing

[issue9951] introduce bytes.hex method

2010-10-02 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Patch generally looks good, but the type of retbuf is incorrect (should be Py_UNICODE* rather than wchar_t*). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9951

[issue6612] 'import site' fails when called from an unlinked directory

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A unit test is needed. Not to check the code, but to ensure that we don't break it in the future. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue1767933] Badly formed XML using etree and utf-16

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Python 3.1 improves the situation, the file looks more like utf-16, except that the BOM (\xff\xfe) is repeated all the time, probably on every internal call to file.write(). Here is a test script that should work on both 2.7 and 3.1.

[issue10013] fix `./libpython2.6.so: undefined re ference to `_PyParser_Grammar´` in parallel builds

2010-10-02 Thread Paul Menzel
New submission from Paul Menzel paulepan...@users.sourceforge.net: Compiling Python in parallel sometimes fails as reported in [1] and [2]. ./libpython2.6.so: undefined reference to `_PyParser_Grammar´ Fedora applies a patch by dmalcolm dmalc...@fedoraproject.org which fixes this issue

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r85172 changes PyUnicode_AsWideCharString() (don't count the trailing nul character in the output size) and add unit tests. r85173 patches unicode_aswidechar() to supports non-BMP characters for all known wchar_t/Py_UNICODE size

[issue10013] fix `./libpython2.6.so: undefined re ference to `_PyParser_Grammar´` in parallel builds

2010-10-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: 2.6 is closed for bug fixes, so this cannot be applied anymore. Notice that py3k has this fixed in r84068; I'll backport the fix to 2.7. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r85174+r85177: ctypes.c_wchar supports non-BMP characters with 32 bits wchar_t = fix this issue (I commited also an unwanted change on _testcapi to fix r85172 in r85174: r85175 reverts this change, and r85176 fixes the _testcapi

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r85173 patches unicode_aswidechar() to supports non-BMP characters for all known wchar_t/Py_UNICODE size combinaisons (2/2, 2/4 and 4/2). Oh, and 4/4 ;-) -- ___ Python tracker

[issue10013] fix `./libpython2.6.so: undefined re ference to `_PyParser_Grammar´` in parallel builds

2010-10-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10013 ___ ___ Python-bugs-list

[issue10014] sys.path[0] is incorrect if PYTHONFSENCODING is used

2010-10-02 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: In the following example, sys.path[0] should be '/home/SHARE/SVN/py3k\udcc3\udca9' (my locale and filesystem encodings are utf-8): $ cd /home/SHARE/SVN/py3ké $ echo import sys; print(sys.path[0]) x.py $ ./python x.py

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #10014: sys.path[0] is decoded from the locale encoding instead of the fileystem encoding. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9992

[issue9533] metaclass can't derive from ABC

2010-10-02 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9533 ___ ___ Python-bugs-list

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Thanks for working on this! Since this was a bugfix, it should be merged back into 2.7, yes? -- stage: unit test needed - committed/rejected ___ Python tracker

[issue6706] asyncore's accept() is broken

2010-10-02 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Patch in attachment adds a handled_accepted() method to dispatcher class as recommended by Antoine. -- Added file: http://bugs.python.org/file19104/accept.patch ___ Python tracker

[issue10011] `except` doesn't use `isinstance`

2010-10-02 Thread Ram Rachum
Ram Rachum cool...@cool-rr.com added the comment: Also, how important is the performance of exception checking *after* an exception was raised? I mean, wouldn't it matter only for programs that raise and catch hundreds of exceptions a second? --

[issue10015] Creating a multiproccess.pool.ThreadPool from a child thread blows up.

2010-10-02 Thread Michael Olson
New submission from Michael Olson ol...@irinim.net: Using Python 2.7 x32 on Windows XP Attempting to create a multiprocessing.pool.ThreadPool in a child thread created using threading.Thread, an AttributeError is thrown. A ThreadPool created in the main thread can be passed to the child thread

[issue9807] deriving configuration information for different builds with the same prefix

2010-10-02 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9807 ___

[issue5117] os.path.relpath problem with root directory

2010-10-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: In py3k, ntpath is almost fixed. but posixpath is not fixed yet. ntpath has another problem about case sensitivity. I'll attach the patch to fix ntpath's case issue and posixpath. In Py27, ntpath has whole issue still there.

[issue5117] os.path.relpath problem with root directory

2010-10-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I'll create the patch for it. -- versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5117 ___

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
New submission from Tom Potts karake...@gmail.com: Copying a sparse file under Linux using shutil.copyfile will not result in a sparse file at the end of the process. I'm submitting a patch that will remedy this. Note that I am only concerned with Linux at the moment -- as far as I know this

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
Tom Potts karake...@gmail.com added the comment: (see opening message) -- Added file: http://bugs.python.org/file19108/shutil-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10016

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
Changes by Tom Potts karake...@gmail.com: Added file: http://bugs.python.org/file19109/shutil-3.2.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10016 ___

[issue9533] metaclass can't derive from ABC

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Does the fix for issue 10006 affect this? (I imagine that question is why Antoine made Benjamin nosy on this issue). -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue10015] Creating a multiproccess.pool.ThreadPool from a child thread blows up.

2010-10-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +asksol, jnoller type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10015 ___

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: You are right that this needs to be tested on other platforms. In order to so test it (and in any case!), the patch will need unit tests. It also needs doc updates. In general patch itself looks good to me, modulo the concern you

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Since this was a bugfix, it should be merged back into 2.7, yes? Mmmh, the fix requires to change PyUnicode_AsWideChar() function (support non-BMP characters and surrogate pairs) (and maybe also to create

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Since I noticed the bug through source code inspection and no one has reported it occurring in practice, that sounds reasonable to me. -- versions: -Python 2.7 ___ Python tracker

[issue1050268] rfc822.parseaddr is broken, breaks sendmail call in smtplib

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Fix committed to py3k in r85179, 3.1 in r85170, and 2.7 in r85181. I modified the unit tests, deleting the ones that were redundant because they were just two different python spellings of the same input string, and adding a comment

[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-10-02 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___

[issue10006] non-Pythonic fate of __abstractmethods__

2010-10-02 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2010/10/1 Yaroslav Halchenko rep...@bugs.python.org: Yaroslav Halchenko yarikop...@gmail.com added the comment: yikes... surprising resolution -- I expected that fix would either makes __abstractmethods__ accessible in derived types

[issue8792] Support Apache extensions to XML-RPC in xmlrpclib

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's easy enough to subclass the Transport type and add custom types to the dispatcher object, see the script below. Attila, Bhargav, is this solution acceptable to you? from xmlrpclib import Transport, ServerProxy class

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Martin, what do you think about this kind of changes? Are there possible regressions or incompatibilities? -- nosy: +amaury.forgeotdarc, loewis ___ Python tracker rep...@bugs.python.org

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: AFAICT, they are compatible, so +1. The typical proposition of an incompatible change either proposes to use const char* as the return type, or has multi-level pointers that are proposed to be constified. --

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Thanks for the confirmation! -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369 ___

[issue10015] Creating a multiproccess.pool.ThreadPool from a child thread blows up.

2010-10-02 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: I can not, for the life of me, remember why ThreadPool is there, except as a fallback. It's also not part of the documented interface as well. Additionally, in Python 3 we now have futures. -- ___

[issue9533] metaclass can't derive from ABC

2010-10-02 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: You can now create metaclass abcs. However, having __abstractmethods__ does not prevent instance creation. This is a problem with a builtins, though. -- resolution: - fixed status: open - closed

[issue10011] `except` doesn't use `isinstance`

2010-10-02 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: It matters when exceptions are expected or are a normal part of control flow. For example StopIteration. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Version 4 of patch, now including doc updates. The patch set is now complete. -- Added file: http://bugs.python.org/file19110/email_parse_bytes4.diff ___ Python tracker rep...@bugs.python.org

[issue5117] os.path.relpath problem with root directory

2010-10-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Well, I said msg80877 past, and I think so too, but os.path module of python2.x seems not to support UNC correctly, and I'm not sure if the behavior change is allowed here. Probably UNC support is new feature, so I'll attach the

[issue1710703] zipfile.ZipFile behavior inconsistent.

2010-10-02 Thread Alan McIntyre
Changes by Alan McIntyre alan.mcint...@gmail.com: Removed file: http://bugs.python.org/file9144/empty-zipfile.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1710703 ___

[issue10017] pprint.pprint raises TypeError on dictionaries with user-defined types as keys

2010-10-02 Thread Arnaud Delobelle
New submission from Arnaud Delobelle arno...@googlemail.com: The pprint function in the python 3.1 pprint module fails when printing a dictionary containing more than one item and with one item being a user-defined type. It seems pprint tries to sort the keys but fails, (maybe because calling

[issue1710703] zipfile.ZipFile behavior inconsistent.

2010-10-02 Thread Alan McIntyre
Alan McIntyre alan.mcint...@gmail.com added the comment: My apologies if Georg was waiting on me to say, Yes. :-) I've attached an updated patch that has the NEWS/doc changes Antoine mentioned. I also just checked that the tests still pass on Linux against the current trunk, and that the

[issue1710703] zipfile.ZipFile behavior inconsistent.

2010-10-02 Thread Alan McIntyre
Changes by Alan McIntyre alan.mcint...@gmail.com: Removed file: http://bugs.python.org/file18534/zipfile_empty2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1710703 ___

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Rietveld issue, with a small doc addition compared to pach4: http://codereview.appspot.com/2362041 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4661

[issue9647] os.confstr() does not handle value changing length between calls

2010-10-02 Thread David Watson
David Watson bai...@users.sourceforge.net added the comment: If I understood correctly, you don't want the value to be truncated if the variable grows between the two calls to confstr(). Which behaviour would you expect? A Python exception? A return size larger than the buffer is

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2010-10-02 Thread dontbugme
dontbugme pythonbugsbugme...@spamavert.com added the comment: you can add InstallPath key with the corresponding value at [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\] if you want disutils installer to detect your python That makes him detect and install the librarys or

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Upload svn patch, so that Martin's new rietveld support will (hopefully) create an automatic review link. -- Added file: http://bugs.python.org/file19113/email_parse_bytes5.diff ___ Python

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2010-10-02 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6792 ___ ___

[issue10017] pprint.pprint raises TypeError on dictionaries with user-defined types as keys

2010-10-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10017 ___ ___

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Andreas Stührk
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369 ___ ___

[issue1210680] Split email headers near a space

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Since no test case has been provided I am closing this issue. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1210680

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2010-10-02 Thread Jeremy Kloth
Changes by Jeremy Kloth jeremy.kl...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6792 ___ ___ Python-bugs-list

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: For what it's worth, a similar fast path existed in Python 2 for lists (but not tuples). It was removed for Python 3. I'm not sure why it was removed, but it may have been part of removing the PyInt type. -- nosy:

[issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I don't believe either the example that other mailers reject or the one that they accept are in fact RFC compliant. Encoded words are not supposed to occur in (structured) MIME headers. The behavior observed is a consequence of all

[issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally

2010-10-02 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: As per RDM's email to python-dev, a better way to create the pseudo_str values would be by decoding as ascii with a surrogate escape error handler rather than by decoding as latin-1. -- ___ Python

[issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Here is a patch. -- keywords: +patch stage: unit test needed - patch review Added file: http://bugs.python.org/file19114/add_header.patch ___ Python tracker rep...@bugs.python.org

[issue6302] email.header.decode_header data types are inconsistent and incorrectly documented

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Here is a patch that makes the output consistently (bytes, string) pairs. This is definitely a potential backward compatibility issue, but in general code which compensates for the old behavior should work fine with the new behavior,

[issue6302] email.header.decode_header data types are inconsistent and incorrectly documented

2010-10-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6302 ___ ___

[issue10018] IDLE not loading in xp pro due to tcl issue

2010-10-02 Thread Grant Andrew
New submission from Grant Andrew gveg...@gmail.com: I'm attempting to use Python for the first time and am running into issues before I'm out the door. I started with 3.2 and have worked backward installing older versions in hopes that IDLE would load on my xp pro laptop. After reading