msg133223 - (view) |
Author: Miki Tebeka (tebeka) * |
Date: 2011-04-07 15:57 |
The following code is not changed by 2to3:: import os reload(os) reload has moved to the imp module. |
|
|
msg133224 - (view) |
Author: Raymond Hettinger (rhettinger) *  |
Date: 2011-04-07 16:15 |
This should get fixed, but I'm *really* curious about what kind of code actually needs to do this ;-) |
|
|
msg133249 - (view) |
Author: Laurie Clark-Michalek (BluePeppers) |
Date: 2011-04-07 19:39 |
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). |
|
|
msg133254 - (view) |
Author: Miki Tebeka (tebeka) * |
Date: 2011-04-07 20:39 |
Raymond: Sometimes I store configuration in Python files and would like to reload the configuration. |
|
|
msg133258 - (view) |
Author: Raymond Hettinger (rhettinger) *  |
Date: 2011-04-07 21:01 |
Miki: That's a really great use case. Thanks. |
|
|
msg138350 - (view) |
Author: Torsten Landschoff (torsten) * |
Date: 2011-06-14 21:26 |
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. |
|
|
msg141156 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-07-26 12:57 |
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. |
|
|
msg141429 - (view) |
Author: Georg Brandl (georg.brandl) *  |
Date: 2011-07-30 07:10 |
I sure didn't have anything to do with that file :) |
|
|
msg141452 - (view) |
Author: Laurie Clark-Michalek (BluePeppers) |
Date: 2011-07-30 20:32 |
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. |
|
|
msg174749 - (view) |
Author: Mark Lawrence (BreamoreBoy) * |
Date: 2012-11-04 03:56 |
Please find attached a new file with the copyright notice removed. Would someone like to review it please. |
|
|
msg174750 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2012-11-04 04:14 |
FixIntern → FixReload |
|
|
msg174751 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2012-11-04 04:14 |
More importantly, tests would be great. |
|
|
msg176162 - (view) |
Author: Berker Peksag (berker.peksag) *  |
Date: 2012-11-23 10:19 |
Here's a patch that adds tests and updates the documentation. |
|
|
msg176718 - (view) |
Author: Benjamin Peterson (benjamin.peterson) *  |
Date: 2012-11-30 21:08 |
Thanks for the patch. Could you try to share could with fix_intern? Maybe by moving some things to fixer_utils. |
|
|
msg177041 - (view) |
Author: Berker Peksag (berker.peksag) *  |
Date: 2012-12-06 14:20 |
> 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. |
|
|
msg177143 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-12-08 03:44 |
New changeset 3576c0c6f860 by Benjamin Peterson in branch 'default': add fixer for reload() -> imp.reload() (closes #11797)\n\nPatch by Laurie Clark-Michalek and Berker Peksag http://hg.python.org/cpython/rev/3576c0c6f860 |
|
|
msg206884 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2013-12-24 02:44 |
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? |
|
|