On Fri, Mar 1, 2013 at 6:35 AM, Brett Cannon <br...@python.org> wrote: > > > > On Thu, Feb 28, 2013 at 3:17 PM, fwierzbi...@gmail.com > <fwierzbi...@gmail.com> wrote: >> >> On Thu, Feb 28, 2013 at 12:00 PM, Antoine Pitrou <solip...@pitrou.net> >> wrote: >> > IMHO, we should remove the plat-* directories, they are completely >> > unmaintained, undocumented, and serve no useful purpose. >> Oh I didn't know that - so definitely adding to that is right out :) >> >> Really for cases like Jython's zlib.py (no useful code for CPython) I >> don't have any trouble keeping them entirely in Jython. It just would >> have been fun to delete our Lib/ :) >> >> It would be nice in this particular case if there was a zlib.py that >> imported _zlib -- then it would be easy to shim in Jython's version, >> whether it is written in a .py file or in Java. > > > That should be fine as that is what we already do for accelerator modules > anyway. If you want to work towards having an equivalent of CPython's > Modules/ directory so you can ditch your custom Lib/ modules by treating > your specific code as accelerators I think we can move towards that > solution.
I'd go further and say we *should* move to that solution. Here's an interesting thought: for pure C modules without a Python implementation, we can migrate to this architecture even *without* creating pure Python equivalents. All we shou;d have to do is change the test of the pure Python version to be that the module *can't be imported* without the accelerator, rather than the parallel tests that we normally implement when there's a pure Python alternative to the accelerated version. (There would likely still be some mucking about to ensure robust pickle compatibility, since that leaks implementation details about exact module names if you're not careful) PyPy, Jython, IronPython would then have RPython, Java, C# versions, while CPython has a C version, and the test suite should work regardless. (If PyPy have equivalents in Python, they can either push them upstream, overwrite the "import the accelerator" version). Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com