Skip to content

Commit

Permalink
Grep for 2.7 and remove places for Python 2 support.
Browse files Browse the repository at this point in the history
Additionally removed also a bit of Zope 2.7 support code.
  • Loading branch information
Michael Howitz committed Sep 10, 2019
1 parent 4aadecc commit de2873e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 36 deletions.
13 changes: 1 addition & 12 deletions docs/INSTALL.rst
Expand Up @@ -16,8 +16,7 @@ available:
- A supported version of Python, including the development support if
installed from system-level packages. Supported versions include:

* 2.7
* 3.5 - 3.8
* 3.5 up to 3.8

- Zope needs the Python ``zlib`` module to be importable. If you are
building your own Python from source, please be sure that you have the
Expand Down Expand Up @@ -72,11 +71,6 @@ Built-in standard buildout configuration
$ bin/pip install -U pip zc.buildout
$ bin/buildout
.. note::

When using Python 2.7 instead of calling ``python3.7 -m venv .`` you have to
install `virtualenv` and then call ``python2.7 -m virtualenv .``.

Custom buildout configurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -175,11 +169,6 @@ version you find on https://zopefoundation.github.io/Zope/:
$ bin/pip install Zope==4.1 \
-c https://zopefoundation.github.io/Zope/releases/4.1/constraints.txt
.. note::

When using Python 2.7 instead of calling ``python3.7 -m venv zope`` you have
to install `virtualenv` and then call ``python2.7 -m virtualenv zope``.

You can also install Zope using a single requirements file. Note that this
installation method might install packages that are not actually needed (i. e.
more than are listed in the ``install_requires`` section of ``setup.py``):
Expand Down
2 changes: 1 addition & 1 deletion docs/operation.rst
Expand Up @@ -401,7 +401,7 @@ done.
Troubleshooting
---------------

- This version of Zope requires Python 2.7 or Python 3.5 and later.
- This version of Zope requires Python 3.5 and later.
It will *not* run with any version of PyPy.

- To build Python extensions you need to have Python configuration
Expand Down
11 changes: 5 additions & 6 deletions docs/zope4/news.rst
Expand Up @@ -29,15 +29,14 @@ found in this release.

Extended Python version support
-------------------------------
Zope 4 supports Python 2.7 and Python 3.5 up to Python 3.8.
Zope 5 supports Python 3.5 up to Python 3.8.

The Python 3 support currently covers the core dependencies shipped
with Zope and is limited to the new WSGI based publisher. The new
external ZServer project is currently limited to Python 2.7 compatibility
and likely to stay that way.
with Zope and is limited to the new WSGI based publisher.

Migrating an existing ZODB to Python 3 is not an automated process. Please
consult :ref:`zope4zodbmigration` for details.
Migrating an existing ZODB to Python 3 is not an automated process. You have
to update to Zope 4 first, see
`Zope 4 migration <https://zope.readthedocs.io/en/4.x/zope4/migration/index.html>`_.


WSGI as the new default server type
Expand Down
24 changes: 7 additions & 17 deletions src/Testing/ZopeTestCase/testZODBCompat.py
Expand Up @@ -139,23 +139,13 @@ def afterClear(self):
os.rmdir(self.import_dir)
except OSError:
pass
try:
import App.config
except ImportError:
# Restore builtins
builtins = getattr(__builtins__, '__dict__', __builtins__)
if hasattr(self, '_ih'):
builtins['INSTANCE_HOME'] = self._ih
if hasattr(self, '_ch'):
builtins['CLIENT_HOME'] = self._ch
else:
# Zope >= 2.7
config = App.config.getConfiguration()
if hasattr(self, '_ih'):
config.instancehome = self._ih
if hasattr(self, '_ch'):
config.clienthome = self._ch
App.config.setConfiguration(config)
import App.config
config = App.config.getConfiguration()
if hasattr(self, '_ih'):
config.instancehome = self._ih
if hasattr(self, '_ch'):
config.clienthome = self._ch
App.config.setConfiguration(config)


class TestAttributesOfCleanObjects(ZopeTestCase.ZopeTestCase):
Expand Down

0 comments on commit de2873e

Please sign in to comment.