From f8fc2c122b562f07dcc90b37cc6e01cec2b4cc92 Mon Sep 17 00:00:00 2001 From: Marcel Hellkamp Date: Thu, 31 Dec 2020 19:00:29 +0100 Subject: Drop fapws3 and Python 3.5 support. fapws3 is unmaintained for 3 years and breaks tests. Python 3.5 is end-of-life. --- .github/workflows/install-deps.sh | 2 +- .github/workflows/run_tests.yml | 12 +++++------- Makefile | 27 +++------------------------ README.rst | 2 +- bottle.py | 1 + docs/changelog.rst | 24 ++++++++++++++++-------- docs/deployment.rst | 2 -- docs/index.rst | 3 +-- docs/tutorial_app.rst | 3 +-- test/test_server.py | 3 +-- 10 files changed, 30 insertions(+), 49 deletions(-) diff --git a/.github/workflows/install-deps.sh b/.github/workflows/install-deps.sh index 283f1bf..7b9d07a 100755 --- a/.github/workflows/install-deps.sh +++ b/.github/workflows/install-deps.sh @@ -10,6 +10,6 @@ sudo apt-get install -y libev-dev pip install mako jinja2 for name in waitress "cherrypy<9" cheroot paste tornado twisted diesel meinheld\ - gunicorn eventlet flup fapws3 bjoern gevent aiohttp-wsgi uvloop; do + gunicorn eventlet flup bjoern gevent aiohttp-wsgi uvloop; do pip install $name || echo "Failed to install $name with $(python -V 2>&1)" 1>&2 done diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index f878f8c..621048f 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -7,16 +7,14 @@ jobs: strategy: max-parallel: 5 matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + python-version: ['2.7', '3.6', '3.7', '3.8', '3.9', 'pypy-2.7', 'pypy-3.6', 'pypy-3.7'] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: | - .github/workflows/install-deps.sh + run: .github/workflows/install-deps.sh - name: Run tests - run: | - pytest + run: pytest diff --git a/Makefile b/Makefile index df096f5..af6e69b 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ ALLFILES = $(shell echo bottle.py test/*.py test/views/*.tpl) VENV = build/venv TESTBUILD = build/python -.PHONY: venv release coverage install docs test test_all test_27 test_32 test_33 test_34 test_35 2to3 clean +.PHONY: venv release coverage install docs test test_27 test_36 test_37 test_38 test_39 clean release: clean test_all venv $(VENV)/bin/python3 setup.py --version | egrep -q -v '[a-zA-Z]' # Fail on dev/rc versions @@ -38,32 +38,11 @@ install: docs: sphinx-build -b html -d build/docs/doctrees docs build/docs/html/; -test: venv - $(VENV)/bin/python3 -m unittest discover -test_all: test_27 test_32 test_33 test_34 test_35 test_37 -test_27: - $(TESTBUILD)/bin/python2.7 -m unittest discover -test_34: - $(TESTBUILD)/bin/python3.4 -m unittest discover - -test_35: - $(TESTBUILD)/bin/python3.5 -m unittest discover - -test_36: - $(TESTBUILD)/bin/python3.6 -m unittest discover - -test_37: - $(TESTBUILD)/bin/python3.7 -m unittest discover - -test_setup: - bash test/build_python.sh 2.7.3 $(TESTBUILD) - bash test/build_python.sh 3.4.9 $(TESTBUILD) - bash test/build_python.sh 3.5.6 $(TESTBUILD) - bash test/build_python.sh 3.6.7 $(TESTBUILD) - bash test/build_python.sh 3.7.1 $(TESTBUILD) +test: + python3 -m unittest discover clean: rm -rf $(VENV) build/ dist/ MANIFEST .coverage .name htmlcov 2>/dev/null || true diff --git a/README.rst b/README.rst index 42c6c19..38ad182 100644 --- a/README.rst +++ b/README.rst @@ -61,7 +61,7 @@ Download and Install .. __: https://github.com/bottlepy/bottle/raw/master/bottle.py -Install the latest stable release with ``pip install bottle`` or download `bottle.py`__ (unstable) into your project directory. There are no hard dependencies other than the Python standard library. Bottle runs with **Python 2.7 and 3.4+**. +Install the latest stable release with ``pip install bottle`` or download `bottle.py`__ (unstable) into your project directory. There are no hard dependencies other than the Python standard library. Bottle runs with **Python 2.7 and 3.6+**. License diff --git a/bottle.py b/bottle.py index 3c18ae9..3835a09 100755 --- a/bottle.py +++ b/bottle.py @@ -3365,6 +3365,7 @@ class FapwsServer(ServerAdapter): """ Extremely fast webserver using libev. See http://www.fapws.org/ """ def run(self, handler): # pragma: no cover + depr(0, 13, "fapws3 is not maintained and support will be dropped.") import fapws._evwsgi as evwsgi from fapws import base, config port = self.port diff --git a/docs/changelog.rst b/docs/changelog.rst index 34887e7..9169ae4 100755 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -10,19 +10,27 @@ Release 0.13 .. warning:: Not released yet. -.. rubric:: Dropped support for Python 2.5, 2.6, 3.1, 3.2 and 3.3 +.. rubric:: Dropped support for Python versions that reached their end-of-life. -These five Python versions are no longer maintained by the Python Software Foundation and reached their end of life a long time ago. Keeping up support for ancient Python versions hinders adaptation of new features and serves no real purpose. Even Debian 7 (wheezy) and Ubuntu 12.04 (precise), both outdated, ship with Python 2.7.3 and 3.2.3 already. For this reason, we decided to drop support for Python 2.5, 2.6, 3.1, 3.2 and 3.3. The updated list of tested and supported python releases is as follows: +Keeping up support for ancient Python versions hinders adaptation of new features +and serves no real purpose. If you need support for older Python versions, you can +stay on bottle-0.12. The updated list of tested and supported python releases is +as follows: * Python 2.7 (>= 2.7.3) - * Python 3.4 - * Python 3.5 * Python 3.6 * Python 3.7 - * PyPy 5.3 - * PyPy3 2.4 - -Support for Python 2.5 was marked as deprecated since 0.12. We decided to go a step further and also remove 2.6, 3.1, 3.2 and 3.3 support even if it was never deprecated explicitly in bottle. This means that this release is *not* backwards compatible in Python <2.7 or <3.4 environments. Maintainers for distributions or systems that still use these old python versions should not update to Bottle 0.13 and stick with 0.12 instead. + * Python 3.8 + * Python 3.9 + * PyPy 2.7 + * PyPy 3.6 + * PyPy 3.7 + +Support for Python 2.5 was marked as deprecated since 0.12. We decided to go a step further +and also remove support for 2.6 and 3.1 to 3.5 even if it was never deprecated explicitly +in bottle. This means that this release is *not* backwards compatible in Python <2.7.3 or +<3.6 environments. Maintainers for distributions or systems that still use these old python +versions should not update to Bottle 0.13 and stick with 0.12 instead. .. rubric:: Stabilized APIs * The documented API of the :class:`ConfigDict` class is now considered stable and ready to use. diff --git a/docs/deployment.rst b/docs/deployment.rst index 26bb1d6..c4da4b6 100644 --- a/docs/deployment.rst +++ b/docs/deployment.rst @@ -4,7 +4,6 @@ .. _cherrypy: http://www.cherrypy.org/ .. _paste: http://pythonpaste.org/ .. _gunicorn: http://pypi.python.org/pypi/gunicorn -.. _fapws3: http://www.fapws.org/ .. _tornado: http://www.tornadoweb.org/ .. _twisted: http://twistedmatrix.com/ .. _diesel: http://dieselweb.org/ @@ -72,7 +71,6 @@ gunicorn gunicorn_ Pre-forked, partly written in C eventlet eventlet_ Asynchronous framework with WSGI support. gevent gevent_ Asynchronous (greenlets) diesel diesel_ Asynchronous (greenlets) -fapws3 fapws3_ Asynchronous (network side only), written in C tornado tornado_ Asynchronous, powers some parts of Facebook twisted twisted_ Asynchronous, well tested but... twisted meinheld meinheld_ Asynchronous, partly written in C diff --git a/docs/index.rst b/docs/index.rst index a6a23f8..15b39ad 100755 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,7 +5,6 @@ .. _cheetah: http://www.cheetahtemplate.org/ .. _jinja2: http://jinja.pocoo.org/ .. _paste: http://pythonpaste.org/ -.. _fapws3: https://github.com/william-os4y/fapws3 .. _bjoern: https://github.com/jonashaag/bjoern .. _flup: http://trac.saddi.com/flup .. _cherrypy: http://www.cherrypy.org/ @@ -26,7 +25,7 @@ Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_. * **Routing:** Requests to function-call mapping with support for clean and dynamic URLs. * **Templates:** Fast and pythonic :ref:`built-in template engine ` and support for mako_, jinja2_ and cheetah_ templates. * **Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata. -* **Server:** Built-in HTTP development server and support for paste_, fapws3_, bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server. +* **Server:** Built-in HTTP development server and support for paste_, bjoern_, gae_, cherrypy_ or any other WSGI_ capable HTTP server. .. rubric:: Example: "Hello World" in a bottle diff --git a/docs/tutorial_app.rst b/docs/tutorial_app.rst index 409097a..0e7be1f 100644 --- a/docs/tutorial_app.rst +++ b/docs/tutorial_app.rst @@ -7,7 +7,6 @@ .. _`Python DB API`: http://www.python.org/dev/peps/pep-0249/ .. _`WSGI reference Server`: http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server .. _Cherrypy: http://www.cherrypy.org/ -.. _Fapws3: http://github.com/william-os4y/fapws3 .. _Flup: https://www.saddi.com/software/flup/ .. _Paste: http://pythonpaste.org/ .. _Apache: http://www.apache.org @@ -486,7 +485,7 @@ The ``port`` and ``host`` parameter can also be applied when Bottle is running w As said above, the standard server is perfectly suitable for development, personal use or a small group of people only using your application based on Bottle. For larger tasks, the standard server may become a bottleneck, as it is single-threaded, thus it can only serve one request at a time. -But Bottle has already various adapters to multi-threaded servers on board, which perform better on higher load. Bottle supports Cherrypy_, Fapws3_, Flup_ and Paste_. +But Bottle has already various adapters to multi-threaded servers on board, which perform better on higher load. Bottle supports Cherrypy_, Flup_ and Paste_. If you want to run for example Bottle with the Paste server, use the following code:: diff --git a/test/test_server.py b/test/test_server.py index b7732e0..dacdfc1 100644 --- a/test/test_server.py +++ b/test/test_server.py @@ -98,7 +98,7 @@ class TestServer(unittest.TestCase): self.assertEqual(tob('OK'), self.fetch('test')) -blacklist = ['cgi', 'flup', 'gae', 'wsgiref'] +blacklist = ['cgi', 'flup', 'gae', 'wsgiref', 'fapws3'] if sys.version_info.major == 2: blacklist += [ @@ -109,7 +109,6 @@ else: blacklist += [ 'bjoern', 'diesel', - 'fapws3', 'flup', 'gevent', ] -- cgit v1.2.1