googlecolab / jupyter_http_over_ws

Apache License 2.0
267 stars 56 forks source link

enum34 is being installed on Python 3, sometimes breaking other package installs #16

Closed itamarst closed 4 years ago

itamarst commented 4 years ago
  1. enum34 isn't needed on Python 3.6 or later, and is incompatible (it doesn't include enum.IntFlag).
  2. The decision whether to install it is made via an if statement in setup.py.
  3. The currently released universal wheel are generated by Python 2, so enum34 is always installed.
  4. Code that relies on enum.IntFlag can then fail to install, or possibly even run.

Solving this:

  1. The correct way to have conditional installs is via environment markers: https://www.python.org/dev/peps/pep-0508/#environment-markers
  2. Alternatively, you could have a wheel for Python 2 and a wheel for Python 3.
craigcitro commented 4 years ago

Thanks for the report! Yep, this is a bug; fixing now, will work on cutting a new release in the next day or so.

Internal tracking: b/151315211

craigcitro commented 4 years ago

Actually, I went ahead and cut it now -- fix is in, confirmed it worked in a local virtualenv.

Thanks again!