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

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 ___

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

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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. from io import B

[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 : 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 which fixes this issue [3]. diff -up Python-2.7/Makefile.pre.in.fix-parallel-mak

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

2010-10-02 Thread STINNER Victor
STINNER Victor 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 combinaisons (2/2, 2/4 and 4/2

[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 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

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

2010-10-02 Thread STINNER Victor
STINNER Victor 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 bug again) -- resolu

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

2010-10-02 Thread STINNER Victor
STINNER Victor 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 : -- nosy: +dmalcolm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

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

2010-10-02 Thread STINNER Victor
New submission from STINNER Victor : 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 /home/SHARE/SVN/py3ké $ PYTHONFSENCO

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

2010-10-02 Thread STINNER Victor
STINNER Victor added the comment: See also #10014: sys.path[0] is decoded from the locale encoding instead of the fileystem encoding. -- ___ Python tracker ___ _

[issue9533] metaclass can't derive from ABC

2010-10-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

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

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach 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' 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 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? -- ___ Python tracker

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

2010-10-02 Thread Michael Olson
New submission from Michael Olson : 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 and used. Exac

[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 : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

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

2010-10-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto 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. -- Added file: http://bu

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

2010-10-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I'll create the patch for it. -- versions: -Python 2.6 ___ Python tracker ___ ___ Python-bugs-li

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
New submission from Tom Potts : 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 patch will not mes

[issue10016] shutil.copyfile -- allow sparse copying

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

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
Changes by Tom Potts : Added file: http://bugs.python.org/file19109/shutil-3.2.1.patch ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue9533] metaclass can't derive from ABC

2010-10-02 Thread R. David Murray
R. David Murray 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 __

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

2010-10-02 Thread R. David Murray
Changes by R. David Murray : -- nosy: +asksol, jnoller type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread R. David Murray
R. David Murray 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 raise about truncate. Yo

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

2010-10-02 Thread STINNER Victor
STINNER Victor 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 PyUnicode_AsWideCharString()). I don't really want t

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

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach 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 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 about the third test cas

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

2010-10-02 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue10006] non-Pythonic fate of __abstractmethods__

2010-10-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/10/1 Yaroslav Halchenko : > > Yaroslav Halchenko added the comment: > > yikes... surprising resolution -- I expected that fix would either makes > __abstractmethods__ accessible in derived "type"s or becomes absent from > output of dir() -- but none o

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

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 MyTransport(Transport): def

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 __

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Martin v . Löwis
Martin v. Löwis 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 added the comment: Thanks for the confirmation! -- resolution: -> accepted ___ Python tracker ___ ___ Python-bug

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

2010-10-02 Thread Jesse Noller
Jesse Noller 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. -- ___ Python tracker

[issue9533] metaclass can't derive from ABC

2010-10-02 Thread Benjamin Peterson
Benjamin Peterson 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 ___ Python tra

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

2010-10-02 Thread Benjamin Peterson
Benjamin Peterson 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 ___

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

2010-10-02 Thread R. David Murray
R. David Murray 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 _

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

2010-10-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto 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 patch to solve only this prob

[issue1710703] zipfile.ZipFile behavior inconsistent.

2010-10-02 Thread Alan McIntyre
Changes by Alan McIntyre : Removed file: http://bugs.python.org/file9144/empty-zipfile.diff ___ Python tracker ___ ___ Python-bugs-list mail

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

2010-10-02 Thread Arnaud Delobelle
New submission from Arnaud Delobelle : 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 __lt__ on a user-defined

[issue1710703] zipfile.ZipFile behavior inconsistent.

2010-10-02 Thread Alan McIntyre
Alan McIntyre 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 docs still build properly

[issue1710703] zipfile.ZipFile behavior inconsistent.

2010-10-02 Thread Alan McIntyre
Changes by Alan McIntyre : Removed file: http://bugs.python.org/file18534/zipfile_empty2.diff ___ Python tracker ___ ___ Python-bugs-list ma

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

2010-10-02 Thread R. David Murray
R. David Murray added the comment: Rietveld issue, with a small doc addition compared to pach4: http://codereview.appspot.com/2362041 -- ___ Python tracker ___ _

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

2010-10-02 Thread David Watson
David Watson 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 *supposed* to indicate that the cur

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

2010-10-02 Thread dontbugme
dontbugme 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 scripts to the right directory, but

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

2010-10-02 Thread R. David Murray
R. David Murray 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 tracker

[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 : -- versions: -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[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 : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1210680] Split email headers near a space

2010-10-02 Thread R. David Murray
R. David Murray added the comment: Since no test case has been provided I am closing this issue. -- status: open -> closed ___ Python tracker ___ _

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

2010-10-02 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

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

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach 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: +stutzbach _

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

2010-10-02 Thread R. David Murray
R. David Murray 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 headers, whether structu

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

2010-10-02 Thread Nick Coghlan
Nick Coghlan 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 tracker

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

2010-10-02 Thread R. David Murray
R. David Murray 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 __

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

2010-10-02 Thread R. David Murray
R. David Murray 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, since it was always pos

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

2010-10-02 Thread R. David Murray
Changes by R. David Murray : -- versions: -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

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

2010-10-02 Thread Grant Andrew
New submission from Grant Andrew : 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 several threads here,

[issue10012] httplib shadows builtin, assumes strings

2010-10-02 Thread Senthil Kumaran
Senthil Kumaran added the comment: Here are patches with tests for py3k and release27-maint, for explicit conversion of header values to bytes/str. If someone likes to review the patch, please provide your comments. -- keywords: +patch resolution: -> accepted stage: -> patch review

[issue10012] httplib shadows builtin, assumes strings

2010-10-02 Thread Senthil Kumaran
Changes by Senthil Kumaran : Added file: http://bugs.python.org/file19117/issue10012-py3k.patch ___ Python tracker ___ ___ Python-bugs-list ma