cbapi-python icon indicating copy to clipboard operation
cbapi-python copied to clipboard

[BUG] cbapi broken on Python 3.12

Open sim0nx opened this issue 10 months ago • 1 comments

I am seeing this behaviour on:

  • OS: Ubuntu
  • Carbon Black Product: CB API
  • Python Version: 3.12

Describe the bug Using cbapi breaks with an error while importing 'cbapi.six.moves'

Steps to Reproduce Steps to reproduce the behavior (Provide a log message if relevant):

  1. Install Python 3.12
  2. Install cbapi
  3. import cbapi

Python 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cbapi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/venv/lib/python3.12/site-packages/cbapi/__init__.py", line 12, in <module>
    from cbapi.response.rest_api import CbEnterpriseResponseAPI, CbResponseAPI
  File "/home/user/venv/lib/python3.12/site-packages/cbapi/response/__init__.py", line 5, in <module>
    from .models import (
  File "/home/user/venv/lib/python3.12/site-packages/cbapi/response/models.py", line 17, in <module>
    from cbapi.six.moves import urllib
ModuleNotFoundError: No module named 'cbapi.six.moves'

Expected behavior It should just work :-)

Could you please fix Python 3.12 compatibility

sim0nx avatar Apr 18 '24 10:04 sim0nx

Internal ticket: CRE-18007

averma-cb avatar May 30 '24 16:05 averma-cb

Is there any news on this issue?

ManofWax avatar Aug 22 '24 15:08 ManofWax

The changes are merged: https://github.com/carbonblack/cbapi-python/pull/329 @avanbrunt-cb do we know when tag: 1.7.11 (or 1.8) will be out?

averma-cb avatar Aug 22 '24 15:08 averma-cb

cbapi 2.0.0 has been released. Not sure how we missed the github release but check it out on pypi https://pypi.org/project/cbapi/

avanbrunt-cb avatar Aug 22 '24 16:08 avanbrunt-cb