cpplint: fix build on Python 3.14

Backport upstream’s removal of deprecated codecs.open(), whose warnings cause the test suite to fail under Python 3.14.

https://github.com/cpplint/cpplint/pull/405

Assisted-by: pi coding agent / Mika (OpenAI gpt-5.6-sol)
This commit is contained in:
Gerhard Schwanzer
2026-07-13 20:47:46 +02:00
parent 1e21db31b9
commit ff3d8044cf
+15
View File
@@ -2,6 +2,7 @@
lib,
python3Packages,
fetchFromGitHub,
fetchpatch2,
versionCheckHook,
}:
@@ -17,6 +18,20 @@ python3Packages.buildPythonApplication (finalAttrs: {
hash = "sha256-4crTuqynQt8Nyjqea6DpREtLy7ydRF0hNVnc7tUnO1k=";
};
# Fix Python 3.14 test failures. Remove with the next release.
patches = [
(fetchpatch2 {
name = "drop-codecs-open.patch";
url = "https://github.com/cpplint/cpplint/commit/89bff410afed72e58d23ae084de4103986ea8630.patch?full_index=1";
hash = "sha256-Jdeewj3GM7GMoRF7+Qz/9n1hc8PYPcXLgtSGwSUpT1E=";
})
(fetchpatch2 {
name = "use-universal-newlines.patch";
url = "https://github.com/cpplint/cpplint/commit/d15a8715a6e848f784fda700758c4ac2d252fd31.patch?full_index=1";
hash = "sha256-Oo2doknEGnuxDJA0y17n1DCaKwadtMW/14a5wnIgfkw=";
})
];
# We use pytest-cov-stub instead
postPatch = ''
substituteInPlace pyproject.toml \