Update to 4.7.1
Fixes CVE-2021-43818 Resolves: rhbz#2031686, rhbz#2032572
This commit is contained in:
parent
27eebecb4d
commit
eb5a8db088
|
@ -56,3 +56,4 @@ lxml-2.2.7.tar.gz.asc
|
|||
/lxml-4.5.1.tgz
|
||||
/lxml-4.6.2.tar.gz
|
||||
/lxml-4.6.3.tar.gz
|
||||
/lxml-4.7.1.tar.gz
|
||||
|
|
46
333.patch
46
333.patch
|
@ -1,46 +0,0 @@
|
|||
From 5550b4e615178a559027a31b353ca7ee2e4ef732 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Fri, 26 Nov 2021 15:27:38 +0100
|
||||
Subject: [PATCH] Use the non-depcrecated TextTestResult instead of
|
||||
_TextTestResult
|
||||
|
||||
_TextTestResult was removed from Python 3.11.
|
||||
TextTestResult is available on all supported Python versions.
|
||||
---
|
||||
test.py | 10 +++-------
|
||||
1 file changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/test.py b/test.py
|
||||
index 45d52a9e0..d523e7084 100644
|
||||
--- a/test.py
|
||||
+++ b/test.py
|
||||
@@ -72,11 +72,7 @@
|
||||
import unittest
|
||||
import traceback
|
||||
|
||||
-try:
|
||||
- # Python >=2.7 and >=3.2
|
||||
- from unittest.runner import _TextTestResult
|
||||
-except ImportError:
|
||||
- from unittest import _TextTestResult
|
||||
+from unittest import TextTestResult
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
@@ -307,14 +303,14 @@ def get_test_hooks(test_files, cfg, cov=None):
|
||||
return results
|
||||
|
||||
|
||||
-class CustomTestResult(_TextTestResult):
|
||||
+class CustomTestResult(TextTestResult):
|
||||
"""Customised TestResult.
|
||||
|
||||
It can show a progress bar, and displays tracebacks for errors and failures
|
||||
as soon as they happen, in addition to listing them all at the end.
|
||||
"""
|
||||
|
||||
- __super = _TextTestResult
|
||||
+ __super = TextTestResult
|
||||
__super_init = __super.__init__
|
||||
__super_startTest = __super.startTest
|
||||
__super_stopTest = __super.stopTest
|
|
@ -1,25 +0,0 @@
|
|||
From 852ed1092bd80b6b9a51db24371047ec88843031 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Tue, 18 May 2021 22:02:02 +0200
|
||||
Subject: [PATCH] Adapt a test to a behavioural change in libxml2 2.9.11+.
|
||||
|
||||
---
|
||||
src/lxml/tests/test_etree.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lxml/tests/test_etree.py b/src/lxml/tests/test_etree.py
|
||||
index 9cf70604b..42613dcbe 100644
|
||||
--- a/src/lxml/tests/test_etree.py
|
||||
+++ b/src/lxml/tests/test_etree.py
|
||||
@@ -3036,7 +3036,10 @@ def test_subelement_nsmap(self):
|
||||
def test_html_prefix_nsmap(self):
|
||||
etree = self.etree
|
||||
el = etree.HTML('<hha:page-description>aa</hha:page-description>').find('.//page-description')
|
||||
- self.assertEqual({'hha': None}, el.nsmap)
|
||||
+ if etree.LIBXML_VERSION < (2, 9, 11):
|
||||
+ self.assertEqual({'hha': None}, el.nsmap)
|
||||
+ else:
|
||||
+ self.assertEqual({}, el.nsmap)
|
||||
|
||||
def test_getchildren(self):
|
||||
Element = self.etree.Element
|
|
@ -1,8 +1,8 @@
|
|||
%global modname lxml
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 4.6.3
|
||||
Release: 5%{?dist}
|
||||
Version: 4.7.1
|
||||
Release: 1%{?dist}
|
||||
Summary: XML processing library combining libxml2/libxslt with the ElementTree API
|
||||
|
||||
# The lxml project is licensed under BSD
|
||||
|
@ -13,13 +13,6 @@ License: BSD and MIT and zlib
|
|||
URL: https://github.com/lxml/lxml
|
||||
Source0: %{pypi_source %{modname}}
|
||||
|
||||
# Adapt a test to a behavioural change in libxml2 2.9.11+
|
||||
Patch1: %{url}/commit/852ed1092b.patch
|
||||
|
||||
# Use the non-depcrecated TextTestResult instead of _TextTestResult
|
||||
# _TextTestResult was removed from Python 3.11
|
||||
Patch2: %{url}/pull/333.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libxslt-devel
|
||||
|
@ -72,6 +65,11 @@ cp -a build/lib.%{python3_platform}-%{python3_version}/* src/
|
|||
%{python3_sitearch}/%{modname}-*.egg-info/
|
||||
|
||||
%changelog
|
||||
* Thu Jan 06 2022 Charalampos Stratakis <cstratak@redhat.com> - 4.7.1-1
|
||||
- Update to 4.7.1
|
||||
- Fixes CVE-2021-43818
|
||||
- Resolves: rhbz#2031686, rhbz#2032572
|
||||
|
||||
* Fri Nov 26 2021 Miro Hrončok <mhroncok@redhat.com> - 4.6.3-5
|
||||
- Run the tests during build
|
||||
- Resolves: rhbz#2026941
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (lxml-4.6.3.tar.gz) = 57489c42257afd00376886d6873c97088778afa8009fa644e2660722d134f346030218c24be6329ee828f73f5164cdd1dad583c17addbdf3e0c84e4d8ab9e176
|
||||
SHA512 (lxml-4.7.1.tar.gz) = dd0d421e10db6c9084cf5b2c04a4fc54d74bd62b4dfa83efcf92dd46cd1c5f043c47613521b2de04c450b83eb1161d197b017c53e615e5785e97e7afe106b6cf
|
||||
|
|
Loading…
Reference in New Issue