17
0

Compare commits

6 Commits

Author SHA256 Message Date
aba7b996d3 Accepting request 1278544 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1278544
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-docformatter?expand=0&rev=11
2025-05-20 15:04:08 +00:00
74a6fc6fdc Accepting request 1278378 from home:glaubitz:branches:devel:languages:python
- Update to 1.7.7
  * Merged pull requests:
    + chore(deps-dev): bump black from 22.12.0 to 24.3.0
    + chore(deps-dev): bump jinja2 from 3.1.4 to 3.1.6
    + chore(deps-dev): bump requests from 2.31.0 to 2.32.2
    + chore(deps-dev): bump virtualenv from 20.21.1 to 20.26.6
    + chore(deps-dev): bump zipp from 3.15.0 to 3.19.1
    + chore(deps-dev): bump urllib3 from 2.0.7 to 2.2.2
- from version 1.7.6
  * Features
    + prefer new unittest.mock from the standard library #280
    + Handle abbreviation 'etc.' (et cetera) #273
  * Bug Fixes
    + Do not double-process urls #284
  * Merged pull requests:
    + Fix pre-commit syntax #266
    + Update version listed in documentation's Pre-Commit example #262
    + Add missing comma in requirements table #261
- Drop remove-mock.patch, merged upstream
- Drop support-python-312.patch, merged upstream
- Use Python 3.11 on SLE-15 by default

OBS-URL: https://build.opensuse.org/request/show/1278378
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docformatter?expand=0&rev=23
2025-05-20 08:06:42 +00:00
6e80026855 Accepting request 1238300 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1238300
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-docformatter?expand=0&rev=10
2025-01-16 19:24:21 +00:00
cd6b470baa Accepting request 1238277 from home:mcalabkova:branches:devel:languages:python
- Fix packaging

OBS-URL: https://build.opensuse.org/request/show/1238277
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docformatter?expand=0&rev=21
2025-01-16 16:29:04 +00:00
77e70f2717 Accepting request 1227206 from devel:languages:python
- 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/request/show/1227206
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-docformatter?expand=0&rev=9
2024-11-30 12:27:45 +00:00
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
3 changed files with 1 additions and 40 deletions

View File

@@ -1,32 +0,0 @@
From 412479e5d6b02f7dd7e20f870132a413dc83898a Mon Sep 17 00:00:00 2001
From: Doyle Rowland <doyle.rowland@reliaqual.com>
Date: Thu, 14 Aug 2025 17:58:02 -0400
Subject: [PATCH] fix: explicitly ignore utf_16 and utf_32 encoding
---
src/docformatter/encode.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/docformatter/encode.py b/src/docformatter/encode.py
index ac55ee9..c7e36f0 100644
--- a/src/docformatter/encode.py
+++ b/src/docformatter/encode.py
@@ -64,9 +64,15 @@ def do_detect_encoding(self, filename) -> None:
"""
try:
detection_result = from_path(filename).best()
- self.encoding = (
- detection_result.encoding if detection_result else self.DEFAULT_ENCODING
- )
+ if detection_result and detection_result.encoding in ["utf_16", "utf_32"]:
+ # Treat undetectable/binary encodings as failure
+ self.encoding = self.DEFAULT_ENCODING
+ else:
+ self.encoding = (
+ detection_result.encoding
+ if detection_result
+ else self.DEFAULT_ENCODING
+ )
# Check for correctness of encoding.
with self.do_open_with_encoding(filename) as check_file:

View File

@@ -1,8 +1,3 @@
-------------------------------------------------------------------
Fri Nov 14 13:51:14 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Add upstream ignore-utf16.patch to fix test failure
------------------------------------------------------------------- -------------------------------------------------------------------
Mon May 19 10:01:24 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> Mon May 19 10:01:24 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-docformatter # spec file for package python-docformatter
# #
# Copyright (c) 2025 SUSE LLC and contributors # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -26,8 +26,6 @@ URL: https://github.com/myint/docformatter
Source: https://github.com/PyCQA/docformatter/archive/refs/tags/v%{version}.tar.gz#/docformatter-%{version}.tar.gz Source: https://github.com/PyCQA/docformatter/archive/refs/tags/v%{version}.tar.gz#/docformatter-%{version}.tar.gz
# PATCH-FIX-OPENSUSE Do not require virtualenvs to run the tests # PATCH-FIX-OPENSUSE Do not require virtualenvs to run the tests
Patch0: do-not-require-venv.patch Patch0: do-not-require-venv.patch
# PATCH-FIX-UPSTREAM cherry-pick from https://github.com/PyCQA/docformatter/pull/323 fix: issue 321
Patch1: ignore-utf16.patch
BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core} BuildRequires: %{python_module poetry-core}