team-telnyx / telnyx-python

Python SDK for the Telnyx API
MIT License
49 stars 16 forks source link

Telnyx broken on Python 3.12 due to outdated six module #73

Closed popotam closed 8 months ago

popotam commented 1 year ago

Checked on Python 3.12 and telnyx 1.5.0 and 2.0.0

$ python -c "import telnyx"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/booksy/.local/lib/python3.12/site-packages/telnyx/__init__.py", line 5, in <module>
    from telnyx.api_resources import *  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/booksy/.local/lib/python3.12/site-packages/telnyx/api_resources/__init__.py", line 3, in <module>
    from telnyx.api_resources.access_control_ip import AccessControlIP
  File "/home/booksy/.local/lib/python3.12/site-packages/telnyx/api_resources/access_control_ip.py", line 3, in <module>
    from telnyx.api_resources.abstract import (
  File "/home/booksy/.local/lib/python3.12/site-packages/telnyx/api_resources/abstract/__init__.py", line 3, in <module>
    from telnyx.api_resources.abstract.api_resource import APIResource
  File "/home/booksy/.local/lib/python3.12/site-packages/telnyx/api_resources/abstract/api_resource.py", line 4, in <module>
    from telnyx.six.moves.urllib.parse import quote_plus
ModuleNotFoundError: No module named 'telnyx.six.moves'

This is a known issue with outdated versions of six Telnyx bundles six==1.1.0 released in 2017 :) The issue was fixed in six==1.6.0

Please update the bundled version of six or even better switch to requirements.txt and proper dependency management.

popotam commented 1 year ago

Related issue #72

michaelshann0n2 commented 11 months ago

I updated my version of python to python-3.9.18 and it worked newest python version threw the same error.

ADandyGuyInSpace commented 8 months ago

Resolved with latest update