mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
dev-python/typed-ast: fix Python 3.10 compat for 1.4.3
I'm absolutely convinced I committed this before like a year ago? Closes: https://bugs.gentoo.org/874900 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
30
dev-python/typed-ast/files/typed-ast-1.4.3-python310.patch
Normal file
30
dev-python/typed-ast/files/typed-ast-1.4.3-python310.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
https://github.com/python/typed_ast/commit/123286721923ae8f3885dbfbad94d6ca940d5c96
|
||||
https://bugs.gentoo.org/874900
|
||||
|
||||
From 123286721923ae8f3885dbfbad94d6ca940d5c96 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Wed, 10 Nov 2021 19:15:50 +0100
|
||||
Subject: [PATCH] Define _PyUnicode_DecodeUnicodeEscape even on Python 3.6+
|
||||
(#171)
|
||||
|
||||
--- a/ast3/Python/ast.c
|
||||
+++ b/ast3/Python/ast.c
|
||||
@@ -56,6 +56,8 @@ _PyBytes_DecodeEscape(const char *s,
|
||||
return PyBytes_DecodeEscape(s, len, errors, unicode, recode_encoding);
|
||||
}
|
||||
|
||||
+#endif
|
||||
+
|
||||
PyObject *
|
||||
_PyUnicode_DecodeUnicodeEscape(const char *s,
|
||||
Py_ssize_t size,
|
||||
@@ -66,8 +68,6 @@ _PyUnicode_DecodeUnicodeEscape(const char *s,
|
||||
return PyUnicode_DecodeUnicodeEscape(s, size, errors);
|
||||
}
|
||||
|
||||
-#endif
|
||||
-
|
||||
static int validate_stmts(asdl_seq *);
|
||||
static int validate_exprs(asdl_seq *, expr_context_ty, int);
|
||||
static int validate_nonempty_seq(asdl_seq *, const char *, const char *);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7..10} )
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Python typed-ast backported"
|
||||
@@ -15,6 +15,10 @@ LICENSE="Apache-2.0 MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-python310.patch
|
||||
)
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
python_test() {
|
||||
Reference in New Issue
Block a user