From e8e37e1a2524d0e7eb1d20482934f5549780d7350db70f8cd1924c7dabd8617b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 6 Aug 2020 07:31:14 +0000 Subject: [PATCH] - Update the patch according to the pending pull request gh#rollbar/pyrollbar#346. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rollbar?expand=0&rev=22 --- python-rollbar-no-unittest2.patch | 46 +++++++++++++++++++++++++++++++ python-rollbar.changes | 2 ++ 2 files changed, 48 insertions(+) diff --git a/python-rollbar-no-unittest2.patch b/python-rollbar-no-unittest2.patch index 38eac6b..b5b4504 100644 --- a/python-rollbar-no-unittest2.patch +++ b/python-rollbar-no-unittest2.patch @@ -114,6 +114,22 @@ def test_filter_ip_no_user_ip(self): request_data = {'something': 'but no ip'} +--- a/rollbar/test/test_scruburl_transform.py ++++ b/rollbar/test/test_scruburl_transform.py +@@ -1,4 +1,5 @@ + import copy ++import six + + from rollbar.lib import map, transforms, string_types, urlparse, parse_qs, python_major_version + from rollbar.lib.transforms.scruburl import ScrubUrlTransform, _starts_with_auth_re +@@ -146,5 +147,5 @@ class ScrubUrlTransformTest(BaseTest): + self.assertNotIn('secret', result['url'][0]['link']) + self.assertNotIn('secr3t', result['link'][0]['url']) + self.assertNotIn('secret', result['link'][0]['url']) +- self.assertNotRegex(result['url'][0]['link'], r'^-+$') +- self.assertNotRegex(result['link'][0]['url'], r'^-+$') ++ six.assertNotRegex(self, result['url'][0]['link'], r'^-+$') ++ six.assertNotRegex(self, result['link'][0]['url'], r'^-+$') --- a/rollbar/test/test_serializable_transform.py +++ b/rollbar/test/test_serializable_transform.py @@ -10,6 +10,8 @@ except ImportError: @@ -158,3 +174,33 @@ result = transforms.transform(start, serializable) - self.assertRegex(result['custom'], "") + six.assertRegex(self, result['custom'], "") +--- a/setup.py ++++ b/setup.py +@@ -20,7 +20,6 @@ with open(INIT_PATH) as fd: + tests_require = [ + 'webob', + 'blinker', +- 'unittest2' + ] + + version = sys.version_info +@@ -78,7 +77,7 @@ setup( + ], + install_requires=[ + 'requests>=0.12.1', +- 'six>=1.9.0' ++ 'six>=1.14.0' + ], + tests_require=tests_require, + ) +--- a/shell.nix ++++ b/shell.nix +@@ -20,7 +20,7 @@ python = let + }; + in python36.override { inherit packageOverrides; }; + pyrollbar = pkgs.callPackage ./. { inherit python; }; +-pyenv = python.withPackages(ps: with ps; [ pyrollbar twine unittest2 mock pyramid ]); ++pyenv = python.withPackages(ps: with ps; [ pyrollbar twine mock pyramid ]); + + in + diff --git a/python-rollbar.changes b/python-rollbar.changes index 5aa926d..cd28d72 100644 --- a/python-rollbar.changes +++ b/python-rollbar.changes @@ -4,6 +4,8 @@ Wed Aug 5 16:13:20 UTC 2020 - Matej Cepl - Replace self.assertRegex with six.assertRegex in python-rollbar-no-unittest2.patch to finally unrequire unittest2 (gh#rollbar/pyrollbar#340). +- Update the patch according to the pending pull request + gh#rollbar/pyrollbar#346. ------------------------------------------------------------------- Sat Jul 18 05:17:28 UTC 2020 - Matej Cepl