dev-python/pure-eval: Enable py3.15

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2026-09-05 20:37:38 +02:00
parent 99567ada8e
commit f098b99dec
2 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
From d70a873553d3163373ebcbb4217a1144fd371df2 Mon Sep 17 00:00:00 2001
From: Alex Hall <alex.mojaki@gmail.com>
Date: Sun, 11 Jan 2026 14:05:46 +0200
Subject: [PATCH] Test and fix python 3.15
--- a/pure_eval/my_getattr_static.py
+++ b/pure_eval/my_getattr_static.py
@@ -69,7 +69,7 @@ def getattr_static(obj, attr):
klass = type(obj)
dict_attr = _shadowed_dict(klass)
if (dict_attr is _sentinel or
- type(dict_attr) is types.MemberDescriptorType):
+ type(dict_attr) is types.MemberDescriptorType or type(dict_attr) is types.GetSetDescriptorType):
instance_result = _check_instance(obj, attr)
else:
raise CannotEval

View File

@@ -0,0 +1,27 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{12..15} python3_{14..15}t )
inherit distutils-r1 pypi
DESCRIPTION="Safely evaluate AST nodes without side effects"
HOMEPAGE="
https://github.com/alexmojaki/pure_eval/
https://pypi.org/project/pure-eval/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
PATCHES=(
# https://github.com/alexmojaki/pure_eval/pull/24
"${FILESDIR}/${P}-py315.patch"
)