]> git.openstreetmap.org Git - nominatim.git/commitdiff
release 5.1.0.post6 master
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 30 Apr 2025 08:49:37 +0000 (10:49 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 30 Apr 2025 08:49:37 +0000 (10:49 +0200)
packaging/nominatim-api/pyproject.toml
packaging/nominatim-db/pyproject.toml
src/nominatim_api/search/token_assignment.py
src/nominatim_api/v1/format_xml.py

index b7970029822da0ad06722feef98d3638f9364bfb..dce6b9d01222f54faf8387fc37a3364762a80564 100644 (file)
@@ -1,6 +1,6 @@
 [project]
 name = "nominatim-api"
 [project]
 name = "nominatim-api"
-version = "5.1.0.post4"
+version = "5.1.0.post6"
 description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Search library."
 readme = "README.md"
 requires-python = ">=3.7"
 description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Search library."
 readme = "README.md"
 requires-python = ">=3.7"
index d9df9f668283fdde17c86b1d8e08b5c19770fb35..c4ba5958564cf959c1fe9b2ce0cbae9f9bc43a03 100644 (file)
@@ -1,6 +1,6 @@
 [project]
 name = "nominatim-db"
 [project]
 name = "nominatim-db"
-version = "5.1.0.post4"
+version = "5.1.0.post6"
 description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Database backend."
 readme = "README.md"
 requires-python = ">=3.7"
 description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Database backend."
 readme = "README.md"
 requires-python = ">=3.7"
@@ -21,7 +21,7 @@ dependencies = [
     "jinja2==3.1.6",
     "pyYAML==6.0.2",
     "psutil==7.0.0",
     "jinja2==3.1.6",
     "pyYAML==6.0.2",
     "psutil==7.0.0",
-    "PyICU==2.15",
+    "PyICU==2.15.2",
     "osmium==4.0.2",
 ]
 
     "osmium==4.0.2",
 ]
 
index a0df7d039e948ab159223bf7ebc2c9209b01d418..4247158c73817161655dd43206cacb8f531c01d0 100644 (file)
@@ -287,7 +287,7 @@ class _TokenSequence:
             return
 
         penalty = self.penalty
             return
 
         penalty = self.penalty
-        if self.direction == 1 and query.dir_penalty > 0:
+        if not base.country and self.direction == 1 and query.dir_penalty > 0:
             penalty += query.dir_penalty
 
         log().comment('first word = name')
             penalty += query.dir_penalty
 
         log().comment('first word = name')
@@ -332,7 +332,7 @@ class _TokenSequence:
             return
 
         penalty = self.penalty
             return
 
         penalty = self.penalty
-        if self.direction == -1 and query.dir_penalty < 0:
+        if not base.country and self.direction == -1 and query.dir_penalty < 0:
             penalty -= query.dir_penalty
 
         if self.direction == -1 or len(base.address) > 1 or base.postcode:
             penalty -= query.dir_penalty
 
         if self.direction == -1 or len(base.address) > 1 or base.postcode:
index b3f0e562271c023e65ead3f786d873519f6a4ff3..ed6aca0a8d1d92a478666910d2fd6360f7d617a1 100644 (file)
@@ -90,7 +90,7 @@ def format_base_xml(results: Union[ReverseResults, SearchResults],
         result will be output, otherwise a list.
     """
     root = ET.Element(xml_root_tag)
         result will be output, otherwise a list.
     """
     root = ET.Element(xml_root_tag)
-    root.set('timestamp', dt.datetime.utcnow().strftime('%a, %d %b %Y %H:%M:%S +00:00'))
+    root.set('timestamp', dt.datetime.now(dt.timezone.utc).strftime('%a, %d %b %Y %H:%M:%S +00:00'))
     root.set('attribution', cl.OSM_ATTRIBUTION)
     for k, v in xml_extra_info.items():
         root.set(k, v)
     root.set('attribution', cl.OSM_ATTRIBUTION)
     for k, v in xml_extra_info.items():
         root.set(k, v)