#8 Update to 2.20.0 (close RHBZ#2105849)
Merged 2 years ago by music. Opened 2 years ago by music.
rpms/ music/pre-commit v2.20.0  into  rawhide

file modified
+1
@@ -12,3 +12,4 @@ 

  /pre-commit-2.15.0.tar.gz

  /pre-commit-2.16.0.tar.gz

  /pre-commit-2.19.0.tar.gz

+ /pre-commit-2.20.0.tar.gz

file modified
+5 -10
@@ -1,22 +1,14 @@ 

  %bcond_without check

  

  Name:           pre-commit

- Version:        2.19.0

- Release:        2%{?dist}

+ Version:        2.20.0

+ Release:        1%{?dist}

  Summary:        Framework for managing and maintaining multi-language pre-commit hooks

  

  License:        MIT

  URL:            https://pre-commit.com

  Source0:        https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz

  

- # https://github.com/pre-commit/pre-commit/issues/2450

- # https://github.com/pre-commit/pre-commit/pull/2454 -- removed this fixture entirely

- Patch:          python3.11-dont-error-with-importlib-deprecation-warnings.patch

- 

- # https://github.com/pre-commit/pre-commit/issues/2451

- # https://github.com/pre-commit/pre-commit/pull/2453

- Patch:          python3.11-enhanced-tracebacks-in-tests.patch

- 

  BuildArch:      noarch

  

  BuildRequires:  python3-devel
@@ -138,6 +130,9 @@ 

  

  

  %changelog

+ * Tue Jul 12 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 2.20.0-1

+ - Update to 2.20.0 (close RHBZ#2105849)

+ 

  * Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.19.0-2

  - Rebuilt for Python 3.11

  

@@ -1,21 +0,0 @@ 

- diff --git a/tests/conftest.py b/tests/conftest.py

- index b68a1d0..b04680b 100644

- --- a/tests/conftest.py

- +++ b/tests/conftest.py

- @@ -28,11 +28,14 @@ def no_warnings(recwarn):

-      for warning in recwarn:  # pragma: no cover

-          message = str(warning.message)

-          # ImportWarning: Not importing directory '...' missing __init__(.py)

- -        if not (

- +        if not ((

-              isinstance(warning.message, ImportWarning) and

-              message.startswith('Not importing directory ') and

-              ' missing __init__' in message

- -        ):

- +        ) or (

- +            isinstance(warning.message, DeprecationWarning) and

- +            '#migrating-from-legacy' in message

- +        )):

-              warnings.append(

-                  f'{warning.filename}:{warning.lineno} {message}',

-              )

@@ -1,50 +0,0 @@ 

- From 901e831313e897e3b9313f5efbb5ef589b3e279c Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>

- Date: Sun, 10 Jul 2022 02:03:56 +0200

- Subject: [PATCH] Tests: Adjust traceback regexes to allow Python 3.11+ ^^^^^^^

- 

- Fixes https://github.com/pre-commit/pre-commit/issues/2451

- ---

-  tests/error_handler_test.py | 6 ++++++

-  1 file changed, 6 insertions(+)

- 

- diff --git a/tests/error_handler_test.py b/tests/error_handler_test.py

- index 31c71d287..47e2afaa4 100644

- --- a/tests/error_handler_test.py

- +++ b/tests/error_handler_test.py

- @@ -45,9 +45,11 @@ def test_error_handler_fatal_error(mocked_log_and_exit):

-          r'Traceback \(most recent call last\):\n'

-          r'  File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'

-          r'    yield\n'

- +        r'(    \^\^\^\^\^\n)?'

-          r'  File ".+tests.error_handler_test.py", line \d+, '

-          r'in test_error_handler_fatal_error\n'

-          r'    raise exc\n'

- +        r'(    \^\^\^\^\^\^\^\^\^\n)?'

-          r'(pre_commit\.errors\.)?FatalError: just a test\n',

-      )

-      pattern.assert_matches(mocked_log_and_exit.call_args[0][3])

- @@ -69,9 +71,11 @@ def test_error_handler_uncaught_error(mocked_log_and_exit):

-          r'Traceback \(most recent call last\):\n'

-          r'  File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'

-          r'    yield\n'

- +        r'(    \^\^\^\^\^\n)?'

-          r'  File ".+tests.error_handler_test.py", line \d+, '

-          r'in test_error_handler_uncaught_error\n'

-          r'    raise exc\n'

- +        r'(    \^\^\^\^\^\^\^\^\^\n)?'

-          r'ValueError: another test\n',

-      )

-      pattern.assert_matches(mocked_log_and_exit.call_args[0][3])

- @@ -93,9 +97,11 @@ def test_error_handler_keyboardinterrupt(mocked_log_and_exit):

-          r'Traceback \(most recent call last\):\n'

-          r'  File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'

-          r'    yield\n'

- +        r'(    \^\^\^\^\^\n)?'

-          r'  File ".+tests.error_handler_test.py", line \d+, '

-          r'in test_error_handler_keyboardinterrupt\n'

-          r'    raise exc\n'

- +        r'(    \^\^\^\^\^\^\^\^\^\n)?'

-          r'KeyboardInterrupt\n',

-      )

-      pattern.assert_matches(mocked_log_and_exit.call_args[0][3])

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (pre-commit-2.19.0.tar.gz) = 9cc28c5e9ce4be87e09e7be01138c35bbe954efb6c1400e92b1a6b5f50e426b59d74651802359015840d5ec4a5583bf8f579bf7f08eb778d5950c8c8dfe4c80c

+ SHA512 (pre-commit-2.20.0.tar.gz) = b1da558a0e5d8f2f655427089f1d0b11b01ad7513ece7a0b3b67c33529cf3584edba558c78704e6da6ca18876b1d6c0fa8698e01fd7c2439b8d4dc0a93961e52

This looks to be a straightforward update that incorporates two patches previously carried downstream, along with other minor changes.

Upstream source diff: https://github.com/pre-commit/pre-commit/compare/v2.19.0...v2.20.0
Upstream release notes: https://github.com/pre-commit/pre-commit/releases/tag/v2.20.0

+1, assuming it builds :)

Pull-Request has been merged by music

2 years ago