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: Tools/i18n/pygettext.py: replace deprecated imp module with importlib
Type: enhancement Stage: patch review
Components: Demos and Tools Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, brett.cannon, eric.snow, ezio.melotti, ncoghlan, pitrou, python-dev, serhiy.storchaka, supriyanto maftuh, vstinner
Priority: normal Keywords: patch

Created on 2016-03-25 10:50 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pygettext_imp.patch vstinner, 2016-03-25 10:50 review
Messages (6)
msg262420 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-03-25 10:50
Attached patch replaces the imp module with importlib in Tools/i18n/pygettext.py.

Please review carefully, it looks like the code getting the filename of a Python module is not tested by Lib/test/test_tools.py :-/
msg262644 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-03-30 01:18
See also the issue #20021 '"modernize" makeopcodetargets.py"' (now closed).
msg263256 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-04-12 15:47
Can someone please review pygettext_imp.patch?

(I send a ping since Roundup email notifications were broken recently.)
msg263264 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-04-12 16:35
pygettext_imp.patch looks good to me. I left a comment on Rietveld.
msg263266 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-04-12 16:46
New changeset cd03ff74eaea by Victor Stinner in branch 'default':
Update pygettext.py to get ride of imp
https://hg.python.org/cpython/rev/cd03ff74eaea
msg263267 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-04-12 16:47
> pygettext_imp.patch looks good to me.

Thanks for the review.

> I left a comment on Rietveld.

Oops, I added it but then inlined the function in caller sites. I removed the now empty function :-)
History
Date User Action Args
2022-04-11 14:58:29adminsetgithub: 70826
2016-04-12 19:06:40zach.waresethgrepos: - hgrepo340
2016-04-12 16:47:15vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg263267
2016-04-12 16:46:19python-devsetnosy: + python-dev
messages: + msg263266
2016-04-12 16:35:17berker.peksagsetmessages: + msg263264
2016-04-12 16:30:27berker.peksagsetstage: patch review
type: compile error -> enhancement
components: - Unicode, Benchmarks
versions: - Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5
2016-04-12 15:52:45supriyantomaftuhsetversions: + Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5
nosy: + ezio.melotti, pitrou, supriyanto maftuh

hgrepos: + hgrepo340
components: + Demos and Tools, Unicode, Benchmarks
type: compile error
2016-04-12 15:47:14vstinnersetmessages: + msg263256
2016-03-30 01:18:23vstinnersetnosy: + berker.peksag, serhiy.storchaka
messages: + msg262644
2016-03-25 10:50:05vstinnercreate