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

Support Python 3.12 #246

Closed
4 tasks done
icemac opened this issue Mar 6, 2023 · 4 comments
Closed
4 tasks done

Support Python 3.12 #246

icemac opened this issue Mar 6, 2023 · 4 comments
Labels
RELEASE BLOCKER Until this issue is fixed/PR is merged no new release should be created.

Comments

@icemac
Copy link
Member

icemac commented Mar 6, 2023

Look through the change log of Python 3.12 (once the final version is released) for potential issues which need to be handled by RestrictedPython to prevent access to otherwise forbidden data/objects.

There is no need to support new language features of Python 3.12 right now, let's see how they evolve when started being used.

Open tasks:

@d-maurer
Copy link
Contributor

I have checked the items in What's new in Python 3.12 and did not find a problem for RestrictedPython.

PEP 695
new type statement -- automatically forbidden

PEP 701
extended f-strings
- embedded expressions are evaluated in the normal way, thus controlled by RestrictedPython
- provides implicit access to the format builtin (not otherwise allowed), but format being very similar to the allowed str should be safe

Interpreter improvements -- irrelevant for RestrictedPython

PEP 688 buffer protocol from Python
only available via memoryview not exposed by RestrictedPython

Standard library improvements -- no module exposed by RestrictedPython is affected

Irrelevant for RestrictedPython: security improvements, C API improvements, CPython implementation improvements, new typing features,

Nothing critical in section "Other language changes".

A few uncritical new methods in the math module.

A few uncritical changes in the random module.

Irrelevant for RestrictedPython: optimizations, CPython bytecode changes, demos and tools, deprecated.

@dataflake
Copy link
Member

Thank you very much for taking a closer look. @icemac did you want to do your own audit? If not, Dieter's assessment sounds good to me and we could move forward with a release.

@icemac
Copy link
Member Author

icemac commented Nov 17, 2023

@d-maurer Thank you for your detailed analysis. I am now going to cut a release.

@icemac
Copy link
Member Author

icemac commented Nov 17, 2023

Just released https://pypi.org/project/RestrictedPython/7.0/

@icemac icemac closed this as completed Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RELEASE BLOCKER Until this issue is fixed/PR is merged no new release should be created.
Projects
None yet
Development

No branches or pull requests

3 participants