pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-confuse



Module Name:    pkgsrc
Committed By:   wiz
Date:           Mon Oct 13 12:28:04 UTC 2025

Modified Files:
        pkgsrc/devel/py-confuse: Makefile distinfo
Added Files:
        pkgsrc/devel/py-confuse/patches: patch-confuse_util.py

Log Message:
py-confuse: address deprecation of pkgutil.get_loader

using upstream patch

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/devel/py-confuse/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/py-confuse/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/py-confuse/patches/patch-confuse_util.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-confuse/Makefile
diff -u pkgsrc/devel/py-confuse/Makefile:1.8 pkgsrc/devel/py-confuse/Makefile:1.9
--- pkgsrc/devel/py-confuse/Makefile:1.8        Thu Oct  9 07:57:29 2025
+++ pkgsrc/devel/py-confuse/Makefile    Mon Oct 13 12:28:04 2025
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2025/10/09 07:57:29 wiz Exp $
+# $NetBSD: Makefile,v 1.9 2025/10/13 12:28:04 wiz Exp $
 
 DISTNAME=      confuse-2.0.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=c/confuse/}
 
@@ -18,6 +18,9 @@ USE_LANGUAGES=        # none
 
 PYTHON_VERSIONS_INCOMPATIBLE=  310
 
+post-install:
+       ${RM} ${DESTDIR}${PREFIX}/${PYSITELIB}/confuse/util.py.orig
+
 do-test:
        cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHONBIN} -m unittest discover -v
 

Index: pkgsrc/devel/py-confuse/distinfo
diff -u pkgsrc/devel/py-confuse/distinfo:1.2 pkgsrc/devel/py-confuse/distinfo:1.3
--- pkgsrc/devel/py-confuse/distinfo:1.2        Mon Apr  3 12:01:24 2023
+++ pkgsrc/devel/py-confuse/distinfo    Mon Oct 13 12:28:04 2025
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.2 2023/04/03 12:01:24 adam Exp $
+$NetBSD: distinfo,v 1.3 2025/10/13 12:28:04 wiz Exp $
 
 BLAKE2s (confuse-2.0.1.tar.gz) = 38b1f313da61efce3ab670f192220148bf717b339c800261b3531defde96e27f
 SHA512 (confuse-2.0.1.tar.gz) = fe9e17d3b321079290fa2c7db64cd5664db11f1277fe608cf5a1419254b83eee9bc169e34631a429ab1bf47779ea709156b8310a97e65fae32a20802b379fa76
 Size (confuse-2.0.1.tar.gz) = 50872 bytes
+SHA1 (patch-confuse_util.py) = a94e38588c21511b127f27e2817fa083454e3b78

Added files:

Index: pkgsrc/devel/py-confuse/patches/patch-confuse_util.py
diff -u /dev/null pkgsrc/devel/py-confuse/patches/patch-confuse_util.py:1.1
--- /dev/null   Mon Oct 13 12:28:04 2025
+++ pkgsrc/devel/py-confuse/patches/patch-confuse_util.py       Mon Oct 13 12:28:04 2025
@@ -0,0 +1,35 @@
+$NetBSD: patch-confuse_util.py,v 1.1 2025/10/13 12:28:04 wiz Exp $
+
+address deprecation of  pkgutil.get_loader
+https://github.com/beetbox/confuse/commit/ed79b4b9f53fe99293139c18f053168e564508b8
+
+--- confuse/util.py.orig       2022-07-16 18:35:30.824052000 +0000
++++ confuse/util.py
+@@ -1,9 +1,9 @@
++import importlib.util
+ import os
+ import sys
+ import argparse
+ import optparse
+ import platform
+-import pkgutil
+ 
+ 
+ UNIX_DIR_FALLBACK = '~/.config'
+@@ -114,8 +114,14 @@ def find_package_path(name):
+     None if the path could not be identified (e.g., if
+     ``name == "__main__"``).
+     """
+-    # Based on get_root_path from Flask by Armin Ronacher.
+-    loader = pkgutil.get_loader(name)
++    # Based on get_root_path from Flask by Armin Ronacher, cf.
++    # https://github.com/pallets/flask/blob/85c5d93cbd049c4bd0679c36fd1ddcae8c37b642/src/flask/helpers.py#L570
++    try:
++        spec = importlib.util.find_spec(name)
++    except (ImportError, ValueError):
++        return None
++
++    loader = spec.loader
+     if loader is None or name == '__main__':
+         return None
+ 



Home | Main Index | Thread Index | Old Index