[issue14721] httplib doesn't specify content-length header for POST requests without data

2012-05-04 Thread Arve Knudsen
Arve Knudsen arve.knud...@gmail.com added the comment: Which HTTP methods should we auto-define content-length for? POST and PUT? I noticed that my first attempt at a patch would define content-length also for GET requests, which broke a unit test (test_ipv6host_header). --

[issue14662] shutil.move doesn't handle ENOTSUP raised by chflags on OS X

2012-05-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Looks ok to me, but I don't have a system with os.chflags to test on. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14662 ___

[issue14678] Update zipimport to support importlib.invalidate_caches()

2012-05-04 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I should mention I have a version from importers that is probably out-of-date: http://code.google.com/p/importers/source/browse/importers/zip.py -- ___ Python tracker rep...@bugs.python.org

[issue11618] Locks broken wrt timeouts on Windows

2012-05-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I agree that Martin that it's not a good idea to add dead code. Furthermore, you patch has: +#ifndef _PY_EMULATED_WIN_CV +#define _PY_EMULATED_WIN_CV 0 /* use emulated condition variables */ +#endif + +#if !defined NTDDI_VISTA || NTDDI_VERSION

[issue14711] Remove os.stat_float_times

2012-05-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: +1 for deprecating. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14711 ___ ___

[issue2377] Replace __import__ w/ importlib.__import__

2012-05-04 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___ ___

[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib

2012-05-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Quinn, are you planning to work on an updated patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11943 ___

[issue14722] Overflow in parsing 'float' parameters in PyArg_ParseTuple*

2012-05-04 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: I also thought about ±∞. But PyLong_AsDouble() raises OverflowError for out-of-range value. And it checks strictly out of ±DBL_MAX. Because float(10**1000) returns no float('inf'), but raises an exception, I think that returning ±∞ will be

[issue14692] json.loads parse_constant callback not working anymore

2012-05-04 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- title: json.joads parse_constant callback not working anymore - json.loads parse_constant callback not working anymore ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14692

[issue14722] Overflow in parsing 'float' parameters in PyArg_ParseTuple*

2012-05-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: And it checks strictly out of ±DBL_MAX. Nope. Values just larger than DBL_MAX won't raise OverflowError here. Because float(10**1000) returns no float('inf'), but raises an exception, I think that returning ±∞ will be wrong. Possibly.

[issue14721] httplib doesn't specify content-length header for POST requests without data

2012-05-04 Thread Arve Knudsen
Arve Knudsen arve.knud...@gmail.com added the comment: Actually, when inspecting the HTTP requests sent by Chrome for the different methods (a great little Chrome app called Postman let me fire requests manually), I found that content-length would be set for most methods. I could confirm that

[issue14701] parser module doesn't support 'raise ... from'

2012-05-04 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Just curious, should The parser module provides an interface to Python’s internal parser and byte-code compiler. say CPython's? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org

[issue14723] Misleading error message for str.format()

2012-05-04 Thread Mark Theisen
New submission from Mark Theisen mark.thei...@digitecinc.com: When I run this code: '{0:i}'.format(None) I get this error: ValueError: Unknown format code 'i' for object of type 'str' This seems misleading because None is of Type 'NoneType'. I was expecting the error to say something to the

[issue14701] parser module doesn't support 'raise ... from'

2012-05-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Hmm. Possibly, yes. At least, it should be clear somehow from the docs that the parser, symbol, token and ast modules are CPython specific. (And possibly tokenize, too.) -- ___ Python tracker

[issue14723] Misleading error message for str.format()

2012-05-04 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: This is a duplicate of issue 13790. See the comments there for why it works this way. -- nosy: +eric.smith resolution: - duplicate status: open - closed superseder: - In str.format an incorrect error message for list, tuple, dict,

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-05-04 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13790 ___ ___

[issue14721] httplib doesn't specify content-length header for POST requests without data

2012-05-04 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: HEAD?. It doesn't make sense in HEAD if it doesn't make sense in GET. Looking around, I found this, to mud the water a little bit more: http://fixunix.com/tcp-ip/66198-http-rfc-related-question-content-length-0-get-request.html. Not being

[issue14657] Avoid two importlib copies

2012-05-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 257cbd2fac38 by Brett Cannon in branch 'default': Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. http://hg.python.org/cpython/rev/257cbd2fac38 -- nosy: +python-dev

[issue13959] Re-implement parts of imp in pure Python

2012-05-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 257cbd2fac38 by Brett Cannon in branch 'default': Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. http://hg.python.org/cpython/rev/257cbd2fac38 -- ___ Python

[issue13959] Re-implement parts of imp in pure Python

2012-05-04 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: OK, I'm waiting on issue #14657 (avoiding the _frozen_importlib/importlib dichotomy) is resolved before I document the new imp.extension_suffixes() as it would be good to know where I should pull in the source and bytecode suffixes. I think

[issue14722] Overflow in parsing 'float' parameters in PyArg_ParseTuple*

2012-05-04 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Here is a patch with tests. Nope. Values just larger than DBL_MAX won't raise OverflowError here. Isn't that a little bit. But values that rounded to DBL_MAX can raise OverflowError. In any case it's too difficult to achieve strict

[issue14722] Overflow in parsing 'float' parameters in PyArg_ParseTuple*

2012-05-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- type: - enhancement versions: -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14722 ___

[issue14721] httplib doesn't specify content-length header for POST requests without data

2012-05-04 Thread Arve Knudsen
Arve Knudsen arve.knud...@gmail.com added the comment: Here's my initial proposal for a patch against httplib, based on the 2.7 branch of cpython repository. I've included a couple of tests, which check that when content is empty, content-length is set to 0 for certain methods (POST/PUT etc)

[issue14721] httplib doesn't specify content-length header for POST requests without data

2012-05-04 Thread Arve Knudsen
Arve Knudsen arve.knud...@gmail.com added the comment: Yes, I agree it doesn't make much sense for HEAD AFAICT, but Chrome does it. Maybe there's a reason? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14721

[issue14722] Overflow in parsing 'float' parameters in PyArg_ParseTuple*

2012-05-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: But values that rounded to DBL_MAX can raise OverflowError. In any case it's too difficult to achieve strict behavior in this corner case. Well, PyLong_AsDouble *does* achieve strict behaviour in this corner case :-). Integers less than

[issue14093] Mercurial version information not appearing in Windows builds

2012-05-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4459d82ff127 by Vinay Sajip in branch 'default': Closes #14093: Added Mercurial version information to Windows builds. http://hg.python.org/cpython/rev/4459d82ff127 -- nosy: +python-dev resolution: - fixed

[issue14578] importlib doesn't check Windows registry for paths

2012-05-04 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: FYI, I just deleted PC/import_nt.c as it stopped compiling after my removal of _imp.get_suffixes(). Obviously hg has the history of the file so if someone needs to resurrect it there shouldn't be much issue. --

[issue13959] Re-implement parts of imp in pure Python

2012-05-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 22b0689346f9 by Brett Cannon in branch 'default': Issue #13959: Move module type constants to Lib/imp.py. http://hg.python.org/cpython/rev/22b0689346f9 -- ___ Python

[issue14662] shutil.move doesn't handle ENOTSUP raised by chflags on OS X

2012-05-04 Thread Ned Deily
Ned Deily n...@acm.org added the comment: I will test and check it in next week if still open. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14662 ___

[issue14724] kill imp.load_dynamic's third argument

2012-05-04 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14724 ___ ___ Python-bugs-list mailing list

[issue14724] kill imp.load_dynamic's third argument

2012-05-04 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: imp.load_dynamic's third optional argument doesn't seem used in the wild, and I don't think it's correctly implemented by the current code. It would seem reasonable to kill it. -- components: Interpreter Core, Library (Lib) messages:

[issue14725] test_multiprocessing failure under Windows

2012-05-04 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: There was this failure on one of the XP buildbots: Process Process-269: Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\multiprocessing\process.py, line 258, in _bootstrap self.run()

[issue14726] Lib/email/*.py use an EMPTYSTRING global instead of ''

2012-05-04 Thread Gregory P. Smith
New submission from Gregory P. Smith g...@krypto.org: Lib/email/*.py are fond of using EMPTYSTRING = '' and within the code: EMPTYSTRING.join(...) instead of just writing: ''.join(...) They should just do the latter. It'll avoid a name lookup and look less silly to people reading

[issue14726] Lib/email/*.py use an EMPTYSTRING global instead of ''

2012-05-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I've always wondered why the code did that. If Barry doesn't have a good reason for it, I'll refactor it at some point. -- assignee: - r.david.murray nosy: +barry, r.david.murray type: - performance

[issue14695] Tools/parser/unparse.py is out of date.

2012-05-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: There is a test_tools file now. test_unparse could be called from it. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14695

[issue14702] os.makedirs breaks under autofs directories

2012-05-04 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Hynek: it doesn't seem like that would work, since legitimate EPERM errors are much more likely. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue14726] Lib/email/*.py use an EMPTYSTRING global instead of ''

2012-05-04 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: On May 05, 2012, at 01:25 AM, R. David Murray wrote: I've always wondered why the code did that. If Barry doesn't have a good reason for it, I'll refactor it at some point. A long time ago, Tim (IIRC) expressed an opinion that using the

<    1   2