[issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element

2019-09-10 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 7d952ded6813c896ea3f4234bb8db5247dcb5484 by Stefan Behnel (Gordon P. Hemsley) in branch 'master': bpo-32424: Deprecate xml.etree.ElementTree.Element.copy() in favor of copy.copy() (GH-12995) https://github.com/python/cpython/commit

[issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element

2019-09-10 Thread Stefan Behnel
Stefan Behnel added the comment: Let's just deprecate it directly (in Py3.9, I guess), given that it was never documented. -- ___ Python tracker <https://bugs.python.org/issue32

[issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file

2019-09-02 Thread Stefan Behnel
Stefan Behnel added the comment: I don't see anything inherently wrong with having multiple text nodes. In fact, input with very large text content can be considered a security threat (c.f. compression bombs), so a tool like pulldom (which is designed for incremental processing) should

[issue37940] Add xml.tool to pretty print XML like json.tool

2019-08-25 Thread Stefan Behnel
Stefan Behnel added the comment: I agree that formatting is not a use case by itself. I like the idea of XPath grepping, though, especially *without* pretty printing, i.e. one result per line. I admit that there is no strong reason for adding such a command line tool to the stdlib, though

[issue23423] XPath Support in ElementTree doc omission

2019-08-25 Thread Stefan Behnel
Stefan Behnel added the comment: Already fixed in later versions of the documentation: https://docs.python.org/3/library/xml.etree.elementtree.html#supported-xpath-syntax Note that Py3.4 is no longer maintained. -- resolution: -> out of date stage: -> resolved status

[issue37940] Add xml.tool to pretty print XML like json.tool

2019-08-24 Thread Stefan Behnel
Stefan Behnel added the comment: Sounds like a good idea to add something like this. Have a look here for some more ideas: https://github.com/lxml/lxml/blob/master/tools/xpathgrep.py ElementTree should be able to provide most of these features as well these days. -- stage: -> ne

[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2019-08-23 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2019-08-23 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset b5d3ceea48c181b3e2c6c67424317afed606bd39 by Stefan Behnel in branch 'master': bpo-14465: Add an indent() function to xml.etree.ElementTree to pretty-print XML trees (GH-15200) https://github.com/python/cpython/commit

[issue37819] as_integer_ratio() missing from fractions.Fraction()

2019-08-11 Thread Stefan Behnel
Stefan Behnel added the comment: FWIW, makes total sense to me to have it there. Question is more if we can still get it into Py3.8, since it's a new feature for fractions. -- nosy: +lukasz.langa, scoder ___ Python tracker <ht

[issue37792] xml.etree.ElementTree.Element.__eq__ does compare only objects identity

2019-08-10 Thread Stefan Behnel
Stefan Behnel added the comment: Right. If you want to compare XML trees for equality, either write your own deep-tree comparison function, or use something like doctestcompare, or use a C14N serialisation (which is now part of Py3.8). Whichever suits your needs. https://github.com/lxml

[issue37792] xml.etree.ElementTree.Element.__eq__ does compare only objects identity

2019-08-10 Thread Stefan Behnel
Stefan Behnel added the comment: FWIW, deep traversing an XML tree on an operation as simple as "==" seems excessive. To me, object identity comparison seems the most sensible behaviour of "==" on Element objects. (It's not "complicated to implement", bu

[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2019-08-10 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +14929 pull_request: https://github.com/python/cpython/pull/15200 ___ Python tracker <https://bugs.python.org/issue14

[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2019-08-10 Thread Stefan Behnel
Stefan Behnel added the comment: The spec section that Raymond quoted makes it clear that pretty printing is not for everyone. But there are many use cases where it is 1) helpful, 2) leads to correct results, and 3) does not grow the file size excessively. Whoever wants to make use

[Cython] Progress towards Cython 3.0

2019-08-04 Thread Stefan Behnel
Hi, tl;dr: help with the remaining work would be appreciated. The "3.0" milestone on github currently lists 24 open tickets, so there's still quite a bit to do before the release. Some of them are already PRs that need more work in one way or another.

[Python-Dev] Re: Comparing dict.values()

2019-07-29 Thread Stefan Behnel
Kristian Klette schrieb am 23.07.19 um 22:59: > During the sprints after EuroPython, I made an attempt at adding support for > comparing the results from `.values()` of two dicts. > > Currently the following works as expected: > > ``` > d = {'a': 1234} > > d.keys() == d.keys() > d.items() ==

[issue37399] XML text behaviour change if there are comments

2019-07-24 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37399] XML text behaviour change if there are comments

2019-07-24 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset bb697899aa65d90488af1950ac7cceeb3877d409 by Stefan Behnel in branch '3.8': [3.8] bpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856) (GH-14936) https://github.com/python/cpython/commit

[issue34160] ElementTree not preserving attribute order

2019-07-24 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 63673916464bace8e2147357395fdf3497967ecb by Stefan Behnel (Miss Islington (bot)) in branch '3.8': [3.8] bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867) (GH-14935) https://github.com/python/cpython/commit

[issue37399] XML text behaviour change if there are comments

2019-07-24 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +14709 pull_request: https://github.com/python/cpython/pull/14936 ___ Python tracker <https://bugs.python.org/issue37

[issue34160] ElementTree not preserving attribute order

2019-07-24 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset a3697db0102b9b6747fe36009e42f9b08f0c1ea8 by Stefan Behnel in branch 'master': bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867) https://github.com/python/cpython/commit/a3697db0102b9b6747fe36009e42f9b08f0c1ea8

[issue37399] XML text behaviour change if there are comments

2019-07-24 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset c6cb4cdd21c0c3a09b0617dbfaa7053d3bfa6def by Stefan Behnel in branch 'master': bpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856) https://github.com/python/cpython/commit/c6cb4cdd21c0c3a09b0617dbfaa7053d3bfa6def

Re: Embedding Python in C

2019-07-23 Thread Stefan Behnel
Jesse Ibarra schrieb am 22.07.19 um 18:12: > On Saturday, July 20, 2019 at 1:11:51 PM UTC-6, Stefan Behnel wrote: >> Jesse Ibarra schrieb am 20.07.19 um 04:12: >>> Sorry, I am not understanding. Smalltlak VW 8.3 does not support Python. >>> I can only call Pyhto

[issue37636] Deprecate slicing and ordering operations on sys.version

2019-07-21 Thread Stefan Behnel
Stefan Behnel added the comment: > Changing the major version number itself is a breaking change So is the proposed change, in a way. At some point, there will be a 4.0 release, which may or may not break the code in question. So, testing for "version_info[0] == 3" is already w

Re: Embedding Python in C

2019-07-20 Thread Stefan Behnel
Jesse Ibarra schrieb am 20.07.19 um 04:12: > Sorry, I am not understanding. Smalltlak VW 8.3 does not support Python. > I can only call Pyhton code through C/Python API. Ok, but that doesn't mean you need to write code that uses the C-API of Python. All you need to do is: 1) Start up a CPython

[issue34160] ElementTree not preserving attribute order

2019-07-19 Thread Stefan Behnel
Stefan Behnel added the comment: I created a PR that adds a couple of paragraphs to the documentation. Comments welcome. -- versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue34

[issue34160] ElementTree not preserving attribute order

2019-07-19 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +14654 pull_request: https://github.com/python/cpython/pull/14867 ___ Python tracker <https://bugs.python.org/issue34

Re: Embedding Python in C

2019-07-19 Thread Stefan Behnel
Jesse Ibarra schrieb am 17.07.19 um 20:39: > My options seem rather limited, I need to make a Pipeline from > (Smalltalk -> C -> Python) then go back (Smalltalk <- C <- Python). > Since Smalltalk does not support Python directly I have to settle with > the C/Python API >

[issue37399] XML text behaviour change if there are comments

2019-07-19 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +14646 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14856 ___ Python tracker <https://bugs.python.org/issu

[issue37221] PyCode_New API change breaks backwards compatibility policy

2019-07-07 Thread Stefan Behnel
Stefan Behnel added the comment: No need to keep this bug open on CPython side. The backwards compatibility has been restored (and I'll release Cython 0.29.12 today to resolve the issue on that side.) -- resolution: -> fixed status: open ->

[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

2019-07-05 Thread Stefan Behnel
Stefan Behnel added the comment: > it should not be rely upon IMHO, the correct behaviour under coverage analysis is to keep the code and not discard it. After all, it is code that exists, and that is not being executed, so it should count as uncovered code. The fact that some Pyt

[issue37221] PyCode_New API change breaks backwards compatibility policy

2019-07-01 Thread Stefan Behnel
Stefan Behnel added the comment: > Is it part of Cython 0.29.11 released yesterday? Yes. -- ___ Python tracker <https://bugs.python.org/issue37221> ___ _

[issue37399] XML text behaviour change if there are comments

2019-06-30 Thread Stefan Behnel
Stefan Behnel added the comment: I'm working on a patch. It's not entirely trivial, so it might take a couple of days. -- assignee: -> scoder ___ Python tracker <https://bugs.python.org/issu

Re: [Cython] Backport language_level=2 fix?

2019-06-29 Thread Stefan Behnel
Jeroen Demeyer schrieb am 27.06.19 um 12:44: > Since Cython 3.0 doesn't seem close to being released, is there any chance > to backport https://github.com/cython/cython/pull/2792 > > It's a fairly simple and reasonable bugfix. Done:

[issue37399] XML text behaviour change if there are comments

2019-06-27 Thread Stefan Behnel
Stefan Behnel added the comment: I think it might be this call that strikes here: https://github.com/python/cpython/commit/43851a202c#diff-f3b827d6e1d5c270ab42bc2c0523c1d2R2842 treebuilder_flush_data() is not made for concatenating text, it simply replaces it. If both text parts come

[issue37221] PyCode_New API change breaks backwards compatibility policy

2019-06-24 Thread Stefan Behnel
Stefan Behnel added the comment: I'm really only waiting for bpo-37250 to be resolved, then I can prepare a new point release of Cython, preferably this week. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-24 Thread Stefan Behnel
Stefan Behnel added the comment: Thank you, Petr, for bringing this discussion back on a solid basis, actually twice already. And sorry for causing this problem in the first place. The "tp_print = 0" was necessary to fix misbehaviour in Py2, and we should have restricted it to

Re: [Cython] Empty defines of Py_TPFLAGS_METHOD_DESCRIPTOR?

2019-06-23 Thread Stefan Behnel
Jeroen Demeyer schrieb am 18.06.19 um 13:47: > What's the purpose of commit > https://github.com/cython/cython/commit/8ac1a6a55fc44ff858cc367af556250a91f71d16 > > I can't think of any reasonable scenario where Py_TPFLAGS_METHOD_DESCRIPTOR > would be defined differently than in CPython (i.e. with

[issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset

2019-06-14 Thread Stefan Behnel
Stefan Behnel added the comment: I agree with Steve that broadly redefining a global name in a widely used header file is not a good idea. You never know what names users have in their code. Yes, you can work around it by undef-ing it again, but honestly, in that case, both sides are hacks

Re: [Cython] Reason for __Pyx_PyObject_Call2Args, __Pyx_PyObject_Call3Args

2019-06-13 Thread Stefan Behnel
Jeroen Demeyer schrieb am 13.06.19 um 15:14: > Is there any particular reason why Cython has specific code like > __Pyx_PyObject_Call2Args, __Pyx_PyObject_Call3Args, ... > > And then there is even more complicated Python code in PyMethodCallNode > generating something like

[issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset

2019-06-12 Thread Stefan Behnel
Stefan Behnel added the comment: (I forgot to state the obvious third option, which is: don't do anything and leave everything as it is now in beta-1.) -- ___ Python tracker <https://bugs.python.org/issue37

[issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset

2019-06-12 Thread Stefan Behnel
Stefan Behnel added the comment: > they can equally easily zero out the entire structure and ignore it without > changing behavior on any Python 3.x. Any solution that we apply in Cython will require users to regenerate their .c sources with a new Cython version in order to make it c

[Python-Dev] Re: Expected stability of PyCode_New() and types.CodeType() signatures

2019-06-11 Thread Stefan Behnel
Victor Stinner schrieb am 12.06.19 um 00:09: > So yeah, the PyCode_New() change is very annoying in practical, since > every single project using Cython requires a new release in practice. I think Cython's deal with regard to this is: """ If you use Cython, we will try hard to cover up the

[Python-Dev] Re: Expected stability of PyCode_New() and types.CodeType() signatures

2019-06-11 Thread Stefan Behnel
Neil Schemenauer schrieb am 08.06.19 um 22:46: > It would be great if we had a system that did CI testing with the > top PyPI modules. E.g. pull the latest versions of the top 100 PyPI > modules and test them with the latest CPython branch. FWIW, travis-ci provides the latest CPython master

[issue37221] PyCode_New API change breaks backwards compatibility policy

2019-06-11 Thread Stefan Behnel
Stefan Behnel added the comment: Note that PyCode_New() is not the only change in 3.8 beta1 that breaks Cython generated code. The renaming of "tp_print" to "tp_vectorcall" is equally disruptive, because Cython has (or had) a work-around for CPython (mis-)behaviour

[issue36885] Make makeunicode.py script more readable

2019-06-01 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

Re: [Python-Dev] Expected stability of PyCode_New() and types.CodeType() signatures

2019-06-01 Thread Stefan Behnel
Serhiy Storchaka schrieb am 01.06.19 um 09:02: > I have a related proposition. Yesterday I have reported two bugs (and Pablo > quickly fixed them) related to handling positional-only arguments. These > bugs were occurred due to subtle changing the meaning of co_argcount. When > we make some

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 18e23f227be59241cbb1eeb6d6669771dd7275fb by Stefan Behnel (Miss Islington (bot)) in branch '3.7': bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13718) https://github.com/python/cpython/commit

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: fixed -> stage: resolved -> backport needed status: closed -> open versions: +Python 3.7 ___ Python tracker <https://bugs.python.or

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker <https://bugs.python.or

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 5ac0b988fd5f1428efe35329c531c7b5c74d37f6 by Stefan Behnel (Windson yang) in branch 'master': bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13352) https://github.com/python/cpython/commit

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-05-31 Thread Stefan Behnel
Stefan Behnel added the comment: Asking users unconditionally to use the "xmlcharrefreplace" replacement method seems wrong for UTF-8. It should not be necessary. We should, however, document explicitly that the file will receive text and not bytes, i.e. that users are

[python-committers] discussion fragmentation

2019-05-19 Thread Stefan Behnel
Paul Moore schrieb am 15.05.19 um 17:18: > I don't really follow this sort of PR discussion, as the github > emails don't tend to have sufficient context on what's being said I agree, although there is also an upside to it. PR discussions can be more easily constrained to reflect the exact

[issue3020] doctest should have lib2to3 integration

2019-05-14 Thread Stefan Behnel
Stefan Behnel added the comment: I'm closing this old ticket. Python 2 will be dead by the time someone gets around to do something about it. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracke

[issue33303] ElementTree Comment text isn't escaped

2019-05-12 Thread Stefan Behnel
Stefan Behnel added the comment: I'm really sorry again, but I only consulted the XML spec on this now (and also the way libxml2 does it), and I found that XML comment text actually does not get escaped. It's not character data, and, in fact, "--" is not even allowed at

[issue36885] Make makeunicode.py script more readable

2019-05-11 Thread Stefan Behnel
Change by Stefan Behnel : -- title: Clean up makeunicode.py script -> Make makeunicode.py script more readable ___ Python tracker <https://bugs.python.org/issu

[issue36885] Clean up makeunicode.py script

2019-05-11 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +13154 ___ Python tracker <https://bugs.python.org/issue36885> ___ ___ Python-bugs-list mailin

[issue36885] Clean up makeunicode.py script

2019-05-11 Thread Stefan Behnel
New submission from Stefan Behnel : The code generation in the makeunicode.py script is more difficult to read than necessary due to the many use of "print(file=fp)" everywhere. Moving the "file" argument out of the way makes it easier to read through the actual code that

[issue33303] ElementTree Comment text isn't escaped

2019-05-11 Thread Stefan Behnel
Stefan Behnel added the comment: Hmm, sorry, I was wrong here. I looked it up and also checked the behaviour of other libraries: the data content of PIs is application specific and must not be escaped, at all. It's not XML character data. Sorry for the confusion and the extra work on your

[issue34600] python3 regression ElementTree.iterparse() unable to capture comments

2019-05-10 Thread Stefan Behnel
Stefan Behnel added the comment: I think this is resolved by issue 36673 (Py3.8). Please try it in the just released alpha4. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue36874] Support CDATA by xml.etree.(c)ElementTree

2019-05-10 Thread Stefan Behnel
Stefan Behnel added the comment: PR welcome. This is how lxml implements it: https://lxml.de/api.html#cdata Tests are here: https://github.com/lxml/lxml/blob/1a2db33aa8b9619c1caf407167567d5cca0b9019/src/lxml/tests/test_etree.py#L1692-L1749 I guess it won't look perfectly the same

[issue36676] Make ET.XMLParser target aware of namespace prefixes

2019-05-10 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset e9a465f3ea22c61e05ffe7b44a69102b25f57db4 by Stefan Behnel in branch 'master': bpo-36676: Update what's new document. (#13226) https://github.com/python/cpython/commit/e9a465f3ea22c61e05ffe7b44a69102b25f57db4

Re: [Python-Dev] PEP 580/590 discussion

2019-05-10 Thread Stefan Behnel
Petr Viktorin schrieb am 10.05.19 um 00:07: > On 5/9/19 5:33 PM, Jeroen Demeyer wrote: >> Maybe you misunderstood my proposal. I want to allow both for extra >> flexibility: >> >> - METH_FASTCALL (possibly combined with METH_KEYWORDS) continues to work >> as before. If you don't want to care about

[issue36676] Make ET.XMLParser target aware of namespace prefixes

2019-05-09 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +13136 ___ Python tracker <https://bugs.python.org/issue36676> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36831] ElementTree.find attribute matching with empty namespace

2019-05-08 Thread Stefan Behnel
Change by Stefan Behnel : -- stage: needs patch -> resolved ___ Python tracker <https://bugs.python.org/issue36831> ___ ___ Python-bugs-list mailing list Un

[issue36831] ElementTree.find attribute matching with empty namespace

2019-05-08 Thread Stefan Behnel
Stefan Behnel added the comment: Sorry for the annoyance during the release. -- keywords: -patch resolution: -> fixed stage: patch review -> needs patch status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36831] ElementTree.find attribute matching with empty namespace

2019-05-08 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 88db8bd0648588c67eeab16d0bc72ec5c206e3ad by Stefan Behnel in branch 'master': bpo-36831: Do not apply default namespace to unprefixed attributes in ElementPath. (#13201) https://github.com/python/cpython/commit

[issue36831] ElementTree.find attribute matching with empty namespace

2019-05-08 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +13112 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue36831] ElementTree.find attribute matching with empty namespace

2019-05-08 Thread Stefan Behnel
Stefan Behnel added the comment: Right, thanks for the reproducer. The default namespace should not apply to attributes. I'll write up a PR today. -- ___ Python tracker <https://bugs.python.org/issue36

[issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets

2019-05-06 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: -scoder ___ Python tracker <https://bugs.python.org/issue25541> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets

2019-05-06 Thread Stefan Behnel
Stefan Behnel added the comment: Looks like the issue was originally reported against Python 3.4. -- ___ Python tracker <https://bugs.python.org/issue25

[issue36811] Warning when compiling _elementree.c

2019-05-06 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks for the report. In simple cases like this, I think it's fine to comment in the original ticket and/or pull request. There's no real need for a dedicated ticket, at least not before an official release. -- resolution: -> fixed stage: pa

[issue36811] Warning when compiling _elementree.c

2019-05-06 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 6b95149eccac540a911a5ada03fcb7d623a0de37 by Stefan Behnel in branch 'master': bpo-36811: Fix a C compiler warning in _elementtree.c. (GH-13109) https://github.com/python/cpython/commit/6b95149eccac540a911a5ada03fcb7d623a0de37

[issue36811] Warning when compiling _elementree.c

2019-05-06 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +13024 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36811> ___ ___ Py

[issue36798] f-strings do not support top-level :=

2019-05-05 Thread Stefan Behnel
Stefan Behnel added the comment: FWIW, I think it's equally reasonable to allow assignment expressions directly in f-strings, as it is to require parentheses with a reference to the invalidity of top-level expressions. That makes me lean towards adding a parse-time error message

[issue28238] In xml.etree.ElementTree findall() can't search all elements in a namespace

2019-05-03 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue28238] In xml.etree.ElementTree findall() can't search all elements in a namespace

2019-05-03 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 47541689ccea79dfcb055c6be5800b13fcb6bdd2 by Stefan Behnel in branch 'master': bpo-28238: Implement "{*}tag" and "{ns}*" wildcard tag selection support for ElementPath, and extend the surrounding tests and docs. (GH-12997

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-05-03 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue13611] Integrate ElementC14N module into xml.etree package

2019-05-02 Thread Stefan Behnel
Stefan Behnel added the comment: > Maybe complete Doc/license.rst? Thanks, done. -- ___ Python tracker <https://bugs.python.org/issue13611> ___ ___ Python-

[issue13611] Integrate ElementC14N module into xml.etree package

2019-05-02 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +12972 ___ Python tracker <https://bugs.python.org/issue13611> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36772] Let lru_cache be used as a decorator with no arguments

2019-05-02 Thread Stefan Behnel
Stefan Behnel added the comment: I'm generally ok with such APIs. It seems needless to require @lru_cache() def f(): ... when a simple decorator would suffice. I think I might decide otherwise in cases where almost all usages require arguments, but if the no-arguments case is common

[issue13611] Integrate ElementC14N module into xml.etree package

2019-05-02 Thread Stefan Behnel
Stefan Behnel added the comment: A buildbot failure made me notice that the test files were not part of the CPython installation yet, so I added them. I also took the opportunity to add a README file that describes where they come from and under which conditions they were originally

[issue13611] Integrate ElementC14N module into xml.etree package

2019-05-02 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 0d5864fa07ab4f03188c690a5eb07bdd1fd1cb9c by Stefan Behnel in branch 'master': bpo-13611: Include C14N 2.0 test data in installation (GH-13053) https://github.com/python/cpython/commit/0d5864fa07ab4f03188c690a5eb07bdd1fd1cb9c

[issue25707] Add the close method for ElementTree.iterparse() object

2019-05-02 Thread Stefan Behnel
Stefan Behnel added the comment: Ok, I think it's reasonable to make the resource management explicit for the specific case of letting iterparse() open the file. That suggests that there should also be context manager support, given that safe usages would often involve a try-finally. Since

[issue13611] Integrate ElementC14N module into xml.etree package

2019-05-02 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +12971 ___ Python tracker <https://bugs.python.org/issue13611> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36673] Comment/PI parsing support for ElementTree

2019-05-01 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: -12811 ___ Python tracker <https://bugs.python.org/issue36673> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13611] Integrate ElementC14N module into xml.etree package

2019-05-01 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36676] Make ET.XMLParser target aware of namespace prefixes

2019-05-01 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36676> ___ ___

[issue13611] Integrate ElementC14N module into xml.etree package

2019-05-01 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset e1d5dd645d5f59867cb0ad63179110f310cbca89 by Stefan Behnel in branch 'master': bpo-13611: C14N 2.0 implementation for ElementTree (GH-12966) https://github.com/python/cpython/commit/e1d5dd645d5f59867cb0ad63179110f310cbca89

[issue36676] Make ET.XMLParser target aware of namespace prefixes

2019-05-01 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset dde3eebdaa8d2c51971ca704d53af7cbcda8bb34 by Stefan Behnel in branch 'master': bpo-36676: Namespace prefix aware parsing support for the ET.XMLParser target (GH-12885) https://github.com/python/cpython/commit

[issue36673] Comment/PI parsing support for ElementTree

2019-05-01 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36673] Comment/PI parsing support for ElementTree

2019-05-01 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 43851a202cabce1e6be699e7177735c778b6697e by Stefan Behnel in branch 'master': bpo-36673: Implement comment/PI parsing support for the TreeBuilder in ElementTree. (#12883) https://github.com/python/cpython/commit

[issue13611] Integrate ElementC14N module into xml.etree package

2019-05-01 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks for testing, Zackery. I resolved the reference leaks. They were already in the PR for issue 36676. Both PRs updated. -- ___ Python tracker <https://bugs.python.org/issue13

[issue13611] Integrate ElementC14N module into xml.etree package

2019-05-01 Thread Stefan Behnel
Stefan Behnel added the comment: > I personally think it's ready to go into the last alpha release Since I didn't get any negative comments or requests for deferral, I'll merge this today to get the feature into the last (still unreleased) alpha. We still have the beta phase to reso

[issue13611] Integrate ElementC14N module into xml.etree package

2019-04-29 Thread Stefan Behnel
Stefan Behnel added the comment: Playing around with it a bit more, I ended up changing the interface of the canonicalize() function to return its output as a string by default. It's really nice to be able to say c14n_xml = canonicalize(plain_xml) To write to a file, you now do

[issue28238] In xml.etree.ElementTree findall() can't search all elements in a namespace

2019-04-28 Thread Stefan Behnel
Stefan Behnel added the comment: BTW, I found that lxml and ET differ in their behaviour when searching for '*'. ET takes it as meaning "any tree node", whereas lxml interprets it as "any Element". Since ET's parser does not create comments and processing instructions b

[issue28238] In xml.etree.ElementTree findall() can't search all elements in a namespace

2019-04-28 Thread Stefan Behnel
Stefan Behnel added the comment: PR submitted, feedback welcome. -- assignee: -> scoder type: behavior -> enhancement ___ Python tracker <https://bugs.python.org/i

[issue28238] In xml.etree.ElementTree findall() can't search all elements in a namespace

2019-04-28 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +12919 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 50fed0b64faa305338ef5607b570fe209de6 by Stefan Behnel (Gordon P. Hemsley) in branch 'master': bpo-32424: Improve test coverage for xml.etree.ElementTree (GH-12891) https://github.com/python/cpython/commit

[issue21403] cElementTree's Element creation handles attrib argument different from ET

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Let's not change this in Py2 anymore. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

<    1   2   3   4   5   6   7   8   9   10   >