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: Dead or buggy code in importlib.test.__main__
Type: Stage: resolved
Components: Tests Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: barry, brett.cannon, eric.araujo, georg.brandl, python-dev
Priority: normal Keywords: needs review, patch

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:17adminsetgithub: 56228
2011-06-07 16:08:17eric.araujosetstatus: open -> closed
resolution: fixed
messages: + msg137848

stage: commit review -> resolved
2011-06-07 16:04:20python-devsetnosy: + python-dev
messages: + msg137846
2011-06-07 15:13:06eric.araujosetmessages: + msg137834
2011-06-07 15:12:04georg.brandlsetstatus: pending -> open

messages: + msg137833
2011-06-07 15:07:17eric.araujosetstatus: open -> pending

messages: + msg137831
versions: - Python 3.2
2011-06-07 09:55:20georg.brandlsetnosy: + georg.brandl
messages: + msg137798
2011-06-07 02:07:40brett.cannonsetmessages: + msg137783
2011-06-06 15:28:05eric.araujosetmessages: + msg137743
2011-06-06 00:32:02brett.cannonsetassignee: eric.araujo
messages: + msg137721
2011-05-27 15:47:36eric.araujosetkeywords: + needs review, patch
files: + dead-code-importlib-test-main-3.3.diff
messages: + msg137065

stage: commit review
2011-05-06 16:08:27eric.araujocreate