Skip to content

Conversation

@sterliakov
Copy link
Collaborator

@sterliakov sterliakov commented Nov 7, 2025

Fixes #20070.

I tested this manually in debian:sid container with libxml2-16 installed via apt and lxml==6.0.2 built against it (--no-binary). HTML reports testcases fail on master as reported and pass on my branch.

@sterliakov
Copy link
Collaborator Author

(mypy) root@85af24f2db65:/mypy# pytest mypy/test/testcmdline.py::PythonCmdlineSuite::reports.test
============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.14.0, pytest-8.4.2, pluggy-1.6.0
rootdir: /mypy
configfile: pyproject.toml
plugins: xdist-3.8.0, cov-7.0.0
2 workers [22 items]    
......................                                                                                                                                                                                     [100%]
============================================================================================== 22 passed in 47.89s ===============================================================================================
(mypy) root@85af24f2db65:/mypy# git branch
* bugfix/gh-20070-html-meta
  master
(mypy) root@85af24f2db65:/mypy# git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
(mypy) root@85af24f2db65:/mypy# pytest mypy/test/testcmdline.py::PythonCmdlineSuite::reports.test
============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.14.0, pytest-8.4.2, pluggy-1.6.0
rootdir: /mypy
configfile: pyproject.toml
plugins: xdist-3.8.0, cov-7.0.0
2 workers [22 items]    
....FFF..F.......FF...                                                                                                                                                                                     [100%]
==================================================================================================== FAILURES ====================================================================================================
_________________________________________________________________________________________ testUnreachableCodeMarkedAsAny _________________________________________________________________________________________
[gw0] linux -- Python 3.14.0 /mypy/.venv/bin/python3
data: /mypy/test-data/unit/reports.test:196:
Failed: Output file tmp/report/html/n.py.html did not match its expected output
---------------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------------
Expected:
  <html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>
Actual:
  <html>
  <head>
  <meta charset="UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>

Alignment of first line difference:
  E: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  A: <meta charset="UTF-8">
           ^
Update the test output using --update-data (implies -n0; you can additionally use the -k selector to update only specific tests)
________________________________________________________________________________________ testClassDefIsNotTreatedAsEmpty _________________________________________________________________________________________
[gw1] linux -- Python 3.14.0 /mypy/.venv/bin/python3
data: /mypy/test-data/unit/reports.test:110:
Failed: Output file tmp/report/html/n.py.html did not match its expected output
---------------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------------
Expected:
  <html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>
Actual:
  <html>
  <head>
  <meta charset="UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>

Alignment of first line difference:
  E: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  A: <meta charset="UTF-8">
           ^
Update the test output using --update-data (implies -n0; you can additionally use the -k selector to update only specific tests)
______________________________________________________________________________________ testHtmlReportMemberExprNoUnanalyzed ______________________________________________________________________________________
[gw0] linux -- Python 3.14.0 /mypy/.venv/bin/python3
data: /mypy/test-data/unit/reports.test:245:
Failed: Output file tmp/report/html/n.py.html did not match its expected output
---------------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------------
Expected:
  <html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>
Actual:
  <html>
  <head>
  <meta charset="UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>

Alignment of first line difference:
  E: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  A: <meta charset="UTF-8">
           ^
Update the test output using --update-data (implies -n0; you can additionally use the -k selector to update only specific tests)
_________________________________________________________________________________________ testTypeVarTreatedAsEmptyLine __________________________________________________________________________________________
[gw1] linux -- Python 3.14.0 /mypy/.venv/bin/python3
data: /mypy/test-data/unit/reports.test:162:
Failed: Output file tmp/report/html/n.py.html did not match its expected output
---------------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------------
Expected:
  <html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>
Actual:
  <html>
  <head>
  <meta charset="UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>

Alignment of first line difference:
  E: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  A: <meta charset="UTF-8">
           ^
Update the test output using --update-data (implies -n0; you can additionally use the -k selector to update only specific tests)
____________________________________________________________________________________________ testSpecialAnyHtmlReport ____________________________________________________________________________________________
[gw1] linux -- Python 3.14.0 /mypy/.venv/bin/python3
data: /mypy/test-data/unit/reports.test:477:
Failed: Output file tmp/report/html/n.py.html did not match its expected output
---------------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------------
Expected:
  <html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>
Actual:
  <html>
  <head>
  <meta charset="UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>

Alignment of first line difference:
  E: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  A: <meta charset="UTF-8">
           ^
Update the test output using --update-data (implies -n0; you can additionally use the -k selector to update only specific tests)
_______________________________________________________________________________ testHtmlReportOnNamespacePackagesWithExplicitBases _______________________________________________________________________________
[gw0] linux -- Python 3.14.0 /mypy/.venv/bin/python3
data: /mypy/test-data/unit/reports.test:513:
Failed: Output file tmp/report/html/folder/subfolder/something.py.html did not match its expected output
---------------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------------
Expected:
  <html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../../../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>
Actual:
  <html>
  <head>
  <meta charset="UTF-8"> (diff)
  <link rel="stylesheet" type="text/css" href="../../../mypy-html.css">
  </head>
  <body>
  ...
  </table>
  </body>
  </html>

Alignment of first line difference:
  E: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  A: <meta charset="UTF-8">
           ^
Update the test output using --update-data (implies -n0; you can additionally use the -k selector to update only specific tests)
============================================================================================ short test summary info =============================================================================================
FAILED mypy/test/testcmdline.py::PythonCmdlineSuite::reports.test::testUnreachableCodeMarkedAsAny
FAILED mypy/test/testcmdline.py::PythonCmdlineSuite::reports.test::testClassDefIsNotTreatedAsEmpty
FAILED mypy/test/testcmdline.py::PythonCmdlineSuite::reports.test::testHtmlReportMemberExprNoUnanalyzed
FAILED mypy/test/testcmdline.py::PythonCmdlineSuite::reports.test::testTypeVarTreatedAsEmptyLine
FAILED mypy/test/testcmdline.py::PythonCmdlineSuite::reports.test::testSpecialAnyHtmlReport
FAILED mypy/test/testcmdline.py::PythonCmdlineSuite::reports.test::testHtmlReportOnNamespacePackagesWithExplicitBases
========================================================================================= 6 failed, 16 passed in 50.85s ==========================================================================================
(mypy) root@85af24f2db65:/mypy# 

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hauntsaninja hauntsaninja merged commit 66dd2c1 into python:master Nov 7, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A few mypy/test/testcmdline.py::PythonCmdlineSuite::reports.test test fail when lxml is built against libxml2-2.15

2 participants