opentok / Opentok-Python-SDK

OpenTok Python SDK
https://tokbox.com/developer/sdks/python/
MIT License
73 stars 83 forks source link

Poetry pulls down enum34 on Python 3.5+ (Please drop support for EOL Python versions) #176

Closed ryboe closed 3 years ago

ryboe commented 3 years ago
[tool.poetry]
name = "foo"
version = "0.1.0"
description = ""
authors = ["Someone <someone@example.com>"]

[tool.poetry.dependencies]
python = "3.9.0"
opentok = "2.10.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
$ python --version
Python 3.9.0
$ poetry install
...
Installing dependencies from lock file

Package operations: 13 installs, 0 updates, 0 removals

  • Installing pyasn1 (0.4.8)
  • Installing six (1.15.0)
  • Installing certifi (2020.11.8)
  • Installing chardet (3.0.4)
  • Installing ecdsa (0.14.1)
  • Installing idna (2.10)
  • Installing rsa (4.6)
  • Installing urllib3 (1.26.2)
  • Installing enum34 (1.1.10) <<<<<<<<<<<<<< DO NOT WANT
  • Installing python-jose (3.2.0)
  • Installing pytz (2020.4)
  • Installing requests (2.25.0)
  • Installing opentok (2.10.0)
...

enum34 is the source of a lot of grief and breakages for users of Python 3.5+. Unfortunately, poetry seems to have a bug reading Opentok's setup.py. It mistakenly thinks Opentok depends on enum34, even when the Python version is 3.5+.

I will open an issue about this on the poetry repo, but you could also help solve the problem by dropping support for old Python versions and removing enum34 from your setup.py. Python 3.5 and below have reached end-of-life. If anybody is stuck on an old version of Python, they're welcome to continue using Opentok 2.10.0 or below.

superdiana commented 3 years ago

Hello! thank you for pointing this out and apologies for the delay in responding. Taking a look as we are about to roll a new release.

ryboe commented 3 years ago

Thanks for the fix in #147! 🙏 ❤️ Any ETA on the next release?

ryboe commented 3 years ago
# pyproject.toml

[tool.poetry.dependencies]
opentok = { git = "https://github.com/opentok/Opentok-Python-SDK.git" }

Grabbing the latest commit removes the dependency on enum34, but cloning and building opentok from source is causing us lots of build failures. Can you please cut a new release soon? Installing from a wheel would prevent these failures.

Installing opentok (2.10.0 cad138e)
#15 65.15
#15 65.15   CalledProcessError
#15 65.15
#15 65.15   Command '['git', 'clone', '--recurse-submodules', 'https://github.com/opentok/Opentok-Python-SDK.git', '/usr/local/src/opentok']' returned non-zero exit status 128.
#15 65.15
#15 65.15   at ~/.poetry/lib/poetry/utils/_compat.py:218 in run
#15 65.21       214│                 raise
#15 65.22       215│             retcode = process.poll()
#15 65.22       216│             if check and retcode:
#15 65.22       217│                 raise CalledProcessError(
#15 65.22     → 218│                     retcode, process.args, output=stdout, stderr=stderr
#15 65.22       219│                 )
#15 65.22       220│         finally:
#15 65.22       221│             # None because our context manager __exit__ does not use them.
#15 65.22       222│             process.__exit__(None, None, None)
#15 65.23
superdiana commented 3 years ago

The release is coming next week!!

superdiana commented 3 years ago

@ryboe new release is out! thank you for your support! - It's a major release https://pypi.org/project/opentok/