15
0
Files
python-docformatter/remove-mock.patch
Steve Kowalik 487f5a9eaa - Update to 1.7.5:
* Features
    + fix: not recognizing `yield` as a sphinx field name
    + feat: support epytext style
    + feat: use tomllib for Python 3.11+
    + feat: wrap Sphinx style long parameter descriptions
    + feat: add option for user to provide list of words not to capitalize
    + Support python 3.11
  * Bug Fixes
    + fix: summary with back ticks and sphinx field names with periods
    + fix: removing newline between Sphinx field lists
    + fix: wrapping issues with reST directives, quoted URLs, and Sphinx
      field lists
    + fix: improper wrapping of short anonymous hyperlnks
    + fix: removing blank line after import section
    + fix: IndexError when only URL in long description
    + fix: removing newline after shebang
    + fix: not capitalizing first word when summary ends in period
    + fix: adding newlines around wrapped URL
    + fix: adding blank line in summary with symbol
    + fix: remove blank lines after line beginning with 'def'
    + fix: update URL handling functions
- Switch to autosetup and pyproject macros.
- No more greedy globs in %files.
- Add patches:
  * remove-mock.patch
    + Do not use external mock module
  * support-python-312.patch
    + Support Python 3.12+ changes
  * do-not-require-venv.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docformatter?expand=0&rev=19
2024-11-29 00:00:36 +00:00

29 lines
781 B
Diff

From ba56f8498a1ebed724316e3affcc2c98eeac4ca7 Mon Sep 17 00:00:00 2001
From: Alexandre Detiste <alexandre.detiste@gmail.com>
Date: Sat, 27 Apr 2024 13:44:08 +0200
Subject: [PATCH] prefer new unittest.mock from the standard library
---
tests/test_utility_functions.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/test_utility_functions.py b/tests/test_utility_functions.py
index c9fffd3..e127f33 100644
--- a/tests/test_utility_functions.py
+++ b/tests/test_utility_functions.py
@@ -36,9 +36,13 @@
- is_some_sort_of_code()
"""
+try:
+ from unittest.mock import patch
+except ImportError:
+ from mock import patch
+
# Third Party Imports
import pytest
-from mock import patch
# docformatter Package Imports
import docformatter