[issue42137] Prefer using __spec__ over module_repr() for ModuleType.__repr__

2021-03-24 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42137] Prefer using __spec__ over module_repr() for ModuleType.__repr__

2021-03-24 Thread Brett Cannon
Brett Cannon added the comment: New changeset 9cb31d671646a5ff0901f79d2d61022621447190 by Brett Cannon in branch 'master': bpo-42137: have ModuleType.__repr__ prefer __spec__ over module_repr() (GH-24953) https://github.com/python/cpython/commit/9cb31d671646a5ff0901f79d2d61022621447190

[issue42137] Prefer using __spec__ over module_repr() for ModuleType.__repr__

2021-03-22 Thread Brett Cannon
Brett Cannon added the comment: Meant to say, "existence of the _method_ isn't problematic". -- ___ Python tracker ___ ___

[issue42137] Prefer using __spec__ over module_repr() for ModuleType.__repr__

2021-03-20 Thread Brett Cannon
Change by Brett Cannon : -- keywords: +patch pull_requests: +23711 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24953 ___ Python tracker ___

[issue42137] Prefer using __spec__ over module_repr() for ModuleType.__repr__

2021-03-20 Thread Brett Cannon
Change by Brett Cannon : -- dependencies: -[importlib] deprecate module_repr() methods ___ Python tracker ___ ___ Python-bugs-list

[issue42137] Prefer using __spec__ over module_repr() for ModuleType.__repr__

2021-03-20 Thread Brett Cannon
Brett Cannon added the comment: Thinking about it more, raising ImportWarning (or DeprecationWarning) is unnecessarily noisy as the existence of the module isn't problematic, it just won't be used anymore in the future. So updating the code to use __spec__ first and then document in "What's