diff --git a/pkgs/by-name/ap/apache-airflow/package.nix b/pkgs/by-name/ap/apache-airflow/package.nix index c7eec6a7b68a..712235851693 100644 --- a/pkgs/by-name/ap/apache-airflow/package.nix +++ b/pkgs/by-name/ap/apache-airflow/package.nix @@ -1,5 +1,6 @@ { fetchFromGitHub, + fetchpatch, fetchPypi, python3, }: @@ -40,15 +41,40 @@ let aiohttp-remotes decorator pytest-aiohttp + pytest-tornasync pytestCheckHook testfixtures ]; disabledTests = [ + "test_aiohttp_simple_api" "test_app" + "test_invalid_type" # https://github.com/spec-first/connexion/issues/1969 "test_openapi_yaml_behind_proxy" + "test_run_with_wsgi_containers" "test_swagger_ui" ]; - }); + }; + werkzeug = pySuper.werkzeug.overridePythonAttrs rec { + version = "2.3.8"; + src = fetchPypi { + pname = "werkzeug"; + inherit version; + hash = "sha256-VUslfHS763oNJUFgpPj/4YUkP1KlIDUGC3Ycpi2XfwM="; + }; + nativeCheckInputs = with pySelf; [ + pytest-xprocess + ]; + }; + # flask's test-suite needs click 8.1.8 + # TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' + click = pySuper.click.overridePythonAttrs rec { + version = "8.1.8"; + src = fetchPypi { + pname = "click"; + inherit version; + hash = "sha256-7VPJ2JkNg8Kifermjk7jN0c/YzDAQKMdQiXJV00WCWo="; + }; + }; flask = pySuper.flask.overridePythonAttrs (o: rec { version = "2.2.5"; src = fetchPypi { @@ -59,7 +85,30 @@ let nativeBuildInputs = (o.nativeBuildInputs or [ ]) ++ [ pySelf.setuptools ]; + pytestFlagsArray = [ + # tests that are marked with filterwarnings fail with + # DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for + # removal in Python 3.14; use importlib.util.find_spec() instead + "-W ignore::DeprecationWarning" + ]; }); + flask-login = pySuper.flask-login.overridePythonAttrs rec { + version = "0.6.3"; + src = fetchFromGitHub { + owner = "maxcountryman"; + repo = "flask-login"; + tag = version; + hash = "sha256-Sn7Ond67P/3+OmKKFE/KfA6FE4IajhiRXVVrXKJtY3I="; + }; + nativeBuildInputs = with pySelf; [ setuptools ]; + pytestFlagsArray = [ + # DeprecationWarning: datetime.datetime.utcnow() is deprecated + # and scheduled for removal in a future version. + # Use timezone-aware objects to represent datetimes in UTC: + # datetime.datetime.now(datetime.UTC). + "-W ignore::DeprecationWarning" + ]; + }; # flask-appbuilder doesn't work with sqlalchemy 2.x, flask-appbuilder 3.x # https://github.com/dpgaspar/Flask-AppBuilder/issues/2038 flask-appbuilder = pySuper.flask-appbuilder.overridePythonAttrs { @@ -91,6 +140,30 @@ let tag = "v${version}"; hash = "sha256-S4ThQx4H3UlKhunJo35esPClZiEn7gX/Qwo4kE1QMTI="; }; + # Use unmerged PR #65 to fix older version: + # https://github.com/kevin1024/pytest-httpbin/pull/65/ + # It was closed in favour of another which isn't compatible with the overriden version. + patches = [ + (fetchpatch { + url = "https://github.com/kevin1024/pytest-httpbin/commit/4e325f877ff8f77dec9f380bd8e53bb42976775c.patch"; + hash = "sha256-a33XcdMupD+7ZzvUibePdldGImmPLDNU2sxRbwpveDA="; + }) + (fetchpatch { + url = "https://github.com/kevin1024/pytest-httpbin/commit/463afb9b200563ac6fe7ae535f7a7a3c818b0418.patch"; + hash = "sha256-HFmuLtAtEjnB6heSG1YNnqxtz2phXNkHbQaZyB5bLJs="; + }) + ]; + disabledTests = [ + "test_httpbin_secure_accepts_get_requests" + "test_httpbin_secure_accepts_lots_of_get_requests" + "test_httpbin_both[https]" + "test_chunked_encoding[https]" + "TestClassBassedTests::test_http_secure" + "test_dont_crash_on_certificate_problems" + "test_redirect_location_is_https_for_secure_server" + "test_httpbin_secure_accepts_get_requests" + "test_http_secure" + ]; }; # apache-airflow doesn't work with sqlalchemy 2.x # https://github.com/apache/airflow/issues/28723