mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2026-05-06 07:27:03 -04:00
dev-python/smartypants: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1,2 +1 @@
|
||||
DIST smartypants-2.0.1.gh.tar.gz 24152 BLAKE2B 258c9692eec675054dc31f760cf3a9fc3995683d7a15fc549fb390611761c0b09f73e077f5917f9f071a8fc1ae3f06e36f745fdc0e2c368f465e29f6ce51457f SHA512 d47a866a5478c3520251f87a93a468a5eea10318b24b2e8d4bc918d533b5a5789aa56d3a8d5fb8ccff9572fb63e5b6f2eafc44f93fb57a19e6621ebef5d64d9d
|
||||
DIST smartypants-2.0.2.gh.tar.gz 28770 BLAKE2B 5e77ad66db51afcac634b4da47e86e61bfbd3436a79bc77ad57781f173c780be1065ad80ed7ec187dbafaeaae2cf144f16635d5fc63f333e88c22cccf085f2e5 SHA512 6cdb1574145f4c15984550c2b10bc95b7a86baf067f6465d53e60696347a650e6afb978f623f2344d82e03281ecb28a1f94cdb759fd2db613dc13fada1b25485
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
From ea46bf36343044a7a61ba3acce4a7f188d986ec5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= <mimi.vx@gmail.com>
|
||||
Date: Mon, 25 Sep 2023 10:31:37 +0200
|
||||
Subject: [PATCH] Fix regexps and tests for python3.12
|
||||
|
||||
---
|
||||
smartypants.py | 4 ++--
|
||||
tests/test.py | 4 ++--
|
||||
tests/test_cli.py | 16 ++++++++--------
|
||||
3 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/smartypants.py b/smartypants.py
|
||||
index c39f409..37368fb 100755
|
||||
--- a/smartypants.py
|
||||
+++ b/smartypants.py
|
||||
@@ -268,13 +268,13 @@ def smartypants(text, attr=None):
|
||||
if do_quotes:
|
||||
if t == "'":
|
||||
# Special case: single-character ' token
|
||||
- if re.match("\S", prev_token_last_char):
|
||||
+ if re.match(r"\S", prev_token_last_char):
|
||||
t = "’"
|
||||
else:
|
||||
t = "‘"
|
||||
elif t == '"':
|
||||
# Special case: single-character " token
|
||||
- if re.match("\S", prev_token_last_char):
|
||||
+ if re.match(r"\S", prev_token_last_char):
|
||||
t = "”"
|
||||
else:
|
||||
t = "“"
|
||||
diff --git a/tests/test.py b/tests/test.py
|
||||
index 2c1a0ea..ac5075a 100644
|
||||
--- a/tests/test.py
|
||||
+++ b/tests/test.py
|
||||
@@ -24,7 +24,7 @@ def test_change_default_attr(self):
|
||||
|
||||
T = sp(TEXT)
|
||||
E = '“foo” -- bar'
|
||||
- self.assertEquals(T, E)
|
||||
+ self.assertEqual(T, E)
|
||||
|
||||
attr = Attr.q | Attr.d
|
||||
Attr.default = attr
|
||||
@@ -32,7 +32,7 @@ def test_change_default_attr(self):
|
||||
|
||||
T = sp(TEXT)
|
||||
E = '“foo” — bar'
|
||||
- self.assertEquals(T, E)
|
||||
+ self.assertEqual(T, E)
|
||||
|
||||
def test_dates(self):
|
||||
|
||||
diff --git a/tests/test_cli.py b/tests/test_cli.py
|
||||
index e85545a..6b5e136 100644
|
||||
--- a/tests/test_cli.py
|
||||
+++ b/tests/test_cli.py
|
||||
@@ -34,7 +34,7 @@ def test_pipe(self):
|
||||
E = '“foobar”'
|
||||
|
||||
output = self._p([CLI_SCRIPT], T)
|
||||
- self.assertEquals(output, E)
|
||||
+ self.assertEqual(output, E)
|
||||
|
||||
def test_pipe_attr(self):
|
||||
|
||||
@@ -42,11 +42,11 @@ def test_pipe_attr(self):
|
||||
|
||||
E = T
|
||||
output = self._p([CLI_SCRIPT, '--attr', '0'], T)
|
||||
- self.assertEquals(output, E)
|
||||
+ self.assertEqual(output, E)
|
||||
|
||||
E = """"foo" “bar”"""
|
||||
output = self._p([CLI_SCRIPT, '--attr', 'b'], T)
|
||||
- self.assertEquals(output, E)
|
||||
+ self.assertEqual(output, E)
|
||||
|
||||
def test_skipped_elements(self):
|
||||
|
||||
@@ -54,19 +54,19 @@ def test_skipped_elements(self):
|
||||
|
||||
E = '<a>“foo”</a> <b>“bar”</b>'
|
||||
output = self._p([CLI_SCRIPT], T)
|
||||
- self.assertEquals(output, E)
|
||||
+ self.assertEqual(output, E)
|
||||
|
||||
E = '<a>"foo"</a> <b>“bar”</b>'
|
||||
output = self._p([CLI_SCRIPT, '--skip', 'a'], T)
|
||||
- self.assertEquals(output, E)
|
||||
+ self.assertEqual(output, E)
|
||||
|
||||
E = '<a>“foo”</a> <b>"bar"</b>'
|
||||
output = self._p([CLI_SCRIPT, '--skip', 'b'], T)
|
||||
- self.assertEquals(output, E)
|
||||
+ self.assertEqual(output, E)
|
||||
|
||||
E = T
|
||||
output = self._p([CLI_SCRIPT, '--skip', 'a,b'], T)
|
||||
- self.assertEquals(output, E)
|
||||
+ self.assertEqual(output, E)
|
||||
|
||||
def test_file(self):
|
||||
|
||||
@@ -81,4 +81,4 @@ def test_file(self):
|
||||
output = self._p([CLI_SCRIPT, F])
|
||||
finally:
|
||||
os.remove(F)
|
||||
- self.assertEquals(output, E)
|
||||
+ self.assertEqual(output, E)
|
||||
@@ -1,43 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_P="${PN}.py-${PV}"
|
||||
DESCRIPTION="ASCII quote-dot-dash to HTML entity converter"
|
||||
HOMEPAGE="
|
||||
https://pypi.org/project/smartypants/
|
||||
https://github.com/leohemsted/smartypants.py/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/leohemsted/smartypants.py/archive/v${PV}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
|
||||
|
||||
distutils_enable_sphinx docs
|
||||
distutils_enable_tests unittest
|
||||
|
||||
src_prepare() {
|
||||
local PATCHES=(
|
||||
# https://github.com/leohemsted/smartypants.py/pull/21
|
||||
"${FILESDIR}/${P}-py312.patch"
|
||||
)
|
||||
|
||||
# relevant only to upstream packaging, requires docutils
|
||||
rm tests/test_setup.py || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
eunittest -s tests
|
||||
}
|
||||
Reference in New Issue
Block a user