[med-svn] [Git][python-team/packages/mypy][master] 2 commits: Normalize HTML content-type meta
Colin Watson (@cjwatson)
gitlab at salsa.debian.org
Sun Nov 9 18:33:10 GMT 2025
Colin Watson pushed to branch master at Debian Python Team / packages / mypy
Commits:
9cee99c0 by Colin Watson at 2025-11-09T18:32:43+00:00
Normalize HTML content-type meta
Closes: #1120242
- - - - -
a88b9b76 by Colin Watson at 2025-11-09T18:32:54+00:00
releasing package mypy version 1.18.2-2
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/normalize-html-content-type-meta.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+mypy (1.18.2-2) unstable; urgency=medium
+
+ * Team upload.
+ * Normalize HTML content-type meta (closes: #1120242).
+
+ -- Colin Watson <cjwatson at debian.org> Sun, 09 Nov 2025 18:32:44 +0000
+
mypy (1.18.2-1) unstable; urgency=medium
* New upstream version
=====================================
debian/patches/normalize-html-content-type-meta.patch
=====================================
@@ -0,0 +1,98 @@
+From: STerliakov <terlya.stas at gmail.com>
+Date: Fri, 7 Nov 2025 05:02:02 +0100
+Subject: Normalize HTML content-type meta
+
+Origin: upstream, https://github.com/python/mypy/pull/20199
+Bug: https://github.com/python/mypy/issues/20070
+Bug-Debian: https://bugs.debian.org/1120242
+Last-Update: 2025-11-09
+---
+ mypy/test/helpers.py | 9 +++++++++
+ test-data/unit/reports.test | 12 ++++++------
+ 2 files changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/mypy/test/helpers.py b/mypy/test/helpers.py
+index ae432ff..97f40c2 100644
+--- a/mypy/test/helpers.py
++++ b/mypy/test/helpers.py
+@@ -441,6 +441,8 @@ def check_test_output_files(
+ if testcase.suite.native_sep and os.path.sep == "\\":
+ normalized_output = [fix_cobertura_filename(line) for line in normalized_output]
+ normalized_output = normalize_error_messages(normalized_output)
++ if os.path.basename(testcase.file) == "reports.test":
++ normalized_output = normalize_report_meta(normalized_output)
+ assert_string_arrays_equal(
+ expected_content.splitlines(),
+ normalized_output,
+@@ -464,6 +466,13 @@ def normalize_file_output(content: list[str], current_abs_path: str) -> list[str
+ return result
+
+
++def normalize_report_meta(content: list[str]) -> list[str]:
++ # libxml 2.15 and newer emits the "modern" version of this <meta> element.
++ # Normalize the old style to look the same.
++ html_meta = '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'
++ return ['<meta charset="UTF-8">' if x == html_meta else x for x in content]
++
++
+ def find_test_files(pattern: str, exclude: list[str] | None = None) -> list[str]:
+ return [
+ path.name
+diff --git a/test-data/unit/reports.test b/test-data/unit/reports.test
+index 82c3869..e9ee76f 100644
+--- a/test-data/unit/reports.test
++++ b/test-data/unit/reports.test
+@@ -118,7 +118,7 @@ class A(object):
+ [outfile report/html/n.py.html]
+ <html>
+ <head>
+-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
++<meta charset="UTF-8">
+ <link rel="stylesheet" type="text/css" href="../mypy-html.css">
+ </head>
+ <body>
+@@ -172,7 +172,7 @@ T = TypeVar('T')
+ [outfile report/html/n.py.html]
+ <html>
+ <head>
+-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
++<meta charset="UTF-8">
+ <link rel="stylesheet" type="text/css" href="../mypy-html.css">
+ </head>
+ <body>
+@@ -214,7 +214,7 @@ def bar(x):
+ [outfile report/html/n.py.html]
+ <html>
+ <head>
+-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
++<meta charset="UTF-8">
+ <link rel="stylesheet" type="text/css" href="../mypy-html.css">
+ </head>
+ <body>
+@@ -255,7 +255,7 @@ old_stdout = sys.stdout
+ [outfile report/html/n.py.html]
+ <html>
+ <head>
+-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
++<meta charset="UTF-8">
+ <link rel="stylesheet" type="text/css" href="../mypy-html.css">
+ </head>
+ <body>
+@@ -487,7 +487,7 @@ DisplayToSource = Callable[[int], int]
+ [outfile report/html/n.py.html]
+ <html>
+ <head>
+-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
++<meta charset="UTF-8">
+ <link rel="stylesheet" type="text/css" href="../mypy-html.css">
+ </head>
+ <body>
+@@ -529,7 +529,7 @@ namespace_packages = True
+ [outfile report/html/folder/subfolder/something.py.html]
+ <html>
+ <head>
+-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
++<meta charset="UTF-8">
+ <link rel="stylesheet" type="text/css" href="../../../mypy-html.css">
+ </head>
+ <body>
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
hint-typeshed-package
verbose
intersphinx
+normalize-html-content-type-meta.patch
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/compare/b8c381915f92153de9664405cb0d18a9e5305579...a88b9b76ca1cb567a83db89b4302fbb27406dc21
--
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/compare/b8c381915f92153de9664405cb0d18a9e5305579...a88b9b76ca1cb567a83db89b4302fbb27406dc21
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20251109/2b714477/attachment-0001.htm>
More information about the debian-med-commit
mailing list