You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe somebody knows what has changed exactly or where to look for.
I just stumbled over a NameError: name 'DateTime' is not defined in one untested and rarely used template of my app.
Thank you!
P.S.: Now, this is crazy.
I just created a test to reproduce the issue and the test works - with no modification for Python 3, but for Python 2 it fails with the same NameError.
The text was updated successfully, but these errors were encountered:
The namespace stuff itself is a really nice thing but "it fly's a bit under radar". I thought always it would be a nice idea to add an Adapter to modifiy/include stuff in the namespace. Think on the principal or a library to format values...
with Zope 2 some symbols were readily available for use - even without importing them.
I recall `DateTime` and maybe others. (`test`?)
While this always confused me, and I am happy they are gone, could we please add a note to the upgrade instruction from Zope 2 to 4 / 5??
https://zope.readthedocs.io/en/latest/migrations/zope4/index.html
Maybe somebody knows what has changed exactly or where to look for.
I believe that those symbols have been injected by the
DTML implementation.
`RestrictedPython` has a base notion of
what is safe to use. In the `Zope` world, `AccessControl` imports
the corresponding variable (as `safe_builtins`, or similarly spelled)
and significantly adapts/extends it.
Formerly, the DTML implementation has added its own symbols as well,
among them `test`.
Hi,
with Zope 2 some symbols were readily available for use - even without importing them.
I recall
DateTime
and maybe others. (test
?)While this always confused me, and I am happy they are gone, could we please add a note to the upgrade instruction from Zope 2 to 4 / 5??
https://zope.readthedocs.io/en/latest/migrations/zope4/index.html
Maybe somebody knows what has changed exactly or where to look for.
I just stumbled over a
NameError: name 'DateTime' is not defined
in one untested and rarely used template of my app.Thank you!
P.S.: Now, this is crazy.
I just created a test to reproduce the issue and the test works - with no modification for Python 3, but for Python 2 it fails with the same
NameError
.The text was updated successfully, but these errors were encountered: