Werkzeug: SyntaxError on python2.7.5 in 0.15.3

Created on 15 May 2019  ·  10Comments  ·  Source: pallets/werkzeug

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.

bug routing

Most helpful comment

Released 0.15.4

All 10 comments

@asottile

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

I recommend adding 2.7.5 to your tox.ini

On Tue, May 14, 2019, 20:17 Anthony Sottile notifications@github.com
wrote:

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


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pallets/werkzeug/issues/1544?email_source=notifications&email_token=AIQ6EKRWNORHHCPG3IJFHSLPVNQBFA5CNFSM4HM6OKBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVNHJKI#issuecomment-492467369,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIQ6EKQXWOD2YAUB6OIKH63PVNQBFANCNFSM4HM6OKBA
.

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.

True for the most part, but imo the versions that ship with CentOS and are
in epel are good to have just because they're the ones commonly in usage.

On Tue, May 14, 2019, 20:22 David Lord notifications@github.com wrote:

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.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pallets/werkzeug/issues/1544?email_source=notifications&email_token=AIQ6EKXAK3RPZGGD6XCUJELPVNQUVA5CNFSM4HM6OKBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVNHRCI#issuecomment-492468361,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIQ6EKS2YXURY5X57JVH2JTPVNQUVANCNFSM4HM6OKBA
.

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

Makes sense. Forget I asked.

On Tue, May 14, 2019, 20:25 Anthony Sottile notifications@github.com
wrote:

1545 https://github.com/pallets/werkzeug/pull/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


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pallets/werkzeug/issues/1544?email_source=notifications&email_token=AIQ6EKQDGGQCHU43MU6FZS3PVNQ7RA5CNFSM4HM6OKBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVNHVIA#issuecomment-492468896,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIQ6EKVJQSGXPAKZE375SQ3PVNQ7RANCNFSM4HM6OKBA
.

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

Released 0.15.4

That was fast! thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miki725 picture miki725  ·  10Comments

androiddrew picture androiddrew  ·  14Comments

asottile picture asottile  ·  11Comments

sorenh picture sorenh  ·  4Comments

davidism picture davidism  ·  9Comments