diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-05-31 18:58:19 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-05-31 18:58:19 +0000 |
| commit | e709146bfe0a78864c489db0165a0156151b5b7a (patch) | |
| tree | 52317f234fa0358799dfaafe48623cf348e34936 /dev-python/overrides | |
| parent | 0180d18b2874a7cc5346b896ee0c25941be701d5 (diff) | |
| download | baldeagleos-repo-e709146bfe0a78864c489db0165a0156151b5b7a.tar.gz baldeagleos-repo-e709146bfe0a78864c489db0165a0156151b5b7a.tar.xz baldeagleos-repo-e709146bfe0a78864c489db0165a0156151b5b7a.zip | |
Adding metadata
Diffstat (limited to 'dev-python/overrides')
| -rw-r--r-- | dev-python/overrides/files/overrides-7.7.0-py314.patch | 35 | ||||
| -rw-r--r-- | dev-python/overrides/overrides-7.7.0-r1.ebuild | 26 |
2 files changed, 61 insertions, 0 deletions
diff --git a/dev-python/overrides/files/overrides-7.7.0-py314.patch b/dev-python/overrides/files/overrides-7.7.0-py314.patch new file mode 100644 index 000000000000..22f32892146f --- /dev/null +++ b/dev-python/overrides/files/overrides-7.7.0-py314.patch @@ -0,0 +1,35 @@ +From 77f006c388ab3a93c88fb8aeb3d2bde20d585682 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sat, 31 May 2025 18:58:45 +0200 +Subject: [PATCH] Fix `ImportError` on Python 3.14 due to missing + `typing.ByteString` + +Add `typing.ByteString` to `BUILTINS_MAPPING` only when it is present. +The type has been removed in Python 3.14. + +Fixes #127 +--- + overrides/typing_utils.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/overrides/typing_utils.py b/overrides/typing_utils.py +index f628d40..15ab796 100644 +--- a/overrides/typing_utils.py ++++ b/overrides/typing_utils.py +@@ -47,12 +47,15 @@ + typing.Set: set, + typing.Dict: dict, + typing.Tuple: tuple, +- typing.ByteString: bytes, # https://docs.python.org/3/library/typing.html#typing.ByteString + typing.Callable: collections.abc.Callable, + typing.Sequence: collections.abc.Sequence, + type(None): None, + } + ++if hasattr(typing, "ByteString"): ++ # https://docs.python.org/3/library/typing.html#typing.ByteString ++ BUILTINS_MAPPING[typing.ByteString] = bytes ++ + STATIC_SUBTYPE_MAPPING: typing.Dict[type, typing.Type] = { + io.TextIOWrapper: typing.TextIO, + io.TextIOBase: typing.TextIO, diff --git a/dev-python/overrides/overrides-7.7.0-r1.ebuild b/dev-python/overrides/overrides-7.7.0-r1.ebuild new file mode 100644 index 000000000000..64df1e930d8f --- /dev/null +++ b/dev-python/overrides/overrides-7.7.0-r1.ebuild @@ -0,0 +1,26 @@ +# 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_{9,10,11,12,13} pypy3 ) + +inherit distutils-r1 pypi + +DESCRIPTION="A decorator to automatically detect mismatch when overriding a method." +HOMEPAGE=" + https://pypi.org/project/overrides/ + https://github.com/mkorpela/overrides/ +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +distutils_enable_tests pytest + +PATCHES=( + # https://github.com/mkorpela/overrides/pull/133 + "${FILESDIR}/${P}-py314.patch" +) |
