Repository navigation
Closed
Labels
deferred-blockerinterpreter-core(Objects, Python, Grammar, and Parser dirs)stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement
Description
| BPO | 18864 |
|---|---|
| Nosy | @brettcannon, @terryjreedy, @ncoghlan, @larryhastings, @PCManticore, @ericsnowcurrently, @berkerpeksag, @phmc |
| Dependencies | |
| Files |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = 'https://github.com/ericsnowcurrently'
closed_at = <Date 2016-05-12.14:37:11.280>
created_at = <Date 2013-08-28.06:56:18.238>
labels = ['interpreter-core', 'deferred-blocker', 'type-feature', 'library']
title = 'Implementation for PEP 451 (importlib.machinery.ModuleSpec)'
updated_at = <Date 2016-05-12.14:37:11.278>
user = 'https://github.com/ericsnowcurrently'bugs.python.org fields:
activity = <Date 2016-05-12.14:37:11.278>
actor = 'eric.snow'
assignee = 'eric.snow'
closed = True
closed_date = <Date 2016-05-12.14:37:11.280>
closer = 'eric.snow'
components = ['Interpreter Core', 'Library (Lib)']
creation = <Date 2013-08-28.06:56:18.238>
creator = 'eric.snow'
dependencies = ['19697', '19700', '19701', '19703', '19704', '19705', '19706', '19707', '19708', '19709', '19710', '19711', '19712', '19713', '19714', '21098', '21099']
files = ['31959', '32381', '32457', '33073']
hgrepos = []
issue_num = 18864
keywords = ['patch']
message_count = 66.0
messages = ['196352', '198981', '201210', '201212', '201224', '201244', '201369', '201399', '201604', '201605', '201946', '202456', '202461', '202482', '202483', '202655', '202656', '202657', '202658', '202659', '202660', '202661', '202662', '202663', '202664', '202669', '202672', '202673', '202676', '202681', '202695', '202710', '202711', '202712', '202917', '202918', '203329', '203340', '203411', '203578', '203649', '203800', '203801', '203810', '203811', '203825', '203831', '203835', '203843', '205384', '205520', '205575', '205576', '205769', '205822', '205881', '207509', '207510', '210927', '210957', '215152', '221905', '221932', '222289', '236537', '265408']
nosy_count = 11.0
nosy_names = ['brett.cannon', 'terry.reedy', 'ncoghlan', 'larry', 'Arfrever', 'Claudiu.Popa', 'BreamoreBoy', 'python-dev', 'eric.snow', 'berker.peksag', 'pconnell']
pr_nums = []
priority = 'deferred blocker'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue18864'
versions = ['Python 3.4']Metadata
Metadata
Assignees
Labels
deferred-blockerinterpreter-core(Objects, Python, Grammar, and Parser dirs)stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement
Activity
ericsnowcurrently commentedon Aug 28, 2013
This ticket will track the implementation for PEP-451 (ModuleSpec). I'll have a patch up in the next couple days.
ericsnowcurrently commentedon Oct 5, 2013
Here's an initial patch. Some key things left to do:
Once that's squared away there are further things that will be addressed in new tickets (or at least separate patches). This includes:
ericsnowcurrently commentedon Oct 25, 2013
Here's a patch just for the changes to the import page in the language reference. It's not perfect, but should represent the target pretty closely.
ericsnowcurrently commentedon Oct 25, 2013
Let's try that again with the proper diff. :)
ncoghlan commentedon Oct 25, 2013
Thanks, that looks pretty good - so much less work for loaders to do.
After this, we may even be able to finally fix the circular import bug and the one where submodule imports succeed but the overall package import fails.
brettcannon commentedon Oct 25, 2013
I've added a review
ncoghlan commentedon Oct 26, 2013
Something else we may be able to fix (albeit probably not in 3.4): several of the issues noted in PEP-395 (since __main__.__spec__.name will give the real module name, even when __name__ is set to "__main__" or otherwise modified)
ericsnowcurrently commentedon Oct 26, 2013
Here's an update of the language reference patch based on Brett's comments.
ericsnowcurrently commentedon Oct 29, 2013
Here's an updated patch that implements the meat of the current PEP. Docs are still lacking and I could probably add a few more tests. Other key things left to do:
ericsnowcurrently commentedon Oct 29, 2013
This time against tip. :)
I should also point out that this patch is on top of the path in bpo-19413.
ericsnowcurrently commentedon Nov 1, 2013
Here's a new patch that is mostly up to date with the PEP. I still need to work on Docs and add more tests. There are a few failing tests (due to the recent reload patch) that I need to fix when I get a minute.
This patch also implements find_spec() on FileFinder and PathFinder. Left to do:
45 remaining items
ericsnowcurrently commentedon Dec 10, 2013
Here's a patch for adding a setter for ModuleSpec.has_location.
brettcannon commentedon Dec 10, 2013
LGTM
python-dev commentedon Dec 11, 2013
New changeset e961a166dc70 by Eric Snow in branch 'default':
Issue bpo-18864: Add a setter for ModuleSpec.has_location.
http://hg.python.org/cpython/rev/e961a166dc70
ericsnowcurrently commentedon Jan 7, 2014
About the only thing left for this ticket is to finish up writing a few tests and round out some documentation.
ericsnowcurrently commentedon Jan 7, 2014
There are a few lingering to-do comments that will need to be addressed as part of the remaining work:
Lib/test/test_importlib/extension/test_case_sensitivity.py:# XXX find_spec tests
Lib/test/test_importlib/extension/test_finder.py:# XXX find_spec tests
Lib/test/test_importlib/source/test_file_loader.py: mod = loader.load_module('_temp') # XXX
Lib/test/test_importlib/source/test_file_loader.py: # XXX Change to use exec_module().
Lib/test/test_importlib/test_windows.py: # XXX Need a test that finds the spec via the registry.
terryjreedy commentedon Feb 11, 2014
Failure with 3.4.0c1:
On the other hand, the test passes on a fresh debug build.
brettcannon commentedon Feb 11, 2014
Terry has admitted in other bugs he filed that he didn't use a fresh install location, so the test failure is most likely a red herring.
ericsnowcurrently commentedon Mar 29, 2014
I've gone ahead and moved all remaining work into separate issues. Once the 4 remaining sub-issues are resolved, this one can be closed. I've *finally* got a couple days free so I want to close this out. :)
BreamoreBoy commentedon Jun 29, 2014
Given that PEP-451 is listed in the "Finished PEPs (done, implemented in code repository)" section of the PEP index can we close this and associated issues out?
terryjreedy commentedon Jun 30, 2014
Dependencies 19711 and 21099 are still open.
BreamoreBoy commentedon Jul 4, 2014
I've asked for patch reviewss on the three dependencies outstanding, bpo-19711, bpo-19714 and bpo-21099.
BreamoreBoy commentedon Feb 24, 2015
I've asked for updates on the two remaining dependencies bpo-19711 and bpo-21099.
ericsnowcurrently commentedon May 12, 2016
The last dependencies have now been closed!