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

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou 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. If you were worried about performance, then surrogateescape is certainly

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

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I think nttplib's use case can be satisfied via the issue 4661 patch > coupled with the decode_header bytes-recovery enhancement. I don't really understand how that could. nntplib needs to "decode" (in the decode_header sense) headers containing unescaped as

[issue8980] distutils.tests.test_register.RegisterTestCase.test_strict fails

2010-10-03 Thread Tarek Ziadé
Tarek Ziadé added the comment: done in r85197 / r85198 Thanks ! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

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

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a proposal for decode_header_as_string(). -- Added file: http://bugs.python.org/file19118/decode_header.patch ___ Python tracker ___ ___

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

2010-10-03 Thread R. David Murray
R. David Murray added the comment: Yes, that was a late night post and as I was falling asleep I realized that I was wrong. Certainly decode_header_as_string is a function most people using the email package will want and will re-implement in one form or another, so I think it is a good idea

[issue9989] ctypes bitfield problem

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I think this issue is duplicate of #6493. -- nosy: +ocean-city resolution: -> duplicate status: open -> closed superseder: -> Can not set value for structure members larger than 32 bits ___ Python tracker

[issue6493] Can not set value for structure members larger than 32 bits

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I glanced at my patch again, and I noticed it has a problem. SET() cannot handle type larger than unsigned int on windows. I'll recreate the patch... -- nosy: +ned.deily, stutzbach ___ Python tracker

[issue9281] Race condition in distutils.dir_util.mkpath()

2010-10-03 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: I'm attaching the patch for some mkpath functions in distutils2. -- components: +Distutils2 versions: +3rd party -Python 2.6 Added file: http://bugs.python.org/file19119/distutils2-mkpath.patch _

[issue10019] json.dumps with indent = 0 not adding newlines

2010-10-03 Thread David Janes
New submission from David Janes : In Python 2.6.4, json.dumps(...,indent=0) produced newlines as documented here: http://docs.python.org/library/json.html#json.dump In Python 2.7, it no longer adds newlines. $ python Python 2.6.4 (r264:75706, Jan 13 2010, 19:41:08) [GCC 4.1.2 20080704 (Red Hat

[issue6493] Can not set value for structure members larger than 32 bits

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Here is at least better, simple patch. But ideally, mask should be created from variable type. "short" mask should be created for "short" variable, "long long" mask for "long long" variable, vise verse. I'll create such patch next. I hope it's final solution

[issue6493] Can not set value for structure members larger than 32 bits

2010-10-03 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file14506/ctypes_workaround.patch ___ Python tracker ___ ___ Python-bugs-li

[issue6493] Can not set value for structure members larger than 32 bits

2010-10-03 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file14507/ctypes_workaround_2.patch ___ Python tracker ___ ___ Python-bugs-

[issue10020] docs for sqlite3 describe functions not available without recompiling

2010-10-03 Thread Doug Hellmann
New submission from Doug Hellmann : The documentation for the sqlite3 module describes enable_load_extension() and load_extension() methods of the Connection object, but those functions are only available if the user has compiled from source *after* modifying the setup.py to turn off SQLITE_OM

[issue10020] docs for sqlite3 describe functions not available without recompiling

2010-10-03 Thread Doug Hellmann
Changes by Doug Hellmann : -- assignee: -> d...@python components: +Documentation nosy: +d...@python ___ Python tracker ___ ___ Pytho

[issue6493] Can not set value for structure members larger than 32 bits

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Sorry,my patch didn't work again... Because of this compiler behavior. Is this ANSI standard? #include typedef unsigned __int32 uint32; static void print_bits(uint32 n) { int i; for (i = 31; i >= 0; --i) { printf("%c", (n & (1 << i))

[issue9272] CGIHTTPServer poisons os.environ

2010-10-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fix committed in revision 85202 (py3k), r85203 (release31-maint), r85204(release27-maint). I had change the patch to use copy.deepcopy instead of os.environ.copy() because for the purposes of test os.environ was masked with EnvironmentGuard which does not ha

[issue10012] httplib shadows builtin, assumes strings

2010-10-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed in r85205 (py3k), r85206 (release31-maint) and r85207 (release27-maint). -- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue6493] Can not set value for structure members larger than 32 bits

2010-10-03 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file19122/py3k_fix_ctypes_cfields_v2.patch ___ Python tracker ___ ___ Python-

[issue6493] Can not set value for structure members larger than 32 bits

2010-10-03 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file19121/py3k_fix_ctypes_cfields_v2.patch ___ Python tracker ___ ___ Pytho

[issue6493] Can not set value for structure members larger than 32 bits

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This patch removes MAX_SIZE_INT limitation. I hope this is final patch. I confirmed all ctypes test passed on my environment. (Windows, VS8.0) -- Added file: http://bugs.python.org/file19123/py3k_fix_ctypes_cfields_v3.patch _

[issue10020] docs for sqlite3 describe functions not available without recompiling

2010-10-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: d...@python -> ghaering nosy: +ghaering versions: +Python 3.1, Python 3.2 ___ Python tracker ___

[issue10019] json.dumps with indent = 0 not adding newlines

2010-10-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> bob.ippolito nosy: +bob.ippolito ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > In addition, in 3.2 I will disallow non-ASCII parameter values unless > they are specified in a three element tuple as in the example above. Why would the caller be required to choose an encoding while you could simply default to utf-8? There doesn't seem to

[issue6706] asyncore's accept() is broken

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not an asyncore expert, but I can't see anything wrong with the patch. -- stage: needs patch -> patch review versions: -Python 2.6, Python 2.7, Python 3.1 ___ Python tracker _

[issue8017] c_char_p.value does not return a bytes object in Windows.

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: You need to change test_string = ctypes.c_char_p("This Is a test string, that should be of type bytes") to test_string = ctypes.c_char_p(b"This Is a test string, that should be of type bytes") but this issue itself seems to be already fixed. --

[issue9884] The 4th parameter of method always None or 0 on x64 Windows.

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Probably this issue is duplicate of #9266. -- nosy: +ocean-city ___ Python tracker ___ ___ Python

[issue9266] ctypes "ValueError: NULL pointer access" on Win7 x64

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Probably this issue is duplicate of #9884. -- nosy: +ocean-city ___ Python tracker ___ ___ Python

[issue9884] The 4th parameter of method always None or 0 on x64 Windows.

2010-10-03 Thread Greg Hazel
Changes by Greg Hazel : -- nosy: +ghazel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue10019] json.dumps with indent = 0 not adding newlines

2010-10-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The C encoder should not be used when indent=0. Here is a patch+test for 2.7. Note that json.dump (into a file object) already correctly emit newlines. -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file19124/json

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: The use of fdst.truncate() is indeed wrong, since truncate() in 3.x is defined as truncating up to the current file position (which has been moved forward by the latest seek()). -- nosy: +pitrou ___ Python tracker

[issue10020] docs for sqlite3 describe functions not available without recompiling

2010-10-03 Thread Gerhard Häring
Gerhard Häring added the comment: Without SQLITE_OMIT_LOAD_EXTENSION, builds will break on Mac OS X 10.5 and 10.6 and maybe other platforms. -- ___ Python tracker ___ _

[issue10020] docs for sqlite3 describe functions not available without recompiling

2010-10-03 Thread Gerhard Häring
Gerhard Häring added the comment: Fixed in r85208 by adding a note to the docs. -- resolution: -> fixed status: open -> pending ___ Python tracker ___ _

[issue9968] Let cgi.FieldStorage have named uploaded file

2010-10-03 Thread phep
phep added the comment: Well, this is actually somewhat more complicated than what my first tests showed due to the way multipart/form-data is dealt with in FieldStorage.read_multi(). The solution I proposed last time only works if the uploaded file is passed as the first form field. I have

[issue10020] docs for sqlite3 describe functions not available without recompiling

2010-10-03 Thread Doug Hellmann
Doug Hellmann added the comment: Thanks, Gerhard! -- status: pending -> open ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2010-10-03 Thread R. David Murray
R. David Murray added the comment: The compatibility argument is a fair point, and yes we could default to utf8 and no language. So that is probably a better solution than raising the error. -- ___ Python tracker

[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate

2010-10-03 Thread Mads Kiilerich
Mads Kiilerich added the comment: I added some extra verification to Mercurial (http://www.selenic.com/hg/rev/f2937d6492c5). Feel free to use the following under the Python license in Python or elsewhere. It could be a separate method/function or it could integrated in wrap_socket and control

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Changes by Gregory Nofi : Removed file: http://bugs.python.org/file15753/.mailcap ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Gregory Nofi added the comment: Replacing .mailcap with mailcap.txt. Same content, but with more conventional file name. -- Added file: http://bugs.python.org/file19125/mailcap.txt ___ Python tracker _

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Changes by Gregory Nofi : Removed file: http://bugs.python.org/file15752/test_mailcap.py ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Changes by Gregory Nofi : Removed file: http://bugs.python.org/file17042/test_mailcap.py ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Gregory Nofi added the comment: r.david.murray: Thanks a lot for your feedback! I've implemented those suggestions and they helped located a bug. (See case 9923.) -- Added file: http://bugs.python.org/file19126/test_mailcap.py ___ Python tracker

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Changes by Gregory Nofi : Added file: http://bugs.python.org/file19127/test_mailcap.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue9923] mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set

2010-10-03 Thread Gregory Nofi
Gregory Nofi added the comment: I just submitted new versions of test_mailcap.py in case 6484. -- ___ Python tracker ___ ___ Python-bu