Closed VmirGerts closed 6 months ago
Hi @VmirGerts, this quarter we are planning on a new beta release for the Python SDK with updated support for Python 3.9 and hope to resolve this issue as we are removing six.py
dependency. Please watch for updates here.
Hi @VmirGerts Sorry for the delay, we have published a new version of Python SDK v2.0.0 with Python v3.7+ support. Request you to use the latest SDK and let us know if the issue is resolved. Thanks
Hi @ashah-splunk , thank you for the update! I can confirm that the issue is fixed now.
Btw, just for the purpose of completeness: I realized that one could just run python -Werror -c "import splunklib"
to reproduce the error. So creating a test file was not necessary.
Describe the bug Starting from python version "3.10", running
pytest -W error
with a test file which imports splunklib produces following ImportWarning (interpreted as an error due to the "-W error" flag):E ImportWarning: _SixMetaPathImporter.find_spec() not found; falling back to find_module()
(see full log below)To Reproduce Note: the steps 1 and 3 are only necessary because Ubuntu20.04 does not provide python3.10 out of the box.
def test_splunklib(): pass
Expected behavior No ImportWarning
Logs or Screenshots Complete log:
SDK (please complete the following information):
Fix suggestion
Update the
six.py
with the newer version from the official repo: https://github.com/benjaminp/six/blob/master/six.py The newer version provides thefind_spec()
function.