public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/duplicity] epel10: Migrate from third-party mock module to unittest.mock
@ 2026-10-09 15:24 Gwyn Ciesla
0 siblings, 0 replies; only message in thread
From: Gwyn Ciesla @ 2026-10-09 15:24 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/duplicity
Branch : epel10
Commit : 67a00ca45665c0fc233dabd4f1cabb611af45eba
Author : Gwyn Ciesla <gwync@protonmail.com>
Date : 2022-05-25T10:19:16-05:00
Stats : +61/-2 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/duplicity/c/67a00ca45665c0fc233dabd4f1cabb611af45eba?branch=epel10
Log:
Migrate from third-party mock module to unittest.mock
---
diff --git a/changelog b/changelog
index 53e7952..ab5cf48 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,6 @@
+* Wed May 25 2022 Gwyn Ciesla <gwync@protonmail.com> - 0.8.23-2
+- Migrate to unittest.mock.
+
* Mon May 16 2022 Gwyn Ciesla <gwync@protonmail.com> - 0.8.23-1
- 0.8.23
diff --git a/duplicity.spec b/duplicity.spec
index bdda832..aa1978d 100644
--- a/duplicity.spec
+++ b/duplicity.spec
@@ -9,6 +9,8 @@ License: GPLv2+
URL: http://www.nongnu.org/duplicity/
Source0: https://launchpad.net/duplicity/0.8-series/%{version}/+download/duplicity-%{version}.tar.gz
+Patch0: mock.patch
+
Requires: ca-certificates
Requires: gnupg >= 1.0.6
Requires: python3dist(lockfile)
@@ -33,7 +35,6 @@ BuildRequires: gnupg >= 1.0.6
BuildRequires: python3dist(setuptools-scm)
BuildRequires: python3dist(fasteners)
BuildRequires: python3dist(future)
-BuildRequires: python3dist(mock)
BuildRequires: python3dist(pexpect)
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-runner)
@@ -53,7 +54,7 @@ unix permissions, directories, symbolic links, fifos, device files,
but not hard links.
%prep
-%autosetup -p1
+%autosetup -p0
%generate_buildrequires
%pyproject_buildrequires
diff --git a/mock.patch b/mock.patch
new file mode 100644
index 0000000..edf65a5
--- /dev/null
+++ b/mock.patch
@@ -0,0 +1,55 @@
+--- duplicity/librsync.py~ 2022-04-08 13:29:23.000000000 -0500
++++ duplicity/librsync.py 2022-05-25 08:58:11.996961949 -0500
+@@ -36,7 +36,7 @@
+ from . import _librsync
+
+ if os.environ.get(u'READTHEDOCS') == u'True':
+- import mock # pylint: disable=import-error
++ import unittest.mock as mock # pylint: disable=import-error
+ import duplicity
+ duplicity._librsync = mock.MagicMock()
+
+--- testing/unit/test_backend.py~ 2022-04-08 13:29:23.000000000 -0500
++++ testing/unit/test_backend.py 2022-05-25 08:58:55.457807456 -0500
+@@ -24,7 +24,7 @@
+ standard_library.install_aliases()
+
+ import sys
+-import mock
++import unittest.mock as mock
+ import unittest
+
+ import duplicity.backend
+--- testing/unit/test_selection.py~ 2022-04-08 13:29:23.000000000 -0500
++++ testing/unit/test_selection.py 2022-05-25 08:59:11.349750964 -0500
+@@ -32,7 +32,7 @@
+ from duplicity.selection import * # pylint: disable=unused-wildcard-import,redefined-builtin
+ from duplicity.lazy import * # pylint: disable=unused-wildcard-import,redefined-builtin
+ from . import UnitTestCase
+-from mock import patch
++from unittest.mock import patch
+
+
+ class MatchingTest(UnitTestCase):
+--- testing/unit/test_manifest.py~ 2022-04-08 13:29:23.000000000 -0500
++++ testing/unit/test_manifest.py 2022-05-25 08:59:29.599686091 -0500
+@@ -25,7 +25,7 @@
+
+ import re
+ import unittest
+-from mock import patch
++from unittest.mock import patch
+
+ from duplicity import config
+ from duplicity import manifest
+--- testing/unit/test_globmatch.py~ 2022-04-08 13:29:23.000000000 -0500
++++ testing/unit/test_globmatch.py 2022-05-25 08:59:41.432644030 -0500
+@@ -31,7 +31,7 @@
+ from duplicity.globmatch import * # pylint: disable=unused-wildcard-import,redefined-builtin
+ from duplicity.path import * # pylint: disable=unused-wildcard-import,redefined-builtin
+ from testing import _runtest_dir
+-from mock import patch
++from unittest.mock import patch
+
+
+ def sel_file(glob_str, include, file_path):
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-09 15:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 15:24 [rpms/duplicity] epel10: Migrate from third-party mock module to unittest.mock Gwyn Ciesla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox