python-apt/SOURCES/python-apt-3.1.0-fix-python3.9-compat.patch

88 lines
2.5 KiB
Diff

diff --git a/apt/cdrom.py b/apt/cdrom.py
index dc15c5bb..997082f3 100644
--- a/apt/cdrom.py
+++ b/apt/cdrom.py
@@ -20,6 +20,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
"""Classes related to cdrom handling."""
+from __future__ import annotations
+
import glob
import apt_pkg
diff --git a/apt/debfile.py b/apt/debfile.py
index b3ef7330..8e3967e9 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -17,6 +17,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
"""Classes for working with locally available Debian packages."""
+from __future__ import annotations
import gzip
import os
diff --git a/apt/progress/text.py b/apt/progress/text.py
index ea1a176f..0eacb34c 100644
--- a/apt/progress/text.py
+++ b/apt/progress/text.py
@@ -15,6 +15,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
"""Progress reporting for text interfaces."""
+from __future__ import annotations
+
import io
import os
import signal
diff --git a/apt/utils.py b/apt/utils.py
index 5b1fd46a..500ecc04 100644
--- a/apt/utils.py
+++ b/apt/utils.py
@@ -16,6 +16,8 @@
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+from __future__ import annotations
+
import datetime
import os
diff --git a/aptsources/_deb822.py b/aptsources/_deb822.py
index 80b732cf..211b9c3f 100644
--- a/aptsources/_deb822.py
+++ b/aptsources/_deb822.py
@@ -5,6 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
"""deb822 parser with support for comment headers and footers."""
+from __future__ import annotations
import collections
import io
diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py
index 2ee6d7d3..7f9591bd 100644
--- a/aptsources/distinfo.py
+++ b/aptsources/distinfo.py
@@ -20,6 +20,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
+from __future__ import annotations
import csv
import logging
diff --git a/aptsources/sourceslist.py b/aptsources/sourceslist.py
index dfb80979..f95d53bf 100644
--- a/aptsources/sourceslist.py
+++ b/aptsources/sourceslist.py
@@ -22,6 +22,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
+from __future__ import annotations
import builtins
import glob