Control: tags -1 patch

The attached patch resolves the issue.

Kind Regards,

Bas

--
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1
diff -Nru weather-util-2.4.1/debian/changelog 
weather-util-2.4.1/debian/changelog
--- weather-util-2.4.1/debian/changelog 2020-08-30 22:03:08.000000000 +0200
+++ weather-util-2.4.1/debian/changelog 2023-01-19 12:19:41.000000000 +0100
@@ -1,3 +1,11 @@
+weather-util (2.4.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch to fix FTBFS with python3.11.
+    (closes: #1028840)
+
+ -- Bas Couwenberg <[email protected]>  Thu, 19 Jan 2023 12:19:41 +0100
+
 weather-util (2.4.1-1) unstable; urgency=low
 
   * New upstream release (closes: #964721)
diff -Nru weather-util-2.4.1/debian/patches/python3.11.patch 
weather-util-2.4.1/debian/patches/python3.11.patch
--- weather-util-2.4.1/debian/patches/python3.11.patch  1970-01-01 
01:00:00.000000000 +0100
+++ weather-util-2.4.1/debian/patches/python3.11.patch  2023-01-19 
12:19:39.000000000 +0100
@@ -0,0 +1,51 @@
+Description: Don't use U mode, removed in python3.11.
+Author: Bas Couwenberg <[email protected]>
+Bug-Debian: https://bugs.debian.org/1028840
+
+--- a/weather.py
++++ b/weather.py
+@@ -1386,7 +1386,7 @@ def correlate():
+     sys.stdout.write(message)
+     sys.stdout.flush()
+     count = 0
+-    slist = codecs.open(slist_fn, "rU", "utf-8")
++    slist = codecs.open(slist_fn, "r", "utf-8")
+     for line in slist:
+         icao = line.split("#")[0].strip()
+         if icao:
+@@ -1401,7 +1401,7 @@ def correlate():
+     sys.stdout.write(message)
+     sys.stdout.flush()
+     count = 0
+-    nsdcccc = codecs.open(nsdcccc_fn, "rU", "utf-8")
++    nsdcccc = codecs.open(nsdcccc_fn, "r", "utf-8")
+     for line in nsdcccc:
+         line = str(line)
+         fields = line.split(";")
+@@ -1430,7 +1430,7 @@ def correlate():
+     sys.stdout.write(message)
+     sys.stdout.flush()
+     count = 0
+-    ourairports = open(ourairports_fn, "rU")
++    ourairports = open(ourairports_fn, "r")
+     for row in csv.reader(ourairports):
+         icao = row[12].lower()
+         if icao in stations:
+@@ -1468,7 +1468,7 @@ def correlate():
+     sys.stdout.write(message)
+     sys.stdout.flush()
+     count = 0
+-    zlist = codecs.open(zlist_fn, "rU", "utf-8")
++    zlist = codecs.open(zlist_fn, "r", "utf-8")
+     for line in zlist:
+         line = line.split("#")[0].strip()
+         if line:
+@@ -1481,7 +1481,7 @@ def correlate():
+     sys.stdout.flush()
+     count = 0
+     cpfz = {}
+-    cpfzcf = codecs.open(cpfzcf_fn, "rU", "utf-8")
++    cpfzcf = codecs.open(cpfzcf_fn, "r", "utf-8")
+     for line in cpfzcf:
+         fields = line.strip().split("|")
+         if len(fields) == 11 \
diff -Nru weather-util-2.4.1/debian/patches/series 
weather-util-2.4.1/debian/patches/series
--- weather-util-2.4.1/debian/patches/series    2017-01-19 20:56:41.000000000 
+0100
+++ weather-util-2.4.1/debian/patches/series    2023-01-19 12:17:27.000000000 
+0100
@@ -1,2 +1,3 @@
 fhs.patch
 pypath.patch
+python3.11.patch

Reply via email to