public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-venusian] epel10.2: Backport Python 3.12 fixes (close RHBZ#2176132)
@ 2026-06-22 16:02 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-06-22 16:02 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-venusian
Branch : epel10.2
Commit : 3e95d5fc189d6050b5a5457a3236e8b4598aebbc
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2023-03-07T11:24:55-05:00
Stats  : +135/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-venusian/c/3e95d5fc189d6050b5a5457a3236e8b4598aebbc?branch=epel10.2

Log:
Backport Python 3.12 fixes (close RHBZ#2176132)

---
diff --git a/python-venusian.spec b/python-venusian.spec
index 3c9dde8..cf82a0f 100644
--- a/python-venusian.spec
+++ b/python-venusian.spec
@@ -11,6 +11,12 @@ License:        BSD-3-Clause-Modification AND ZPL-2.1
 URL:            https://github.com/Pylons/venusian
 Source0:        %{pypi_source venusian}
 
+# Fixup new deprecations coming soon in Python 3.12
+# https://github.com/Pylons/venusian/issues/78
+# https://github.com/Pylons/venusian/pull/82
+# Rebased on 3.0.0.
+Patch:          venusian-3.0.0-pr-82.patch
+
 BuildArch:      noarch
 
 BuildRequires:  python3-devel
@@ -37,7 +43,7 @@ Summary:        %{summary}
 
 
 %prep
-%autosetup -n venusian-%{version}
+%autosetup -n venusian-%{version} -p1
 
 # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
 sed -r -i 's/ --cov[^[:blank:]]*//g' setup.cfg

diff --git a/venusian-3.0.0-pr-82.patch b/venusian-3.0.0-pr-82.patch
new file mode 100644
index 0000000..1221582
--- /dev/null
+++ b/venusian-3.0.0-pr-82.patch
@@ -0,0 +1,128 @@
+From fc7a1bc7b924e85109a3d25a7f9811b16fcb5700 Mon Sep 17 00:00:00 2001
+From: Gouji Ochiai <gjo.ext@gmail.com>
+Date: Fri, 23 Dec 2022 21:36:18 +0900
+Subject: [PATCH 1/4] fixes #78: remove python 3.12 depreciation warnings
+
+---
+ src/venusian/__init__.py |  3 ++-
+ src/venusian/compat.py   | 12 ++++++++++++
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+ create mode 100644 src/venusian/compat.py
+
+diff --git a/src/venusian/__init__.py b/src/venusian/__init__.py
+index 1b7d52a..3b1a68f 100644
+--- a/src/venusian/__init__.py
++++ b/src/venusian/__init__.py
+@@ -3,6 +3,7 @@ from pkgutil import iter_modules
+ import sys
+ 
+ from venusian.advice import getFrameInfo
++from venusian.compat import compat_find_loader
+ 
+ ATTACH_ATTR = "__venusian_callbacks__"
+ LIFTONLY_ATTR = "__venusian_liftonly_callbacks__"
+@@ -202,7 +203,7 @@ class Scanner(object):
+             )
+ 
+             for importer, modname, ispkg in results:
+-                loader = importer.find_module(modname)
++                loader = compat_find_loader(importer, modname)
+                 if loader is not None:  # happens on pypy with orphaned pyc
+                     try:
+                         get_filename = getattr(loader, "get_filename", None)
+diff --git a/src/venusian/compat.py b/src/venusian/compat.py
+new file mode 100644
+index 0000000..0245b1a
+--- /dev/null
++++ b/src/venusian/compat.py
+@@ -0,0 +1,12 @@
++import sys
++
++if sys.version_info[0] == 3 and sys.version_info[1] < 10:
++
++    def compat_find_loader(importer, modname):
++        return importer.find_module(modname)
++
++else:
++
++    def compat_find_loader(importer, modname):
++        spec = importer.find_spec(modname)
++        return spec.loader
+-- 
+2.39.2
+
+
+From 79b7200137abd631a3d3d90c0d8d14d2985a5582 Mon Sep 17 00:00:00 2001
+From: Gouji Ochiai <gjo.ext@gmail.com>
+Date: Fri, 23 Dec 2022 21:42:44 +0900
+Subject: [PATCH 2/4] pass tox -e docs
+
+---
+ tox.ini | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tox.ini b/tox.ini
+index 7d31112..68a9f39 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -42,6 +42,8 @@ deps =
+     twine
+ 
+ [testenv:docs]
++allowlist_externals =
++    make
+ whitelist_externals =
+     make
+ commands =
+-- 
+2.39.2
+
+
+From 5510300130253a996101c5bdb2a637846c4c0e49 Mon Sep 17 00:00:00 2001
+From: Gouji Ochiai <gjo.ext@gmail.com>
+Date: Fri, 23 Dec 2022 21:43:24 +0900
+Subject: [PATCH 3/4] sign to CONTRIBUTORS.txt
+
+---
+ CONTRIBUTORS.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
+index 2e05016..221a804 100644
+--- a/CONTRIBUTORS.txt
++++ b/CONTRIBUTORS.txt
+@@ -109,3 +109,4 @@ Contributors
+ - Marc Abramowitz, 2015/02/24
+ - Bert JW Regeer, 2017-04-24
+ - Steve Piercy, 2017-08-31
++- Gouji Ochiai, 2022-12-23
+-- 
+2.39.2
+
+
+From a30aaa7635b04bf9abc06ce389e5d70f853cee0c Mon Sep 17 00:00:00 2001
+From: Gouji Ochiai <gjo.ext@gmail.com>
+Date: Wed, 28 Dec 2022 00:14:19 +0900
+Subject: [PATCH 4/4] Revert "pass tox -e docs"
+
+This reverts commit 3fc0f939402a409cd40f84371dc5c5325f971f2c.
+---
+ tox.ini | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/tox.ini b/tox.ini
+index 68a9f39..7d31112 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -42,8 +42,6 @@ deps =
+     twine
+ 
+ [testenv:docs]
+-allowlist_externals =
+-    make
+ whitelist_externals =
+     make
+ commands =
+-- 
+2.39.2
+

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

only message in thread, other threads:[~2026-06-22 16:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-22 16:02 [rpms/python-venusian] epel10.2: Backport Python 3.12 fixes (close RHBZ#2176132) Benjamin A. Beasley

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