{"sha":"ab431ea0b9a7357d968f1d1c5c614649e9aaf358","node_id":"C_kwDOABSox9oAKGFiNDMxZWEwYjlhNzM1N2Q5NjhmMWQxYzVjNjE0NjQ5ZTlhYWYzNTg","commit":{"author":{"name":"Stefan Behnel","email":"stefan_ml@behnel.de","date":"2026-04-10T08:13:03Z"},"committer":{"name":"Stefan Behnel","email":"stefan_ml@behnel.de","date":"2026-04-12T13:33:30Z"},"message":"LP#2146291: Set \"resolve_entities='internal'\" as default for all parser subclasses.","tree":{"sha":"835d733506539e9bb978bd1ebbb369094f3c1111","url":"https://api.github.com/repos/lxml/lxml/git/trees/835d733506539e9bb978bd1ebbb369094f3c1111"},"url":"https://api.github.com/repos/lxml/lxml/git/commits/ab431ea0b9a7357d968f1d1c5c614649e9aaf358","comment_count":0,"verification":{"verified":false,"reason":"unsigned","signature":null,"payload":null,"verified_at":null}},"url":"https://api.github.com/repos/lxml/lxml/commits/ab431ea0b9a7357d968f1d1c5c614649e9aaf358","html_url":"https://github.com/lxml/lxml/commit/ab431ea0b9a7357d968f1d1c5c614649e9aaf358","comments_url":"https://api.github.com/repos/lxml/lxml/commits/ab431ea0b9a7357d968f1d1c5c614649e9aaf358/comments","author":{"login":"scoder","id":491659,"node_id":"MDQ6VXNlcjQ5MTY1OQ==","avatar_url":"https://avatars.githubusercontent.com/u/491659?v=4","gravatar_id":"","url":"https://api.github.com/users/scoder","html_url":"https://github.com/scoder","followers_url":"https://api.github.com/users/scoder/followers","following_url":"https://api.github.com/users/scoder/following{/other_user}","gists_url":"https://api.github.com/users/scoder/gists{/gist_id}","starred_url":"https://api.github.com/users/scoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scoder/subscriptions","organizations_url":"https://api.github.com/users/scoder/orgs","repos_url":"https://api.github.com/users/scoder/repos","events_url":"https://api.github.com/users/scoder/events{/privacy}","received_events_url":"https://api.github.com/users/scoder/received_events","type":"User","user_view_type":"public","site_admin":false},"committer":{"login":"scoder","id":491659,"node_id":"MDQ6VXNlcjQ5MTY1OQ==","avatar_url":"https://avatars.githubusercontent.com/u/491659?v=4","gravatar_id":"","url":"https://api.github.com/users/scoder","html_url":"https://github.com/scoder","followers_url":"https://api.github.com/users/scoder/followers","following_url":"https://api.github.com/users/scoder/following{/other_user}","gists_url":"https://api.github.com/users/scoder/gists{/gist_id}","starred_url":"https://api.github.com/users/scoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scoder/subscriptions","organizations_url":"https://api.github.com/users/scoder/orgs","repos_url":"https://api.github.com/users/scoder/repos","events_url":"https://api.github.com/users/scoder/events{/privacy}","received_events_url":"https://api.github.com/users/scoder/received_events","type":"User","user_view_type":"public","site_admin":false},"parents":[{"sha":"1fd1d6bc300bcd9a41def810c5fc3223811b579e","url":"https://api.github.com/repos/lxml/lxml/commits/1fd1d6bc300bcd9a41def810c5fc3223811b579e","html_url":"https://github.com/lxml/lxml/commit/1fd1d6bc300bcd9a41def810c5fc3223811b579e"}],"stats":{"total":16,"additions":9,"deletions":7},"files":[{"sha":"9b6ceb0094683579485234ad9d147f295d7ae6bf","filename":"src/lxml/iterparse.pxi","status":"modified","additions":6,"deletions":4,"changes":10,"blob_url":"https://github.com/lxml/lxml/blob/ab431ea0b9a7357d968f1d1c5c614649e9aaf358/src%2Flxml%2Fiterparse.pxi","raw_url":"https://github.com/lxml/lxml/raw/ab431ea0b9a7357d968f1d1c5c614649e9aaf358/src%2Flxml%2Fiterparse.pxi","contents_url":"https://api.github.com/repos/lxml/lxml/contents/src%2Flxml%2Fiterparse.pxi?ref=ab431ea0b9a7357d968f1d1c5c614649e9aaf358","patch":"@@ -6,7 +6,8 @@ cdef class iterparse:\n     \"\"\"iterparse(self, source, events=(\"end\",), tag=None, \\\n                   attribute_defaults=False, dtd_validation=False, \\\n                   load_dtd=False, no_network=True, remove_blank_text=False, \\\n-                  remove_comments=False, remove_pis=False, encoding=None, \\\n+                  compact=True, resolve_entities='internal', remove_comments=False, \\\n+                  remove_pis=False, strip_cdata=True, encoding=None, \\\n                   html=False, recover=None, huge_tree=False, schema=None)\n \n     Incremental parser.\n@@ -42,10 +43,11 @@ cdef class iterparse:\n      - remove_blank_text: discard blank text nodes\n      - remove_comments: discard comments\n      - remove_pis: discard processing instructions\n-     - strip_cdata: replace CDATA sections by normal text content (default: \n+     - strip_cdata: replace CDATA sections by normal text content (default:\n        True for XML, ignored otherwise)\n      - compact: safe memory for short text content (default: True)\n-     - resolve_entities: replace entities by their text value (default: True)\n+     - resolve_entities: replace entities by their text value\n+       (default: 'internal' only)\n      - huge_tree: disable security restrictions and support very deep trees\n                   and very long text content (only affects libxml2 2.7+)\n      - html: parse input as HTML (default: XML)\n@@ -68,7 +70,7 @@ cdef class iterparse:\n     def __init__(self, source, events=(\"end\",), *, tag=None,\n                  attribute_defaults=False, dtd_validation=False,\n                  load_dtd=False, no_network=True, remove_blank_text=False,\n-                 compact=True, resolve_entities=True, remove_comments=False,\n+                 compact=True, resolve_entities='internal', remove_comments=False,\n                  remove_pis=False, strip_cdata=True, encoding=None,\n                  html=False, recover=None, huge_tree=False, collect_ids=True,\n                  XMLSchema schema=None):"},{"sha":"726da48ad9ae50ac2c20509fe080b72c4aa1c192","filename":"src/lxml/parser.pxi","status":"modified","additions":3,"deletions":3,"changes":6,"blob_url":"https://github.com/lxml/lxml/blob/ab431ea0b9a7357d968f1d1c5c614649e9aaf358/src%2Flxml%2Fparser.pxi","raw_url":"https://github.com/lxml/lxml/raw/ab431ea0b9a7357d968f1d1c5c614649e9aaf358/src%2Flxml%2Fparser.pxi","contents_url":"https://api.github.com/repos/lxml/lxml/contents/src%2Flxml%2Fparser.pxi?ref=ab431ea0b9a7357d968f1d1c5c614649e9aaf358","patch":"@@ -1584,7 +1584,7 @@ cdef class XMLParser(_FeedParser):\n     \"\"\"XMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, \\\n                  load_dtd=False, no_network=True, decompress=False, ns_clean=False, \\\n                  recover=False, schema: XMLSchema =None, huge_tree=False, \\\n-                 remove_blank_text=False, resolve_entities=True, \\\n+                 remove_blank_text=False, resolve_entities='internal', \\\n                  remove_comments=False, remove_pis=False, strip_cdata=True, \\\n                  collect_ids=True, target=None, compact=True)\n \n@@ -1717,7 +1717,7 @@ cdef class ETCompatXMLParser(XMLParser):\n     \"\"\"ETCompatXMLParser(self, encoding=None, attribute_defaults=False, \\\n                  dtd_validation=False, load_dtd=False, no_network=True, decompress=False, \\\n                  ns_clean=False, recover=False, schema=None, \\\n-                 huge_tree=False, remove_blank_text=False, resolve_entities=True, \\\n+                 huge_tree=False, remove_blank_text=False, resolve_entities='internal', \\\n                  remove_comments=True, remove_pis=True, strip_cdata=True, \\\n                  target=None, compact=True)\n \n@@ -1731,7 +1731,7 @@ cdef class ETCompatXMLParser(XMLParser):\n     def __init__(self, *, encoding=None, attribute_defaults=False,\n                  dtd_validation=False, load_dtd=False, no_network=True, decompress=False,\n                  ns_clean=False, recover=False, schema=None,\n-                 huge_tree=False, remove_blank_text=False, resolve_entities=True,\n+                 huge_tree=False, remove_blank_text=False, resolve_entities='internal',\n                  remove_comments=True, remove_pis=True, strip_cdata=True,\n                  target=None, compact=True):\n         XMLParser.__init__(self,"}]}