[Patches] [ python-Patches-1429601 ] PEP 338 implementation
SourceForge.net
noreply at sourceforge.net
Fri Mar 17 11:06:29 CET 2006
Patches item #1429601, was opened at 2006-02-11 19:04
Message generated for change (Comment added) made by ncoghlan
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1429601&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Nick Coghlan (ncoghlan)
Assigned to: Nobody/Anonymous (nobody)
Summary: PEP 338 implementation
Initial Comment:
This PEP implementation contains three parts - a
separate Python module (runpy.py) that implements the
PEP 338 functionality, a corresponding test module
(test_runpy.py) and a patch against current subversion
to integrate the module with the -m command line switch.
The documentation for the new module will be submitted
as a separate patch (since the review cycle is a bit
different).
----------------------------------------------------------------------
>Comment By: Nick Coghlan (ncoghlan)
Date: 2006-03-17 20:06
Message:
Logged In: YES
user_id=1038590
Slightly updated version of patch committed in SVN
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-19 03:56
Message:
Logged In: YES
user_id=1038590
Updated unit tests to match Feb 18 version of PEP and to
cover executing both source and compiled files from the file
system.
(version 2 of test_runpy module)
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-19 03:52
Message:
Logged In: YES
user_id=1038590
Updated module to match Feb 18 version of PEP (version 6 of
module)
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-18 01:19
Message:
Logged In: YES
user_id=1038590
PEP 338 has been updated as of 18-Feb-2006. Those changes
are still to be incorporated into this implementation.
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-12 13:33
Message:
Logged In: YES
user_id=1038590
Fixed error handling in main.c when the function call
results in an exception. (version 2 of integration diff).
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-12 13:29
Message:
Logged In: YES
user_id=1038590
I've attached a zip archive of the directory tree I've been
using to check that the runpy module works correctly. For
each of these command lines:
python -m runpy_demo.test
python -m runpy_demo.pkg.test
python -m runpy_demo.pkg.pkg.test
python -m runpy_demo.pkg.zip_pkg.test
The message "Running runpy_demo.test" should then print to
the console (with the second part of the message changing as
appropriate for the other 3 modules).
The last one obviously won't work if zlib isn't installed,
and all 4 require that both runpy and runpy_demo be on
sys.path (e.g in site-packages, or in the Lib directory).
On older Python versions (or without applying the patch),
invoking runpy directly is enough to make it work
python -m runpy runpy_demo.test
python -m runpy runpy_demo.pkg.test
python -m runpy runpy_demo.pkg.pkg.test
python -m runpy runpy_demo.pkg.zip_pkg.test
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-12 13:12
Message:
Logged In: YES
user_id=1038590
Added patch to main.c for integration with command line switch.
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-12 12:12
Message:
Logged In: YES
user_id=1038590
Version 5. Removed an import that is now redundant, added a
comment header with author information.
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-12 02:50
Message:
Logged In: YES
user_id=1038590
Version 4 of implementation. Fixes problem with not handling
nested packages and raises ImportError in run_module when no
loader is found.
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-12 01:35
Message:
Logged In: YES
user_id=1038590
Added basic test suite. Could use beefing up in the area of
actually checking that running modules inside packages works
correctly (I'm currently checking that bit manually).
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-12 01:29
Message:
Logged In: YES
user_id=1038590
Version 3 of implementation. Fixed emulator to generate an
ImportError for non-packages (instead of an AttributeError
in some cases).
Removed extraneous print statements from emulator.
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-02-12 00:28
Message:
Logged In: YES
user_id=1038590
Updated to avoid trying to hide exec's quirks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1429601&group_id=5470
More information about the Patches
mailing list