Zope/Plone on PyPy

Does Zope already run on PyPy? If not, are there any known blockers preventing it from doing so?
If Zope is comaptible with PyPy it wouldn't be a long way to get Plone also running on it and get a potential performance boost.

I am pretty sure Zope does not run on PyPy - if I remember correctly it has something to do with RestrictedPython - I am pretty sure either @icemac or @loechel can give better information.

fun fact

Of the 287 actively maintained Zope repositories, 200 run tests for PyPy via tox

❯ all-repos-grep -C all-repos-zope.json "pypy" --repos-with-matches -- 'tox.ini'
output_zope/zopefoundation/Acquisition
output_zope/zopefoundation/AuthEncoding
output_zope/zopefoundation/BTrees
output_zope/zopefoundation/DateTime
output_zope/zopefoundation/ExtensionClass
output_zope/zopefoundation/Missing
output_zope/zopefoundation/MultiMapping
output_zope/zopefoundation/Persistence
output_zope/zopefoundation/Record
output_zope/zopefoundation/ZConfig
output_zope/zopefoundation/ZEO
output_zope/zopefoundation/ZODB
output_zope/zopefoundation/ZopeUndo
output_zope/zopefoundation/grok
output_zope/zopefoundation/grokcore.annotation
output_zope/zopefoundation/grokcore.catalog
output_zope/zopefoundation/grokcore.chameleon
output_zope/zopefoundation/grokcore.component
output_zope/zopefoundation/grokcore.content
output_zope/zopefoundation/grokcore.error
output_zope/zopefoundation/grokcore.formlib
output_zope/zopefoundation/grokcore.json
output_zope/zopefoundation/grokcore.layout
output_zope/zopefoundation/grokcore.message
output_zope/zopefoundation/grokcore.rest
output_zope/zopefoundation/grokcore.security
output_zope/zopefoundation/grokcore.site
output_zope/zopefoundation/grokcore.startup
output_zope/zopefoundation/grokcore.traverser
output_zope/zopefoundation/grokcore.view
output_zope/zopefoundation/grokcore.viewlet
output_zope/zopefoundation/grokcore.xmlrpc
output_zope/zopefoundation/groktoolkit
output_zope/zopefoundation/hurry.query
output_zope/zopefoundation/hurry.workflow
output_zope/zopefoundation/keas.profile
output_zope/zopefoundation/martian
output_zope/zopefoundation/megrok.strictrequire
output_zope/zopefoundation/persistent
output_zope/zopefoundation/roman
output_zope/zopefoundation/transaction
output_zope/zopefoundation/z3c.authenticator
output_zope/zopefoundation/z3c.authviewlet
output_zope/zopefoundation/z3c.autoinclude
output_zope/zopefoundation/z3c.baseregistry
output_zope/zopefoundation/z3c.batching
output_zope/zopefoundation/z3c.caching
output_zope/zopefoundation/z3c.checkversions
output_zope/zopefoundation/z3c.coverage
output_zope/zopefoundation/z3c.csvvocabulary
output_zope/zopefoundation/z3c.currency
output_zope/zopefoundation/z3c.flashmessage
output_zope/zopefoundation/z3c.layer.ready2go
output_zope/zopefoundation/z3c.macro
output_zope/zopefoundation/z3c.menu.ready2go
output_zope/zopefoundation/z3c.objpath
output_zope/zopefoundation/z3c.pagelet
output_zope/zopefoundation/z3c.password
output_zope/zopefoundation/z3c.pt
output_zope/zopefoundation/z3c.ptcompat
output_zope/zopefoundation/z3c.recipe.compattest
output_zope/zopefoundation/z3c.recipe.i18n
output_zope/zopefoundation/z3c.recipe.mkdir
output_zope/zopefoundation/z3c.recipe.sphinxdoc
output_zope/zopefoundation/z3c.recipe.tag
output_zope/zopefoundation/z3c.schema
output_zope/zopefoundation/z3c.table
output_zope/zopefoundation/z3c.template
output_zope/zopefoundation/z3c.testing
output_zope/zopefoundation/z3c.wizard
output_zope/zopefoundation/zExceptions
output_zope/zopefoundation/zc.catalog
output_zope/zopefoundation/zc.form
output_zope/zopefoundation/zc.intid
output_zope/zopefoundation/zc.lockfile
output_zope/zopefoundation/zc.queue
output_zope/zopefoundation/zc.recipe.cmmi
output_zope/zopefoundation/zc.recipe.filestorage
output_zope/zopefoundation/zc.recipe.testrunner
output_zope/zopefoundation/zc.resourcelibrary
output_zope/zopefoundation/zc.set
output_zope/zopefoundation/zc.zdaemonrecipe
output_zope/zopefoundation/zc.zlibstorage
output_zope/zopefoundation/zc.zodbdgc
output_zope/zopefoundation/zc.zodbrecipes
output_zope/zopefoundation/zc.zservertracelog
output_zope/zopefoundation/zdaemon
output_zope/zopefoundation/zodbpickle
output_zope/zopefoundation/zope.annotation
output_zope/zopefoundation/zope.app.apidoc
output_zope/zopefoundation/zope.app.applicationcontrol
output_zope/zopefoundation/zope.app.appsetup
output_zope/zopefoundation/zope.app.authentication
output_zope/zopefoundation/zope.app.basicskin
output_zope/zopefoundation/zope.app.broken
output_zope/zopefoundation/zope.app.catalog
output_zope/zopefoundation/zope.app.component
output_zope/zopefoundation/zope.app.container
output_zope/zopefoundation/zope.app.content
output_zope/zopefoundation/zope.app.debug
output_zope/zopefoundation/zope.app.dependable
output_zope/zopefoundation/zope.app.error
output_zope/zopefoundation/zope.app.exception
output_zope/zopefoundation/zope.app.file
output_zope/zopefoundation/zope.app.folder
output_zope/zopefoundation/zope.app.form
output_zope/zopefoundation/zope.app.generations
output_zope/zopefoundation/zope.app.http
output_zope/zopefoundation/zope.app.i18n
output_zope/zopefoundation/zope.app.locales
output_zope/zopefoundation/zope.app.localpermission
output_zope/zopefoundation/zope.app.onlinehelp
output_zope/zopefoundation/zope.app.pagetemplate
output_zope/zopefoundation/zope.app.preference
output_zope/zopefoundation/zope.app.principalannotation
output_zope/zopefoundation/zope.app.publication
output_zope/zopefoundation/zope.app.publisher
output_zope/zopefoundation/zope.app.renderer
output_zope/zopefoundation/zope.app.rotterdam
output_zope/zopefoundation/zope.app.schema
output_zope/zopefoundation/zope.app.security
output_zope/zopefoundation/zope.app.server
output_zope/zopefoundation/zope.app.session
output_zope/zopefoundation/zope.app.testing
output_zope/zopefoundation/zope.app.tree
output_zope/zopefoundation/zope.app.wsgi
output_zope/zopefoundation/zope.app.zcmlfiles
output_zope/zopefoundation/zope.applicationcontrol
output_zope/zopefoundation/zope.authentication
output_zope/zopefoundation/zope.browser
output_zope/zopefoundation/zope.browsermenu
output_zope/zopefoundation/zope.browserpage
output_zope/zopefoundation/zope.browserresource
output_zope/zopefoundation/zope.cachedescriptors
output_zope/zopefoundation/zope.catalog
output_zope/zopefoundation/zope.component
output_zope/zopefoundation/zope.componentvocabulary
output_zope/zopefoundation/zope.configuration
output_zope/zopefoundation/zope.container
output_zope/zopefoundation/zope.contentprovider
output_zope/zopefoundation/zope.contenttype
output_zope/zopefoundation/zope.copy
output_zope/zopefoundation/zope.copypastemove
output_zope/zopefoundation/zope.datetime
output_zope/zopefoundation/zope.deferredimport
output_zope/zopefoundation/zope.deprecation
output_zope/zopefoundation/zope.dottedname
output_zope/zopefoundation/zope.dublincore
output_zope/zopefoundation/zope.error
output_zope/zopefoundation/zope.errorview
output_zope/zopefoundation/zope.event
output_zope/zopefoundation/zope.exceptions
output_zope/zopefoundation/zope.fanstatic
output_zope/zopefoundation/zope.file
output_zope/zopefoundation/zope.filerepresentation
output_zope/zopefoundation/zope.formlib
output_zope/zopefoundation/zope.generations
output_zope/zopefoundation/zope.hookable
output_zope/zopefoundation/zope.i18n
output_zope/zopefoundation/zope.i18nmessageid
output_zope/zopefoundation/zope.index
output_zope/zopefoundation/zope.interface
output_zope/zopefoundation/zope.intid
output_zope/zopefoundation/zope.keyreference
output_zope/zopefoundation/zope.lifecycleevent
output_zope/zopefoundation/zope.location
output_zope/zopefoundation/zope.locking
output_zope/zopefoundation/zope.login
output_zope/zopefoundation/zope.mimetype
output_zope/zopefoundation/zope.minmax
output_zope/zopefoundation/zope.pagetemplate
output_zope/zopefoundation/zope.password
output_zope/zopefoundation/zope.pluggableauth
output_zope/zopefoundation/zope.preference
output_zope/zopefoundation/zope.principalannotation
output_zope/zopefoundation/zope.principalregistry
output_zope/zopefoundation/zope.processlifetime
output_zope/zopefoundation/zope.proxy
output_zope/zopefoundation/zope.ptresource
output_zope/zopefoundation/zope.ramcache
output_zope/zopefoundation/zope.schema
output_zope/zopefoundation/zope.schemaevent
output_zope/zopefoundation/zope.security
output_zope/zopefoundation/zope.securitypolicy
output_zope/zopefoundation/zope.sendmail
output_zope/zopefoundation/zope.sequencesort
output_zope/zopefoundation/zope.server
output_zope/zopefoundation/zope.session
output_zope/zopefoundation/zope.site
output_zope/zopefoundation/zope.size
output_zope/zopefoundation/zope.structuredtext
output_zope/zopefoundation/zope.tal
output_zope/zopefoundation/zope.tales
output_zope/zopefoundation/zope.testbrowser
output_zope/zopefoundation/zope.testing
output_zope/zopefoundation/zope.testrunner
output_zope/zopefoundation/zope.traversing
output_zope/zopefoundation/zope.viewlet
output_zope/zopefoundation/zope.vocabularyregistry
output_zope/zopefoundation/zopetoolkit

~/All via 🐍 v2.7.17 
❯ all-repos-grep -C all-repos-zope.json "pypy" --repos-with-matches -- 'tox.ini' | wc -l
200

~/All via 🐍 v2.7.17 
❯ all-repos-list-repos -C all-repos-zope.json | wc -l
287
1 Like

RestrictedPython does not work on pypy due to an internal specific of pypy. So it is directly defined, that RestrictedPython is not installable on pypy.

If you look in the internals of RestrictedPython, almost all functionality necessary for Zope to work (Catalog, and others) could and would also work on pypy. We actually did test pypy, and should have it in the tox.ini to check, that it does not start.

If someone remove the install restriction and would run Zope/Plone with RestrictedPython on pypy, that is possible, but it major function to prevent malicious through the web code will not work. So for some use cases that might be a possible way to go.

6 Likes

Plone Foundation Code of Conduct