Changes by Jean-Paul Calderone exar...@divmod.com:
--
nosy: -exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1941
___
___
Python-bugs-list
Changes by Benjamin Peterson benja...@python.org:
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1941
___
Benjamin Peterson added the comment:
I could break this patch into per-module patches. Then as authors
approved them, they could gradually be committed.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1941
__
Benjamin Peterson added the comment:
Comments?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1941
__
___
Python-bugs-list mailing list
Unsubscribe:
Thomas Heller added the comment:
Lib/platform.py contains this notice at the top:
#This module is maintained by Marc-Andre Lemburg [EMAIL PROTECTED].
#If you find problems, please submit bug reports/patches via the
#Python SourceForge Project Page and assign them to lemburg.
#
#
Marc-Andre Lemburg added the comment:
Please remove the platform.py part of the patch. You can apply that to
Py3k, but not to the 2.x series.
--
nosy: +lemburg
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1941
Benjamin Peterson added the comment:
This new patch removes changes to the platform module.
Added file: http://bugs.python.org/file9342/stdlib-with-stmt2-no-platform.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1941
Raymond Hettinger added the comment:
Am unassigning because I don't have time for a detailed review.
For the most part, I'm not excited about this patch which targets
modules that aren't being actively supervised by their original
contributor.
--
assignee: rhettinger -
Benjamin Peterson added the comment:
Today, I carefully looked through every change in my patching. I asked
myself Does this do the same things in the same order as the original?
and Could exceptions cause the code to function differently? They only
changes were when the block which used the
New submission from Benjamin Peterson:
This patch modernizes many modules in the stdlib by making them using
the with statement. They affected modules are modulefinder, ftplib,
cookielib, shutil, pydoc, platform, _LWPCookieJar, mailbox,
_MozillaCookieJar, and zipfile.
--
components:
Thomas Heller added the comment:
modulefinder should be kept compatible with Python 2.2, so please do not
apply the patch for this module. See also PEP 291.
No idea about the other modules.
--
nosy: +theller
__
Tracker [EMAIL PROTECTED]
Christian Heimes added the comment:
A while ago Raymond explained on Python developer list that the with
statement is slightly slower than a try/finally block. Performance
critical sections like the threading module must not use the with statement.
--
assignee: - rhettinger
keywords:
Jean-Paul Calderone added the comment:
The patch doesn't change the threading module, so I'm not sure if
there's anything in particular you think is performance critical there.
The places where it uses try/finally are:
* _Condition.wait. This performs operations on a mutex which are much
Adam Olsen added the comment:
Is there a guarantee that the with-statement is safe in the face of
KeyboardInterrupt? PEP 343 seems to imply it's not, using it as a
reason for why we need no special handling if __exit__ fails.
--
nosy: +Rhamphoryncus
__
Jean-Paul Calderone added the comment:
It's explicitly not (and Guido said this is what he wanted, several
times). However, CPython will not raise a KeyboardInterrupt in the
middle of a C function. Hence my parenthetical about implementing the
lock type in C.
Benjamin Peterson added the comment:
This new patch removes the modulefinder changes.
I was the one you submitted #1910 which probably sparked the performance
debate. In this patch, I tried to avoid these touchy places.
Added file: http://bugs.python.org/file9295/stdlib-with-stmt2.diff
Adam Olsen added the comment:
Yes, but there's no guarantee it will even reach the C function.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1941
__
___
Python-bugs-list
Jean-Paul Calderone added the comment:
There may not be a guarantee, but it will with the current
implementation, and the discussion on this ticket seems to be very
geared towards CPython implementation peculiarities.
__
Tracker [EMAIL PROTECTED]
Raymond Hettinger added the comment:
Please make darned sure these changes are semantically neutral.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1941
__
___
Python-bugs-list
Benjamin Peterson added the comment:
Sorry, but what does that mean? All tests are passing with the changes.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1941
__
___
Christian Heimes added the comment:
Benjamin Peterson wrote:
Sorry, but what does that mean? All tests are passing with the changes.
Tests aren't a proof for correctness. A failing test proofs either an
error in the implementation or in the test suite. The reverse all tests
are passing =
Raymond Hettinger added the comment:
It means to that the test suites are likely inadequate in this
department and that you need to carefully check each transformation to
make sure it doesn't do something subtlely different.
__
Tracker [EMAIL PROTECTED]
22 matches
Mail list logo