Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn when __loader__ != __spec__.loader #75735

Open
brettcannon opened this issue Sep 22, 2017 · 1 comment
Open

Warn when __loader__ != __spec__.loader #75735

brettcannon opened this issue Sep 22, 2017 · 1 comment
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir topic-importlib type-feature A feature request or enhancement

Comments

@brettcannon
Copy link
Member

BPO 31554
Nosy @warsaw, @brettcannon, @ncoghlan, @ericvsmith, @ericsnowcurrently

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 = None
closed_at = None
created_at = <Date 2017-09-22.18:42:23.496>
labels = ['3.7', 'type-feature', 'library']
title = 'Warn when __loader__ != __spec__.loader'
updated_at = <Date 2017-12-13.15:57:43.686>
user = 'https://github.com/brettcannon'

bugs.python.org fields:

activity = <Date 2017-12-13.15:57:43.686>
actor = 'eric.smith'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2017-09-22.18:42:23.496>
creator = 'brett.cannon'
dependencies = []
files = []
hgrepos = []
issue_num = 31554
keywords = []
message_count = 1.0
messages = ['302764']
nosy_count = 5.0
nosy_names = ['barry', 'brett.cannon', 'ncoghlan', 'eric.smith', 'eric.snow']
pr_nums = []
priority = 'low'
resolution = None
stage = 'test needed'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue31554'
versions = ['Python 3.7']

@brettcannon
Copy link
Member Author

There a couple of places where __loader__ is directly used (the biggest one probably being importlib.reload()). It would probably be good to warn when module.__loader__ != module.__spec__.loader like we do for __package__ to start transitioning people over to specs for accessing the loader instead of the direct module attribute.

@brettcannon brettcannon added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Sep 22, 2017
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir topic-importlib type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants