diff options
author | ptrcnull <git@ptrcnull.me> | 2024-04-19 16:05:14 +0200 |
---|---|---|
committer | ptrcnull <git@ptrcnull.me> | 2024-04-19 16:05:24 +0200 |
commit | e44f223f7f2ec509ba80e48b1318183a3d054a0c (patch) | |
tree | 47dba639d21cf171c7faeeb7a94aa0a3ece37e60 | |
parent | fb7dabe819add721afe0fcadeeb10ab6354c9658 (diff) |
-rw-r--r-- | testing/py3-snapshottest/APKBUILD | 7 | ||||
-rw-r--r-- | testing/py3-snapshottest/importlib.patch | 24 |
2 files changed, 29 insertions, 2 deletions
diff --git a/testing/py3-snapshottest/APKBUILD b/testing/py3-snapshottest/APKBUILD index 994327719b5..ab8ae36b0bd 100644 --- a/testing/py3-snapshottest/APKBUILD +++ b/testing/py3-snapshottest/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Bart Ribbers <bribbers@disroot.org> pkgname=py3-snapshottest pkgver=0.6.0 -pkgrel=3 +pkgrel=4 pkgdesc="Snapshot testing for pytest, unittest, Django, and Nose" url="https://github.com/syrusakbary/snapshottest" arch="noarch" @@ -21,7 +21,9 @@ checkdepends=" py3-six " subpackages="$pkgname-pyc" -source="https://pypi.python.org/packages/source/s/snapshottest/snapshottest-$pkgver.tar.gz" +source="https://pypi.python.org/packages/source/s/snapshottest/snapshottest-$pkgver.tar.gz + importlib.patch + " builddir="$srcdir/snapshottest-$pkgver" build() { @@ -38,4 +40,5 @@ package() { sha512sums=" 0f39ec0b2255291d35bcc873b73b3802b427efd53b8d12ab373a76193dfe9d108534980f8081be38fadbf2392915e8e0d63547e5bf0479ea06d8d79cde4016ce snapshottest-0.6.0.tar.gz +2ee20d34f7db1a736401d0b217576dad1b308bb69b578a17123cfeab3e363c0cfc0348e321c2f299f01324997034230c61ed3eba6145da1f726f64474d5aa39a importlib.patch " diff --git a/testing/py3-snapshottest/importlib.patch b/testing/py3-snapshottest/importlib.patch new file mode 100644 index 00000000000..bf4d2572d82 --- /dev/null +++ b/testing/py3-snapshottest/importlib.patch @@ -0,0 +1,24 @@ +replace deprecated imp module + +diff --git a/snapshottest/module.py b/snapshottest/module.py +index 2f02c83..b0959ed 100644 +--- a/snapshottest/module.py ++++ b/snapshottest/module.py +@@ -1,7 +1,7 @@ + import codecs + import errno + import os +-import imp ++from importlib.machinery import SourceFileLoader + from collections import defaultdict + import logging + +@@ -29,7 +29,7 @@ class SnapshotModule(object): + + def load_snapshots(self): + try: +- source = imp.load_source(self.module, self.filepath) ++ source = SourceFileLoader(self.module, self.filepath).load_module() + # except FileNotFoundError: # Python 3 + except (IOError, OSError) as err: + if err.errno == errno.ENOENT: |