Skip to content

Commit

Permalink
[GR-59726] Fix issue with use of internal function from xml.dom.minid…
Browse files Browse the repository at this point in the history
…om whose function signature changes in Python 3.13

PullRequest: mx/1850
  • Loading branch information
atrib committed Nov 11, 2024
2 parents eca504c + 23b0eaa commit 2302f25
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -11782,6 +11782,13 @@ def get_dynamic_imports():

### ~~~~~~~~~~~~~ XML

def _write_data(writer, data):
"Writes datachars to writer."
if data:
data = data.replace("&", "&amp;").replace("<", "&lt;"). \
replace("\"", "&quot;").replace(">", "&gt;")
writer.write(data)

class XMLElement(xml.dom.minidom.Element):
def writexml(self, writer, indent="", addindent="", newl=""):
writer.write(indent + "<" + self.tagName)
Expand All @@ -11791,7 +11798,7 @@ def writexml(self, writer, indent="", addindent="", newl=""):

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

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

_mx_start_datetime = datetime.utcnow()

Expand Down

0 comments on commit 2302f25

Please sign in to comment.