Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-osc-tiny for openSUSE:Factory
checked in at 2022-01-21 01:25:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-osc-tiny (Old)
and /work/SRC/openSUSE:Factory/.python-osc-tiny.new.1938 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-osc-tiny"
Fri Jan 21 01:25:36 2022 rev:11 rq:947671 version:0.4.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-osc-tiny/python-osc-tiny.changes
2021-11-03 17:27:17.481370874 +0100
+++
/work/SRC/openSUSE:Factory/.python-osc-tiny.new.1938/python-osc-tiny.changes
2022-01-21 01:26:15.858239976 +0100
@@ -1,0 +2,6 @@
+Thu Jan 20 10:54:08 UTC 2022 - Andreas Hasenkopf <[email protected]>
+
+- Release 0.4.2
+ * Bugfix: Explicitly quote special characters in URLs
+
+-------------------------------------------------------------------
Old:
----
osc-tiny-0.4.1.tar.gz
New:
----
osc-tiny-0.4.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-osc-tiny.spec ++++++
--- /var/tmp/diff_new_pack.SAEeIJ/_old 2022-01-21 01:26:16.266237179 +0100
+++ /var/tmp/diff_new_pack.SAEeIJ/_new 2022-01-21 01:26:16.274237125 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-osc-tiny
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-osc-tiny
-Version: 0.4.1
+Version: 0.4.2
Release: 0
Summary: Client API for openSUSE BuildService
License: MIT
++++++ osc-tiny-0.4.1.tar.gz -> osc-tiny-0.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.4.1/PKG-INFO new/osc-tiny-0.4.2/PKG-INFO
--- old/osc-tiny-0.4.1/PKG-INFO 2021-09-22 11:55:15.028164000 +0200
+++ new/osc-tiny-0.4.2/PKG-INFO 2022-01-20 11:42:50.830566000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: osc-tiny
-Version: 0.4.1
+Version: 0.4.2
Summary: Client API for openSUSE BuildService
Home-page: http://github.com/crazyscientist/osc-tiny
Author: Andreas Hasenkopf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.4.1/osc_tiny.egg-info/PKG-INFO
new/osc-tiny-0.4.2/osc_tiny.egg-info/PKG-INFO
--- old/osc-tiny-0.4.1/osc_tiny.egg-info/PKG-INFO 2021-09-22
11:55:15.000000000 +0200
+++ new/osc-tiny-0.4.2/osc_tiny.egg-info/PKG-INFO 2022-01-20
11:42:50.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: osc-tiny
-Version: 0.4.1
+Version: 0.4.2
Summary: Client API for openSUSE BuildService
Home-page: http://github.com/crazyscientist/osc-tiny
Author: Andreas Hasenkopf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.4.1/osctiny/__init__.py
new/osc-tiny-0.4.2/osctiny/__init__.py
--- old/osc-tiny-0.4.1/osctiny/__init__.py 2021-09-22 11:55:07.000000000
+0200
+++ new/osc-tiny-0.4.2/osctiny/__init__.py 2022-01-20 11:42:40.000000000
+0100
@@ -6,4 +6,4 @@
__all__ = ['Osc', 'bs_requests', 'buildresults', 'comments', 'packages',
'projects', 'search', 'users']
-__version__ = "0.4.1"
+__version__ = "0.4.2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.4.1/osctiny/osc.py
new/osc-tiny-0.4.2/osctiny/osc.py
--- old/osc-tiny-0.4.1/osctiny/osc.py 2021-09-22 11:55:07.000000000 +0200
+++ new/osc-tiny-0.4.2/osctiny/osc.py 2022-01-20 11:42:40.000000000 +0100
@@ -8,6 +8,7 @@
import re
from ssl import get_default_verify_paths
import time
+from urllib.parse import quote
import warnings
# pylint: disable=no-name-in-module
@@ -218,7 +219,7 @@
req = Request(
method,
- url,
+ url.replace("#", quote("#")).replace("?", quote("?")),
auth=self.auth,
data=self.handle_params(data),
params=self.handle_params(params)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.4.1/osctiny/tests/test_basic.py
new/osc-tiny-0.4.2/osctiny/tests/test_basic.py
--- old/osc-tiny-0.4.1/osctiny/tests/test_basic.py 2021-09-22
11:55:07.000000000 +0200
+++ new/osc-tiny-0.4.2/osctiny/tests/test_basic.py 2022-01-20
11:42:40.000000000 +0100
@@ -1,6 +1,11 @@
# -*- coding: utf-8 -*-
+import re
+from urllib.parse import unquote_plus
+
+import responses
+
from ..extensions import projects
-from .base import OscTest
+from .base import OscTest, CallbackFactory
class BasicTest(OscTest):
@@ -55,3 +60,33 @@
for attr, expected in data:
with self.subTest(attr):
_run(attr, expected)
+
+ @responses.activate
+ def test_request_url_encode(self):
+ pattern = re.compile(self.osc.url + r'file/(?P<filename>.*)')
+ special_chars = ('#', '?')
+ data = [
+ ["Clean URL", "hello_world.txt"],
+ ["URL with hashtag", "he??????#w??r??d.txt"],
+ ["URL with question mark", "hello?w??r????.txt"],
+ ["URL with ampersand", "he??????&world.txt"]
+ ]
+
+ def callback(headers, params, request):
+ match = pattern.match(request.url)
+ self.assertIsNotNone(match)
+ print(match.groups())
+ self.assertEqual(unquote_plus(match.group("filename")), filename)
+ for special_c in special_chars:
+ self.assertNotIn(special_c, match.group("filename"))
+ return 200, headers, ""
+
+ self.mock_request(
+ method=responses.GET,
+ url=pattern,
+ callback=CallbackFactory(callback)
+ )
+
+ for name, filename in data:
+ with self.subTest(name):
+ self.osc.request(f"{self.osc.url}file/{filename}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.4.1/setup.py new/osc-tiny-0.4.2/setup.py
--- old/osc-tiny-0.4.1/setup.py 2021-09-22 11:55:07.000000000 +0200
+++ new/osc-tiny-0.4.2/setup.py 2022-01-20 11:42:40.000000000 +0100
@@ -19,7 +19,7 @@
setup(
name='osc-tiny',
- version='0.4.1',
+ version='0.4.2',
description='Client API for openSUSE BuildService',
long_description=long_description,
long_description_content_type="text/markdown",