lol

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

authored by

Theodore Ni and committed by
GitHub
b5fde732 9dd8601a

+31
+4
pkgs/development/python-modules/aiohttp/default.nix
··· 6 6 , pythonOlder 7 7 # build_requires 8 8 , setuptools 9 + , wheel 9 10 # install_requires 10 11 , attrs 11 12 , charset-normalizer ··· 49 50 url = "https://github.com/aio-libs/aiohttp/commit/7dcc235cafe0c4521bbbf92f76aecc82fee33e8b.patch"; 50 51 hash = "sha256-ZzhlE50bmA+e2XX2RH1FuWQHZIAa6Dk/hZjxPoX5t4g="; 51 52 }) 53 + # https://github.com/aio-libs/aiohttp/pull/7454 but does not merge cleanly 54 + ./setuptools-67.5.0-compatibility.diff 52 55 ]; 53 56 54 57 postPatch = '' ··· 57 60 58 61 nativeBuildInputs = [ 59 62 setuptools 63 + wheel 60 64 ]; 61 65 62 66 propagatedBuildInputs = [
+27
pkgs/development/python-modules/aiohttp/setuptools-67.5.0-compatibility.diff
··· 1 + diff --git a/setup.cfg b/setup.cfg 2 + index 6944b7e2..dfa65d69 100644 3 + --- a/setup.cfg 4 + +++ b/setup.cfg 5 + @@ -128,6 +128,7 @@ filterwarnings = 6 + ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning:: 7 + ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing 8 + 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 9 + + ignore:pkg_resources is deprecated as an API:DeprecationWarning 10 + junit_suite_name = aiohttp_test_suite 11 + norecursedirs = dist docs build .tox .eggs 12 + minversion = 3.8.2 13 + diff --git a/tests/test_circular_imports.py b/tests/test_circular_imports.py 14 + index 22e5ea47..a655fd1d 100644 15 + --- a/tests/test_circular_imports.py 16 + +++ b/tests/test_circular_imports.py 17 + @@ -113,6 +113,10 @@ def test_no_warnings(import_path: str) -> None: 18 + "-W", 19 + "ignore:Creating a LegacyVersion has been deprecated and will " 20 + "be removed in the next major release:DeprecationWarning:", 21 + + # Deprecation warning emitted by setuptools v67.5.0+ triggered by importing 22 + + # `gunicorn.util`. 23 + + "-W", "ignore:pkg_resources is deprecated as an API:" 24 + + "DeprecationWarning", 25 + "-c", f"import {import_path!s}", 26 + # fmt: on 27 + )