Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
A couple of questions about default-zpublisher-encoding #571
I have a couple of questions /annotations about that one.
Both refer to zope.conf.
I installed Zope via
If that's correct, we should update the news.rst.
Is this a config file or only documentation?
I'd assume it's a config file, as it gets loaded here..
Having a look at...
I'd think the docstring is wrong.
a) the encoding is not used from "
b) the fallback is "
c) Does the class even get used?
The class gets used at the bottom of the module
but these new identifiers are only used for tests.
So it looks like the code could be removed.
I have done a quick search on github - no results except the tests. Or is that a public API we'd have to deprecate?
Don't get hung up about something as inconsequential as a small class that doesn't get used, please. There's more important stuff to do, really.
Jürgen Gmach wrote at 2019-4-27 23:45 -0700:
1. The only documentation about that option seems to be the CHANGES.rst and the NEWS.rst.
Zope relies on `ZConfig` for its configuration. `ZConfig` gets the configuration options applicable for a given application or application component from an XML file (usually called `component[s].xml` or `***schmema.xml`). The schema has (typically) detailed documentation for each option. The `Zope2 2.x` schema is `Zope2.Startup:zopeschema.xml`.
Both refer to zope.conf.
What formerly was `zope.conf` is now called `wsgi.conf` (at least for the WSGI setup). I find this suboptimal, because the configuration therein is mainly for the parts of Zope independent from WSGI/ZServer. I would prefer if the name would remain `zope.conf`.
I installed Zope via `$ bin/buildout -c zope-ecosystem.cfg` and under `etc/` there is only a wsgi.conf and a zope.ini, no zope.conf.
Afaik `zope.conf` came with ZServer, which is no longer the default, and zope.ini / wsgi.conf comes with the new wsgi way.
If that's correct, we should update the news.rst. 2. Can anybody please explain what is the "wsgischema.xml" for?
See the remarks above about `ZConfig`.
... Is this a config file or only documentation?
It is some kind of "meta configuration" telling `ZConfig` which options are allowed in an application or component configuration file (in the current case `wsgi.conf`) and how these options should be processed.
What the configuration name is called, be it wsgi.conf or zope.conf, was just convention. I believe the intent was to say "this is a zope configuration for WSGI setups only", because it is likely to fail when starting a ZServer instance with it. There are some configuration keys that differ.
I'm open to switch the naming so that
Jens Vagelpohl wrote at 2019-4-28 10:32 -0700:
... I'm open to switch the naming so that `mkwsgiinstance` creates a zope.conf and a wsgi.ini as opposed to a wsgi.conf and a zope.ini, but is this really important?
It is cosmetics. But, it is also more natural and fits better with the existing documentation.
.. zconfig:: Zope2.Startup :file: wsgischema.xml
@jamadden Have you actually tried that ZConfig Sphinx directive? It appears to expect files starting with
I didn't realize it wasn't actually a component file when I made that above remark. It's true that directive currently just takes component files. I think there may be a workaround involving a dummy component file, but ideally the ZConfig directive would just handle that. (zopefoundation/ZConfig#59)
referenced this issue
May 3, 2019
I wrote the original Sphinx extension plus this PR and I have PyPI access for ZConfig, so getting it released won't be an issue. We just need someone to swing by and review. I've had several different reviewers in that repo in the past, usually within a day or so.
A configuration reference based on the schema is now live at https://zope.readthedocs.io/en/latest/operation.html#configuration-reference