This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a commit to branch dw/8519
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/dw/8519 by this push:
     new 2b7790071 [#8519] drop py3.7 support: changed various 3.7 updates to 
3.8 or other, etc.
2b7790071 is described below

commit 2b7790071e1217642e899802ed87910723aafbef
Author: Dillon Walls <[email protected]>
AuthorDate: Thu Sep 14 20:03:19 2023 +0000

    [#8519] drop py3.7 support: changed various 3.7 updates to 3.8 or other, 
etc.
---
 Allura/allura/lib/helpers.py                      | 2 +-
 Allura/allura/tests/exclude_from_rewrite_hook.py  | 1 +
 Allura/docs/getting_started/install_each_step.rst | 8 ++++----
 Allura/docs/getting_started/installation.rst      | 4 ++--
 CHANGES                                           | 6 ++++++
 Dockerfile                                        | 3 ++-
 scripts/init-docker-dev.sh                        | 2 +-
 scripts/jenkins-run.sh                            | 2 +-
 8 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index a164863d9..9e9f8b294 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -1089,7 +1089,7 @@ def plain2markdown(txt, preserve_multiple_spaces=False, 
has_html_entities=False)
     return txt
 
 
-OrderedDefaultDict = defaultdict  # py3.7 dicts are always ordered
+OrderedDefaultDict = defaultdict  # py3.7+ dicts are always ordered
 
 
 def iter_entry_points(group, *a, **kw):
diff --git a/Allura/allura/tests/exclude_from_rewrite_hook.py 
b/Allura/allura/tests/exclude_from_rewrite_hook.py
index defaeac2b..b74ed98ee 100644
--- a/Allura/allura/tests/exclude_from_rewrite_hook.py
+++ b/Allura/allura/tests/exclude_from_rewrite_hook.py
@@ -22,6 +22,7 @@ from allura.lib.decorators import task
 from allura.lib.exceptions import CompoundError
 
 
+# FIXME: can we move this to a test module?
 class ThemeProviderTestApp(Application):
     """
     If this test class is added directly to a test module, pkg_resources 
internals
diff --git a/Allura/docs/getting_started/install_each_step.rst 
b/Allura/docs/getting_started/install_each_step.rst
index fccdd670f..264b37f08 100644
--- a/Allura/docs/getting_started/install_each_step.rst
+++ b/Allura/docs/getting_started/install_each_step.rst
@@ -44,7 +44,7 @@ In these instructions, we'll use `VirtualBox 
<http://www.virtualbox.org>`__ and
 System Packages
 ^^^^^^^^^^^^^^^
 
-Before we begin, you'll need to install some system packages.  Allura 
currently supports Python 3.7 through 3.11.  The steps below use 3.7.
+Before we begin, you'll need to install some system packages.  Allura 
currently supports Python 3.8 through 3.11.  The steps below use Python 3.11.
 
 .. code-block:: bash
 
@@ -53,7 +53,7 @@ Before we begin, you'll need to install some system packages. 
 Allura currently
     ~$ sudo apt-get install software-properties-common
     ~$ sudo add-apt-repository ppa:deadsnakes/ppa
     ~$ sudo apt-get update
-    ~$ sudo apt-get install git-core python3.7 python3.7-dev gcc libmagic1 
libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev libffi-dev
+    ~$ sudo apt-get install git-core python3.11 python3.11-dev gcc libmagic1 
libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev libffi-dev
 
 To install MongoDB, follow the instructions `here 
<https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/>`_.
 
@@ -70,13 +70,13 @@ The first step to installing the Allura platform is 
installing a virtual environ
 
 .. code-block:: bash
 
-    ~$ sudo apt-get install python3.7-venv
+    ~$ sudo apt-get install python3.11-venv
 
 Then create a virtual environment.  We'll call our Allura environment 
'env-allura'.
 
 .. code-block:: bash
 
-    ~$ python3.7 -m venv env-allura
+    ~$ python3.11 -m venv env-allura
 
 This gives us a nice, clean environment into which we can install all the 
allura dependencies.
 In order to use the virtual environment, you'll need to activate it:
diff --git a/Allura/docs/getting_started/installation.rst 
b/Allura/docs/getting_started/installation.rst
index c680d93f9..20b212c1b 100644
--- a/Allura/docs/getting_started/installation.rst
+++ b/Allura/docs/getting_started/installation.rst
@@ -67,7 +67,7 @@ Build/fetch all required images:
 
 .. note::
 
-   You can override the python version by adding :code:`--build-arg 
PY_VERSION=3.8` for example.
+   You can override the python version by adding :code:`--build-arg 
PY_VERSION=3.11` for example.
 
 Python and JS package setup (and first containers started):
 
@@ -282,7 +282,7 @@ If you'd like to use another webserver, here are a few 
options:
 .. code-block:: bash
 
     ~$ pip install mod_wsgi  # requires httpd2 devel libraries installed in 
the system
-    ~$ mod_wsgi-express start-server development.ini --application-type paste 
--user allura --group allura --port 8080  --python-path 
/PATH/TO/VIRTUALENV/lib/python3.7/site-packages/
+    ~$ mod_wsgi-express start-server development.ini --application-type paste 
--user allura --group allura --port 8080  --python-path 
/PATH/TO/VIRTUALENV/lib/python3.11/site-packages/
 
 For any other wsgi server (e.g. mod_wsgi with Apache, or waitress) you will 
need a wsgi callable set up like this:
 
diff --git a/CHANGES b/CHANGES
index 268f26278..293acefa0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+NEXT RELEASE (future)
+
+General
+ * [#8519] Drop support for Python 3.7. Python 3.8 or Python 3.11 are 
officially supported.
+
+
 Version 1.15.0  (September 2023)
 
 Upgrade Instructions
diff --git a/Dockerfile b/Dockerfile
index 70b3d54a2..c5e254ed1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,8 +17,9 @@
 
 FROM ubuntu:22.04
 
-ARG PY_VERSION=3.7
+ARG PY_VERSION=3.11
 
+# FIXME: change this?
 # Ubunutu 18.04's latest python is 3.6 (and Ubuntu 20.04's is 3.8)
 # In order to get a different python, we must add the deadsnakes apt repo, and 
install a specific version
 RUN apt-get update \
diff --git a/scripts/init-docker-dev.sh b/scripts/init-docker-dev.sh
index 39001c1f0..afc04a515 100755
--- a/scripts/init-docker-dev.sh
+++ b/scripts/init-docker-dev.sh
@@ -40,7 +40,7 @@ cp /allura/Allura/allura/public/nf/favicon.ico 
/allura-data/www-misc/favicon.ico
 rm -rf /allura-data/virtualenv
 if [ ! -e /allura-data/virtualenv ]; then
     echo -e "Creating virtualenv\n"
-    PYTHON_EXE="${PYTHON_EXE:-python3.7}"  # should always be set from 
Dockerfile, but set default value just in case
+    PYTHON_EXE="${PYTHON_EXE:-python3.11}"  # should always be set from 
Dockerfile, but set default value just in case
     $PYTHON_EXE -m venv /allura-data/virtualenv
     /allura-data/virtualenv/bin/pip install -U pip
     /allura-data/virtualenv/bin/pip install -U wheel
diff --git a/scripts/jenkins-run.sh b/scripts/jenkins-run.sh
index 3e2447a1d..fda940b80 100755
--- a/scripts/jenkins-run.sh
+++ b/scripts/jenkins-run.sh
@@ -19,7 +19,7 @@
 #       under the License.
 
 IMAGE_TAG=allura
-PY_VERSION="${PY_VERSION:-3.7}"
+PY_VERSION="${PY_VERSION:-3.11}"
 
 echo
 echo 
"============================================================================="

Reply via email to