Issue 12019: Dead or buggy code in importlib.test.main (original) (raw)

Created on 2011-05-06 16:08 by eric.araujo, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
dead-code-importlib-test-main-3.3.diff eric.araujo,2011-05-27 15:47 review
Messages (11)
msg135314 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-05-06 16:08
I was stealing importlib’s test/__main__ file for packaging (thanks!) and I noticed this bug thanks to pyflakes: “sep” is undefined. It looks like the bug hasn’t been noticed because it’s in a dead block that depends on __file__ containing '__pycache__'. Is this a leftover from a previous version of the PEP without __file__/__cached__ distinction? Or maybe __file__ is set to the pyc file for pyc-only imports?
msg137065 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-05-27 15:47
I read again the part of the PEP about __file__ and decided the code is a dead branch, so I removed it.
msg137721 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-06-06 00:32
Yeah, it's dead code so go ahead and rip it out.
msg137743 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-06 15:28
Is this minor cleanup, non-bugfix okay for 3.2?
msg137783 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-06-07 02:07
Sure, but I'm not even sure it's worth the hassle of dealing with the merge. If you want to put in the time then that's fine, but I don't think it's worth it.
msg137798 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-06-07 09:55
If it's a minor cleanup and not a bugfix, why should it go into a branch that receives bugfixes only?
msg137831 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-07 15:07
Brett: Merging is hardly a hassle for me, nor would it take any time in this case (non-conflicting changes are applied by Mercurial itself). I handle merges in projects that use multiple repositories, tons of clones, translation branches, so I’m a merge master :) Georg: Thanks for confirming it’s not okay, I got confused for a bit about general Python policy vs. stricter distutils policy. (I asked because I had set the 3.2 and 3.3 versions and Brett did not change them.)
msg137833 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-06-07 15:12
I don't think our policy is that strict, i.e. I wouldn't revert the change if it was already committed. But it's a bit slippery, and I'd rather have no behavior-changing "cleanups" end up in 3.2 originating in good intentions.
msg137834 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-07 15:13
Agreed; I didn’t mean to imply that strict was restrictive, but that it was safe.
msg137846 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-06-07 16:04
New changeset 5392be94ea65 by Éric Araujo in branch 'default': Kill dead code in importlib.test.__main__ (#12019, reviewed by Brett Cannon) http://hg.python.org/cpython/rev/5392be94ea65
msg137848 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-07 16:08
I checked the patch again with ./python -m importlib.test and ./python Lib/importlib/test and committed.
History
Date User Action Args
2022-04-11 14:57:17 admin set github: 56228
2011-06-07 16:08:17 eric.araujo set status: open -> closedresolution: fixedmessages: + stage: commit review -> resolved
2011-06-07 16:04:20 python-dev set nosy: + python-devmessages: +
2011-06-07 15:13:06 eric.araujo set messages: +
2011-06-07 15:12:04 georg.brandl set status: pending -> openmessages: +
2011-06-07 15:07:17 eric.araujo set status: open -> pendingmessages: + versions: - Python 3.2
2011-06-07 09:55:20 georg.brandl set nosy: + georg.brandlmessages: +
2011-06-07 02:07:40 brett.cannon set messages: +
2011-06-06 15:28:05 eric.araujo set messages: +
2011-06-06 00:32:02 brett.cannon set assignee: eric.araujomessages: +
2011-05-27 15:47:36 eric.araujo set keywords: + needs review, patchfiles: + dead-code-importlib-test-main-3.3.diffmessages: + stage: commit review
2011-05-06 16:08:27 eric.araujo create