raise minimum supported Python version to 3.9

This commit is contained in:
Sarah Hoffmann
2025-07-19 15:23:17 +02:00
parent 8a96e4f802
commit 8bb53c22be
6 changed files with 6 additions and 9 deletions

View File

@@ -119,7 +119,7 @@ jobs:
if: matrix.dependencies == 'pip' if: matrix.dependencies == 'pip'
- name: Python static typechecking - name: Python static typechecking
run: ../venv/bin/python -m mypy --strict --python-version 3.8 src run: ../venv/bin/python -m mypy --strict --python-version 3.9 src
working-directory: Nominatim working-directory: Nominatim
if: matrix.dependencies == 'pip' if: matrix.dependencies == 'pip'

View File

@@ -18,7 +18,7 @@ build-api:
tests: mypy lint pytest bdd tests: mypy lint pytest bdd
mypy: mypy:
mypy --strict --python-version 3.8 src mypy --strict --python-version 3.9 src
pytest: pytest:
pytest test/python pytest test/python

View File

@@ -27,7 +27,7 @@ For running Nominatim:
* [PostgreSQL](https://www.postgresql.org) (12+ will work, 13+ strongly recommended) * [PostgreSQL](https://www.postgresql.org) (12+ will work, 13+ strongly recommended)
* [PostGIS](https://postgis.net) (3.0+ will work, 3.2+ strongly recommended) * [PostGIS](https://postgis.net) (3.0+ will work, 3.2+ strongly recommended)
* [osm2pgsql](https://osm2pgsql.org) (1.8+) * [osm2pgsql](https://osm2pgsql.org) (1.8+)
* [Python 3](https://www.python.org/) (3.7+) * [Python 3](https://www.python.org/) (3.9+)
Furthermore the following Python libraries are required: Furthermore the following Python libraries are required:

View File

@@ -2,7 +2,7 @@
name = "nominatim-api" name = "nominatim-api"
description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Search library." description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Search library."
readme = "README.md" readme = "README.md"
requires-python = ">=3.7" requires-python = ">=3.9"
license = 'GPL-3.0-or-later' license = 'GPL-3.0-or-later'
maintainers = [ maintainers = [
{ name = "Sarah Hoffmann", email = "lonvia@denofr.de" }, { name = "Sarah Hoffmann", email = "lonvia@denofr.de" },

View File

@@ -2,7 +2,7 @@
name = "nominatim-db" name = "nominatim-db"
description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Database backend." description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Database backend."
readme = "README.md" readme = "README.md"
requires-python = ">=3.7" requires-python = ">=3.9"
license = 'GPL-3.0-or-later' license = 'GPL-3.0-or-later'
maintainers = [ maintainers = [
{ name = "Sarah Hoffmann", email = "lonvia@denofr.de" }, { name = "Sarah Hoffmann", email = "lonvia@denofr.de" },

View File

@@ -2,7 +2,7 @@
# #
# This file is part of Nominatim. (https://nominatim.org) # This file is part of Nominatim. (https://nominatim.org)
# #
# Copyright (C) 2024 by the Nominatim developer community. # Copyright (C) 2025 by the Nominatim developer community.
# For a full list of authors see the git log. # For a full list of authors see the git log.
""" """
Functions for specialised logging with HTML output. Functions for specialised logging with HTML output.
@@ -106,9 +106,6 @@ class BaseLogger:
except TypeError: except TypeError:
return sqlstr return sqlstr
# Fixes an odd issue with Python 3.7 where percentages are not
# quoted correctly.
sqlstr = re.sub(r'%(?!\()', '%%', sqlstr)
sqlstr = re.sub(r'__\[POSTCOMPILE_([^]]*)\]', r'%(\1)s', sqlstr) sqlstr = re.sub(r'__\[POSTCOMPILE_([^]]*)\]', r'%(\1)s', sqlstr)
return sqlstr % params return sqlstr % params