| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
(GH-117099) (#118791)
docs: module page titles should not start with a link to themselves (GH-117099)
(cherry picked from commit bcb435ee8ff41b5ec5d879ee0b6651f146a66151)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
|
|
|
|
|
|
|
| |
(#117754)
Co-authored-by: Mikhail B <55960560+mbel0@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-24223) (#117429)
(cherry picked from commit 9dae05ee59eeba0e67af2a46f2a2907c9f8d7e4a)
Co-authored-by: Moshe Kaplan <mosheekaplan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-115623) (GH-116248)
Allow controlling Expat >=2.6.0 reparse deferral (CVE-2023-52425) by adding five new methods:
- `xml.etree.ElementTree.XMLParser.flush`
- `xml.etree.ElementTree.XMLPullParser.flush`
- `xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`
- `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`
- `xml.sax.expatreader.ExpatParser.flush`
Based on the "flush" idea from https://github.com/python/cpython/pull/115138#issuecomment-1932444270 .
- Please treat as a security fix related to CVE-2023-52425.
(cherry picked from commit 6a95676bb526261434dd068d6c49927c44d24a9b)
(cherry picked from commit 73807eb634315f70a464a18feaae33d9e065de09)
(cherry picked from commit eda2963378a3c292cf6bb202bb00e94e46ee6d90)
---------
Includes code suggested-by: Snild Dolkow <snild@sony.com>
and by core dev Serhiy Storchaka.
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
| |
PI objects instead of comment objects.
(cherry picked from commit de6f97cd3519c5d8528d8ca1bb00fce4e9969671)
Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
practice (#114409) (#114472)
(cherry picked from commit 1d7bddd9612bcbaaedbc837e2936de773e855411)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
|
|
|
|
|
|
| |
Co-authored-by: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
|
| |
Co-authored-by: Don Patterson <37046246+don-patterson@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
`Doc/library/xml.etree.elementtree.rst` (GH-109799) (#109800)
gh-101100: Fix sphinx warnings in `Doc/library/xml.etree.elementtree.rst` (GH-109799)
(cherry picked from commit 649768fb6781ba810df44017fee1975a11d65e2f)
gh-101100: Fix shpinx warnings in `Doc/library/xml.etree.elementtree.rst`
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
| |
When testing element truth values, emit a DeprecationWarning in all implementations.
This had emitted a FutureWarning in the rarely used python-only implementation since ~2.7 and has always been documented as a behavior not to rely on.
Matching an element in a tree search but having it test False can be unexpected. Raising the warning enables making the choice to finally raise an exception for this ambiguous behavior in the future.
|
|
|
| |
Add newline for prompts so copying to REPL does not cause errors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
API members documented in sphinx have an object name, which allow the
documentation to be linked from other projects. Sphinx calculates the
object name by prefixing the current module name to the directive
argument, e.g:
.. module:: foo
.. function:: bar.baz
becomes foo.bar.baz. Since these anchors aren't displayed in the
documentation, some mistakes have crept in, namely the Python stdlib
documentation currently contains the objects:
* asyncio.asyncio.subprocess.DEVNULL
* asyncio.asyncio.subprocess.PIPE
* asyncio.asyncio.subprocess.STDOUT
* asyncio.asyncio.subprocess.Process
* multiprocessing.sharedctypes.multiprocessing.Manager
* xml.etree.ElementTree.xml.etree.ElementInclude
This commit fixes this by making use of the :module: option which
without an argument makes sphinx take the directive argument as is
for the object name (avoiding the prefixing of the current module
name that led to these broken object names).
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
| |
|
|
|
|
| |
modifying an XML tree while iterating over it. (GH-22464)
|
|
|
|
|
|
|
| |
(GH-20117)
* Revert "bpo-36543: Remove the xml.etree.cElementTree module. (GH-19108)"
This reverts commit b33e52511a59c6da7132c226b7f7489b092a33eb.
|
|
|
|
| |
Looks like the merging of bpo-33187 and bpo-20928 was racy, resulting in
this change going undocumented.
|
|
|
|
|
|
|
|
|
| |
* "Return true/false" is replaced with "Return ``True``/``False``"
if the function actually returns a bool.
* Fixed formatting of some True and False literals (now in monospace).
* Replaced "True/False" with "true/false" if it can be not only bool.
* Replaced some 1/0 with True/False if it corresponds the code.
* "Returns <bool>" is replaced with "Return <bool>".
|
| |
|
|
|
|
|
| |
Remove methods Element.getchildren(), Element.getiterator() and
ElementTree.getiterator() and the xml.etree.cElementTree module.
|
|
|
|
| |
XML trees (GH-15200)
|
|
|
|
|
|
|
| |
* Fix the formatting in the documentation of the tostring() functions.
* bpo-34160: Document that the tostring() and tostringlist() functions also preserve the attribute order now.
* bpo-34160: Add an explanation of how users should deal with the attribute order.
|
|
|
|
| |
ElementPath, and extend the surrounding tests and docs. (GH-12997)
|
|
|
|
|
|
|
| |
* Implement C14N 2.0 as a new canonicalize() function in ElementTree.
Missing features:
- prefix renaming in XPath expressions (tag and attribute text is supported)
- preservation of original prefixes given redundant namespace declarations
|
|
|
|
|
| |
target (GH-12885)
* bpo-36676: Implement namespace prefix aware parsing support for the XMLParser target in ElementTree.
|
|
|
|
|
|
|
|
| |
ElementTree. (#12883)
* bpo-36673: Implement comment/PI parsing support for the TreeBuilder in ElementTree.
* bpo-36673: Rewrite the comment/PI factory handling for the TreeBuilder in "_elementtree" to make it use the same factories as the ElementTree module, and to make it explicit when the comments/PIs are inserted into the tree and when they are not (which is the default).
|
|
|
|
| |
ElementPath from None to '' since there is existing code that uses that and it's more convenient to have an all-string-keys dict (e.g. when sorting items etc.). (#12860)
|
|
|
|
| |
as prefix (#1823)
|
|
|
|
|
| |
arguments (GH-12225)
Add new keyword arguments "default_namespace" and "xml_declaration" to functions ET.tostring() and ET.tostringlist(), as known from ElementTree.write().
|
| |
|
| |
|
|
|
|
|
| |
Also make getchildren() and getiterator() emitting
a DeprecationWarning instead of PendingDeprecationWarning.
|
|
|
| |
The new link is given in a red box on the old page.
|
|
|
|
|
| |
* Allow whitespace inside of ElementPath predicates.
* Add ElementPath predicate support for text comparison of the current node, like "[.='text']".
|
|
|
|
|
|
|
|
| |
* Use explicit numbering for footnotes referred by explicit number.
* Restore missed footnote reference in stdtypes.rst.
* Fix literal strings formatting in howto/urllib2.rst.
* Update susp-ignored.csv for zipapp.rst.
* Fix suspicious mark up in Misc/NEWS.
|
| |
|
|
|
|
|
| |
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
|
|
|
|
| |
Original patch by James Edwards.
|
| |
|
|
|
|
| |
This affects documentation, code comments, and a debugging messages.
|
| |
|
| |
|
|
|
|
| |
ElementTree Element objects. Initial patch by Martin Panter.
|
| |
|
|
|
|
| |
the XPATH predicate table.
|
| |
|
|
|
|
| |
Based on patch by Nikolaus Rath.
|
| |
|
| |
|
|\ |
|