Skip to content
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

Python 3 support #113

Closed
wants to merge 55 commits into from
Closed

Python 3 support #113

wants to merge 55 commits into from

Conversation

icemac
Copy link
Member

@icemac icemac commented May 5, 2017

Fixes #39.

hannosch and others added 30 commits May 3, 2017 09:59
We do not need to convert the ast to source code before passing it to the
RestrictedPython machinery. It takes the result of the 2.7 ast.parse() as well.
If pip installs AccessControl before RestrictedPyton, it will pick up
the latest release instead of the other develop dependency.
This should not happen as we're dealing with parsed documents here and
even if it happened, the solution is to not raise old-style class
exceptions.
This actually uses the C extension under Py3.
)

* rewrite to use new RestrictedPython Impl

* cleanup and singleton
…ble for ensuring the c implementation works the same way the python implementation does.
@hannosch
Copy link
Contributor

hannosch commented May 5, 2017

We had a discussion at the current Zope sprint about what to do with the id attribute of persistent objects, which ends up both in the physical path as well as the URL. Our current thought is to make those native string, much like WSGI (PEP 3333) treats the HTTP headers. So the id will be of the str type in both Python 2 and 3, even tough it means something different in both Python versions. This should work fairly well, as the id was limited to ASCII-only in Zope so far, so there's no tricky conversion required. When running under Python 3, we should finally get support for full Unicode ids and URLs.

@hannosch
Copy link
Contributor

I've merged in cleaned up version of this into master, further fixes can be done as PR's directly against master.

@hannosch hannosch closed this May 13, 2017
@hannosch hannosch deleted the py3 branch May 14, 2017 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants