public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Gwyn Ciesla <gwync@protonmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/duplicity] epel10: Migrate from third-party mock module to unittest.mock
Date: Fri, 09 Oct 2026 15:24:43 GMT	[thread overview]
Message-ID: <179155948392.1.10183401880158351774.rpms-duplicity-67a00ca45665@fedoraproject.org> (raw)

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):

                 reply	other threads:[~2026-10-09 15:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179155948392.1.10183401880158351774.rpms-duplicity-67a00ca45665@fedoraproject.org \
    --to=gwync@protonmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox