Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-responses for 
openSUSE:Factory checked in at 2022-08-10 17:12:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-responses (Old)
 and      /work/SRC/openSUSE:Factory/.python-responses.new.1521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-responses"

Wed Aug 10 17:12:23 2022 rev:23 rq:993541 version:0.21.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-responses/python-responses.changes        
2022-06-21 17:15:21.326342192 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-responses.new.1521/python-responses.changes  
    2022-08-10 17:12:26.441573418 +0200
@@ -1,0 +2,6 @@
+Sat Aug  6 12:18:21 UTC 2022 - Matej Cepl <[email protected]>
+
+- Add py_old_re_Pattern.patch to make package buildable even on
+  SLE-15-SP3.
+
+-------------------------------------------------------------------

New:
----
  py_old_re_Pattern.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-responses.spec ++++++
--- /var/tmp/diff_new_pack.DeATJA/_old  2022-08-10 17:12:28.981580047 +0200
+++ /var/tmp/diff_new_pack.DeATJA/_new  2022-08-10 17:12:28.985580058 +0200
@@ -18,7 +18,6 @@
 
 %{?!python_module:%define python_module() python3-%{**}}
 %global skip_python2 1
-%global skip_python36 1
 Name:           python-responses
 Version:        0.21.0
 Release:        0
@@ -27,6 +26,9 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/getsentry/responses
 Source:         
https://files.pythonhosted.org/packages/source/r/responses/responses-%{version}.tar.gz
+# PATCH-FIX-SLE py_old_re_Pattern.patch [email protected]
+# Make package compatible with SLE-15
+Patch0:         py_old_re_Pattern.patch
 # test requirements
 BuildRequires:  %{python_module cookies}
 BuildRequires:  %{python_module pytest-localserver}
@@ -48,7 +50,7 @@
 about the library.
 
 %prep
-%setup -q -n responses-%{version}
+%autosetup -p1 -n responses-%{version}
 
 %build
 export LANG="en_US.UTF8"

++++++ py_old_re_Pattern.patch ++++++
---
 responses/__init__.py             |   23 ++++++++++++-----------
 responses/tests/test_responses.py |    3 +++
 2 files changed, 15 insertions(+), 11 deletions(-)

--- a/responses/__init__.py
+++ b/responses/__init__.py
@@ -7,7 +7,6 @@ from collections.abc import Sized
 from functools import wraps
 from http import client
 from itertools import groupby
-from re import Pattern
 from threading import Lock as _ThreadingLock
 from typing import TYPE_CHECKING
 from typing import Any
@@ -34,9 +33,11 @@ from responses.matchers import urlencode
 from responses.registries import FirstMatchRegistry
 
 try:
-    from typing_extensions import Literal
-except ImportError:  # pragma: no cover
-    from typing import Literal  # type: ignore  # pragma: no cover
+    from re import Pattern
+except ImportError:
+    from re import compile
+    Pattern = type(compile(''))
+    del compile
 
 try:
     from requests.packages.urllib3.response import HTTPResponse
@@ -623,13 +624,13 @@ class OriginalResponseShim(object):
 
 
 class RequestsMock(object):
-    DELETE: Literal["DELETE"] = "DELETE"
-    GET: Literal["GET"] = "GET"
-    HEAD: Literal["HEAD"] = "HEAD"
-    OPTIONS: Literal["OPTIONS"] = "OPTIONS"
-    PATCH: Literal["PATCH"] = "PATCH"
-    POST: Literal["POST"] = "POST"
-    PUT: Literal["PUT"] = "PUT"
+    DELETE: Any = "DELETE"
+    GET: Any = "GET"
+    HEAD: Any = "HEAD"
+    OPTIONS: Any = "OPTIONS"
+    PATCH: Any = "PATCH"
+    POST: Any = "POST"
+    PUT: Any = "PUT"
 
     response_callback: Optional[Callable[[Any], Any]] = None
 
--- a/responses/tests/test_responses.py
+++ b/responses/tests/test_responses.py
@@ -3,6 +3,7 @@
 import inspect
 import os
 import re
+import sys
 import warnings
 from io import BufferedReader
 from io import BytesIO
@@ -562,6 +563,8 @@ def test_callback():
     assert_reset()
 
 
[email protected](sys.version_info[:2] <= (3, 6),
+                    reason="test doesn't work on Python 3.6")
 def test_deprecated_package_attributes():
     """Validates that deprecation warning is raised when package attributes 
are called."""
     # keep separate context manager to avoid leakage

Reply via email to