plone / plone.protect

HTTP protection utilities for the Plone CMS
https://pypi.org/project/plone.protect/
7 stars 8 forks source link

SyntaxError: unqualified exec is not allowed in function '__call__' it contains a nested function with free variables #75

Open zopyx opened 6 years ago

zopyx commented 6 years ago

My Travis testrunner for zopyx.plone.persistentlogger suddenly fails with plone.protect 3.1.3:

https://travis-ci.org/zopyx/zopyx.plone.persistentlogger/jobs/379640548


odule: zopyx.plone.persistentlogger.tests.test_logger
Traceback (most recent call last):
  File "/home/travis/build/zopyx/zopyx.plone.persistentlogger/zopyx/plone/persistentlogger/tests/test_logger.py", line 12, in <module>
    from .base import TestBase
  File "/home/travis/build/zopyx/zopyx.plone.persistentlogger/zopyx/plone/persistentlogger/tests/base.py", line 11, in <module>
    import plone.api
  File "/home/travis/build/zopyx/zopyx.plone.persistentlogger/eggs/plone.api-1.8.3-py2.7.egg/plone/api/__init__.py", line 6, in <module>
    from plone.api import group
  File "/home/travis/build/zopyx/zopyx.plone.persistentlogger/eggs/plone.api-1.8.3-py2.7.egg/plone/api/group.py", line 7, in <module>
    from plone.api.user import get as user_get
  File "/home/travis/build/zopyx/zopyx.plone.persistentlogger/eggs/plone.api-1.8.3-py2.7.egg/plone/api/user.py", line 16, in <module>
    from Products.PlonePAS.interfaces.plugins import ILocalRolesPlugin
  File "/home/travis/build/zopyx/zopyx.plone.persistentlogger/eggs/Products.PlonePAS-5.0.15-py2.7.egg/Products/PlonePAS/__init__.py", line 18, in <module>
    from Products.PlonePAS.tools.membership import MembershipTool
  File "/home/travis/build/zopyx/zopyx.plone.persistentlogger/eggs/Products.PlonePAS-5.0.15-py2.7.egg/Products/PlonePAS/tools/membership.py", line 34, in <module>
    from plone.protect.interfaces import IDisableCSRFProtection
  File "/home/travis/build/zopyx/zopyx.plone.persistentlogger/eggs/plone.protect-3.1.3-py2.7.egg/plone/protect/__init__.py", line 6, in <module>
    from plone.protect.utils import protect
SyntaxError: unqualified exec is not allowed in function '__call__' it contains a nested function with free variables (utils.py, line 63)
davisagli commented 6 years ago

See #74

zopyx commented 6 years ago

The Python version here is 2.7.14