diff --git a/0001-Fix-failing-cases-for-Python-3.14.patch b/0001-Fix-failing-cases-for-Python-3.14.patch
new file mode 100644
index 0000000000000000000000000000000000000000..8a6b1946c2318f81cd0d7f5555772e3c87bb7535
--- /dev/null
+++ b/0001-Fix-failing-cases-for-Python-3.14.patch
@@ -0,0 +1,40 @@
+From 23c301de28e12426408656efdfa153b11d4ff558 Mon Sep 17 00:00:00 2001
+From: facelessuser
+Date: Mon, 21 Jul 2025 08:56:43 -0600
+Subject: [PATCH] Fix failing cases for Python 3.14
+
+New change requires us to monkey patch `locatetagend` to prevent
+capturing incomplete tags in code spans.
+---
+ docs/changelog.md | 6 ++++++
+ markdown/htmlparser.py | 14 ++++++++++++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/markdown/htmlparser.py b/markdown/htmlparser.py
+index 478e702..63e5df3 100644
+--- a/markdown/htmlparser.py
++++ b/markdown/htmlparser.py
+@@ -69,6 +69,20 @@ htmlparser.locatestarttagend_tolerant = re.compile(r"""
+ )?
+ \s* # trailing whitespace
+ """, re.VERBOSE)
++htmlparser.locatetagend = re.compile(r"""
++ [a-zA-Z][^`\t\n\r\f />]* # tag name
++ [\t\n\r\f /]* # optional whitespace before attribute name
++ (?:(?<=['"\t\n\r\f /])[^`\t\n\r\f />][^\t\n\r\f /=>]* # attribute name
++ (?:= # value indicator
++ (?:'[^']*' # LITA-enclosed value
++ |"[^"]*" # LIT-enclosed value
++ |(?!['"])[^>\t\n\r\f ]* # bare value
++ )
++ )?
++ [\t\n\r\f /]* # possibly followed by a space
++ )*
++ >?
++""", re.VERBOSE)
+
+ # Match a blank line at the start of a block of text (two newlines).
+ # The newlines may be preceded by additional whitespace.
+--
+2.39.3
+
diff --git a/Ensure-incomplete-markup-declaration-in-raw-HTML-doe.patch b/Ensure-incomplete-markup-declaration-in-raw-HTML-doe.patch
new file mode 100644
index 0000000000000000000000000000000000000000..f7410d70bac2865997e4de3894f40f12bdffb60c
--- /dev/null
+++ b/Ensure-incomplete-markup-declaration-in-raw-HTML-doe.patch
@@ -0,0 +1,64 @@
+From 820721485c928c6f97f3d74f37afb6d2450aef9e Mon Sep 17 00:00:00 2001
+From: Waylan Limberg
+Date: Wed, 18 Jun 2025 10:29:03 -0400
+Subject: [PATCH] Ensure incomplete markup declaration in raw HTML doesn't
+ crash parser.
+
+See Python bug report at gh-77057 for details. Until we drop support for
+Python < 3.13 (where this was fixed upstream), we need to avoid the
+unwanted error by checking for it explicitly. Fixes #1534.
+---
+ docs/changelog.md | 1 +
+ markdown/extensions/md_in_html.py | 4 ++++
+ markdown/htmlparser.py | 4 ++++
+ tests/test_syntax/blocks/test_html_blocks.py | 7 +++++++
+ 4 files changed, 16 insertions(+)
+
+diff --git a/markdown/extensions/md_in_html.py b/markdown/extensions/md_in_html.py
+index ba73c9425..5256e9046 100644
+--- a/markdown/extensions/md_in_html.py
++++ b/markdown/extensions/md_in_html.py
+@@ -280,6 +280,10 @@ def parse_pi(self, i: int) -> int:
+
+ def parse_html_declaration(self, i: int) -> int:
+ if self.at_line_start() or self.intail or self.mdstack:
++ if self.rawdata[i:i+3] == ' int:
+
+ def parse_html_declaration(self, i: int) -> int:
+ if self.at_line_start() or self.intail:
++ if self.rawdata[i:i+3] == '<![
'
++ )
++
+ def test_raw_cdata_code_span(self):
+ self.assertMarkdownRenders(
+ self.dedent(
diff --git a/Fixes-for-Python-3.14.patch b/Fixes-for-Python-3.14.patch
new file mode 100644
index 0000000000000000000000000000000000000000..c241cbf808045c07f5a00828b535462413217373
--- /dev/null
+++ b/Fixes-for-Python-3.14.patch
@@ -0,0 +1,131 @@
+From 9980cb5b27b07ff48283178d98213e41543701ec Mon Sep 17 00:00:00 2001
+From: Isaac Muse
+Date: Thu, 19 Jun 2025 09:46:13 -0600
+Subject: [PATCH] Fixes for Python 3.14
+
+- Fix codecs deprecation
+- Fix issue with unclosed ` int:
+ if self.rawdata[i:i+3] == '':
++ self.handle_data('<')
++ self.override_comment_update = True
++ return
+ self.handle_empty_tag(''.format(data), is_block=True)
+
++ def updatepos(self, i: int, j: int) -> int:
++ if self.override_comment_update:
++ self.override_comment_update = False
++ i = 0
++ j = 1
++ return super().updatepos(i, j)
++
+ def handle_decl(self, data: str):
+ self.handle_empty_tag(''.format(data), is_block=True)
+
+@@ -278,7 +293,11 @@ def parse_html_declaration(self, i: int) -> int:
+ if self.rawdata[i:i+3] == ' int: # pragma: no cover
+ self.__starttag_text = None
+ endpos = self.check_for_whole_start_tag(i)
+ if endpos < 0:
+- return endpos
++ self.handle_data(self.rawdata[i:i + 1])
++ return i + 1
+ rawdata = self.rawdata
+ self.__starttag_text = rawdata[i:endpos]
+
diff --git a/python-markdown.spec b/python-markdown.spec
index 102342fe5acb4e11796afcf60b333e14a41ce5a2..9db8783d850dee0c84189838172ef9d848ac2e49 100644
--- a/python-markdown.spec
+++ b/python-markdown.spec
@@ -1,13 +1,17 @@
-%global srcname Markdown
%global pkgname markdown
Summary: Markdown implementation in Python
Name: python-%{pkgname}
-Version: 3.5.1
-Release: 3%{?dist}
+Version: 3.7
+Release: 1%{?dist}
License: BSD
URL: https://python-markdown.github.io/
-Source0: %{pypi_source}
+Source0: %{pypi_source markdown}
+
+Patch0001: Ensure-incomplete-markup-declaration-in-raw-HTML-doe.patch
+Patch0002: Fixes-for-Python-3.14.patch
+Patch0003: 0001-Fix-failing-cases-for-Python-3.14.patch
+
BuildArch: noarch
%description
@@ -30,7 +34,7 @@ though there are a few known issues.
%prep
-%autosetup -p1 -n %{srcname}-%{version}
+%autosetup -p1 -n %{pkgname}-%{version}
%generate_buildrequires
%pyproject_buildrequires
@@ -55,6 +59,10 @@ though there are a few known issues.
%changelog
+* Mon Dec 15 2025 Upgrade Robot - 3.7-1
+- Upgrade to version 3.7
+- Upgrading to version 3.7 resolves compatibility issues with Python 3.11
+
* Thu Sep 26 2024 OpenCloudOS Release Engineering - 3.5.1-3
- Rebuilt for clarifying the packages requirement in BaseOS and AppStream
diff --git a/sources b/sources
index b8d2ad20596c11ee4600e6c11754328c64ec1c6a..9d324f3d71371ed033ea2bc0599d5256562e416c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (Markdown-3.5.1.tar.gz) = 72771300bded3a12b0f1addfcdb124c8e12d3b42672c62b92b7565a03d8ba108fe9d156a59c1783295059a11e6e2d312ec4f60de2bc6c0ee7b853c0a56e2e97c
+SHA512 (markdown-3.7.tar.gz) = 9152ae942dfe5c93f29d4f083d7b04fa86f042a816b7a1360f6088cd5ea0fc730e14915a8fc48f6d36f74bc311ddc35dbfe1f78ef85779f285aa35a1e56caae1