Syntax error in slugify/slugify.py
Closed this issue · 5 comments
Hello,
The current master branch (commit c096bcd)
gives a syntax error in slugify/slugify.py
File ".../site-packages/slugify/slugify.py", line 69
replacements: typing.Iterable[typing.Iterable[str]] = ()):
^
SyntaxError: invalid syntax
Have a good day
Could you indicate the python version you are using ?
@mrezzamoradi could you tract this issue? typing
was introduced during the last PR.
@un33k This change was added to the staging branch a year ago in this commit. Still, it should be fine with Python >= 3.6
What version of Python are you using @janderson-atb-potsdam ?
Python 2.7
Perhaps you could put in a check that the Python version meets the minimum requirement when the slugify module is imported?
Sorry for wasting your time on something like this. I am trying to install a docker container on a server, and it looks like something inside of that is pulling the most recent version of slugify, even though it is still running Python 2.7. I will try to trace this back up the chain and file a bug report to the package repository that does this.
@janderson-atb-potsdam it's fine, don't worry about our time.
@un33k we can remove this type hinting and improve the docstring instead if we want to keep supporting python 2. what do you think?
@mrezzamoradi It seems that many projects are using the latest version without pinning down the specific version.
I agree, that we improve the docstring for now, and remove the type hinting. At some point we will do a major release and bring types back.
Here is another related issue for your ref: #112.
Please kindly go ahead with your recommendation.