Datatamer / tamr-client

Programmatically interact with Tamr
https://tamr-client.readthedocs.io
Apache License 2.0
11 stars 25 forks source link

Python version (and any other requirements) should be specified more visibly #33

Closed nsylv closed 5 years ago

nsylv commented 5 years ago

Got the following error after running the quickstart example in the docs:

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from tamr_unify_client import Client
  File "/home/nikki/.local/lib/python2.7/site-packages/tamr_unify_client/__init__.py", line 1, in <module>
    from tamr_unify_client.client import Client
  File "/home/nikki/.local/lib/python2.7/site-packages/tamr_unify_client/client.py", line 69
    return f"{method} {url} : {response.status_code}"
                                                    ^
SyntaxError: invalid syntax

The issue is that I'm running python 2.7, but 3.6+ is required. Maybe we could add a requirements section to the docs and github to help make this more visible?

pcattori commented 5 years ago

Currently, the Python version is specified in 3 places:

1) README badge 2) PyPI page in the Classifiers section 3) .travis.yml / Travis CI tests

1 & 2 are both derived from the classifiers specified in setup.py and are the canonical answer for what we have committed to and should be supporting.

3 is what versions of Python we actually test.

We don't foresee any cases where those 3 shouldn't be the same, but maybe for test perf we might not test against a specific Python version if other tests against previous/later versions give us confidence that that specific version will work (e.g. if tests pass for 3.4 and 3.6, I don't think we need to test 3.5).


We could add a "Requirements" section to the installation instructions specifying the compatible Python versions to make it more visible.

pcattori commented 5 years ago

58 adds a Python compatibility message at the top of the installation docs.

40 prevents pip install tamr-unify-client from installing tamr-unify-client on incompatible Python versions. NOTE: this only affects version 0.3.0 and newer. E.g. trying to pip install tamr-unify-client from Python2.7 will result in tamr-unify-client version 0.2.0 being installed.