Comments (3)
Must be a bug in http://pypi.python.org/pypi/sourcecodegen (which generates Python source code from a Python 2.4 AST in order for us to use RestrictedPython).
How can I reproduce this locally? Is the an open-source package you're trying to use?
from chameleon.
Oh, sorry, missed the request for more info.
No, unfortunately, this is in client code. I have two tests that fail with this error. Both of them are testbrowser tests that create a custom AT content type both of which use the default AT view and edit templates.
Some time with pdb shows me that this error comes from using Products.ATBackRef: https://dev.plone.org/archetypes/browser/MoreFieldsAndWidgets/ATBackRef/trunk/src/Products/ATBackRef/skins/ATBackRef/backreferencebrowserwidget.pt?rev=13257#L57
tal:define="foo python:refs.sort(lambda x,y: cmp(x.order, y.order))"
from chameleon.
I worked around this:
https://dev.plone.org/archetypes/changeset/13739
But it sure looks like Chameleon might not support lambdas. I did a grep of all my client project full omelets and didn't find any other cases of lambdas in templates. Still, I'm sure ATBackRef isn't the only one which did. So this should probably be fixed or lambdas should be documented as an exception to Chameleon's claim of compatibility.
from chameleon.
Related Issues (20)
- 3.9.1: pytest is failing HOT 6
- Tag not Parseable with Tab and Colon HOT 6
- ``${}`` operator to expand attributes not working HOT 2
- Cannot access repeat variable when iterating over dict items HOT 3
- str() of Chameleon Exception throws UnicodeDecodeError
- Q: how to make condition without the element itself? HOT 1
- VS Code extension HOT 2
- SystemError AST constructor recursion depth mismatch error on Python 3.11 HOT 8
- Wheel releases? HOT 8
- sdist is missing tests HOT 1
- Chameleon support for Python 3.11? HOT 4
- i18n:target undefined variable HOT 2
- `target_language` not passed to the translate method in certain cases HOT 1
- Python f-strings with numbers give unexpected results
- Missing tag for 4.0.1 HOT 2
- 4.0.1: `chameleon` code is using deprecated `pkg_resources` module HOT 6
- Boolean HTML attribute behavior under >3.8.0 HOT 2
- 4.1.0 wheel doesn't work under Python 3.11 HOT 5
- RFE: is it possible to start making github releases?🤔 HOT 3
- SystemError: AST constructor recursion depth mismatch HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chameleon.