Skip to content

Commit 2302f25

Browse files
committed
[GR-59726] Fix issue with use of internal function from xml.dom.minidom whose function signature changes in Python 3.13
PullRequest: mx/1850
2 parents eca504c + 23b0eaa commit 2302f25

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/mx/_impl/mx.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -11782,6 +11782,13 @@ def get_dynamic_imports():
1178211782

1178311783
### ~~~~~~~~~~~~~ XML
1178411784

11785+
def _write_data(writer, data):
11786+
"Writes datachars to writer."
11787+
if data:
11788+
data = data.replace("&", "&amp;").replace("<", "&lt;"). \
11789+
replace("\"", "&quot;").replace(">", "&gt;")
11790+
writer.write(data)
11791+
1178511792
class XMLElement(xml.dom.minidom.Element):
1178611793
def writexml(self, writer, indent="", addindent="", newl=""):
1178711794
writer.write(indent + "<" + self.tagName)
@@ -11791,7 +11798,7 @@ def writexml(self, writer, indent="", addindent="", newl=""):
1179111798

1179211799
for a_name in a_names:
1179311800
writer.write(f" {a_name}=\"")
11794-
xml.dom.minidom._write_data(writer, attrs[a_name].value)
11801+
_write_data(writer, attrs[a_name].value)
1179511802
writer.write("\"")
1179611803
if self.childNodes:
1179711804
if not self.ownerDocument.padTextNodeWithoutSiblings and len(self.childNodes) == 1 and isinstance(self.childNodes[0], xml.dom.minidom.Text):
@@ -18215,7 +18222,7 @@ def alarm_handler(signum, frame):
1821518222
_CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache'))
1821618223

1821718224
# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
18218-
version = VersionSpec("7.34.2") # [GR-59700] set JVMCI_VERSION_CHECK to ignore when calling a fetch-jdk provider
18225+
version = VersionSpec("7.35.0") # [GR-59726] Fix use of internal xml function changed in Python 3.13+
1821918226

1822018227
_mx_start_datetime = datetime.utcnow()
1822118228

0 commit comments

Comments
 (0)