larryhastings / appeal

Command-line parsing library for Python 3.
Other
122 stars 7 forks source link

Appeal uses equals-signs-in-f-strings, but that's a 3.8 feature and Appeal supports 3.6+ #7

Closed vsajip closed 1 year ago

vsajip commented 1 year ago

I just installed appeal 0.5.1 into a venv created using Python 3.7.4 on Windows (using pip install appeal). I can't seem to import it, and the error message makes no sense to me:

Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import appeal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<fstring>", line 1
    (options=)
            ^
SyntaxError: invalid syntax
>>>
larryhastings commented 1 year ago

Thanks for the report! This is fixed in 0.5.2. Appeal was using "fstrings-with-equals-signs" in a couple places, a syntax feature that wasn't added until Python 3.8:

https://docs.python.org/3/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging

I tested Appeal 0.5.2 with Python versions 3.6 to 3.11 inclusive, and it's passing the test suite again with all those versions.

larryhastings commented 1 year ago

Oops, actually, that's fixed in 0.5.3. (That change wasn't in 0.5.2.) D'oh!