[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-06-25 Thread Brett Cannon
Brett Cannon added the comment: The restriction of lazily loading built-ins and extensions is now lifted! -- status: open -> closed ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-06-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7af4b3ad75b7 by Brett Cannon in branch 'default': Issue #26186: Remove the restriction that built-in and extension https://hg.python.org/cpython/rev/7af4b3ad75b7 -- ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-20 Thread Brett Cannon
Brett Cannon added the comment: This has been resolved by removing the check (the docs have always said the method was ignored, so that will just continue). I also did separate commit to list that BuiltinImporter and ExtensionFileLoader won't work (they would need to be updated to return a

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f1e680896ef by Brett Cannon in branch '3.5': Issue #26186: Remove an invalid type check in https://hg.python.org/cpython/rev/9f1e680896ef New changeset 86fc6cdd65de by Brett Cannon in branch 'default': Merge for issue #26186

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-04 Thread Brett Cannon
Brett Cannon added the comment: My current plan is to simply remove the check in 3.5 -- the docs say it's ignored so I don't think it will hurt anything -- and add the warning I proposed in 3.6. What do you think, Antoine? -- ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way does this mean the LazyLoader won't work with ExtensionFileLoader? That would reduce its usefulness quite a bit. -- ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-04 Thread Brett Cannon
Brett Cannon added the comment: You're right, it won't work with extension modules based on how ExtensionFileLoader is structured. -- ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Just stumbled on this very issue while trying to use LazyLoader. -- nosy: +pitrou ___ Python tracker ___

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't know what the impact of the error is, but it seems like at least the default loader classes should be able to work with LazyLoader... -- ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-31 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-28 Thread Brett Cannon
Brett Cannon added the comment: I think I'm liking the following approach: if __debug__: hopefully_None = loader.create_module(spec) if hopefully_None is not None: warnings.warn("watch out!", ImportWarning) -- ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-23 Thread Brett Cannon
Brett Cannon added the comment: One way to possibly improve this is to remove the create_module() check and replace it with a warning if create_module() doesn't return None. Another option is to use an assert statement. The final option is to just drop the check entirely, although that can

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-23 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +eric.snow, ncoghlan ___ Python tracker ___ ___

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-23 Thread Brett Cannon
New submission from Brett Cannon: It was privately reported to me that importlib.util.LazyLoader rejects using importlib.machinery.SourceFileLoader (or at least _frozen_importlib.SourceFileLoader). At least a test should be added for LazyLoader to make sure it will happily accept

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-23 Thread Keith Dart
Changes by Keith Dart : -- nosy: +kdart ___ Python tracker ___ ___ Python-bugs-list