Nick Coghlan ncogh...@gmail.com added the comment:
Buildbots are green (at least as far as this issue goes), so closing again.
I created #15384 for the surprising behaviour of FileFinder on Windows.
#15385 records my investigation into the odd symlink behaviour on 3.2 (it was
just a
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 16e50e85d684 by Nick Coghlan in branch 'default':
Issue #15314: Tweak a pkgutil test to hopefully be more Windows friendly
http://hg.python.org/cpython/rev/16e50e85d684
--
Nick Coghlan ncogh...@gmail.com added the comment:
OK, I just pushed a tweak to the test that will hopefully resolve the problem.
If the tweak works, though, it does suggest we have a bit of weirdness in
importlib: it means pkgutil.get_importer() is returning an importer on POSIX
systems, but
Antoine Pitrou pit...@free.fr added the comment:
A test fails on the XP buildbots:
==
FAIL: test_get_importer_avoids_emulation
(test.test_pkgutil.ImportlibMigrationTests)
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 3987667bf98f by Nick Coghlan in branch 'default':
Take the first step in resolving the messy pkgutil vs importlib edge cases by
basing pkgutil explicitly on importlib, deprecating its internal import
emulation and
Nick Coghlan ncogh...@gmail.com added the comment:
OK, I think runpy and __main__.__loader__ are all sorted now. The relevant
runpy and command line script tests all check for the expected values, and I
added a couple of new tests to cover the -c and reading from stdin cases.
--
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15314
___
___
Python-bugs-list
Nick Coghlan ncogh...@gmail.com added the comment:
OK, the way I plan to tackle this is to actually redirect the pkgutil APIs to
importlib (rather than using the private import emulation).
The reason I'm going to tackle it like this is that there are some assumptions
pkgutil deals with that
Nick Coghlan ncogh...@gmail.com added the comment:
Oh, special - importlib.find_loader() currently expects every module to have a
__loader__ attribute, but there's at least one that doesn't: __main__.
Guess I'll be tweaking it to handle that case more gracefully after all :)
--
Nick Coghlan ncogh...@gmail.com added the comment:
Ah, __main__, thou art such a special beast.
Here's my current plan:
1. __main__ will be initialised with __loader__ set to BuiltinImporter. This
covers cases like the interactive prompt or execution of stdin where there is
no source code
Brett Cannon br...@python.org added the comment:
Ooh, first customer of importlib.find_loader()! Obviously if the API doesn't
work for you let me know since it's a 3.3 addition and can be tweaked to meet
your needs.
--
nosy: +brett.cannon
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15314
___
New submission from Nick Coghlan ncogh...@gmail.com:
There's some lingering weirdness in runpy due to its reliance on pkgutil's
import emulation (see #15272).
For 3.3, I'd like to explicitly switch runpy over to using importlib. This was
supposed to happen automatically, but the relevant API
13 matches
Mail list logo