msg135314 - (view) |
Author: Éric Araujo (eric.araujo) *  |
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) *  |
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) *  |
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) *  |
Date: 2011-06-06 15:28 |
Is this minor cleanup, non-bugfix okay for 3.2? |
|
|
msg137783 - (view) |
Author: Brett Cannon (brett.cannon) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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)  |
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) *  |
Date: 2011-06-07 16:08 |
I checked the patch again with ./python -m importlib.test and ./python Lib/importlib/test and committed. |
|
|