A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-January/123524.html below:

[Python-Dev] is this the fault of import_fresh_module or pickle?

[Python-Dev] is this the fault of import_fresh_module or pickle? [Python-Dev] is this the fault of import_fresh_module or pickle?Stefan Krah stefan at bytereef.org
Tue Jan 8 17:58:29 CET 2013
Eli Bendersky <eliben at gmail.com> wrote:
> On Tue, Jan 8, 2013 at 8:05 AM, Stefan Krah <stefan at bytereef.org> wrote:
> 
>     pickle always looks up sys.modules['xml.etree.ElementTree']. Perhaps we
>     could improve something, but this requirement is rather special; personally
>     I'm okay with switching sys.modules explicitly in the tests, because that
>     reminds me of what pickle does.
> 
> 
> Wouldn?t it be be better if import_fresh_module or some alternative function
> could do that for you? I mean, wipe out the import cache for certain modules I
> don't want to be found?

For a single test, perhaps. ContextAPItests.test_pickle() from test_decimal
would look quite strange if import_fresh_module was used repeatedly.


Stefan Krah


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4