On 7 September 2016 at 19:30, Tomas Orsava <tors...@redhat.com> wrote: > On 09/06/2016 08:25 PM, Nick Coghlan wrote: >> Very interesting, although I see a pragmatic problem with trying to >> check for explicitly missing packages only after checking for the >> standard library ones: the default import system doesn't make a clear >> distinction as to which sys.path entries refer to the standard library >> and which refer to other directories (like site-packages), so you >> can't readily intercept processing after the standard library is >> checked but before the rest of sys.path is processed. > > I have created a proposal for the Reference Implementation which you can > find here: > https://github.com/torsava/cpython/pull/1 > > It works by checking for the .missing.py files in every directory on the > sys.path. Therefore the packager can put it into any directory they use for > stdlib, and it will work (that directory of course already is on the > sys.path). And because it checks for the .missing.py file only after it > tried every other possible file extension in each directory, it won't shadow > actually installed stdlib modules.
Oh, nice, that's very cool, and way simpler than anything I was thinking of :) Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ python-devel mailing list python-devel@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/python-devel@lists.fedoraproject.org