mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/css-parser: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1,2 +1 @@
|
||||
DIST css-parser-1.0.7.tar.gz 348843 BLAKE2B 72fd2a0555eea2b912d3088b1d38a4bf082862a47a414c4c00718ad1b31299a3df3b2e9dcf4f22c3195520c28f5652aaf4103a9a999ceb3ea6b8c785f50bb40e SHA512 51e4ca836b18f963d798a14762bed78cbd3034598cc828dfe81b3f7d921a5bfe52374b0dc6160e1c01e40a8c8147a10664b9f7edeee867ca1086e6a4a96ff162
|
||||
DIST css-parser-1.0.8.tar.gz 349363 BLAKE2B 2e67d74422cf87e1c593793f6acc9089a745d020cba18c63c70bc2099f53aad95bd5de1def49a3f5ab7cbff7f91efb3a60b3d2d9f1efa55244d99770f0d7baec SHA512 1b22665a172b8a29e277217f39bac1512867dbd5acdfe37ddf078eab71452467adc3dcdac68e424df32cc204f3e55da45d31663f8e7aa143c0243818df32487a
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{8..11} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A CSS Cascading Style Sheets library (fork of cssutils)"
|
||||
HOMEPAGE="https://pypi.org/project/css-parser/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1+"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm ~arm64 ~riscv x86"
|
||||
|
||||
BDEPEND="
|
||||
test? ( dev-python/chardet[${PYTHON_USEDEP}] )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-python311-tests.patch
|
||||
)
|
||||
|
||||
distutils_enable_tests unittest
|
||||
@@ -1,51 +0,0 @@
|
||||
https://github.com/ebook-utils/css-parser/commit/ad79cfcb6e55837a4353b92d051de023c18f6581
|
||||
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sat, 21 May 2022 14:21:28 +0200
|
||||
Subject: [PATCH] tests: adjust exception string checks for python 3.11
|
||||
|
||||
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2062102.
|
||||
--- a/css_parser_tests/test_property.py
|
||||
+++ b/css_parser_tests/test_property.py
|
||||
@@ -5,6 +5,7 @@
|
||||
import xml.dom
|
||||
from . import basetest
|
||||
import css_parser
|
||||
+import sys
|
||||
|
||||
|
||||
class PropertyTestCase(basetest.BaseTestCase):
|
||||
@@ -162,8 +163,9 @@ def test_literalname(self):
|
||||
"Property.literalname"
|
||||
p = css_parser.css.property.Property(r'c\olor', 'red')
|
||||
self.assertEqual(r'c\olor', p.literalname)
|
||||
- self.assertRaisesMsgSubstring(AttributeError, "can't set attribute", p.__setattr__,
|
||||
- 'literalname', 'color')
|
||||
+ pattern = "object has no setter" if sys.version_info >= (3,11) else "can't set attribute"
|
||||
+ self.assertRaisesMsgSubstring(AttributeError, pattern,
|
||||
+ p.__setattr__, 'literalname', 'color')
|
||||
|
||||
def test_validate(self):
|
||||
"Property.valid"
|
||||
--- a/css_parser_tests/test_selector.py
|
||||
+++ b/css_parser_tests/test_selector.py
|
||||
@@ -11,6 +11,7 @@
|
||||
import xml.dom
|
||||
from . import basetest
|
||||
import css_parser
|
||||
+import sys
|
||||
|
||||
|
||||
class SelectorTestCase(basetest.BaseTestCase):
|
||||
@@ -412,7 +413,9 @@ def test_specificity(self):
|
||||
|
||||
# readonly
|
||||
def _set(): selector.specificity = 1
|
||||
- self.assertRaisesMsgSubstring(AttributeError, "can't set attribute", _set)
|
||||
+
|
||||
+ pattern = "object has no setter" if sys.version_info >= (3,11) else "can't set attribute"
|
||||
+ self.assertRaisesMsgSubstring(AttributeError, pattern, _set)
|
||||
|
||||
tests = {
|
||||
'*': (0, 0, 0, 0),
|
||||
|
||||
Reference in New Issue
Block a user