I keep encountering a particular `ResourceWarning: unclosed file
<_io.BufferedRandom` in my test suite that I can not track down. I'm
hoping someone else may have an idea:
* In a suite of 10+ test classes, it only happens when 2 particular classes
are run consecutively and in a particular order. It does not happen in the
inverse.
* this happens in a testapp setup, on the consecutive setup
* the error happens in this stack:
pyramid.paster.get_appsettings("test.ini")
...
plaster.loaders.find_loader()
It seems to trigger right after the final `return [EntryPointLoaderInfo...]
The error is also coming from `packaging/version.py`
site-packages/pkg_resources/_vendor/packaging/version.py:141:
ResourceWarning: unclosed file <_io.BufferedRandom name=5>
and is in the _cmpkey function:
release = tuple(
reversed(list(
itertools.dropwhile(
lambda x: x == 0,
reversed(release),
)
))
)
I can't seem to recreate this, and I can't pinpoint things further to fix.
It happens somewhere in the pyramid/plaster/paste configuration.
Does this situation look familiar to anyone? This makes no sense. I have
a small hope that someone has experienced this before and knows where I
should be focusing my efforts.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pylons-discuss/b109be13-a837-48b0-8ca7-6c061396d6d8%40googlegroups.com.