dataflake: I have changed `zopewsgi.ini` to `zope.ini` now.
diff --git a/CHANGES.rst b/CHANGES.rst
index 8ca82522a..26dcddc03 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -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``,
diff --git a/docs/INSTALL.rst b/docs/INSTALL.rst
index fd2270f10..bf5b3ea60 100644
--- a/docs/INSTALL.rst
+++ b/docs/INSTALL.rst
@@ -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
diff --git a/docs/operation.rst b/docs/operation.rst
index f79f75d51..808ba1004 100644
--- a/docs/operation.rst
+++ b/docs/operation.rst
@@ -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
@@ -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``.
 
 
@@ -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 >
 
@@ -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
@@ -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)
diff --git a/docs/zope4/migration/zodb.rst b/docs/zope4/migration/zodb.rst
index f78d47817..da931a80a 100644
--- a/docs/zope4/migration/zodb.rst
+++ b/docs/zope4/migration/zodb.rst
@@ -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
diff --git a/docs/zopebook/AdvZPT.rst b/docs/zopebook/AdvZPT.rst
index 195412f0f..66f84db0d 100644
--- a/docs/zopebook/AdvZPT.rst
+++ b/docs/zopebook/AdvZPT.rst
@@ -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>
diff --git a/src/Products/PageTemplates/unicodeconflictresolver.py b/src/Products/PageTemplates/unicodeconflictresolver.py
index d65116280..e2196f8fd 100644
--- a/src/Products/PageTemplates/unicodeconflictresolver.py
+++ b/src/Products/PageTemplates/unicodeconflictresolver.py
@@ -48,7 +48,7 @@ DefaultUnicodeEncodingConflictResolver = \
 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'):
diff --git a/src/Zope2/utilities/finder.py b/src/Zope2/utilities/finder.py
index 2060d4b77..d233f5b6e 100644
--- a/src/Zope2/utilities/finder.py
+++ b/src/Zope2/utilities/finder.py
@@ -38,10 +38,10 @@ class ZopeFinder(object):
 
     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
diff --git a/src/Zope2/utilities/skel/etc/wsgi.conf.in b/src/Zope2/utilities/skel/etc/zope.conf.in
similarity index 100%
rename from src/Zope2/utilities/skel/etc/wsgi.conf.in
rename to src/Zope2/utilities/skel/etc/zope.conf.in
diff --git a/src/Zope2/utilities/skel/etc/zope.ini.in b/src/Zope2/utilities/skel/etc/zope.ini.in
index b81187cb9..71884f4ad 100644
--- a/src/Zope2/utilities/skel/etc/zope.ini.in
+++ b/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

A couple of questions about default-zpublisher-encoding
When revising #564 @dataflake made me aware of the `default-zpublisher-encoding` option.

I have a couple of questions /annotations about that one.

1. The only documentation about that option seems to be the CHANGES.rst and the NEWS.rst.

Both refer to 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?

https://github.com/zopefoundation/Zope/blob/9b2d948b2072a0c4cdc2220fa33b09b7f3bf79e4/src/Zope2/Startup/wsgischema.xml#L266-L273

Is this a config file or only documentation?

I'd assume it's a config file, as it gets loaded here..
https://github.com/zopefoundation/Zope/blob/882629f3deb0a188e1be548f7da9bbcd39e4862d/src/Zope2/Startup/options.py#L52-L60

3. Wrong docstring

Having a look at...

https://github.com/zopefoundation/Zope/blob/882629f3deb0a188e1be548f7da9bbcd39e4862d/src/Products/PageTemplates/unicodeconflictresolver.py#L47-L69

I'd think the docstring is wrong.

a) the encoding is not used from "`default-zpublisher-encoding`" but from 
"`ZPublisher.HTTPRequest.default_encoding`" which is hardcoded to "`utf-8`."

https://github.com/zopefoundation/Zope/blob/882629f3deb0a188e1be548f7da9bbcd39e4862d/src/ZPublisher/HTTPRequest.py#L55-L56

b) the fallback is "`iso-8859-15`", and not "`sys.getdefaultencoding`".

c) Does the class even get used?

The class gets used at the bottom of the module
https://github.com/zopefoundation/Zope/blob/882629f3deb0a188e1be548f7da9bbcd39e4862d/src/Products/PageTemplates/unicodeconflictresolver.py#L127-L132

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?
diff --git a/src/Zope2/Startup/tests/test_schema.py b/src/Zope2/Startup/tests/test_schema.py
index cdbcc72b6..24f219535 100644
--- a/src/Zope2/Startup/tests/test_schema.py
+++ b/src/Zope2/Startup/tests/test_schema.py
@@ -67,7 +67,7 @@ class WSGIStartupTestCase(unittest.TestCase):
     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)

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
apt-get update apt-get install -y python3-dev gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
AccessControl==7.2
Acquisition==6.1
AuthEncoding==6.0
beautifulsoup4==4.13.3
BTrees==6.1
cffi==1.17.1
Chameleon==4.6.0
coverage==7.8.0
DateTime==5.5
DocumentTemplate==4.6
exceptiongroup==1.2.2
execnet==2.1.1
ExtensionClass==6.0
importlib_metadata==8.6.1
iniconfig==2.1.0
MultiMapping==5.0
multipart==1.2.1
packaging==24.2
PasteDeploy==3.1.0
Persistence==5.1
persistent==6.1.1
pluggy==1.5.0
pycparser==2.22
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
python-gettext==5.0
pytz==2025.2
RestrictedPython==8.1a1.dev0
roman==5.0
six==1.17.0
soupsieve==2.6
tomli==2.2.1
transaction==5.0
typing_extensions==4.13.0
waitress==3.0.2
WebOb==1.8.9
WebTest==3.0.4
WSGIProxy2==0.5.1
z3c.pt==4.5
zc.lockfile==3.0.post1
ZConfig==4.2
zExceptions==5.0
zipp==3.21.0
ZODB==6.0
zodbpickle==4.2
-e git+https://github.com/zopefoundation/Zope.git@07e20d235fda0e8555c24cbb424574e9a69241a2#egg=Zope
zope.annotation==5.1
zope.browser==3.1
zope.browsermenu==5.1
zope.browserpage==5.0
zope.browserresource==5.2
zope.cachedescriptors==5.1
zope.component==6.0
zope.configuration==6.0
zope.container==6.1
zope.contentprovider==6.0
zope.contenttype==5.2
zope.deferredimport==5.0
zope.deprecation==5.1
zope.dottedname==6.0
zope.event==5.0
zope.exceptions==5.2
zope.filerepresentation==6.1
zope.globalrequest==2.0
zope.hookable==7.0
zope.i18n==5.2
zope.i18nmessageid==7.0
zope.interface==7.2
zope.lifecycleevent==5.1
zope.location==5.1
zope.pagetemplate==5.1
zope.processlifetime==3.1
zope.proxy==6.1
zope.ptresource==5.1
zope.publisher==7.3
zope.schema==7.0.1
zope.security==7.3
zope.sequencesort==5.1
zope.site==5.1
zope.size==5.1
zope.structuredtext==5.0
zope.tal==5.1
zope.tales==6.1
zope.testbrowser==7.0.1
zope.testing==5.1
zope.traversing==5.1
zope.viewlet==5.1

name: Zope
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - accesscontrol==7.2
      - acquisition==6.1
      - authencoding==6.0
      - beautifulsoup4==4.13.3
      - btrees==6.1
      - cffi==1.17.1
      - chameleon==4.6.0
      - coverage==7.8.0
      - datetime==5.5
      - documenttemplate==4.6
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - extensionclass==6.0
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - multimapping==5.0
      - multipart==1.2.1
      - packaging==24.2
      - pastedeploy==3.1.0
      - persistence==5.1
      - persistent==6.1.1
      - pluggy==1.5.0
      - pycparser==2.22
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - python-gettext==5.0
      - pytz==2025.2
      - restrictedpython==8.1a1.dev0
      - roman==5.0
      - six==1.17.0
      - soupsieve==2.6
      - tomli==2.2.1
      - transaction==5.0
      - typing-extensions==4.13.0
      - waitress==3.0.2
      - webob==1.8.9
      - webtest==3.0.4
      - wsgiproxy2==0.5.1
      - z3c-pt==4.5
      - zc-lockfile==3.0.post1
      - zconfig==4.2
      - zexceptions==5.0
      - zipp==3.21.0
      - zodb==6.0
      - zodbpickle==4.2
      - zope-annotation==5.1
      - zope-browser==3.1
      - zope-browsermenu==5.1
      - zope-browserpage==5.0
      - zope-browserresource==5.2
      - zope-cachedescriptors==5.1
      - zope-component==6.0
      - zope-configuration==6.0
      - zope-container==6.1
      - zope-contentprovider==6.0
      - zope-contenttype==5.2
      - zope-deferredimport==5.0
      - zope-deprecation==5.1
      - zope-dottedname==6.0
      - zope-event==5.0
      - zope-exceptions==5.2
      - zope-filerepresentation==6.1
      - zope-globalrequest==2.0
      - zope-hookable==7.0
      - zope-i18n==5.2
      - zope-i18nmessageid==7.0
      - zope-interface==7.2
      - zope-lifecycleevent==5.1
      - zope-location==5.1
      - zope-pagetemplate==5.1
      - zope-processlifetime==3.1
      - zope-proxy==6.1
      - zope-ptresource==5.1
      - zope-publisher==7.3
      - zope-schema==7.0.1
      - zope-security==7.3
      - zope-sequencesort==5.1
      - zope-site==5.1
      - zope-size==5.1
      - zope-structuredtext==5.0
      - zope-tal==5.1
      - zope-tales==6.1
      - zope-testbrowser==7.0.1
      - zope-testing==5.1
      - zope-traversing==5.1
      - zope-viewlet==5.1
prefix: /opt/conda/envs/Zope

src/Zope2/Startup/tests/test_schema.py::WSGIStartupTestCase::test_load_config_template
src/Zope2/Startup/tests/test_schema.py::WSGIStartupTestCase::test_default_zpublisher_encoding src/Zope2/Startup/tests/test_schema.py::WSGIStartupTestCase::test_environment src/Zope2/Startup/tests/test_schema.py::WSGIStartupTestCase::test_max_conflict_retries_default src/Zope2/Startup/tests/test_schema.py::WSGIStartupTestCase::test_max_conflict_retries_explicit src/Zope2/Startup/tests/test_schema.py::WSGIStartupTestCase::test_pid_filename src/Zope2/Startup/tests/test_schema.py::WSGIStartupTestCase::test_zodb_db
src/Zope2/utilities/skel/etc/zope.ini.in docs/zope4/migration/zodb.rst src/Zope2/utilities/skel/etc/wsgi.conf.in docs/zopebook/AdvZPT.rst docs/operation.rst CHANGES.rst docs/INSTALL.rst src/Zope2/utilities/finder.py src/Products/PageTemplates/unicodeconflictresolver.py
src/Zope2/utilities/skel/etc/zope.ini.in docs/zope4/migration/zodb.rst docs/zopebook/AdvZPT.rst src/Zope2/utilities/skel/etc/zope.conf.in docs/operation.rst CHANGES.rst docs/INSTALL.rst src/Zope2/utilities/finder.py src/Products/PageTemplates/unicodeconflictresolver.py