OK, I see what you mean with the import backup change now, though it seems like it changes the semantics of Python's import mechanism a bit...
But I still don't really get what information we'd gain from doing this. What call is being made and is failing is pretty obvious from the stacktrace. Thanks for your replies, anyway. /Geoff On Fri, Feb 21, 2020 at 12:25 PM Chris Angelico <ros...@gmail.com> wrote: > On Fri, Feb 21, 2020 at 8:58 PM Geoff Bache <geoff.ba...@gmail.com> wrote: > > > > But, as I say, I don't have the module loaded beforehand, so caching it > from sys.modules and restoring it afterwards won't be possible. > > Those lines go into the actual file you're importing. > > > Basically I'm looking for hints as to information about known problems > and whether this kind of thing is likely to work anyway, and also hints for > debugging - as in extracting more information about possible causes rather > than documenting the symptoms further. I think I already have a fairly good > overview of the symptoms. > > > > Yeah, changing the actual module that's being messed with might help > with that. I am kinda clutching at straws though. > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list