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

SyntaxError on python2.7.5 in 0.15.3 #1544

Closed
golf-player opened this issue May 14, 2019 · 10 comments
Closed

SyntaxError on python2.7.5 in 0.15.3 #1544

golf-player opened this issue May 14, 2019 · 10 comments
Milestone

Comments

@golf-player
Copy link

Traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/werkzeug/routing.py", line 948
    exec(code, globs, locs)
SyntaxError: unqualified exec is not allowed in function '_compile_builder' it contains a nested function with free variables

I haven't dug too deep into this, but I suspect it's the comprehensions which, in python2.7.5, are treated as subfunctions https://stackoverflow.com/a/52498591/8826764

python2.7.5 is important to support as it's the default python version shipped with centos7, and we're not at EOL quite yet.

I'll have time on the weekend to make an MR for this if that's OK with y'all.

If not, please change the setup python_requires to require a higher version of python.

@golf-player golf-player changed the title SyntaxError on python2.7.5 SyntaxError on python2.7.5 in 0.15.3 May 14, 2019
@davidism
Copy link
Member

@asottile

@davidism davidism added this to the 0.15.4 milestone May 15, 2019
@asottile
Copy link
Contributor

should be an easy fix, let me see what I can do here, I've never seen this error before though!

@golf-player
Copy link
Author

golf-player commented May 15, 2019 via email

@davidism
Copy link
Member

It wouldn't do any good, most people don't have 2.7.5 installed, adding an entry to tox wouldn't solve that. Additionally we don't have unlimited resources to check every patch version of every Python on CI. At some point we have to assume people install patches.

@golf-player
Copy link
Author

golf-player commented May 15, 2019 via email

@asottile
Copy link
Contributor

#1545 has a fix, wasn't too difficult. tox both doesn't support 3-number versions and doens't help you install that version of python.

Neither travis-ci nor azure pipelines ship with that old of a python version either -- we would have to do some complex docker trickery to end up with that version which simply isn't worth it for a soon-dead version of python

@golf-player
Copy link
Author

golf-player commented May 15, 2019 via email

@asottile
Copy link
Contributor

nah it's fine <3 -- good thought on putting some testing in place to prevent regressions, it's just prohibitively difficult in this situation

@davidism
Copy link
Member

Released 0.15.4

@golf-player
Copy link
Author

That was fast! thanks!

ajdavis added a commit to ajdavis/proporti.onl that referenced this issue May 24, 2020
Avoid syntax error on old Python:
pallets/werkzeug#1544
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants