[issue42137] Raise an ImportWarning for calling module_repr() on loaders

2021-03-20 Thread Brett Cannon


Brett Cannon  added the comment:

Should try to use __spec__ first, but if it isn't set then fall back on 
module_repr() and raise an ImportWarning. See 
Lib/importlib/_bootstrap.py:_module_repr.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42137] Raise an ImportWarning for calling module_repr() on loaders

2020-10-23 Thread Brett Cannon


Change by Brett Cannon :


--
dependencies: +[importlib] deprecate module_repr() methods

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42137] Raise an ImportWarning for calling module_repr() on loaders

2020-10-23 Thread Brett Cannon


New submission from Brett Cannon :

Once all traces of module_repr() are gone, raise an `ImportWarning` when using 
`module_repr()`.

Once this is implemented and has been out in the wild for a sufficient amount 
of time, it should be switching to a DeprecationWarning and then the fallback 
eventually removed.

--
components: Interpreter Core
messages: 379496
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Raise an ImportWarning for calling module_repr() on loaders
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com