Control: tags -1 patch
Hi,
In Ubuntu, the attached patch was applied to achieve the following:
* d/p/python-3.9.patch: Cherrypick upstream commit to fix FTBFS/test failure
with Python 3.9.
Thanks for considering the patch.
Logan
diff -Nru logging-tree-1.8.1/debian/patches/python-3.9.patch
logging-tree-1.8.1/debian/patches/python-3.9.patch
--- logging-tree-1.8.1/debian/patches/python-3.9.patch 1969-12-31
19:00:00.000000000 -0500
+++ logging-tree-1.8.1/debian/patches/python-3.9.patch 2021-04-10
18:51:22.000000000 -0400
@@ -0,0 +1,57 @@
+From dfde23eca7288c1878d3b63a26f98e9764f5ba6c Mon Sep 17 00:00:00 2001
+From: Logan Rosen <[email protected]>
+Date: Sat, 10 Apr 2021 04:26:32 -0400
+Subject: [PATCH] Fix compatibility with Python 3.9 (#27)
+
+---
+ .travis.yml | 1 +
+ logging_tree/tests/test_format.py | 4 ++--
+ setup.py | 1 +
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/.travis.yml b/.travis.yml
+index 1bc5bf5..bcff67e 100644
+--- a/.travis.yml
++++ b/.travis.yml
+@@ -11,6 +11,7 @@ python:
+ - "3.6"
+ - "3.7"
+ - "3.8"
++ - "3.9"
+
+ script:
+ - "python -m unittest logging_tree.tests.test_format
logging_tree.tests.test_node"
+diff --git a/logging_tree/tests/test_format.py
b/logging_tree/tests/test_format.py
+index c777747..fec6c2d 100644
+--- a/logging_tree/tests/test_format.py
++++ b/logging_tree/tests/test_format.py
+@@ -13,7 +13,7 @@
+
+
+ class FakeFile(StringIO):
+- def __init__(self, filename, mode, encoding=None):
++ def __init__(self, filename, *args, **kwargs):
+ self.filename = filename
+ StringIO.__init__(self)
+
+@@ -154,7 +154,7 @@ def test_2_dot_5_handlers(self):
+ Level WARNING
+ Handler TimedRotatingFile '/bar/two.txt' when='H' interval=3600
backupCount=0
+ '''
+- if sys.version_info >= (3, 8):
++ if sys.version_info == (3, 8):
+ # Apparently the design of the TimedRotatingFileHandler has
+ # become a bit more ambitious as of Python 3.8.
+ expected += '''\
+diff --git a/setup.py b/setup.py
+index 65da834..15cb6b1 100644
+--- a/setup.py
++++ b/setup.py
+@@ -24,6 +24,7 @@
+ 'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
++ 'Programming Language :: Python :: 3.9',
+ 'Topic :: System :: Logging',
+ ],
+ packages=['logging_tree', 'logging_tree.tests'],
diff -Nru logging-tree-1.8.1/debian/patches/series
logging-tree-1.8.1/debian/patches/series
--- logging-tree-1.8.1/debian/patches/series 1969-12-31 19:00:00.000000000
-0500
+++ logging-tree-1.8.1/debian/patches/series 2021-04-10 18:51:22.000000000
-0400
@@ -0,0 +1 @@
+python-3.9.patch