Re: [Python-Dev] how to find the file path to an extension module at init time?
"Martin v. Löwis", 15.11.2011 01:33: Currently, for Cython? I don't think that can work. Hmm, it might work to put an empty module next to the 'real' extension and to import it to figure out the common directory of both. As long as it's still there after installation and the right one gets imported, that is. A relative import should help on versions that support it. Although that won't help in the __init__ case because a relative import will likely depend on __path__ being available first. Chicken and egg... If there was an actual __init__.py that just had import __cinit__ or rather from .__cinit__ import * (relative import only for CPythons that support it) then __cinit__ could copy __path__ from the already-loaded __init__, no? Hmm, right - that should work. __init__ would be in sys.modules with a properly set __file__ and __path__, and __cinit__ (knowing its own package name anyway) could look it up there to find out its file system path. I don't think there's much code out there that actually uses __file__ to find out the name of the module rather than just its package directory. So it would (more or less) fix both problems for __init__ files, and it should work with Py2.4+. Certainly. An approach similar to _Py_PackageContext should be possible. Yes, and a "_Py_ModuleImportContext" would be rather trivial to do. Could that go into 3.3? If somebody contributes a patch: sure. Ok, cool. What about 2.7? Certainly not. It would be a new feature, and there can't be new features in 2.7. Could an exception be made there regarding new "features"? It's not likely to break anything, but it would help Cython. "Not likely to break anything" really means it practice "it probably will break somebody's code". Policies are there to be followed, and this one I personally feel strongly about. If it means that users can get certain Cython features only with Python 3.x, the better. Understandable. Stefan ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 405 (proposed): Python 2.8 Release Schedule
On Wed, Nov 9, 2011 at 17:18, Amaury Forgeot d'Arc wrote: > Hi, > 2011/11/9 Barry Warsaw >> >> I think we should have an official pronouncement about Python 2.8, and >> PEPs >> are as official as it gets 'round here. > > Do we need to designate a release manager? I volunteer. It's on my level of competence. //Lennart ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 376 - contents of RECORD file
Hi Paul, > Looking at a RECORD file installed by pysetup (on 3.3 trunk, on > Windows) all of the filenames seem to be absolute, even though the > package is pure-Python and so everything is under site-packages. > Looking at PEP 376, it looks like the paths should be relative to > site-packages. Two questions: > > 1. Am I reading this right? Is it a bug in pysetup? I believe so. > 2. Does it matter? Are relative paths needed, or is it just nice to have? I’ll try to find the mailing list thread that lead to this change. Regards ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [Python-checkins] cpython: Issue #6397: Support '/dev/poll' polling objects in select module, under
Hi, > http://hg.python.org/cpython/rev/8f7ab4bf7ad9 > user:Jesus Cea > date:Mon Nov 14 19:07:41 2011 +0100 > summary: > Issue #6397: Support '/dev/poll' polling objects in select module, under > Solaris & derivatives. > +.. _devpoll-objects: > + > +``/dev/poll`` Polling Objects > +-- > + > + http://developers.sun.com/solaris/articles/using_devpoll.html > + http://developers.sun.com/solaris/articles/polling_efficient.html > + This markup creates a blockquote with the two links displayed in a line. You probably meant to use a comment (start the block with “.. ”) or, if the links are generally useful, move them to a seealso block later in the file. Regards ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
