You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/benjaminp'closed_at=<Date2012-12-08.03:44:17.444>created_at=<Date2011-04-07.15:57:22.808>labels= ['easy', 'type-bug', 'expert-2to3']
title='2to3 does not correct "reload"'updated_at=<Date2013-12-24.02:44:06.577>user='https://github.com/tebeka'
Find a fixer for this attached. I really just did sed 's/intern/reload' fix_intern.py >fix_reload.py, but it seems to work. I didn't write any tests (I couldn't seem to find any for any other fixers).
tebeka commented on Apr 7, 2011
tebekamannequin
MannequinAuthor
More actions
Raymond: Sometimes I store configuration in Python files and would like to reload the configuration.
I sure didn't have anything to do with that file :)
BluePeppers commented on Jul 30, 2011
BluePeppersmannequin
Mannequin
More actions
Ah, that's my fault. As I mentioned, I simply replaced sys with imp and intern with reload from fix_intern.py. Seeing as the vast majority of the file was not modified, I didn't bother to change the copyright notices.
BreamoreBoy commented on Nov 4, 2012
BreamoreBoymannequin
Mannequin
More actions
Please find attached a new file with the copyright notice removed. Would someone like to review it please.
Could you try to share could with fix_intern? Maybe by moving some
things to fixer_utils.
Thanks for the suggestion. Here's a new patch. I'm not sure the name of the helper is correct.
python-dev commented on Dec 8, 2012
python-devmannequin
Mannequin
More actions
New changeset 3576c0c6f860 by Benjamin Peterson in branch 'default':
add fixer for reload() -> imp.reload() (closes bpo-11797)\n\nPatch by Laurie Clark-Michalek and Berker Peksag http://hg.python.org/cpython/rev/3576c0c6f860
Since this patch was applied, imp.reload has been deprecated in favor of importlib.reload. I don't know how we handle differences between python3 versions...is there anything that should be done here, or do we just use imp.reload even though it is deprecated in 3.4?
Activity
tebeka commentedon Apr 7, 2011
The following code is not changed by 2to3::
reload has moved to the imp module.
rhettinger commentedon Apr 7, 2011
This should get fixed, but I'm *really* curious about what kind of code actually needs to do this ;-)
BluePeppers commentedon Apr 7, 2011
Find a fixer for this attached. I really just did sed 's/intern/reload' fix_intern.py >fix_reload.py, but it seems to work. I didn't write any tests (I couldn't seem to find any for any other fixers).
tebeka commentedon Apr 7, 2011
Raymond: Sometimes I store configuration in Python files and would like to reload the configuration.
rhettinger commentedon Apr 7, 2011
Miki: That's a really great use case. Thanks.
Bluehorn commentedon Jun 14, 2011
The other use case I see is to reload a module during debugging after changing the code. This is especially useful for big GUI applications.
merwok commentedon Jul 26, 2011
File looks good, although I’m not sure about the “Copyright 2006 Georg Brandl” line. I also don’t know if stable branches can get this fix.
birkenfeld commentedon Jul 30, 2011
I sure didn't have anything to do with that file :)
BluePeppers commentedon Jul 30, 2011
Ah, that's my fault. As I mentioned, I simply replaced sys with imp and intern with reload from fix_intern.py. Seeing as the vast majority of the file was not modified, I didn't bother to change the copyright notices.
BreamoreBoy commentedon Nov 4, 2012
Please find attached a new file with the copyright notice removed. Would someone like to review it please.
merwok commentedon Nov 4, 2012
FixIntern → FixReload
merwok commentedon Nov 4, 2012
More importantly, tests would be great.
berkerpeksag commentedon Nov 23, 2012
Here's a patch that adds tests and updates the documentation.
benjaminp commentedon Nov 30, 2012
Thanks for the patch. Could you try to share could with fix_intern? Maybe by moving some things to fixer_utils.
berkerpeksag commentedon Dec 6, 2012
Thanks for the suggestion. Here's a new patch. I'm not sure the name of the helper is correct.
python-dev commentedon Dec 8, 2012
New changeset 3576c0c6f860 by Benjamin Peterson in branch 'default':
add fixer for reload() -> imp.reload() (closes bpo-11797)\n\nPatch by Laurie Clark-Michalek and Berker Peksag
http://hg.python.org/cpython/rev/3576c0c6f860
bitdancer commentedon Dec 24, 2013
Since this patch was applied, imp.reload has been deprecated in favor of importlib.reload. I don't know how we handle differences between python3 versions...is there anything that should be done here, or do we just use imp.reload even though it is deprecated in 3.4?