diff --git a/CHANGES.rst b/CHANGES.rst index 6be611a..05bbd28 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,10 @@ Changelog 4.1 (unreleased) ---------------- +- Fix: ``zserver-threads`` configuration option has been ineffective due + to too early import of the configuration variable + (`Zope#665 `_). + 4.0.1 (2019-05-17) ------------------ @@ -14,7 +18,7 @@ Changelog 4.0 (2019-05-08) ---------------- -Changes since 3.0: +ZChanges since 3.0: - Broke out ZServer and related code from Zope core project. diff --git a/src/ZServer/PubCore/__init__.py b/src/ZServer/PubCore/__init__.py index 07b267c..53328c1 100644 --- a/src/ZServer/PubCore/__init__.py +++ b/src/ZServer/PubCore/__init__.py @@ -11,10 +11,6 @@ # ############################################################################## -from ZServer.Zope2.Startup.config import ( # NOQA - setNumberOfThreads, - ZSERVER_THREADS as _n, -) from ZServer.PubCore import ZRendezvous _handle = None @@ -24,6 +20,7 @@ def handle(*args, **kw): global _handle if _handle is None: + from ZServer.Zope2.Startup.config import ZSERVER_THREADS as _n _handle = ZRendezvous.ZRendevous(_n).handle return _handle(*args, **kw)