-
Notifications
You must be signed in to change notification settings - Fork 96
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
Undocumented name space / import issues between Zope 2 and 4 #813
Labels
Projects
Comments
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... tal:content="principal.id" |
Jürgen Gmach wrote at 2020-4-1 05:58 -0700:
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`.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: