mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-08 13:46:39 +02:00
dev-python/lxml: Sync with Gentoo
It's from Gentoo commit 77f67752cd0fa1d306b5d82723954ac8dbc6cd6c.
This commit is contained in:
parent
efc0ab4e7d
commit
c42521030b
@ -0,0 +1,49 @@
|
||||
https://github.com/lxml/lxml/commit/07db761f9f027d1814a43686cda6fca26e37a931
|
||||
https://github.com/lxml/lxml/commit/c6b7e621e4696c02bf8f6ea423ffbbf2109748ab
|
||||
|
||||
From 07db761f9f027d1814a43686cda6fca26e37a931 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Thu, 11 May 2023 10:29:02 +0200
|
||||
Subject: [PATCH] Avoid using the deprecated "imp" module.
|
||||
|
||||
Closes https://bugs.launchpad.net/lxml/+bug/2018137
|
||||
--- a/src/lxml/html/tests/test_html5parser.py
|
||||
+++ b/src/lxml/html/tests/test_html5parser.py
|
||||
@@ -1,5 +1,4 @@
|
||||
import os
|
||||
-import imp
|
||||
try:
|
||||
from StringIO import StringIO
|
||||
except ImportError: # python 3
|
||||
@@ -45,7 +44,10 @@ def find_module(self, fullname, path=None):
|
||||
return None
|
||||
|
||||
def load_module(self, fullname):
|
||||
- mod = sys.modules.setdefault(fullname, imp.new_module(fullname))
|
||||
+ fake_module = object()
|
||||
+ fake_module.__qualname__ = fullname
|
||||
+ fake_module.__name__ = fullname.rsplit('.', 1)[-1]
|
||||
+ mod = sys.modules.setdefault(fullname, fake_module)
|
||||
mod.__file__, mod.__loader__, mod.__path__ = "<dummy>", self, []
|
||||
mod.__dict__.update(self.mocks[fullname])
|
||||
return mod
|
||||
|
||||
From c6b7e621e4696c02bf8f6ea423ffbbf2109748ab Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Thu, 11 May 2023 10:30:15 +0200
|
||||
Subject: [PATCH] Avoid using the deprecated "imp" module.
|
||||
|
||||
Closes https://bugs.launchpad.net/lxml/+bug/2018137
|
||||
--- a/src/lxml/html/tests/test_html5parser.py
|
||||
+++ b/src/lxml/html/tests/test_html5parser.py
|
||||
@@ -44,7 +44,8 @@ def find_module(self, fullname, path=None):
|
||||
return None
|
||||
|
||||
def load_module(self, fullname):
|
||||
- fake_module = object()
|
||||
+ class Cls: pass
|
||||
+ fake_module = Cls()
|
||||
fake_module.__qualname__ = fullname
|
||||
fake_module.__name__ = fullname.rsplit('.', 1)[-1]
|
||||
mod = sys.modules.setdefault(fullname, fake_module)
|
||||
|
||||
@ -5,7 +5,7 @@ EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{9..11} pypy3 )
|
||||
PYTHON_COMPAT=( python3_{10..12} pypy3 )
|
||||
|
||||
inherit distutils-r1 optfeature toolchain-funcs
|
||||
|
||||
@ -23,7 +23,7 @@ S=${WORKDIR}/lxml-${P}
|
||||
|
||||
LICENSE="BSD ElementTree GPL-2 PSF-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="doc examples +threads test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
@ -37,6 +37,7 @@ RDEPEND="
|
||||
"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
<dev-python/cython-3[${PYTHON_USEDEP}]
|
||||
>=dev-python/cython-0.29.29[${PYTHON_USEDEP}]
|
||||
doc? (
|
||||
$(python_gen_any_dep '
|
||||
@ -53,6 +54,7 @@ BDEPEND="
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.6.0-tests-pypy.patch
|
||||
"${FILESDIR}"/${P}-py3.12-drop-deprecated-imp.patch
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user