gentoo/dev-python/lxml/files/lxml-6.0.0-pypy.patch
Michał Górny 25fd987a6c
dev-python/lxml: Bump to 6.0.0
Recommit with the missing patch.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-06-27 14:25:17 +02:00

53 lines
1.8 KiB
Diff

From 405dd576104cf0e92fbd40d5b294abd93ecb9d41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 29 Mar 2024 16:22:00 +0100
Subject: [PATCH] skip tests that are broken on pypy
---
src/lxml/tests/test_http_io.py | 3 ++-
src/lxml/tests/test_nsclasses.py | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
index 12c9d606..d95e3e06 100644
--- a/src/lxml/tests/test_http_io.py
+++ b/src/lxml/tests/test_http_io.py
@@ -8,7 +8,7 @@ import textwrap
import sys
import gzip
-from .common_imports import etree, HelperTestCase, BytesIO, _bytes
+from .common_imports import etree, HelperTestCase, BytesIO, _bytes, IS_PYPY
from .dummy_http_server import webserver, HTTPRequestCollector
@@ -18,6 +18,7 @@ def needs_http(test_method, _skip_when_called=unittest.skip("needs HTTP support
return _skip_when_called(test_method)
+@unittest.skipIf(IS_PYPY, "broken on pypy")
class HttpIOTestCase(HelperTestCase):
etree = etree
diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
index 0c33f20c..08540001 100644
--- a/src/lxml/tests/test_nsclasses.py
+++ b/src/lxml/tests/test_nsclasses.py
@@ -6,7 +6,7 @@ namespace registry mechanism
import unittest
-from .common_imports import etree, HelperTestCase, _bytes, make_doctest
+from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY
class ETreeNamespaceClassesTestCase(HelperTestCase):
@@ -43,6 +43,7 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
self.Namespace('ns02').clear()
self.Namespace('ns03').clear()
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_ns_classes(self):
bluff_dict = {'bluff' : self.bluff_class}
maeh_dict = {'maeh' : self.maeh_class}