[issue10012] httplib shadows builtin, assumes strings

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

[issue10012] httplib shadows builtin, assumes strings

2010-10-03 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: Added file: http://bugs.python.org/file19117/issue10012-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10012 ___

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

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2010-10-03 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: done in r85197 / r85198 Thanks ! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8980 ___

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

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

[issue9989] ctypes bitfield problem

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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

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

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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 ___

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

2010-10-03 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com 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 davidja...@davidjanes.com: 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)

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

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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

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

2010-10-03 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file14506/ctypes_workaround.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6493 ___

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

2010-10-03 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file14507/ctypes_workaround_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6493 ___

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

2010-10-03 Thread Doug Hellmann
New submission from Doug Hellmann doug.hellm...@gmail.com: 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

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

2010-10-03 Thread Doug Hellmann
Changes by Doug Hellmann doug.hellm...@gmail.com: -- assignee: - d...@python components: +Documentation nosy: +d...@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10020 ___

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

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Sorry,my patch didn't work again... Because of this compiler behavior. Is this ANSI standard? #include stdio.h typedef unsigned __int32 uint32; static void print_bits(uint32 n) { int i; for (i = 31; i = 0; --i) {

[issue9272] CGIHTTPServer poisons os.environ

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

[issue10012] httplib shadows builtin, assumes strings

2010-10-03 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com 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 ocean-c...@m2.ccsnet.ne.jp: Added file: http://bugs.python.org/file19122/py3k_fix_ctypes_cfields_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6493 ___

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

2010-10-03 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file19121/py3k_fix_ctypes_cfields_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6493 ___

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

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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 pit...@free.fr: -- assignee: d...@python - ghaering nosy: +ghaering versions: +Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10020 ___

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

2010-10-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - bob.ippolito nosy: +bob.ippolito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10019 ___

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

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue6706] asyncore's accept() is broken

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org

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

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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(bThis Is a test string, that should be of type bytes) but this issue itself seems to be

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

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Probably this issue is duplicate of #9266. -- nosy: +ocean-city ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9884 ___

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

2010-10-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Probably this issue is duplicate of #9884. -- nosy: +ocean-city ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9266 ___

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

2010-10-03 Thread Greg Hazel
Changes by Greg Hazel gha...@users.sourceforge.net: -- nosy: +ghazel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9884 ___ ___ Python-bugs-list

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

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

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 ___

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

2010-10-03 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de 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 rep...@bugs.python.org http://bugs.python.org/issue10020

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

2010-10-03 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Fixed in r85208 by adding a note to the docs. -- resolution: - fixed status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10020

[issue9968] Let cgi.FieldStorage have named uploaded file

2010-10-03 Thread phep
phep patrice.pil...@teletopie.net 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

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

2010-10-03 Thread Doug Hellmann
Doug Hellmann doug.hellm...@gmail.com added the comment: Thanks, Gerhard! -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10020 ___

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

2010-10-03 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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 m...@kiilerich.com 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

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Changes by Gregory Nofi crackityjones200...@yahoo.com: Removed file: http://bugs.python.org/file15753/.mailcap ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6484 ___

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Gregory Nofi crackityjones200...@yahoo.com 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 crackityjones200...@yahoo.com: Removed file: http://bugs.python.org/file15752/test_mailcap.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6484 ___

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Changes by Gregory Nofi crackityjones200...@yahoo.com: Removed file: http://bugs.python.org/file17042/test_mailcap.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6484 ___

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Gregory Nofi crackityjones200...@yahoo.com 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

[issue6484] No unit test for mailcap module

2010-10-03 Thread Gregory Nofi
Changes by Gregory Nofi crackityjones200...@yahoo.com: Added file: http://bugs.python.org/file19127/test_mailcap.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6484 ___

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

2010-10-03 Thread Gregory Nofi
Gregory Nofi crackityjones200...@yahoo.com added the comment: I just submitted new versions of test_mailcap.py in case 6484. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9923 ___