Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 2 SyntaxError in 3.4.0 and 3.4.1 #751

Closed
chrisburr opened this issue Apr 6, 2020 · 4 comments · Fixed by #752
Closed

Python 2 SyntaxError in 3.4.0 and 3.4.1 #751

chrisburr opened this issue Apr 6, 2020 · 4 comments · Fixed by #752
Labels

Comments

@chrisburr
Copy link

In ad1e55e a keyword argument was added in combination with *specs. This Syntax is not supported in Python 2 therefore causing:

   File "/root/.local/lib/python2.7/site-packages/gspread/__init__.py", line 16, in <module>
    from .client import Client
  File "/root/.local/lib/python2.7/site-packages/gspread/client.py", line 16, in <module>
    from .models import Spreadsheet
  File "/root/.local/lib/python2.7/site-packages/gspread/models.py", line 1276
    def sort(self, *specs, range=None):
                               ^
SyntaxError: invalid syntax

This can also be seen in the CI for that commit: https://travis-ci.org/github/burnash/gspread/jobs/471597434?utm_medium=notification&utm_source=github_status

Dropping Python 2 support is entirely reasonable, but if it's intentional the metadata in setup.py should be updated to match. It would also be nice to mention it in the 3.4.0 release notes so it's clear what version constraint should be used.

@burnash burnash added the Bug label Apr 6, 2020
@burnash
Copy link
Owner

burnash commented Apr 6, 2020

Thanks for spotting this! No, it's not intentional, I've overlooked this.

gspread is not dropping Python 2 support until the next major release.

@burnash
Copy link
Owner

burnash commented Apr 6, 2020

I'll release a fix soon. Please stay tuned.

burnash added a commit that referenced this issue Apr 6, 2020
Python 2 SyntaxError in models.py
burnash added a commit that referenced this issue Apr 6, 2020
Python 2 SyntaxError in models.py
@chrisburr
Copy link
Author

Thank you for the extremely quick fix!

@burnash
Copy link
Owner

burnash commented Apr 6, 2020

You're welcome. It actually owes to the precision of the bug report ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants