Issue1784696

classification
Title: Patch: Import hook for separate source and class folders
Type: Severity: normal
Components: Core Versions: Jython 2.5
Milestone:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: cgroves, david-perez, fwierzbicki
Priority: low Keywords: patch

Created on 2007-08-30.09:49:26 by david-perez, last changed 2013-02-25.19:05:31 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
SeparateFolderImporter2.java.patch david-perez, 2007-08-31.10:00:10
Messages
msg2865 (view) Author: David Pérez (david-perez) Date: 2007-08-30.09:49:26
This import hook implements separate source (.py) and compiled ($py.class) folders, so that source folders are kept clean, like it is done for Java projects.

msg2866 (view) Author: Charlie Groves (cgroves) Date: 2007-08-31.08:04:48
As I guessed it might in my email, this patch duplicates a fair bit of code from imp.java.  However, it doesn't look like it'd be too bad to make imp use a class very much SeparateFolderImporter as its default importer, and have your hook subclass from that to add this notion of separate folders.  That way it gets away from the evil of code duplication but keeps the niceties of your new functionality.  
msg2867 (view) Author: David Pérez (david-perez) Date: 2007-08-31.10:00:10
File Added: SeparateFolderImporter2.java.patch
msg2868 (view) Author: David Pérez (david-perez) Date: 2007-08-31.10:09:37
Hi,

Even though the repetition of code is small (only locating source and class files), your proposal is also good for me.
msg7367 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2012-08-10.18:24:38
Something like this would be a good thing for Jython3 -- it would need to follow http://www.python.org/dev/peps/pep-3147/ -- we will be targeting at least version 3.3 when we get going on Jython3 and it will most likely use the new importlib from the CPython project to do imports so we'd need to look into integrating with that.
History
Date User Action Args
2013-02-25 19:05:31fwierzbickisetversions: + Jython 2.5, - 2.5.1
2012-08-10 18:24:38fwierzbickisetmessages: + msg7367
2009-03-30 16:49:23fwierzbickisetassignee: fwierzbicki ->
2009-03-30 16:42:37fwierzbickisetversions: + 2.5.1
2009-03-30 16:29:50fwierzbickisetpriority: normal -> low
2009-03-14 02:47:36fwierzbickisetassignee: fwierzbicki
nosy: + fwierzbicki
2008-12-14 17:41:49fwierzbickisetcomponents: + Core, - None
2007-08-30 09:49:26david-perezcreate