* [gentoo-commits] repo/gentoo:master commit in: dev-python/werkzeug/files/
@ 2021-12-04 0:37 Louis Sautier
0 siblings, 0 replies; 2+ messages in thread
From: Louis Sautier @ 2021-12-04 0:37 UTC (permalink / raw
To: gentoo-commits
commit: d6528f72813cd8b6240fb5d94c154c51c1cc2d41
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri Dec 3 16:38:21 2021 +0000
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Sat Dec 4 00:27:20 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6528f72
dev-python/werkzeug: remove unused patch(es)
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/23166
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
.../werkzeug/files/werkzeug-2.0.1-py310.patch | 103 ---------------------
.../files/werkzeug-2.0.1-test-warning.patch | 75 ---------------
2 files changed, 178 deletions(-)
diff --git a/dev-python/werkzeug/files/werkzeug-2.0.1-py310.patch b/dev-python/werkzeug/files/werkzeug-2.0.1-py310.patch
deleted file mode 100644
index 56a0166d334d..000000000000
--- a/dev-python/werkzeug/files/werkzeug-2.0.1-py310.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 584f3cff7d5cb8a588189ae1137b814cf5c47e05 Mon Sep 17 00:00:00 2001
-From: David Lord <davidism@gmail.com>
-Date: Wed, 19 May 2021 20:01:58 -0700
-Subject: [PATCH] address deprecation warnings from Python 3.10b1
-
----
- tests/conftest.py | 5 ++++-
- tests/test_local.py | 34 +++++++++++++++++++++++++---------
- 2 files changed, 29 insertions(+), 10 deletions(-)
-
-diff --git a/tests/conftest.py b/tests/conftest.py
-index 3b5cbd71c..4ad1ff23e 100644
---- a/tests/conftest.py
-+++ b/tests/conftest.py
-@@ -66,7 +66,10 @@ def connect(self, **kwargs):
-
- if protocol == "https":
- if "context" not in kwargs:
-- kwargs["context"] = ssl.SSLContext()
-+ context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
-+ context.check_hostname = False
-+ context.verify_mode = ssl.CERT_NONE
-+ kwargs["context"] = context
-
- return http.client.HTTPSConnection(self.addr, **kwargs)
-
-diff --git a/tests/test_local.py b/tests/test_local.py
-index 537fc32fb..b5c392890 100644
---- a/tests/test_local.py
-+++ b/tests/test_local.py
-@@ -12,6 +12,18 @@
- from werkzeug import local
-
-
-+if sys.version_info < (3, 7):
-+
-+ def run_async(coro):
-+ return asyncio.get_event_loop().run_until_complete(coro)
-+
-+
-+else:
-+
-+ def run_async(coro):
-+ return asyncio.run(coro)
-+
-+
- def test_basic_local():
- ns = local.Local()
- ns.foo = 0
-@@ -55,9 +67,11 @@ async def value_setter(idx):
- await asyncio.sleep(0.02)
- values.append(ns.foo)
-
-- loop = asyncio.get_event_loop()
-- futures = [asyncio.ensure_future(value_setter(idx)) for idx in [1, 2, 3]]
-- loop.run_until_complete(asyncio.gather(*futures))
-+ async def main():
-+ futures = [asyncio.ensure_future(value_setter(i)) for i in [1, 2, 3]]
-+ await asyncio.gather(*futures)
-+
-+ run_async(main())
- assert sorted(values) == [1, 2, 3]
-
- def delfoo():
-@@ -118,9 +132,11 @@ async def task():
- ls.push(1)
- assert len(ls._local.stack) == 2
-
-- loop = asyncio.get_event_loop()
-- futures = [asyncio.ensure_future(task()) for _ in range(3)]
-- loop.run_until_complete(asyncio.gather(*futures))
-+ async def main():
-+ futures = [asyncio.ensure_future(task()) for _ in range(3)]
-+ await asyncio.gather(*futures)
-+
-+ run_async(main())
-
-
- @pytest.mark.skipif(
-@@ -571,7 +587,7 @@ async def get():
- async def main():
- return await p
-
-- out = asyncio.get_event_loop().run_until_complete(main())
-+ out = run_async(main())
- assert out == 1
-
-
-@@ -599,7 +615,7 @@ async def main():
-
- return out
-
-- out = asyncio.get_event_loop().run_until_complete(main())
-+ out = run_async(main())
- assert out == [2, 1, 0]
-
-
-@@ -623,4 +639,4 @@ async def main():
- assert p.value == 2
- return True
-
-- assert asyncio.get_event_loop().run_until_complete(main())
-+ assert run_async(main())
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
deleted file mode 100644
index 3bb14ab6ba42..000000000000
--- a/dev-python/werkzeug/files/werkzeug-2.0.1-test-warning.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-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
-
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/werkzeug/files/
@ 2023-09-22 6:10 Andrew Ammerlaan
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Ammerlaan @ 2023-09-22 6:10 UTC (permalink / raw
To: gentoo-commits
commit: f648662912774d79c2e88716c6910a10bdd35579
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri Sep 22 05:41:52 2023 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Fri Sep 22 06:10:14 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6486629
dev-python/werkzeug: remove unused patch(es)
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/32983
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
.../werkzeug/files/werkzeug-2.3.4-iri-bytes.patch | 64 ----------------------
1 file changed, 64 deletions(-)
diff --git a/dev-python/werkzeug/files/werkzeug-2.3.4-iri-bytes.patch b/dev-python/werkzeug/files/werkzeug-2.3.4-iri-bytes.patch
deleted file mode 100644
index 1e06b0621cdd..000000000000
--- a/dev-python/werkzeug/files/werkzeug-2.3.4-iri-bytes.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 3ba0fd5c52c9943c492ce098693bf9e651942fe5 Mon Sep 17 00:00:00 2001
-From: midchildan <git@midchildan.org>
-Date: Sat, 27 May 2023 01:03:02 +0900
-Subject: [PATCH] fix: iri_to_uri fails when the argument is a bytestring
-
-This was caused by the 'charset' variable being used before it was ready.
----
- CHANGES.rst | 4 ++++
- src/werkzeug/urls.py | 20 ++++++++++----------
- tests/test_urls.py | 3 +++
- 3 files changed, 17 insertions(+), 10 deletions(-)
-
-diff --git a/src/werkzeug/urls.py b/src/werkzeug/urls.py
-index 89ef21943..f5760eb4c 100644
---- a/src/werkzeug/urls.py
-+++ b/src/werkzeug/urls.py
-@@ -966,6 +966,16 @@ def iri_to_uri(
-
- .. versionadded:: 0.6
- """
-+ if charset is not None:
-+ warnings.warn(
-+ "The 'charset' parameter is deprecated and will be removed"
-+ " in Werkzeug 3.0.",
-+ DeprecationWarning,
-+ stacklevel=2,
-+ )
-+ else:
-+ charset = "utf-8"
-+
- if isinstance(iri, tuple):
- warnings.warn(
- "Passing a tuple is deprecated and will not be supported in Werkzeug 3.0.",
-@@ -982,16 +992,6 @@ def iri_to_uri(
- )
- iri = iri.decode(charset)
-
-- if charset is not None:
-- warnings.warn(
-- "The 'charset' parameter is deprecated and will be removed"
-- " in Werkzeug 3.0.",
-- DeprecationWarning,
-- stacklevel=2,
-- )
-- else:
-- charset = "utf-8"
--
- if errors is not None:
- warnings.warn(
- "The 'errors' parameter is deprecated and will be removed in Werkzeug 3.0.",
-diff --git a/tests/test_urls.py b/tests/test_urls.py
-index 56bca8e94..765d42546 100644
---- a/tests/test_urls.py
-+++ b/tests/test_urls.py
-@@ -231,6 +231,9 @@ def test_iri_support():
-
- assert urls.iri_to_uri("/foo") == "/foo"
-
-+ with pytest.deprecated_call():
-+ assert urls.iri_to_uri(b"/foo") == "/foo"
-+
- assert (
- urls.iri_to_uri("http://föö.com:8080/bam/baz")
- == "http://xn--f-1gaa.com:8080/bam/baz"
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-22 6:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-04 0:37 [gentoo-commits] repo/gentoo:master commit in: dev-python/werkzeug/files/ Louis Sautier
-- strict thread matches above, loose matches on Subject: below --
2023-09-22 6:10 Andrew Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox