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

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new dcce3b6  No point trying to support Python before 3.8 [skip ci]
dcce3b6 is described below

commit dcce3b6503c12bbdf0d177c1eaf4db3a6031721b
Author: Sebb <s...@apache.org>
AuthorDate: Mon Jul 15 15:36:06 2024 +0100

    No point trying to support Python before 3.8 [skip ci]
---
 README.md                |  2 +-
 server/endpoints/mbox.py |  6 +-----
 tools/mappings.py        |  5 ++---
 tools/setup.py           | 16 ++--------------
 4 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/README.md b/README.md
index 5504a9d..0a6e8a3 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ Please see the [installation documentation](INSTALL.md) for 
setup instructions.
   * FreeBSD
   * Windows
   * Mac OS
-* Python 3.7.3 or higher with dependencies from `requirements.txt` in tools/ 
and server/ as needed.
+* Python 3.8 or higher with dependencies from `requirements.txt` in tools/ and 
server/ as needed.
 * Web server with proxy capabilities for the UI.
 * ElasticSearch 7.x or higher.
 
diff --git a/server/endpoints/mbox.py b/server/endpoints/mbox.py
index c1d7ae0..147b6a4 100644
--- a/server/endpoints/mbox.py
+++ b/server/endpoints/mbox.py
@@ -24,11 +24,7 @@ import plugins.defuzzer
 import re
 import typing
 import aiohttp.web
-import sys
-if sys.version_info >= (3,8):
-    from asyncio.exceptions import CancelledError
-elif sys.version_info >= (3,7):
-    from asyncio import CancelledError
+from asyncio.exceptions import CancelledError
 import email.utils as eutils
 import datetime
 
diff --git a/tools/mappings.py b/tools/mappings.py
index cff2a00..489d58c 100755
--- a/tools/mappings.py
+++ b/tools/mappings.py
@@ -24,9 +24,8 @@ import sys
 import yaml
 from plugins.elastic import Elastic # pylint: disable=no-name-in-module
 
-# Needs 3.4 or higher to work
-if sys.version_info <= (3, 3):
-    print("This script requires Python 3.4 or higher in order to work!")
+if sys.version_info < (3, 8):
+    print("This script requires Python 3.8 or higher in order to work!")
     sys.exit(-1)
 
 # the desired mappings
diff --git a/tools/setup.py b/tools/setup.py
index 2cba11d..71d6ea6 100755
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -22,22 +22,10 @@ import shutil
 import sys
 import yaml
 
-# Needs 3.4 or higher to work
-if sys.version_info <= (3, 3):
-    print("This script requires Python 3.4 or higher in order to work!")
+if sys.version_info < (3, 8):
+    print("This script requires Python 3.8 or higher in order to work!")
     sys.exit(-1)
 
-# Backend needs 3.8 or higher, warn if not found.
-if sys.version_info < (3, 7, 3):
-    print(
-        "Warning: Pony Mail Foal requires Python 3.7.3 or higher for backend 
operations."
-    )
-    print(
-        "You will be able to run the setup using this version (%u.%u), but 
will need >=3.7.3"
-        % (sys.version_info.major, sys.version_info.minor)
-    )
-    print("for operating the UI backend server.")
-
 DEFAULT_DB_URL = "http://localhost:9200/";
 dburl = ""
 dbname = ""

Reply via email to