This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Switch applicable importlib tests to use PEP 451 API
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.snow Nosy List: brett.cannon, eric.snow, ncoghlan, python-dev
Priority: normal Keywords: patch

Created on 2014-03-29 21:34 by eric.snow, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue21099-better-use-of-451-api.diff eric.snow, 2014-03-30 01:39 review
Messages (11)
msg215147 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2014-03-29 21:34
(from msg202657 in issue 18864)

A bunch of importlib (and other?) tests make direct calls to find_module(), find_loader(), or load_module().  These are still working, as expected.  However, we should probably either replace them or supplement them with equivalent tests that make use of specs directly.
msg215150 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-03-29 21:38
New tests please - we want to make sure these keep working unless/until we reach agreement to actually remove them, and I'd prefer not to raise any new barriers to migration from Python 2.6/7 until 3.6 at the earliest :)
msg215151 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2014-03-29 21:40
Agreed. :)
msg215161 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2014-03-30 01:39
Here's a patch.  In most spots I'm left things alone.

There is a comment in the docstring for test_abc.SourceOnlyLoaderTests about reload-related tests and module_for_loader (which is deprecated now).  I'm not going to worry about that for now.
msg222288 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-04 14:42
Can we have a patch review please as #18864 is dependent on this.
msg232567 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-12-12 17:36
Should this be closed, Eric?
msg236536 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-02-24 19:49
To echo Brett's question, should this be closed, Eric?
msg265282 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2016-05-10 22:24
Could I get a quick review on this.  There shouldn't be anything surprising or controversial here.  I'm pretty confident about the patch and it's pretty low-impact so if I don't hear back in the next day or two I'll merge it.

Note: the posted patch does not apply cleanly but the difference is cosmetic.
msg265283 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-05-10 22:35
I'll try to get to it today or tomorrow.
msg265347 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-05-11 20:22
Patch LGTM
msg265407 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-05-12 14:02
New changeset fceaa0dc715e by Eric Snow in branch 'default':
Issue #21099: Switch applicable importlib tests to use PEP 451 API.
https://hg.python.org/cpython/rev/fceaa0dc715e
History
Date User Action Args
2022-04-11 14:58:00adminsetgithub: 65298
2016-05-12 14:35:19eric.snowsetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.6, - Python 3.4, Python 3.5
2016-05-12 14:02:05python-devsetnosy: + python-dev
messages: + msg265407
2016-05-11 20:22:50brett.cannonsetmessages: + msg265347
2016-05-11 13:15:04BreamoreBoysetnosy: - BreamoreBoy
2016-05-10 22:35:21brett.cannonsetmessages: + msg265283
2016-05-10 22:24:09eric.snowsetmessages: + msg265282
2015-02-24 19:49:33BreamoreBoysetstatus: pending -> open

messages: + msg236536
2014-12-12 17:36:42brett.cannonsetstatus: open -> pending

messages: + msg232567
2014-07-04 14:42:38BreamoreBoysetnosy: + BreamoreBoy
messages: + msg222288
2014-03-30 01:39:57eric.snowsetfiles: + issue21099-better-use-of-451-api.diff
keywords: + patch
messages: + msg215161

stage: needs patch -> patch review
2014-03-29 21:40:07eric.snowsetmessages: + msg215151
2014-03-29 21:38:19ncoghlansetmessages: + msg215150
2014-03-29 21:35:54eric.snowlinkissue18864 dependencies
2014-03-29 21:34:35eric.snowcreate