summaryrefslogtreecommitdiff
path: root/dev-python/loguru
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2026-04-15 19:12:21 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2026-04-15 19:12:21 +0000
commitf6bcc45ab811bbc6c133a87192de845240fdfd9c (patch)
tree2d40b5748b807e79e3247c8672686a94d5a61290 /dev-python/loguru
parentef93034729ae626be7fa73289869f79c19ac7144 (diff)
downloadbaldeagleos-repo-f6bcc45ab811bbc6c133a87192de845240fdfd9c.tar.gz
baldeagleos-repo-f6bcc45ab811bbc6c133a87192de845240fdfd9c.tar.xz
baldeagleos-repo-f6bcc45ab811bbc6c133a87192de845240fdfd9c.zip
Adding metadata
Diffstat (limited to 'dev-python/loguru')
-rw-r--r--dev-python/loguru/files/loguru-0.7.3-py314.patch58
-rw-r--r--dev-python/loguru/loguru-0.7.3.ebuild8
2 files changed, 65 insertions, 1 deletions
diff --git a/dev-python/loguru/files/loguru-0.7.3-py314.patch b/dev-python/loguru/files/loguru-0.7.3-py314.patch
new file mode 100644
index 000000000000..c47d81608288
--- /dev/null
+++ b/dev-python/loguru/files/loguru-0.7.3-py314.patch
@@ -0,0 +1,58 @@
+From 84023e2bd8339de95250470f422f096edcb8f7b7 Mon Sep 17 00:00:00 2001
+From: Delgan <delgan.py@gmail.com>
+Date: Sat, 5 Jul 2025 22:43:12 +0200
+Subject: [PATCH] Fix failing "exception_modern" unit test with Python 3.14
+ (#1331)
+
+The test relies on the "repr()" output of a few classes which are
+not meant to be considered as a stabilized API. In this
+specific case, "Union" representation was changed upstream from
+"typing.Union" to "<class 'typing.Union'>" (kind of leak
+implementation details).
+
+I simply replaced the dummy "Union" with "Tuple" in the unit test,
+since its representation appears stable acrcoss versions.
+---
+ tests/exceptions/output/modern/type_hints.txt | 4 ++--
+ tests/exceptions/source/modern/type_hints.py | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/exceptions/output/modern/type_hints.txt b/tests/exceptions/output/modern/type_hints.txt
+index 64484d3f..917180a3 100644
+--- a/tests/exceptions/output/modern/type_hints.txt
++++ b/tests/exceptions/output/modern/type_hints.txt
+@@ -10,11 +10,11 @@
+  └ <function foo at 0xDEADBEEF>
+
+ File "tests/exceptions/source/modern/type_hints.py", line 15, in foo
+- def foo(a: int, b: Union[Name, float], c: "Name") -> T: 1 / 0
++ def foo(a: int, b: Tuple[Name, float], c: "Name") -> T: 1 / 0
+  │ │ │ │ │ │ └ ~T
+  │ │ │ │ │ └ 3
+  │ │ │ │ └ <class 'str'>
+-  │ │ │ └ typing.Union
++  │ │ │ └ typing.Tuple
+  │ │ └ 2
+  │ └ 1
+  └ <function foo at 0xDEADBEEF>
+diff --git a/tests/exceptions/source/modern/type_hints.py b/tests/exceptions/source/modern/type_hints.py
+index 84b36e51..cda95a68 100644
+--- a/tests/exceptions/source/modern/type_hints.py
++++ b/tests/exceptions/source/modern/type_hints.py
+@@ -1,6 +1,6 @@
+ # fmt: off
+ import sys
+-from typing import TypeVar, Union
++from typing import TypeVar, Tuple
+
+ from loguru import logger
+
+@@ -12,7 +12,7 @@
+ Name = str
+
+
+-def foo(a: int, b: Union[Name, float], c: "Name") -> T: 1 / 0
++def foo(a: int, b: Tuple[Name, float], c: "Name") -> T: 1 / 0
+
+
+ def main():
diff --git a/dev-python/loguru/loguru-0.7.3.ebuild b/dev-python/loguru/loguru-0.7.3.ebuild
index cbc0bada5720..7124a750a0d0 100644
--- a/dev-python/loguru/loguru-0.7.3.ebuild
+++ b/dev-python/loguru/loguru-0.7.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2024 Gentoo Authors
+# Copyright 2019-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -31,6 +31,7 @@ BDEPEND="
# filesystem buffering tests may fail
# on tmpfs with 64k PAGESZ, but pass fine on ext4
+EPYTEST_PLUGINS=()
distutils_enable_tests pytest
EPYTEST_IGNORE=(
@@ -39,6 +40,11 @@ EPYTEST_IGNORE=(
)
src_prepare() {
+ local PATCHES=(
+ # https://github.com/Delgan/loguru/commit/84023e2bd8339de95250470f422f096edcb8f7b7
+ "${FILESDIR}/${P}-py314.patch"
+ )
+
distutils-r1_src_prepare
# neuter mypy integration