python-lxml/9e95960cd6.patch
Miro Hrončok b52ea727c7 Fix build with Python 3.14
- Fixes: rhbz#2335830
2025-01-06 16:21:46 +01:00

41 lines
1.3 KiB
Diff

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):