Skip to content

Commit

Permalink
Merge pull request #296351 from dotlambda/pydocstyle-python312
Browse files Browse the repository at this point in the history
python312Packages.pydocstyle: fix tests
  • Loading branch information
mweinelt authored Mar 16, 2024
2 parents 53dcb6d + 46b2fc4 commit 5e1ca32
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pkgs/development/python-modules/pydocstyle/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, pythonAtLeast
, fetchpatch2
, poetry-core
, snowballstemmer
, tomli
Expand All @@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "pydocstyle";
version = "6.3.0";
format = "pyproject";
pyproject = true;

disabled = pythonOlder "3.6";

Expand All @@ -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
];
Expand All @@ -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
];
Expand Down

0 comments on commit 5e1ca32

Please sign in to comment.