python3.pkgs.aiohttp: fix tests with setuptools 67.5.0+ (#247310)

This commit is contained in:
Theodore Ni 2023-08-10 22:53:24 -07:00 committed by GitHub
parent 9dd8601a6d
commit b5fde732b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 0 deletions

View File

@ -6,6 +6,7 @@
, pythonOlder
# build_requires
, setuptools
, wheel
# install_requires
, attrs
, charset-normalizer
@ -49,6 +50,8 @@ buildPythonPackage rec {
url = "https://github.com/aio-libs/aiohttp/commit/7dcc235cafe0c4521bbbf92f76aecc82fee33e8b.patch";
hash = "sha256-ZzhlE50bmA+e2XX2RH1FuWQHZIAa6Dk/hZjxPoX5t4g=";
})
# https://github.com/aio-libs/aiohttp/pull/7454 but does not merge cleanly
./setuptools-67.5.0-compatibility.diff
];
postPatch = ''
@ -57,6 +60,7 @@ buildPythonPackage rec {
nativeBuildInputs = [
setuptools
wheel
];
propagatedBuildInputs = [

View File

@ -0,0 +1,27 @@
diff --git a/setup.cfg b/setup.cfg
index 6944b7e2..dfa65d69 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -128,6 +128,7 @@ filterwarnings =
ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning::
ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing
ignore:path is deprecated. Use files.. instead. Refer to https.//importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.:DeprecationWarning:certifi.core
+ ignore:pkg_resources is deprecated as an API:DeprecationWarning
junit_suite_name = aiohttp_test_suite
norecursedirs = dist docs build .tox .eggs
minversion = 3.8.2
diff --git a/tests/test_circular_imports.py b/tests/test_circular_imports.py
index 22e5ea47..a655fd1d 100644
--- a/tests/test_circular_imports.py
+++ b/tests/test_circular_imports.py
@@ -113,6 +113,10 @@ def test_no_warnings(import_path: str) -> None:
"-W",
"ignore:Creating a LegacyVersion has been deprecated and will "
"be removed in the next major release:DeprecationWarning:",
+ # Deprecation warning emitted by setuptools v67.5.0+ triggered by importing
+ # `gunicorn.util`.
+ "-W", "ignore:pkg_resources is deprecated as an API:"
+ "DeprecationWarning",
"-c", f"import {import_path!s}",
# fmt: on
)