zopefoundation / Zope

Zope is an open-source web application server.
https://zope.readthedocs.io
Other
352 stars 99 forks source link

Replacement for component.xml with implements "ZServer.zserver" #522

Closed zopyx closed 5 years ago

zopyx commented 5 years ago

There are a bunch of Zope/Plone-Addons using the components mechanism for add-on related configurations e.g. like in collective.es.index for registering a global utility.

https://github.com/collective/collective.es.index/blob/master/src/collective/es/index/component.xml https://github.com/collective/collective.es.index/blob/master/src/collective/es/index/components.py

This fails in Zope 4 and Python 3 obviously because of the absence of ZServer.

Is there a reasonable replacement or an alternative way for registering components.

dataflake commented 5 years ago

The mechanism itself still works in Zope 4. There's a few of those configuration registration XML files in the Zope source tree. So this is not a general issue.

The example you link to wants to explicitly import and use ZServer definitions. Sure, that will break. There is no replacement within Zope and none is planned or needed. Zope doesn't need definitions that model running a web service by itself at this point.

dataflake commented 5 years ago

Closing as invalid due to the reasons provided in my last comment.

Third-party packages that insist on importing ZServer-specific definitions can always implement those themselves instead.