Skip to content

Commit

Permalink
Change generated WSGI confinguation names (#597)
Browse files Browse the repository at this point in the history
* - change generated WSGI config names to zope.conf and zopewsgi.ini

* - correct docstring

* - change WSGI ini file name to zope.ini
  • Loading branch information
dataflake committed May 9, 2019
1 parent 07e20d2 commit fdf9708
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Expand Up @@ -62,6 +62,10 @@ Features
Other changes
+++++++++++++

- Change naming for the generated WSGI configurations to ``zope.conf`` and
``zope.ini`` to match existing documentation for Zope configurations.
(`#571 <https://github.com/zopefoundation/Zope/issues/571>`_)

- Make Zope write a PID file again under WSGI.
This makes interaction with sysadmin tools easier.
The PID file path can be set in the Zope configuration with ``pid-filename``,
Expand Down
2 changes: 1 addition & 1 deletion docs/INSTALL.rst
Expand Up @@ -152,7 +152,7 @@ include the WSGI server software egg in the ``eggs`` specification:
gunicorn
user = admin:adminpassword
http-address = 8080
wsgi = /path/to/wsgi.ini
wsgi = /path/to/zope.ini
On Python 2 you can also forego the use of WSGI and create an old-fashioned
ZServer-based installation by pulling in the ``ZServer`` egg and setting
Expand Down
10 changes: 5 additions & 5 deletions docs/operation.rst
Expand Up @@ -67,7 +67,7 @@ an existing account with non-admin privileges.
Configuring Zope
----------------

Your instance's configuration is defined in its ``etc/wsgi.conf``
Your instance's configuration is defined in its ``etc/zope.conf``
and ``etc/zope.ini`` configuration files.

When starting Zope, if you see errors indicating that an address is in
Expand All @@ -88,7 +88,7 @@ After making any changes to the configuration file, you need to restart any
running Zope server for the affected instance before changes are in effect.

For a full description of the supported sections and directives for
``wsgi.conf``, refer to the machine readable schema description file
``zope.conf``, refer to the machine readable schema description file
``https://rawgit.com/zopefoundation/Zope/master/src/Zope2/Startup/wsgischema.xml``.


Expand Down Expand Up @@ -184,7 +184,7 @@ module and console script:

.. code-block:: console
$ bin/zconsole debug etc/wsgi.conf
$ bin/zconsole debug etc/zope.conf
>>> app
<Application at >
Expand All @@ -204,7 +204,7 @@ Again in the WSGI setup the `zconsole` module and console script can be used:

.. code-block:: console
$ bin/zconsole run etc/wsgi.conf <path_to_script> <scriptarg1> ...
$ bin/zconsole run etc/zope.conf <path_to_script> <scriptarg1> ...
Adding users
Expand All @@ -216,7 +216,7 @@ this using `addzope2user` as follows:
$ bin/addzope2user user password
The script expects to find the configuration file at ``etc/wsgi.conf``.
The script expects to find the configuration file at ``etc/zope.conf``.


Running Zope (plone.recipe.zope2instance install)
Expand Down
4 changes: 2 additions & 2 deletions docs/zope4/migration/zodb.rst
Expand Up @@ -109,8 +109,8 @@ Migration example

- Create a new Zope instance using ``mkwsgiinstance``

- Update configuration in ``zope.ini`` and ``wsgi.conf`` to match previous
Zope2 instance configuration.
- Update configuration in ``zope.ini`` and ``zope.conf`` to match
previous Zope2 instance configuration.

- Run ``zodb-py3migrate-analyze Data.fs`` to determine if third party
products have serialized objects into the ZODB that would cause decoding
Expand Down
2 changes: 1 addition & 1 deletion docs/zopebook/AdvZPT.rst
Expand Up @@ -1214,7 +1214,7 @@ File system caching is activated by setting an environment variable
named ``CHAMELEON_CACHE`` to the path of a folder on the filesystem
where Chameleon can write its compiled template representation.

Look for or add a section named ``environment`` in ``etc/wsgi.conf``
Look for or add a section named ``environment`` in ``etc/zope.conf``
and add a suitable filesystem path, for example::

<environment>
Expand Down
2 changes: 1 addition & 1 deletion src/Products/PageTemplates/unicodeconflictresolver.py
Expand Up @@ -48,7 +48,7 @@ def resolve(self, context, text, expression):
class Z2UnicodeEncodingConflictResolver(object):
""" This resolver tries to lookup the encoding from the
'default-zpublisher-encoding' setting in the Zope configuration
file and defaults to sys.getdefaultencoding().
file and defaults to the old ZMI encoding iso-8859-15.
"""

def __init__(self, mode='strict'):
Expand Down
2 changes: 1 addition & 1 deletion src/Zope2/Startup/tests/test_schema.py
Expand Up @@ -67,7 +67,7 @@ def load_config_text(self, text):
def test_load_config_template(self):
import Zope2.utilities
base = os.path.dirname(Zope2.utilities.__file__)
fn = os.path.join(base, "skel", "etc", "wsgi.conf.in")
fn = os.path.join(base, "skel", "etc", "zope.conf.in")
with codecs.open(fn, encoding='utf-8') as f:
text = f.read()
self.load_config_text(text)
Expand Down
4 changes: 2 additions & 2 deletions src/Zope2/utilities/finder.py
Expand Up @@ -38,10 +38,10 @@ def get_app(self, config_file=None):

def get_zope_conf(self):
# the default config file path is assumed to live in
# $instance_home/etc/wsgi.conf, and the console scripts that use this
# $instance_home/etc/zope.conf, and the console scripts that use this
# are assumed to live in $instance_home/bin; override if the
# environ contains "ZOPE_CONF".
ihome = os.path.dirname(os.path.abspath(os.path.dirname(self.cmd)))
default_config_file = os.path.join(ihome, 'etc', 'wsgi.conf')
default_config_file = os.path.join(ihome, 'etc', 'zope.conf')
zope_conf = os.environ.get('ZOPE_CONF', default_config_file)
return zope_conf
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Zope2/utilities/skel/etc/zope.ini.in
@@ -1,6 +1,6 @@
[app:zope]
use = egg:Zope#main
zope_conf = %(here)s/wsgi.conf
zope_conf = %(here)s/zope.conf

[server:main]
use = egg:waitress#main
Expand Down

0 comments on commit fdf9708

Please sign in to comment.