Brett Cannon added the comment:
This has now been fixed in https://hg.python.org/cpython/rev/d9f71bc6d897 .
Thanks to everyone who helped with the bug report!
--
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
Quentin Pradet added the comment:
Martin, yes, I'd be glad to see a fix if it's not too complicated.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21049
___
Brett Cannon added the comment:
I'm already planning to look into this problem in issue #21052 so feel free to
follow over there.
--
superseder: - Consider dropping ImportWarning for empty sys.path_hooks and
sys.meta_path
___
Python tracker
Martin Panter added the comment:
Quentin, do you think this should be reopened?
Brett Cannon, I wonder if the only reason you closed this bug is because you
thought the scenario to trigger it is very unlikely. Considering it affected
someone else, and that there are other real-world triggers
Quentin Pradet added the comment:
I've also been affected by this when testing integration with a third-party
library (NLTK). NLTK does need to be fixed, but the ResourceWarning already say
so.
The new one-liner doesn't seem contrived to me.
--
nosy: +Quentin.Pradet
Martin Panter added the comment:
My original demonstration was distilled from a real world case. I get this
issue with other real world cases too, so I am expanding the title to reflect
what I think is going on. This problem seems to be caused by a ResourceWarning
triggered from a garbage