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
from future.standard_library import hooks
with hooks():
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen, Request
from urllib.error import HTTPError
This code made from mymodule import * fail. That is, it runs, but nothing gets imported into the module running that, as if mymodule is empty. Later calls to from mymodule import *, e.g. in a debuger, do work. My guess is the issue is something to do with copying and then re-inserting stuff from sys.modules that the install_hooks-related code does; probably modules are being copied at the wrong time, when they're still half-empty or something.
The text was updated successfully, but these errors were encountered:
itamarst
changed the title
hooks breaks from x import *hooks breaks from x import * (0.15.2)
Sep 8, 2016
Thanks for the feedback. I have seen this before too during development of some modules in future.backports, but it was hard to reproduce for me too. I ended up removing the use of hooks. It may be time to mark the hooks interface as deprecated.
Meanwhile, please let us know if you succeed in reproducing it reliably.
This code made
from mymodule import *
fail. That is, it runs, but nothing gets imported into the module running that, as ifmymodule
is empty. Later calls tofrom mymodule import *
, e.g. in a debuger, do work. My guess is the issue is something to do with copying and then re-inserting stuff fromsys.modules
that theinstall_hooks
-related code does; probably modules are being copied at the wrong time, when they're still half-empty or something.The text was updated successfully, but these errors were encountered: