public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-beartype] rawhide: Add another patch for Python 3.15.0b2
@ 2026-06-06 17:27 Maxwell G
  0 siblings, 0 replies; only message in thread
From: Maxwell G @ 2026-06-06 17:27 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-beartype
Branch : rawhide
Commit : 8b966c088c5244256cd3e23a87cb087d8e89a92e
Author : Maxwell G <maxwell@gtmx.me>
Date   : 2026-06-06T12:17:29-05:00
Stats  : +65/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-beartype/c/8b966c088c5244256cd3e23a87cb087d8e89a92e?branch=rawhide

Log:
Add another patch for Python 3.15.0b2

---
diff --git a/_colorize-blacklist.patch b/_colorize-blacklist.patch
new file mode 100644
index 0000000..168d41e
--- /dev/null
+++ b/_colorize-blacklist.patch
@@ -0,0 +1,61 @@
+From 6b6a9e59d969a79b57b259ddae5a6ad1f163cba6 Mon Sep 17 00:00:00 2001
+From: leycec <leycec@gmail.com>
+Date: Sat, 6 Jun 2026 04:07:00 -0400
+Subject: [PATCH] `_colorize` blacklist.
+
+This commit blacklists Python's standard (albeit technically private)
+pure-Python `_colorize` module from consideration by `beartype.claw`
+import hooks, resolving issue #656 kindly submitted by Fedora-Ansible
+maestro @gotmax23 (Maxwell G). Since increasingly many core public
+pure-Python modules also residing in the standard library now require
+`_colorize` (e.g., `argparse`, `traceback`), this is a surprisingly
+critical resolution. Thanks a heap to:
+
+* @gotmax23 for submitting this to the upstream CPython issue tracker at
+  python/cpython#150994.
+* @DavidCEllis for joining us from CPython Land. It's a wonderful land!
+
+(*Brainy membrane of an entranced remembrance!*)
+
+---
+
+This patch bacports upstream commit 4a9fa1dcb61cd21d2b100d6c53bd8642d13f650d.
+---
+ beartype/_data/conf/dataconfblack.py | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/beartype/_data/conf/dataconfblack.py b/beartype/_data/conf/dataconfblack.py
+index f7d0b2e..4bdc250 100644
+--- a/beartype/_data/conf/dataconfblack.py
++++ b/beartype/_data/conf/dataconfblack.py
+@@ -112,6 +112,27 @@ See Also
+ #  tester returning True *ONLY* if the passed callable has a "__module__" dunder
+ #  attribute whose value is a string residing in this frozenset.
+ BLACKLIST_PACKAGE_NAMES = frozenset((
++    # ....................{ ANTIPATTERN ~ stdlib           }....................
++    # These first-party packages and modules residing in the standard Python
++    # library employ the "if False:" antipattern and are thus runtime-hostile.
++
++    # The private pure-Python "_colorize" module introduced by Python 3.15
++    # employs the "if False:" antipattern: e.g.,
++    #     # types
++    #     if False:
++    #         from typing import IO, Literal, Self, ClassVar
++    #         _theme: Theme
++    #
++    # That should instead read:
++    #     # types
++    #     lazy from typing import IO, Literal, Self, ClassVar
++    #     if False:
++    #         _theme: Theme
++    #
++    # See also the following issue resolved by this blacklist:
++    #     https://github.com/beartype/beartype/issues/656
++    '_colorize',
++
+     # ....................{ ANTIPATTERN ~ forward ref      }....................
+     # These third-party packages and modules widely employ the forward reference
+     # antipattern throughout their codebases and are thus runtime-hostile.
+-- 
+2.54.0
+

diff --git a/python-beartype.spec b/python-beartype.spec
index 37785b6..4dbbaa4 100644
--- a/python-beartype.spec
+++ b/python-beartype.spec
@@ -13,6 +13,10 @@ Source:         %forgesource
 # there are a lot of changes and their commits
 # do not apply cleanly.
 Patch:          python315.patch
+# Another fix for Python 3.15.0b2
+# https://github.com/beartype/beartype/issues/656
+# https://github.com/beartype/beartype/commit/4a9fa1dcb61cd21d2b100d6c53bd8642d13f650d
+Patch:          _colorize-blacklist.patch
 BuildArch:      noarch
 
 BuildRequires:  python3-devel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-06 17:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-06 17:27 [rpms/python-beartype] rawhide: Add another patch for Python 3.15.0b2 Maxwell G

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox