From dc8a7ed2469cafd84514d0f040d77f0d7673214e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Sat, 4 Feb 2023 00:56:57 +0100 Subject: [PATCH] Force an error on "sklearn" installation attempts According to "sklearn"'s [description][0], installing the package doesn't always raise an error, but only according to a specific schedule. Obviously this doesn't work for tests. Fortunately setting the `SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL` environment variable to `False` always forces the error. [0]: https://pypi.org/project/sklearn/#description --- noxfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/noxfile.py b/noxfile.py index 7c12709a..9764d83d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -65,5 +65,6 @@ def build(session): def install(session): """Install the package.""" setdefaults(session) + session.env["SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL"] = "False" session.run("python", "-mpip", "install", "--upgrade", "pip") session.run("python", "-mpip", "install", *Path("dist").glob("*.whl"))