Title: pyexpat: xmlparser is actually XMLParserType · Issue #140771 · python/cpython · GitHub
Open Graph Title: pyexpat: xmlparser is actually XMLParserType · Issue #140771 · python/cpython
X Title: pyexpat: xmlparser is actually XMLParserType · Issue #140771 · python/cpython
Description: The type of the Expat parser is referred everywhere as xmlparser, although no anchor for this reference is defined. But this type is actually exposed in the pyexpat (public API is xml.parsers.expat) module as XMLParserType since 2000 (4b...
Open Graph Description: The type of the Expat parser is referred everywhere as xmlparser, although no anchor for this reference is defined. But this type is actually exposed in the pyexpat (public API is xml.parsers.expat...
X Description: The type of the Expat parser is referred everywhere as xmlparser, although no anchor for this reference is defined. But this type is actually exposed in the pyexpat (public API is xml.parsers.expat...
Opengraph URL: https://github.com/python/cpython/issues/140771
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pyexpat: xmlparser is actually XMLParserType","articleBody":"The type of the Expat parser is referred everywhere as `xmlparser`, although no anchor for this reference is defined. But this type is actually exposed in the `pyexpat` (public API is `xml.parsers.expat`) module as `XMLParserType` since 2000 (4ba298c3253d5c4d11cf822619457701b7b248c0). The class name is `xmlparser`.\n\n```pycon\n\u003e\u003e\u003e import xml.parsers.expat\n\u003e\u003e\u003e xml.parsers.expat.__name__\n'xml.parsers.expat'\n\u003e\u003e\u003e xml.parsers.expat.XMLParserType\n\u003cclass 'pyexpat.xmlparser'\u003e\n\u003e\u003e\u003e xml.parsers.expat.XMLParserType.__name__\n'xmlparser'\n\u003e\u003e\u003e xml.parsers.expat.XMLParserType.__qualname__\n'xmlparser'\n\u003e\u003e\u003e xml.parsers.expat.XMLParserType.__module__\n'pyexpat'\n```\n\nI was planned to add an anchor for the `xmlparser` class, but since it is available as `XMLParserType`, should not we simply change its name and all references in the documentation to `XMLParserType`? Or add an alias `xmlparser`? (the question is why it was not used from the beginning.)\n\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-144456\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2025-10-29T19:44:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/140771/cpython/issues/140771"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4652de84-5b15-59a1-ed8a-30232c55300c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A388:2FCF6D:253836:35181B:6A547DE3 |
| html-safe-nonce | dd866f9955aae530242c0d99631fe7014832c5e13b65a44b3f5e2050e7fbec87 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzg4OjJGQ0Y2RDoyNTM4MzY6MzUxODFCOjZBNTQ3REUzIiwidmlzaXRvcl9pZCI6IjcyNTc0NjIzNDIxNDUwNDgwMzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2fa236783aed9c789c2113b3fbea115f3061fd673cb43b031318c0547a1a593a |
| hovercard-subject-tag | issue:3567592765 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/140771/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a52a11764b6f6e0528c7f573a903e6f13b5f4baf277f6d6ef8a6ec4a864e9738/python/cpython/issues/140771 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a52a11764b6f6e0528c7f573a903e6f13b5f4baf277f6d6ef8a6ec4a864e9738/python/cpython/issues/140771 |
| og:image:alt | The type of the Expat parser is referred everywhere as xmlparser, although no anchor for this reference is defined. But this type is actually exposed in the pyexpat (public API is xml.parsers.expat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | serhiy-storchaka |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6d28624802c2f7d9500239dd6870ed7031b7353b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width