encode / apistar

The Web API toolkit. 🛠
https://docs.apistar.com
BSD 3-Clause "New" or "Revised" License
5.57k stars 411 forks source link

Dependency incompatible with Python 3.5 #654

Closed Lucidiot closed 5 years ago

Lucidiot commented 5 years ago

APIStar uses typesystem, which requires Python >=3.6, but it states it is compatible with 3.5+. When running anything APIStar-related in 3.5, I get errors about the use of f-strings, which weren't here in version 3.5.

Traceback (most recent call last):
  File "./patch.py", line 3, in <module>
    import apistar
  File "/usr/local/lib/python3.5/site-packages/apistar/__init__.py", line 9, in <module>
    from apistar.cli import cli
  File "/usr/local/lib/python3.5/site-packages/apistar/cli.py", line 11, in <module>
    from apistar.client import Client
  File "/usr/local/lib/python3.5/site-packages/apistar/client/__init__.py", line 1, in <module>
    from apistar.client.client import Client
  File "/usr/local/lib/python3.5/site-packages/apistar/client/client.py", line 4, in <module>
    import typesystem
  File "/usr/local/lib/python3.5/site-packages/typesystem/__init__.py", line 1, in <module>
    from typesystem.base import Message, ParseError, Position, ValidationError
  File "/usr/local/lib/python3.5/site-packages/typesystem/base.py", line 21
    return f"{class_name}(line_no={self.line_no}, column_no={self.column_no}, char_index={self.char_index})"
                                                                                                           ^
SyntaxError: invalid syntax
tomchristie commented 5 years ago

Gotcha.

it states it is compatible with 3.5+

Where do we have that - not obvious at first sight?

We ought to have a requirements up front on the README, and it oughta be 3.6+

Lucidiot commented 5 years ago

The only place where I found a 3.5 compatibility statement is on PyPI; there is a Python :: 3.5 classifier. I will make a pull request adding the correct requirements