New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResourceWarnings in py3 during test #86
Comments
Because the connection is only conceptual, it does not need to be closed. The WBEMConnection object will be garbage collected once unused, but that does not matter for that. |
Note that with python 3, the run_cim_operations.py test repeatedly reports: timeout=self.timeout) Which is where I figured out that there was no timeout. |
In retrospect this may be a more serious problem than I originally thought but not sure yet. Note that we are running tests with timeout = 0 at this point |
Ok. The discussion in this issue of the I don't think we want to explicitly destroy the socket after each CIM operation; that would be an efficiency problem. Maybe you are right and an explicit |
Most other platforms have a close and that seems logical. I agree. This is really a 0.9.0 issue and should not be 0.8.0 |
Moving to 0.9.0. |
Discussion point: The |
What we do here depends on the package we use in the future. If we go to requests, Andy's point above is correct. Left open until we pick next ssl/ http package to work with |
This issue waits for the decision to move or not to move to using the requests package (see issue #280). |
This issue needs to be re-evaluated with the current master version (which is based on the requests package). |
The current master branch (close to 1.0.0 final) shows the following ResourceWarnings during test, on Python 3.8 with latest package levels. They are all about unclosed files; the earlier open sockets warnings are gone since we moved to use 'requests'.
|
PR #2488 fixed a ResourceWarning for not closing a MOF log file. With the current master, we still have the following ResourceWarnings:
|
PR #2496 fixes the ResourceWarning for the test_mof_compiler.py cases. That leaves the following cases, all related to logging:
Fixing the cases related to logging requires some thought:
|
While probably not critical, there is no way I could see to disconnect a connection when finished.
Andy: Generalized the issue from ResourceWarnings about open sockets / WBEMConnection has no close() to cover all ResourceWarnings during test.
The text was updated successfully, but these errors were encountered: