diff --git a/pkgs/development/python-modules/pydocstyle/default.nix b/pkgs/development/python-modules/pydocstyle/default.nix index 72f9f277ae7a07b..0e0f2a3bdd711be 100644 --- a/pkgs/development/python-modules/pydocstyle/default.nix +++ b/pkgs/development/python-modules/pydocstyle/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , pythonOlder , fetchFromGitHub -, pythonAtLeast +, fetchpatch2 , poetry-core , snowballstemmer , tomli @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "pydocstyle"; version = "6.3.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -23,6 +23,15 @@ buildPythonPackage rec { hash = "sha256-MjRrnWu18f75OjsYIlOLJK437X3eXnlW8WkkX7vdS6k="; }; + patches = [ + # https://github.com/PyCQA/pydocstyle/pull/656 + (fetchpatch2 { + name = "python312-compat.patch"; + url = "https://github.com/PyCQA/pydocstyle/commit/306c7c8f2d863bdc098a65d2dadbd4703b9b16d5.patch"; + hash = "sha256-bqnoLz1owzDpFqlZn8z4Z+RzKCYBsI0PqqeOtjLxnMo="; + }) + ]; + nativeBuildInputs = [ poetry-core ]; @@ -46,11 +55,6 @@ buildPythonPackage rec { pytestCheckHook ] ++ passthru.optional-dependencies.toml; - disabledTests = lib.optionals (pythonAtLeast "3.12") [ - "test_simple_fstring" - "test_fstring_with_args" - ]; - disabledTestPaths = [ "src/tests/test_integration.py" # runs pip install ];