Fix build with Python 3.14
- Fixes: rhbz#2335830
This commit is contained in:
parent
afcfecf47d
commit
b52ea727c7
2 changed files with 46 additions and 0 deletions
41
9e95960cd6.patch
Normal file
41
9e95960cd6.patch
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
From 9e95960cd69a3e0393f4266d60a6f5a2a755de0d Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Fri, 25 Oct 2024 15:50:04 +0200
|
||||
Subject: [PATCH] Fix missing "//" in file URLs under Py3.14. Closes
|
||||
https://bugs.launchpad.net/bugs/2085619
|
||||
|
||||
---
|
||||
src/lxml/tests/common_imports.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/lxml/tests/common_imports.py b/src/lxml/tests/common_imports.py
|
||||
index 2d371852c..83c3a909a 100644
|
||||
--- a/src/lxml/tests/common_imports.py
|
||||
+++ b/src/lxml/tests/common_imports.py
|
||||
@@ -103,7 +103,7 @@ def tearDown(self):
|
||||
def parse(self, text, parser=None):
|
||||
f = BytesIO(text) if isinstance(text, bytes) else StringIO(text)
|
||||
return etree.parse(f, parser=parser)
|
||||
-
|
||||
+
|
||||
def _rootstring(self, tree):
|
||||
return etree.tostring(tree.getroot()).replace(
|
||||
b' ', b'').replace(b'\n', b'')
|
||||
@@ -118,7 +118,7 @@ def assertRegex(self, *args, **kwargs):
|
||||
class SillyFileLike:
|
||||
def __init__(self, xml_data=b'<foo><bar/></foo>'):
|
||||
self.xml_data = xml_data
|
||||
-
|
||||
+
|
||||
def read(self, amount=None):
|
||||
if self.xml_data:
|
||||
if amount:
|
||||
@@ -202,7 +202,7 @@ def fileInTestDir(name):
|
||||
|
||||
def path2url(path):
|
||||
return urlparse.urljoin(
|
||||
- 'file:', pathname2url(path))
|
||||
+ 'file://', pathname2url(path))
|
||||
|
||||
|
||||
def fileUrlInTestDir(name):
|
||||
|
|
@ -16,6 +16,11 @@ URL: https://github.com/lxml/lxml
|
|||
Source0: lxml-%{version}-no-isoschematron-rng.tar.gz
|
||||
Source1: get-lxml-source.sh
|
||||
|
||||
# Fix missing "//" in file URLs under Python 3.14
|
||||
# https://bugs.launchpad.net/bugs/2085619
|
||||
# https://bugzilla.redhat.com/2335830
|
||||
Patch: https://github.com/lxml/lxml/commit/9e95960cd6.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libxslt-devel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue