zopefoundation / RestrictedPython

A restricted execution environment for Python to run untrusted code.
http://restrictedpython.readthedocs.io/
Other
456 stars 38 forks source link

Support Python 3.12 #246

Closed icemac closed 10 months ago

icemac commented 1 year ago

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 commented 10 months ago

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

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 commented 10 months ago

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 commented 10 months ago

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

icemac commented 10 months ago

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