From bc26911656d147ea59b03ff40f57c3efaa073dc21cc9ed39257624d39eae87f3 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 12 Jan 2024 08:19:35 +0000 Subject: [PATCH] - update to 1.0.0: * Some of the major work has been on making performance improvements to the more data intensive parts of the package. There should be some improvements across the board, however some exciting new performance features include: * A new HTTP transfer mechanism that uses a pool of background worker threads to transmit logs and reports to the Rollbar system. You can enable it with the following... * Removed Python 2 * Fixed handling `sensitive_post_parameters` decorator in Django * Fixed Werkzeug DeprecationWarning of `BaseRequest` * Fixed missing locals shortening on items with "trace_chain" instead of "trace" * Fixed FastAPI version comparison * Fixed #436 `WSGIRequest` has no attribute `sensitive_post_parameters`. * Added new `thread_pool` handler * Added Rollbar branding to the readme * Added batched transform to increase sanitization and serialization performance - drop python-rollbar-no-unittest2.patch (upstream) * Fix Flask 0.x builds. See #376 and `capture_email`. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rollbar?expand=0&rev=27 --- python-rollbar-no-unittest2.patch | 600 ------------------------------ python-rollbar.changes | 30 +- python-rollbar.spec | 12 +- v0.16.3.tar.gz | 3 - v1.0.0.tar.gz | 3 + 5 files changed, 33 insertions(+), 615 deletions(-) delete mode 100644 python-rollbar-no-unittest2.patch delete mode 100644 v0.16.3.tar.gz create mode 100644 v1.0.0.tar.gz diff --git a/python-rollbar-no-unittest2.patch b/python-rollbar-no-unittest2.patch deleted file mode 100644 index eb4971c..0000000 --- a/python-rollbar-no-unittest2.patch +++ /dev/null @@ -1,600 +0,0 @@ -Index: pyrollbar-0.16.3/rollbar/test/__init__.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/__init__.py -+++ pyrollbar-0.16.3/rollbar/test/__init__.py -@@ -1,13 +1,13 @@ --import unittest2 -+import unittest - - - SNOWMAN = b'\xe2\x98\x83' - SNOWMAN_UNICODE = SNOWMAN.decode('utf8') - - --class BaseTest(unittest2.TestCase): -+class BaseTest(unittest.TestCase): - pass - - - def discover(): -- return unittest2.defaultTestLoader.discover(__name__) -+ return unittest.defaultTestLoader.discover(__name__) -Index: pyrollbar-0.16.3/rollbar/test/test_lib.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/test_lib.py -+++ pyrollbar-0.16.3/rollbar/test/test_lib.py -@@ -2,6 +2,8 @@ from rollbar.lib import dict_merge - - from rollbar.test import BaseTest - -+import six -+ - class RollbarLibTest(BaseTest): - def test_dict_merge_not_dict(self): - a = {'a': {'b': 42}} -@@ -56,4 +58,4 @@ class RollbarLibTest(BaseTest): - self.assertIn('b', result['a']) - self.assertEqual(42, result['a']['b']) - self.assertIn('y', result['a']) -- self.assertRegex(result['a']['y'], r'Uncopyable obj') -+ six.assertRegex(self, result['a']['y'], r'Uncopyable obj') -Index: pyrollbar-0.16.3/rollbar/test/test_rollbar.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/test_rollbar.py -+++ pyrollbar-0.16.3/rollbar/test/test_rollbar.py -@@ -17,6 +17,7 @@ except ImportError: - import mock - - import unittest -+import six - - import rollbar - from rollbar.lib import python_major_version, string_types -@@ -1163,7 +1164,7 @@ class RollbarTest(BaseTest): - varargs = payload['data']['body']['trace']['frames'][-1]['varargspec'] - - self.assertEqual(1, len(payload['data']['body']['trace']['frames'][-1]['locals'][varargs])) -- self.assertRegex(payload['data']['body']['trace']['frames'][-1]['locals'][varargs][0], r'\*+') -+ six.assertRegex(self, payload['data']['body']['trace']['frames'][-1]['locals'][varargs][0], r'\*+') - - @mock.patch('rollbar.send_payload') - def test_args_lambda_with_star_args_and_args(self, send_payload): -@@ -1190,8 +1191,8 @@ class RollbarTest(BaseTest): - self.assertEqual('arg1-value', payload['data']['body']['trace']['frames'][-1]['locals']['arg1']) - - self.assertEqual(2, len(payload['data']['body']['trace']['frames'][-1]['locals'][varargs])) -- self.assertRegex(payload['data']['body']['trace']['frames'][-1]['locals'][varargs][0], r'\*+') -- self.assertRegex(payload['data']['body']['trace']['frames'][-1]['locals'][varargs][1], r'\*+') -+ six.assertRegex(self, payload['data']['body']['trace']['frames'][-1]['locals'][varargs][0], r'\*+') -+ six.assertRegex(self, payload['data']['body']['trace']['frames'][-1]['locals'][varargs][1], r'\*+') - - @mock.patch('rollbar.send_payload') - def test_args_lambda_with_kwargs(self, send_payload): -@@ -1411,7 +1412,7 @@ class RollbarTest(BaseTest): - - self.assertEqual(2, len(payload['data']['body']['trace']['frames'][-1]['locals'][keywords])) - self.assertIn('password', payload['data']['body']['trace']['frames'][-1]['locals'][keywords]) -- self.assertRegex(payload['data']['body']['trace']['frames'][-1]['locals'][keywords]['password'], r'\*+') -+ six.assertRegex(self, payload['data']['body']['trace']['frames'][-1]['locals'][keywords]['password'], r'\*+') - self.assertIn('clear', payload['data']['body']['trace']['frames'][-1]['locals'][keywords]) - self.assertEqual('text', payload['data']['body']['trace']['frames'][-1]['locals'][keywords]['clear']) - -@@ -1442,8 +1443,8 @@ class RollbarTest(BaseTest): - - payload = send_payload.call_args[0][0] - -- self.assertRegex(payload['data']['body']['trace']['frames'][-1]['locals']['password'], r'\*+') -- self.assertRegex(payload['data']['body']['trace']['frames'][-1]['locals']['Password'], r'\*+') -+ six.assertRegex(self, payload['data']['body']['trace']['frames'][-1]['locals']['password'], r'\*+') -+ six.assertRegex(self, payload['data']['body']['trace']['frames'][-1]['locals']['Password'], r'\*+') - self.assertIn('_invalid', payload['data']['body']['trace']['frames'][-1]['locals']) - - binary_type_name = 'str' if python_major_version() < 3 else 'bytes' -@@ -1760,19 +1761,19 @@ class RollbarTest(BaseTest): - self.assertEqual('I am from NSA', unscrubbed['headers']['Authorization']) - - scrubbed = rollbar._transform(unscrubbed) -- self.assertRegex(scrubbed['url'], r'http://example.com/the/path\?(q=hello&password=-+)|(password=-+&q=hello)') -+ six.assertRegex(self, scrubbed['url'], r'http://example.com/the/path\?(q=hello&password=-+)|(password=-+&q=hello)') - - self.assertEqual(scrubbed['GET']['q'], 'hello') -- self.assertRegex(scrubbed['GET']['password'], r'\*+') -+ six.assertRegex(self, scrubbed['GET']['password'], r'\*+') - - self.assertEqual(scrubbed['POST']['foo'], 'bar') -- self.assertRegex(scrubbed['POST']['confirm_password'], r'\*+') -- self.assertRegex(scrubbed['POST']['token'], r'\*+') -+ six.assertRegex(self, scrubbed['POST']['confirm_password'], r'\*+') -+ six.assertRegex(self, scrubbed['POST']['token'], r'\*+') - - self.assertEqual('5.6.7.8', scrubbed['headers']['X-Real-Ip']) - -- self.assertRegex(scrubbed['headers']['Cookies'], r'\*+') -- self.assertRegex(scrubbed['headers']['Authorization'], r'\*+') -+ six.assertRegex(self, scrubbed['headers']['Cookies'], r'\*+') -+ six.assertRegex(self, scrubbed['headers']['Authorization'], r'\*+') - - def test_filter_ip_no_user_ip(self): - request_data = {'something': 'but no ip'} -Index: pyrollbar-0.16.3/rollbar/test/test_scruburl_transform.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/test_scruburl_transform.py -+++ pyrollbar-0.16.3/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'^-+$') -Index: pyrollbar-0.16.3/rollbar/test/test_serializable_transform.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/test_serializable_transform.py -+++ pyrollbar-0.16.3/rollbar/test/test_serializable_transform.py -@@ -10,6 +10,8 @@ except ImportError: - # Python 2.7 - from collections import Mapping - -+import six -+ - from rollbar.lib import transforms, python_major_version - from rollbar.lib.transforms.serializable import SerializableTransform - -@@ -237,7 +239,7 @@ class SerializableTransformTest(BaseTest - if python_major_version() < 3: - self.assertEqual(result['custom'], b'hello') - else: -- self.assertRegex(result['custom'], "") -+ six.assertRegex(self, result['custom'], "") - - def test_encode_with_custom_repr_returns_object(self): - class CustomRepr(object): -@@ -248,7 +250,7 @@ class SerializableTransformTest(BaseTest - - serializable = SerializableTransform(safelist_types=[CustomRepr]) - result = transforms.transform(start, serializable) -- self.assertRegex(result['custom'], "") -+ six.assertRegex(self, result['custom'], "") - - def test_encode_with_custom_repr_returns_unicode(self): - class CustomRepr(object): -@@ -268,7 +270,7 @@ class SerializableTransformTest(BaseTest - start = {'hello': 'world', 'custom': CustomRepr()} - serializable = SerializableTransform(safelist_types=[CustomRepr]) - result = transforms.transform(start, serializable) -- self.assertRegex(result['custom'], "") -+ six.assertRegex(self, result['custom'], "") - - def test_encode_with_bad_str_doesnt_die(self): - -@@ -284,4 +286,4 @@ class SerializableTransformTest(BaseTest - start = {'hello': 'world', 'custom': CustomRepr()} - serializable = SerializableTransform(safelist_types=[CustomRepr]) - result = transforms.transform(start, serializable) -- self.assertRegex(result['custom'], "") -+ six.assertRegex(self, result['custom'], "") -Index: pyrollbar-0.16.3/setup.py -=================================================================== ---- pyrollbar-0.16.3.orig/setup.py -+++ pyrollbar-0.16.3/setup.py -@@ -19,7 +19,6 @@ with open(INIT_PATH) as fd: - tests_require = [ - 'webob', - 'blinker', -- 'unittest2', - 'mock<=3.0.5; python_version < "3.3"', - 'enum34; python_version < "3.4"', - 'httpx; python_version >= "3.6"', -@@ -85,7 +84,7 @@ setup( - 'requests>=0.12.1; python_version >= "3.6"', - 'requests<2.26,>=0.12.1; python_version == "3.5"', - 'requests<2.22,>=0.12.1; python_version == "3.4"', -- 'six>=1.9.0' -+ 'six>=1.14.0' - ], - tests_require=tests_require, - ) -Index: pyrollbar-0.16.3/shell.nix -=================================================================== ---- pyrollbar-0.16.3.orig/shell.nix -+++ pyrollbar-0.16.3/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 - -Index: pyrollbar-0.16.3/rollbar/test/starlette_tests/__init__.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/starlette_tests/__init__.py -+++ pyrollbar-0.16.3/rollbar/test/starlette_tests/__init__.py -@@ -1,9 +1,9 @@ - import sys --import unittest2 -+import unittest - - - def _load_tests(loader, tests, pattern): -- return unittest2.TestSuite() -+ return unittest.TestSuite() - - - if sys.version_info < (3, 6): -Index: pyrollbar-0.16.3/rollbar/test/starlette_tests/test_middleware.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/starlette_tests/test_middleware.py -+++ pyrollbar-0.16.3/rollbar/test/starlette_tests/test_middleware.py -@@ -14,7 +14,7 @@ try: - except ImportError: - STARLETTE_INSTALLED = False - --import unittest2 -+import unittest - - import rollbar - from rollbar.lib._async import AsyncMock -@@ -23,7 +23,7 @@ from rollbar.test import BaseTest - ALLOWED_PYTHON_VERSION = sys.version_info >= (3, 6) - - --@unittest2.skipUnless( -+@unittest.skipUnless( - STARLETTE_INSTALLED and ALLOWED_PYTHON_VERSION, 'Starlette requires Python3.6+' - ) - class ReporterMiddlewareTest(BaseTest): -@@ -232,7 +232,7 @@ class ReporterMiddlewareTest(BaseTest): - 'Failed to report asynchronously. Trying to report synchronously.' - ) - -- @unittest2.skipUnless( -+ @unittest.skipUnless( - sys.version_info >= (3, 6), 'Global request access requires Python 3.6+' - ) - @mock.patch('rollbar.contrib.starlette.middleware.store_current_request') -@@ -276,7 +276,7 @@ class ReporterMiddlewareTest(BaseTest): - scope = store_current_request.call_args[0][0] - self.assertDictContainsSubset(expected_scope, scope) - -- @unittest2.skipUnless( -+ @unittest.skipUnless( - sys.version_info >= (3, 6), 'Global request access is supported in Python 3.6+' - ) - def test_should_return_current_request(self): -Index: pyrollbar-0.16.3/rollbar/test/starlette_tests/test_requests.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/starlette_tests/test_requests.py -+++ pyrollbar-0.16.3/rollbar/test/starlette_tests/test_requests.py -@@ -7,14 +7,14 @@ try: - except ImportError: - STARLETTE_INSTALLED = False - --import unittest2 -+import unittest - - from rollbar.test import BaseTest - - ALLOWED_PYTHON_VERSION = sys.version_info >= (3, 6) - - --@unittest2.skipUnless( -+@unittest.skipUnless( - STARLETTE_INSTALLED and ALLOWED_PYTHON_VERSION, - 'Global request access requires Python3.6+', - ) -Index: pyrollbar-0.16.3/rollbar/test/starlette_tests/test_logger.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/starlette_tests/test_logger.py -+++ pyrollbar-0.16.3/rollbar/test/starlette_tests/test_logger.py -@@ -13,7 +13,7 @@ try: - except ImportError: - STARLETTE_INSTALLED = False - --import unittest2 -+import unittest - - import rollbar - from rollbar.test import BaseTest -@@ -21,7 +21,7 @@ from rollbar.test import BaseTest - ALLOWED_PYTHON_VERSION = sys.version_info >= (3, 6) - - --@unittest2.skipUnless( -+@unittest.skipUnless( - STARLETTE_INSTALLED and ALLOWED_PYTHON_VERSION, - 'Starlette LoggerMiddleware requires Python3.6+', - ) -Index: pyrollbar-0.16.3/rollbar/test/fastapi_tests/__init__.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/fastapi_tests/__init__.py -+++ pyrollbar-0.16.3/rollbar/test/fastapi_tests/__init__.py -@@ -1,9 +1,9 @@ - import sys --import unittest2 -+import unittest - - - def _load_tests(loader, tests, pattern): -- return unittest2.TestSuite() -+ return unittest.TestSuite() - - - if sys.version_info < (3, 6): -Index: pyrollbar-0.16.3/rollbar/test/fastapi_tests/test_logger.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/fastapi_tests/test_logger.py -+++ pyrollbar-0.16.3/rollbar/test/fastapi_tests/test_logger.py -@@ -13,7 +13,7 @@ try: - except ImportError: - FASTAPI_INSTALLED = False - --import unittest2 -+import unittest - - import rollbar - from rollbar.test import BaseTest -@@ -21,7 +21,7 @@ from rollbar.test import BaseTest - ALLOWED_PYTHON_VERSION = sys.version_info >= (3, 6) - - --@unittest2.skipUnless( -+@unittest.skipUnless( - FASTAPI_INSTALLED and ALLOWED_PYTHON_VERSION, - 'FastAPI LoggerMiddleware requires Python3.6+', - ) -Index: pyrollbar-0.16.3/rollbar/test/fastapi_tests/test_middleware.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/fastapi_tests/test_middleware.py -+++ pyrollbar-0.16.3/rollbar/test/fastapi_tests/test_middleware.py -@@ -14,7 +14,7 @@ try: - except ImportError: - FASTAPI_INSTALLED = False - --import unittest2 -+import unittest - - import rollbar - from rollbar.lib._async import AsyncMock -@@ -23,7 +23,7 @@ from rollbar.test import BaseTest - ALLOWED_PYTHON_VERSION = sys.version_info >= (3, 6) - - --@unittest2.skipUnless( -+@unittest.skipUnless( - FASTAPI_INSTALLED and ALLOWED_PYTHON_VERSION, 'FastAPI requires Python3.6+' - ) - class ReporterMiddlewareTest(BaseTest): -@@ -258,7 +258,7 @@ class ReporterMiddlewareTest(BaseTest): - 'Failed to report asynchronously. Trying to report synchronously.' - ) - -- @unittest2.skipUnless( -+ @unittest.skipUnless( - sys.version_info >= (3, 6), 'Global request access requires Python 3.6+' - ) - @mock.patch('rollbar.contrib.starlette.middleware.store_current_request') -@@ -305,7 +305,7 @@ class ReporterMiddlewareTest(BaseTest): - scope = store_current_request.call_args[0][0] - self.assertDictContainsSubset(expected_scope, scope) - -- @unittest2.skipUnless( -+ @unittest.skipUnless( - sys.version_info >= (3, 6), 'Global request access is supported in Python 3.6+' - ) - def test_should_return_current_request(self): -Index: pyrollbar-0.16.3/rollbar/test/fastapi_tests/test_routing.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/fastapi_tests/test_routing.py -+++ pyrollbar-0.16.3/rollbar/test/fastapi_tests/test_routing.py -@@ -17,7 +17,7 @@ except ImportError: - FASTAPI_INSTALLED = False - ALLOWED_FASTAPI_VERSION = False - --import unittest2 -+import unittest - - import rollbar - from rollbar.lib._async import AsyncMock -@@ -27,7 +27,7 @@ from rollbar.test import BaseTest - ALLOWED_PYTHON_VERSION = sys.version_info >= (3, 6) - - --@unittest2.skipUnless( -+@unittest.skipUnless( - FASTAPI_INSTALLED and ALLOWED_PYTHON_VERSION, 'FastAPI requires Python3.6+' - ) - class LoggingRouteUnsupportedFastAPIVersionTest(BaseTest): -@@ -64,10 +64,10 @@ class LoggingRouteUnsupportedFastAPIVers - fastapi.__version__ = fastapi_version - - --@unittest2.skipUnless( -+@unittest.skipUnless( - FASTAPI_INSTALLED and ALLOWED_PYTHON_VERSION, 'FastAPI requires Python3.6+' - ) --@unittest2.skipUnless(ALLOWED_FASTAPI_VERSION, 'FastAPI v0.41.0+ is required') -+@unittest.skipUnless(ALLOWED_FASTAPI_VERSION, 'FastAPI v0.41.0+ is required') - class LoggingRouteTest(BaseTest): - default_settings = copy.deepcopy(rollbar.SETTINGS) - -@@ -686,7 +686,7 @@ class LoggingRouteTest(BaseTest): - ' This can cause in duplicate occurrences.' - ) - -- @unittest2.skipUnless( -+ @unittest.skipUnless( - sys.version_info >= (3, 6), 'Global request access requires Python 3.6+' - ) - @mock.patch('rollbar.contrib.fastapi.routing.store_current_request') -@@ -733,7 +733,7 @@ class LoggingRouteTest(BaseTest): - scope = store_current_request.call_args[0][0] - self.assertDictContainsSubset(expected_scope, scope) - -- @unittest2.skipUnless( -+ @unittest.skipUnless( - sys.version_info >= (3, 6), 'Global request access is supported in Python 3.6+' - ) - def test_should_return_current_request(self): -Index: pyrollbar-0.16.3/rollbar/test/fastapi_tests/test_utils.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/fastapi_tests/test_utils.py -+++ pyrollbar-0.16.3/rollbar/test/fastapi_tests/test_utils.py -@@ -7,14 +7,14 @@ try: - except ImportError: - FASTAPI_INSTALLED = False - --import unittest2 -+import unittest - - from rollbar.test import BaseTest - - ALLOWED_PYTHON_VERSION = sys.version_info >= (3, 6) - - --@unittest2.skipUnless( -+@unittest.skipUnless( - FASTAPI_INSTALLED and ALLOWED_PYTHON_VERSION, 'FastAPI requires Python3.6+' - ) - class UtilsMiddlewareTest(BaseTest): -@@ -66,7 +66,7 @@ class UtilsMiddlewareTest(BaseTest): - self.assertListEqual(middlewares, []) - - --@unittest2.skipUnless( -+@unittest.skipUnless( - FASTAPI_INSTALLED and ALLOWED_PYTHON_VERSION, 'FastAPI requires Python3.6+' - ) - class UtilsBareRoutingTest(BaseTest): -Index: pyrollbar-0.16.3/rollbar/test/asgi_tests/__init__.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/asgi_tests/__init__.py -+++ pyrollbar-0.16.3/rollbar/test/asgi_tests/__init__.py -@@ -1,9 +1,9 @@ - import sys --import unittest2 -+import unittest - - - def _load_tests(loader, tests, pattern): -- return unittest2.TestSuite() -+ return unittest.TestSuite() - - - if sys.version_info < (3, 5): -Index: pyrollbar-0.16.3/rollbar/test/asgi_tests/test_middleware.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/asgi_tests/test_middleware.py -+++ pyrollbar-0.16.3/rollbar/test/asgi_tests/test_middleware.py -@@ -7,7 +7,7 @@ try: - except ImportError: - import mock - --import unittest2 -+import unittest - - import rollbar - from rollbar.lib._async import AsyncMock -@@ -17,7 +17,7 @@ ALLOWED_PYTHON_VERSION = sys.version_inf - ASYNC_REPORT_ENABLED = sys.version_info >= (3, 6) - - --@unittest2.skipUnless(ALLOWED_PYTHON_VERSION, 'ASGI implementation requires Python3.5+') -+@unittest.skipUnless(ALLOWED_PYTHON_VERSION, 'ASGI implementation requires Python3.5+') - class ReporterMiddlewareTest(BaseTest): - default_settings = copy.deepcopy(rollbar.SETTINGS) - -@@ -62,7 +62,7 @@ class ReporterMiddlewareTest(BaseTest): - - self.assertIn('asgi', payload['data']['framework']) - -- @unittest2.skipUnless(ASYNC_REPORT_ENABLED, 'Requires Python 3.6+') -+ @unittest.skipUnless(ASYNC_REPORT_ENABLED, 'Requires Python 3.6+') - @mock.patch('rollbar.lib._async.report_exc_info', new_callable=AsyncMock) - @mock.patch('rollbar.report_exc_info') - def test_should_use_async_report_exc_info_if_default_handler( -@@ -81,7 +81,7 @@ class ReporterMiddlewareTest(BaseTest): - self.assertTrue(async_report_exc_info.called) - self.assertFalse(sync_report_exc_info.called) - -- @unittest2.skipUnless(ASYNC_REPORT_ENABLED, 'Requires Python 3.6+') -+ @unittest.skipUnless(ASYNC_REPORT_ENABLED, 'Requires Python 3.6+') - @mock.patch('rollbar.lib._async.report_exc_info', new_callable=AsyncMock) - @mock.patch('rollbar.report_exc_info') - def test_should_use_async_report_exc_info_if_any_async_handler( -@@ -100,7 +100,7 @@ class ReporterMiddlewareTest(BaseTest): - self.assertTrue(async_report_exc_info.called) - self.assertFalse(sync_report_exc_info.called) - -- @unittest2.skipUnless(ASYNC_REPORT_ENABLED, 'Requires Python 3.6+') -+ @unittest.skipUnless(ASYNC_REPORT_ENABLED, 'Requires Python 3.6+') - @mock.patch('logging.Logger.warning') - @mock.patch('rollbar.lib._async.report_exc_info', new_callable=AsyncMock) - @mock.patch('rollbar.report_exc_info') -Index: pyrollbar-0.16.3/rollbar/test/asgi_tests/test_spec.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/asgi_tests/test_spec.py -+++ pyrollbar-0.16.3/rollbar/test/asgi_tests/test_spec.py -@@ -1,14 +1,14 @@ - import inspect - import sys - --import unittest2 -+import unittest - - from rollbar.test import BaseTest - - ALLOWED_PYTHON_VERSION = sys.version_info >= (3, 5) - - --@unittest2.skipUnless(ALLOWED_PYTHON_VERSION, 'ASGI implementation requires Python3.5+') -+@unittest.skipUnless(ALLOWED_PYTHON_VERSION, 'ASGI implementation requires Python3.5+') - class ASGISpecTest(BaseTest): - def test_asgi_v3_middleware_is_single_callable_coroutine(self): - from rollbar.contrib.asgi import ReporterMiddleware -Index: pyrollbar-0.16.3/rollbar/test/async_tests/__init__.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/async_tests/__init__.py -+++ pyrollbar-0.16.3/rollbar/test/async_tests/__init__.py -@@ -1,9 +1,9 @@ - import sys --import unittest2 -+import unittest - - - def _load_tests(loader, tests, pattern): -- return unittest2.TestSuite() -+ return unittest.TestSuite() - - - if sys.version_info < (3, 6): -Index: pyrollbar-0.16.3/rollbar/test/async_tests/test_async.py -=================================================================== ---- pyrollbar-0.16.3.orig/rollbar/test/async_tests/test_async.py -+++ pyrollbar-0.16.3/rollbar/test/async_tests/test_async.py -@@ -6,7 +6,7 @@ try: - except ImportError: - import mock - --import unittest2 -+import unittest - - import rollbar - from rollbar.lib._async import AsyncMock -@@ -15,7 +15,7 @@ from rollbar.test import BaseTest - ALLOWED_PYTHON_VERSION = sys.version_info >= (3, 6) - - --@unittest2.skipUnless(ALLOWED_PYTHON_VERSION, 'Async support requires Python3.6+') -+@unittest.skipUnless(ALLOWED_PYTHON_VERSION, 'Async support requires Python3.6+') - class AsyncLibTest(BaseTest): - default_settings = copy.deepcopy(rollbar.SETTINGS) - diff --git a/python-rollbar.changes b/python-rollbar.changes index c113134..7fcf1b6 100644 --- a/python-rollbar.changes +++ b/python-rollbar.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Fri Jan 12 08:18:36 UTC 2024 - Dirk Müller + +- update to 1.0.0: + * Some of the major work has been on making performance + improvements to the more data intensive parts of the package. + There should be some improvements across the board, however + some exciting new performance features include: + * A new HTTP transfer mechanism that uses a pool of background + worker threads to transmit logs and reports to the Rollbar + system. You can enable it with the following... + * Removed Python 2 + * Fixed handling `sensitive_post_parameters` decorator in + Django + * Fixed Werkzeug DeprecationWarning of `BaseRequest` + * Fixed missing locals shortening on items with "trace_chain" + instead of "trace" + * Fixed FastAPI version comparison + * Fixed #436 `WSGIRequest` has no attribute + `sensitive_post_parameters`. + * Added new `thread_pool` handler + * Added Rollbar branding to the readme + * Added batched transform to increase sanitization and + serialization performance +- drop python-rollbar-no-unittest2.patch (upstream) + ------------------------------------------------------------------- Mon Feb 20 12:16:51 UTC 2023 - Daniel Garcia @@ -26,7 +52,7 @@ Mon Jan 24 01:54:43 UTC 2022 - Steve Kowalik * Collect user IP from X-Forwarded-For, fall back to X-Real-Ip. See #370 * Improve examples. See #368 * Fix Python 3.3 builds. See #374 - * Fix Flask 0.x builds. See #376 + * Fix Flask 0.x builds. See #376 - Add httpx to BuildRequires - Refresh python-rollbar-no-unittest2.patch @@ -78,7 +104,7 @@ Mon Mar 25 14:08:31 UTC 2019 - pgajdos@suse.com - version update to 0.14.7 * Create the configuration options, `capture_username` - and `capture_email`. + and `capture_email`. * Create the configuration option `capture_ip`. * Fix `request.files_keys` for Flask * If you call `init` multiple times we will update the settings diff --git a/python-rollbar.spec b/python-rollbar.spec index ab1a403..81d458e 100644 --- a/python-rollbar.spec +++ b/python-rollbar.spec @@ -1,7 +1,7 @@ # # spec file for package python-rollbar # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,16 +16,13 @@ # -%bcond_without python2 Name: python-rollbar -Version: 0.16.3 +Version: 1.0.0 Release: 0 Summary: Report exceptions, errors, and log messages to Rollbar License: MIT URL: https://github.com/rollbar/pyrollbar Source: https://github.com/rollbar/pyrollbar/archive/v%{version}.tar.gz -# https://github.com/rollbar/pyrollbar/pull/340 -Patch0: python-rollbar-no-unittest2.patch BuildRequires: %{python_module WebOb} BuildRequires: %{python_module blinker} BuildRequires: %{python_module httpx} @@ -41,11 +38,6 @@ Requires: python-six >= 1.14.0 Requires(post): update-alternatives Requires(postun):update-alternatives BuildArch: noarch -%if %{with python2} -BuildRequires: python2-enum34 -BuildRequires: python2-mock -BuildRequires: python2-unittest2 -%endif %python_subpackages %description diff --git a/v0.16.3.tar.gz b/v0.16.3.tar.gz deleted file mode 100644 index dfbf8e8..0000000 --- a/v0.16.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79635a2ca8c36b504fc8a3943154256c39b7369e67c01a79aabb283541330d35 -size 80545 diff --git a/v1.0.0.tar.gz b/v1.0.0.tar.gz new file mode 100644 index 0000000..01fd3c6 --- /dev/null +++ b/v1.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bd32c5e4b3ce437849e6032873e7323843d4cec2177e8175f8923d0aaf48e42 +size 81385