diff --git a/CHANGES.rst b/CHANGES.rst
index 608b131..747afad 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -4,7 +4,10 @@ Changes
 4.3.2 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- Fix instances of ``BaseRequest`` (including ``BrowserRequest``)
+  being unexpectedly ``False`` on Python 3 by defining ``__bool__``.
+  Such instances were always ``True`` on Python 2. See `issue 18
+  <https://github.com/zopefoundation/zope.publisher/issues/18>`_.
 
 
 4.3.1 (2017-04-24)
diff --git a/src/zope/publisher/base.py b/src/zope/publisher/base.py
index 4c6a0a2..ee6de47 100644
--- a/src/zope/publisher/base.py
+++ b/src/zope/publisher/base.py
@@ -353,9 +353,11 @@ class BaseRequest(object):
         # Should be overridden by subclasses
         return BaseResponse()
 
-    def __nonzero__(self):
+    def __bool__(self):
         # This is here to avoid calling __len__ for boolean tests
-        return 1
+        return True
+
+    __nonzero__ = __bool__ # Python 2
 
     def __str__(self):
         L1 = self.items()

`BaseRequest` needs to define `__bool__` for Python 3
It defines `__nonzero__` to always be True for Python 2, but it doesn't define `__bool__` for Python 3. So it falls back to `__len__` and you get different behaviour (requests seem false when they shouldn't be).

Found testing zc.resourcelibrary with Python 3. https://github.com/zopefoundation/zc.resourcelibrary/pull/2
diff --git a/src/zope/publisher/tests/test_baserequest.py b/src/zope/publisher/tests/test_baserequest.py
index eff4d0d..9e1824b 100644
--- a/src/zope/publisher/tests/test_baserequest.py
+++ b/src/zope/publisher/tests/test_baserequest.py
@@ -40,6 +40,9 @@ class TestBaseRequest(BaseTestIPublicationRequest,
     def _Test__expectedViewType(self):
         return None # we don't expect
 
+    def test_bool_empty(self):
+        self.assertTrue(self._Test__new())
+
     def test_IApplicationRequest_bodyStream(self):
         from zope.publisher.base import BaseRequest
 

pip install -e .[test]
parse_log_pytest
pytest
pytest
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
python-gettext==4.1
pytz==2025.2
six==1.17.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work
zope.browser==2.4
zope.component==5.1.0
zope.configuration==4.4.1
zope.contenttype==4.6
zope.deprecation==4.4.0
zope.event==4.6
zope.exceptions==4.6
zope.hookable==5.4
zope.i18n==4.9.0
zope.i18nmessageid==5.1.1
zope.interface==5.5.2
zope.location==4.3
zope.proxy==4.6.1
-e git+https://github.com/zopefoundation/zope.publisher.git@4021bcdecb998b1b45ca32222eaa1126925de794#egg=zope.publisher
zope.schema==6.2.1
zope.security==5.8
zope.testing==5.0.1
zope.testrunner==5.6

name: zope.publisher
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
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - python-gettext==4.1
      - pytz==2025.2
      - six==1.17.0
      - zope-browser==2.4
      - zope-component==5.1.0
      - zope-configuration==4.4.1
      - zope-contenttype==4.6
      - zope-deprecation==4.4.0
      - zope-event==4.6
      - zope-exceptions==4.6
      - zope-hookable==5.4
      - zope-i18n==4.9.0
      - zope-i18nmessageid==5.1.1
      - zope-interface==5.5.2
      - zope-location==4.3
      - zope-proxy==4.6.1
      - zope-schema==6.2.1
      - zope-security==5.8
      - zope-testing==5.0.1
      - zope-testrunner==5.6
prefix: /opt/conda/envs/zope.publisher

src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_bool_empty
src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testEnvironment src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testGetAndDefaultInMapping src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testHaveCustomTestsForIApplicationRequest src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testHaveCustomTestsForIPublicationRequest src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testHaveCustomTestsForIPublisherRequest src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testHoldCloseAndGetResponse src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testIReadMapping src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testPublicationManagement src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testSkinManagement src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testTraversalStack src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testVerifyIApplicationRequest src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testVerifyIPublicationRequest src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::testVerifyIPublisherRequest src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_AnnotationsExist src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_IApplicationRequest_bodyStream src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_IPublicationRequest_getPositionalArguments src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_IPublisherRequest_processInputs src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_IPublisherRequest_retry src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_IPublisherRequest_traverse src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_SetRequestInResponse src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test___len__ src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_items src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_keys src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_retry_keeps_everything src/zope/publisher/tests/test_baserequest.py::TestBaseRequest::test_values src/zope/publisher/tests/test_baserequest.py::test_suite
src/zope/publisher/base.py CHANGES.rst
src/zope/publisher/base.py CHANGES.rst