Repository navigation
tests fail on python 3.14 #445
Copy link
Copy link
Open
Description
caught by nixos CI: https://hydra.nixos.org/build/336720542/log
and confirmed by me locally, here's the logs:
./cpplint_clitest.py
./cpplint_unittest.py
$ ./cpplint_unittest.py
======================================================================================================== test session starts =========================================================================================================
platform linux -- Python 3.14.4, pytest-9.0.3, pluggy-1.6.0
rootdir: /home/poz/Sources/cpplint
configfile: pyproject.toml
plugins: cov-nixpkgs-stub-1.0.0, timeout-2.4.0
timeout: 481.0s
timeout method: signal
timeout func_only: False
collected 205 items
cpplint_unittest.py .......................................................................................................................................................................................................... [ 98%]
..F [100%]
============================================================================================================== FAILURES ==============================================================================================================
__________________________________________________________________________________________________ TestQuiet.testQuietWithoutErrors __________________________________________________________________________________________________
self = <cpplint_unittest.TestQuiet object at 0x76bc9bef95b0>
def testQuietWithoutErrors(self):
# This will succeed. We filtered out all the known errors for that file.
(return_code, output) = self._runCppLint(
"--quiet", "--filter=" + "-legal/copyright," + "-build/header_guard"
)
assert return_code == 0, output
# No cpplint errors are printed since there were no errors.
assert "[legal/copyright]" not in output
assert "[build/header_guard]" not in output
# --quiet was specified and there were no errors:
# skip the printing of 'Done processing' and 'Total errors..'
assert "Done processing" not in output
assert "Total errors found:" not in output
# Output with no errors must be completely blank!
> assert output == ""
E assert '/home/poz/So...arget_file:\n' == ''
E
E + /home/poz/Sources/cpplint/cpplint.py:7553: DeprecationWarning: codecs.open() is deprecated. Use open() instead.
E + with codecs.open(filename, "r", "utf8", "replace") as target_file:
cpplint_unittest.py:7209: AssertionError
====================================================================================================== short test summary info =======================================================================================================
FAILED cpplint_unittest.py::TestQuiet::testQuietWithoutErrors - assert '/home/poz/So...arget_file:\n' == ''
=================================================================================================== 1 failed, 204 passed in 0.71s ====================================================================================================
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
imnotpoz commentedon Jul 13, 2026
seems like #405 fixes this (NixOS/nixpkgs#541487), although it's not in the latest release so I'll leave this open
cclauss commentedon Jul 13, 2026
https://docs.python.org/3/library/codecs.html#codecs.open is scheduled to be removed in Python 3.19 in 4+ years.
@aaronliu0130 Should deprecation warnings cause our pytests to fail?
aaronliu0130 commentedon Jul 13, 2026
Yes, since that means there's something in the code we need to address. What we need to do here is prepare and release a new version. (Though I believe the former also requires us to review the five outstanding PRs.)