-
-
Notifications
You must be signed in to change notification settings - Fork 37k
Add structured version info for pyexpat #157473
Copy link
Copy link
Closed
Labels
3.16new features, bugs and security fixesnew features, bugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-XMLtype-featureA feature request or enhancementA feature request or enhancement
Description
Activity
Metadata
Metadata
Assignees
Labels
3.16new features, bugs and security fixesnew features, bugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-XMLtype-featureA feature request or enhancementA feature request or enhancement
Feature or enhancement
pyexpat.EXPAT_VERSION(fromXML_ExpatVersion()) andpyexpat.version_info(fromXML_ExpatVersionInfo()) describe the Expat library loaded at runtime: both functions are compiled into libexpat from itsXML_MAJOR_VERSION,XML_MINOR_VERSIONandXML_MICRO_VERSIONmacros. The same macros evaluated inpyexpat.cgive the version of the headers the module was built against, which is what the#if XML_COMBINED_VERSION >= ...checks in the module depend on. The two can differ when a system libexpat is used. The build-time version is not exposed to Python; it can only be inferred from which parser methods exist.Add
pyexpat.VERSION_INFOfor the build-time version, and makepyexpat.version_infoa named tuple.Linked PRs