diff options
Diffstat (limited to 'dev-python/werkzeug')
-rw-r--r-- | dev-python/werkzeug/Manifest | 3 | ||||
-rw-r--r-- | dev-python/werkzeug/files/werkzeug-2.0.1-test-warning.patch | 75 | ||||
-rw-r--r-- | dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild | 1 |
3 files changed, 78 insertions, 1 deletions
diff --git a/dev-python/werkzeug/Manifest b/dev-python/werkzeug/Manifest index 883dd6987c57..429c712741ae 100644 --- a/dev-python/werkzeug/Manifest +++ b/dev-python/werkzeug/Manifest @@ -1,9 +1,10 @@ AUX werkzeug-2.0.1-py310.patch 2951 BLAKE2B d820edb9a7e8d94e1783b3a5e2dcb1a12993b00bba92593257447063073a8f9ae0787241ffd2c80776906bb28089c463b32996b7602aa9ba4a15234eec8986a0 SHA512 5f0692374be1af49dd14c8793ee827fe584e5f3d81845f7b57050c3c2ddfd7bd61812ce5d5be527c26562cbfa2c1dd0cf3932fe8e8019f8cd4e48d1d2c8c1e15 +AUX werkzeug-2.0.1-test-warning.patch 2830 BLAKE2B 292f19ade3dec20def690e56caa5191bb4a8df730c6e7476b1b26aaa52de362c0804e4d03919b6df957f51b75a735546c748553b2d90862e597381edc87d7265 SHA512 7e640954110367c631f534cb3355544fa792fc841e3f70c8de0db31a088f3b05cc81094f935b0b1b3a45c0b173115a86126f525ba8963bfaf9f96cb6d60e24b1 DIST werkzeug-1.0.1.gh.tar.gz 907482 BLAKE2B d2dcdce8b1bcbb177b52b0915f2c0ac17d235dee3c77b23e81e4b35412d1f53a194d3c7c7f2a5c065ade99797effe72cc464cf6980b12c761a8a919338021660 SHA512 ba82120fb3e96e3a1334c6452d5ba1950fc016d2d147d643bbc2168ccec496f1dea799982ae8c578167155082c0bdbda5d56a23f64b4b6865f97e90e22df022e DIST werkzeug-2.0.0.gh.tar.gz 894475 BLAKE2B 608de444944fa0bd35c0244a30967446abb8f0d05a8cd49f09707c368b6f9649b299f427fa7bc2e54628cf3eb688c399e420ecd54f12d7eab9cb063c7c740b07 SHA512 8c8e36a58fe53ac4ad3152a34145c726a9145782262b9d47be7bfe9a8e127666b0d0c0c50d305277a153298644732efe37e3785ceaa5b11394adfeb70d86e70d DIST werkzeug-2.0.1.gh.tar.gz 894795 BLAKE2B cef0c6d704604d8b63d9e9d1ef8f232f97cae6654a4284b66ba7cd97f850df725d644ea11ed898a53f69668247545de86a9c44bc381606c700f4e2611fea7699 SHA512 721a6c3cf8f803c80873f68d94b273da2ddda79b5e83d9283b9af3d3c971bb8c7ac7828c7a60c33b9bded7b05f063810df12fc266ee7d264dc6261100fc97708 EBUILD werkzeug-1.0.1-r1.ebuild 1352 BLAKE2B 8e8cc3e15bb6f78ff783fcb03ddc54bae9abed4b25012e71766902b9d2bdb3699c53a71608b95b58a625ce6091d61d2745524a38a6f44dcb77490c5d720f2261 SHA512 329fa7ed8319d7eec1321369ad4e19cc345d21a5ab3f5d954bf2bc17a0c1b6336baaa52081086cb08e0dfe9ce032c44e207d25c0de868d8a2b24e88afbd8e3d2 EBUILD werkzeug-2.0.0.ebuild 1015 BLAKE2B dbbafdea67df22156976230b705228f23f5fde4d3f8e98c932b032f7ae498e8b41dbac7e70d67b98eb3886c0739ba79309ef41d1d24207e9d3014c37a715d585 SHA512 66002c896e3c4b0c204a7e7d9c5cc5686165c8343d3c92cb8350064504dd6528b6739dd77a3e806c4e5a7e336b8e87f5648d29b19d3d16442dba4977ed45d434 -EBUILD werkzeug-2.0.1-r1.ebuild 1116 BLAKE2B 5dc70636a9d15c0fc897ce99d224e1cfd79e97e002dde0d742a727b7f6504ca90723750eb5e5214819654fecb1efe5b505429b04284b63016547d214ce7f61fc SHA512 bfbac4ca0151612338ad853851493ea03306ba6108ee74049098ace25376404e39f9b5406e81747dca0c696a5152a03514705185285cdfca30a2c6a63df99542 +EBUILD werkzeug-2.0.1-r1.ebuild 1155 BLAKE2B 03df232bcab1b3811f57c4beee117171081805f31a28dd61e076009797dedcd4527104c948de1dde38f5c14e86f262332ecf3db72dd3e5bf8eab26be54acab2a SHA512 e6effdb1c441442e1fd7dd0777cfb165666577b99a70a0ed0b1df4df0398e2e5528d19b551d613a72ec2cda7c60a0b0e49bbea71e6a064623b19a17eaf765d7c EBUILD werkzeug-2.0.1.ebuild 1015 BLAKE2B dbbafdea67df22156976230b705228f23f5fde4d3f8e98c932b032f7ae498e8b41dbac7e70d67b98eb3886c0739ba79309ef41d1d24207e9d3014c37a715d585 SHA512 66002c896e3c4b0c204a7e7d9c5cc5686165c8343d3c92cb8350064504dd6528b6739dd77a3e806c4e5a7e336b8e87f5648d29b19d3d16442dba4977ed45d434 MISC metadata.xml 367 BLAKE2B 3a7fccc21ad8c434460cebeee5354dcc6fa0f667ae12b551fe8b4776c3a0d1bfbf3a92e5481eba85c1937bc1c9b4a7e17c21d70428ffc44f08f83b35f7037e42 SHA512 e0a3c3dce6af15bd50e7ac7e56afa18e9baab0f95c719c54b643fb906ac837f0e29e8cfaaf38f4e1ddb4a6434b6866c721d010604e3daa075d5a554183b494e6 diff --git a/dev-python/werkzeug/files/werkzeug-2.0.1-test-warning.patch b/dev-python/werkzeug/files/werkzeug-2.0.1-test-warning.patch new file mode 100644 index 000000000000..3bb14ab6ba42 --- /dev/null +++ b/dev-python/werkzeug/files/werkzeug-2.0.1-test-warning.patch @@ -0,0 +1,75 @@ +From 4201d0f6d1b337a0e69900a79042215896eede4a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sat, 19 Jun 2021 09:51:43 +0200 +Subject: [PATCH] Fix warning tests to work correctly without -Werror + +Use pytest.warns() instead of pytest.raises() to test for warnings, +in order to make these tests work correctly without -Werror. This does +not change the behavior with -Werror. + +While -Werror is useful for package maintainers / CI, it is problematic +for testing on end user systems. For end users, it is important whether +the particular version of package is going to work on their setup, +not whether it does not use anything that's deprecated but still +working. +--- + CHANGES.rst | 2 ++ + tests/test_wrappers.py | 12 ++++++------ + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/CHANGES.rst b/CHANGES.rst +index 8fa1e454..9a05145f 100644 +--- a/CHANGES.rst ++++ b/CHANGES.rst +@@ -5,6 +5,8 @@ Version 2.1.0 + + Unreleased + ++- Fix warning tests to work correctly without -Werror ++ + + Version 2.0.2 + ------------- +diff --git a/tests/test_wrappers.py b/tests/test_wrappers.py +index 3ac80003..fe8c01f3 100644 +--- a/tests/test_wrappers.py ++++ b/tests/test_wrappers.py +@@ -1633,29 +1633,29 @@ def test_response_mixins_deprecated(cls): + class CheckResponse(cls, wrappers.Response): + pass + +- with pytest.raises(DeprecationWarning, match=cls.__name__): ++ with pytest.warns(DeprecationWarning, match=cls.__name__): + CheckResponse() + + + def test_check_base_deprecated(): +- with pytest.raises(DeprecationWarning, match=r"issubclass\(cls, Request\)"): ++ with pytest.warns(DeprecationWarning, match=r"issubclass\(cls, Request\)"): + assert issubclass(wrappers.Request, wrappers.BaseRequest) + +- with pytest.raises(DeprecationWarning, match=r"isinstance\(obj, Request\)"): ++ with pytest.warns(DeprecationWarning, match=r"isinstance\(obj, Request\)"): + assert isinstance( + wrappers.Request({"SERVER_NAME": "example.org", "SERVER_PORT": "80"}), + wrappers.BaseRequest, + ) + +- with pytest.raises(DeprecationWarning, match=r"issubclass\(cls, Response\)"): ++ with pytest.warns(DeprecationWarning, match=r"issubclass\(cls, Response\)"): + assert issubclass(wrappers.Response, wrappers.BaseResponse) + +- with pytest.raises(DeprecationWarning, match=r"isinstance\(obj, Response\)"): ++ with pytest.warns(DeprecationWarning, match=r"isinstance\(obj, Response\)"): + assert isinstance(wrappers.Response(), wrappers.BaseResponse) + + + def test_response_freeze_no_etag_deprecated(): +- with pytest.raises(DeprecationWarning, match="no_etag"): ++ with pytest.warns(DeprecationWarning, match="no_etag"): + Response("Hello, World!").freeze(no_etag=True) + + +-- +2.32.0 + diff --git a/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild b/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild index a6c56f6d470f..2a62f10069ba 100644 --- a/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild +++ b/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild @@ -37,6 +37,7 @@ distutils_enable_tests pytest PATCHES=( "${FILESDIR}"/${P}-py310.patch + "${FILESDIR}"/${P}-test-warning.patch ) python_test() { |