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

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: Interesting. Thanks for investigating this. It looks like the script "appxmanifest.py" uses an empty string as prefix for a lookup: File "D:\a\1\s\PC\layout\support\appxmanifest.py", line 407, in get_appxmanifest node = xml.find(

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

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: The script seems to generally assume that "" is a good representation for "no prefix", i.e. the default namespace, although that is IMHO more correctly represented as None. It's not very likely that this is the only script out there t

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

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 3c5a858ec6a4e5851903762770fe526a46d3c351 by Stefan Behnel in branch 'master': bpo-30485: Re-allow empty strings in ElementPath namespace mappings since they might actually be harmless and unused (and thus went undetected previously)

[issue32782] memoryview & ctypes: incorrect itemsize for empty array

2019-04-14 Thread Stefan Krah
Stefan Krah added the comment: I agree that it is a ctypes issue, itemsize should be equal to struct.calcsize(fmt), which is never 0 for normal PEP-3118 types like the one in the example. [Pedantically, I think that the grammar would allow for an empty record "T{}" that

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

2019-04-15 Thread Stefan Behnel
Stefan Behnel added the comment: lxml has a couple of nice features here: - all tags in a namespace: "{namespace}*" - a local name 'tag' in any (or no) namespace: "{*}tag" - a tag without namespace: "{}tag" - all tags without namespace: "{}*

[issue34160] ElementTree not preserving attribute order

2019-04-16 Thread Stefan Behnel
Stefan Behnel added the comment: I rejected the (now conflicting) PR that adds a sorting option. I also sent Victor a tentative (and trivial) patch for the pungi package. -- ___ Python tracker <https://bugs.python.org/issue34

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

2019-04-16 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +12784 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue30485> ___ ___ Python-

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

2019-04-16 Thread Stefan Behnel
Stefan Behnel added the comment: I submitted a PR that changes the API back to an empty string. While lxml uses None here, an all-strings mapping is simply more convenient. I will start supporting both in lxml from the next release. Comments welcome

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

2019-04-18 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset e8113f51a8bdf33188ee30a1c038a298329e7bfa by Stefan Behnel in branch 'master': bpo-30485: Change the prefix for defining the default namespace in ElementPath from None to '' since there is existing code that uses that and i

[issue36673] Comment/PI parsing support for ElementTree

2019-04-20 Thread Stefan Behnel
New submission from Stefan Behnel : The TreeBuilder in xml.etree.ElementTree ignores comments and processing instructions. It should at least have a way to pass them through, even if there is not currently a way to append comments and PIs to the tree when they appear *outside* of the root

[issue36673] Comment/PI parsing support for ElementTree

2019-04-20 Thread Stefan Behnel
Stefan Behnel added the comment: This is related to issue9521 but not a strict duplicate, because fixing that would require actually adding comments and PIs to the tree when they are not within the root element. When they are, it's in line with the current tree model and this change wi

[issue36673] Comment/PI parsing support for ElementTree

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

[issue36673] Comment/PI parsing support for ElementTree

2019-04-20 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +eli.bendersky, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue36673> ___ ___ Python-bugs-list mailin

[issue36676] Make TreeBuilder aware of namespace prefixes

2019-04-20 Thread Stefan Behnel
New submission from Stefan Behnel : The XMLPullParser has 'start-ns' and 'end-ns' events, but the parser targets don't see them. They should have "start_ns()" and "end_ns()" callback methods to allow namespace prefix aware parsing. -- as

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

2019-04-20 Thread Stefan Behnel
Change by Stefan Behnel : -- title: Make TreeBuilder aware of namespace prefixes -> Make ET.XMLParser target aware of namespace prefixes ___ Python tracker <https://bugs.python.org/issu

[issue36673] Comment/PI parsing support for ElementTree

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

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

2019-04-20 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +12810 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36676> ___ ___ Py

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

2019-04-20 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +eli.bendersky, serhiy.storchaka stage: patch review -> ___ Python tracker <https://bugs.python.org/issue36676> ___ ___ Py

[issue36685] C implementation of xml.etree.ElementTree does not make a copy of attrib argument when creating new Element

2019-04-20 Thread Stefan Behnel
Stefan Behnel added the comment: Instead of always copying the dict in create_new_element(), we should make sure that all code that calls that function (directly or indirectly) does so with a safely owned dict. If that means that we need to add dict copying in some other place, then that&#

[issue36685] C implementation of xml.etree.ElementTree does not make a copy of attrib argument when creating new Element

2019-04-20 Thread Stefan Behnel
Stefan Behnel added the comment: Given that this has probably been like this forever, and thus provably doesn't hurt very much, I would argue that it's not worth fixing this in Py3.7. Not sure about Py2.7, but I think the answer there should be a no, too. -- stage: ->

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

2019-04-20 Thread Stefan Behnel
Stefan Behnel added the comment: We should not add anything to the implementation that we consider legacy elsewhere. Py3 has "always" used the C accelerator module instead of the Python implementation, which suggests that its interface is probably the righter one. So: make sur

[issue26746] struct.pack(): trailing padding bytes on x64

2019-04-21 Thread Stefan Krah
Change by Stefan Krah : -- nosy: +Eric.Wieser ___ Python tracker <https://bugs.python.org/issue26746> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs

2019-04-21 Thread Stefan Krah
Stefan Krah added the comment: Since Terry added me: Yes, this is clearly a bug, but it is a ctypes issue and not a memoryview issue. ctypes issues unfortunately tend to take some time until someone reviews. -- ___ Python tracker <ht

[issue13611] Integrate ElementC14N module into xml.etree package

2019-04-26 Thread Stefan Behnel
Stefan Behnel added the comment: Turns out, it was not that easy. :-/ ElementTree lacks prefixes in its tree model, so they would have to be either registered globally (via register_namespace()) or come from the parser. I tried the latter since that is the most generic way when the input is

[issue13611] Integrate ElementC14N module into xml.etree package

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

[issue34160] ElementTree not preserving attribute order

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: I implemented (most of) C14N 2.0 in issue 13611. Please give it a try if you are interested in the canonical serialisation feature. I would like to include it in Py3.8. -- ___ Python tracker <ht

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Comment/PI parsing in general is implemented in issue 36673. Note that there is currently no way to represent comments and PIs in the tree when they appear outside of the root element, which I think is what this ticket is about. After issue 36673 is resolved

[issue13611] Integrate ElementC14N module into xml.etree package

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: It took me a couple of minutes longer to submit it, but it's there now. :) I'm aware that there is a lot of new code involved, covering really three new features, which makes reviewing it a non-trivial task. I personally think it's ready to g

[issue36735] minimize disk size of cross-compiled python3.6

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

[issue16425] minidom replaceChild(new_child, old_child) removes new_child even if in another document

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Since "new_child" is inserted at least into a new place, it needs to be removed from its old place as well, so that part seems correct. The problem description does not make it clear whether or not "old_child" is handled correctly, but

[issue36735] minimize disk size of cross-compiled python3.6

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Make sure you use CFLAGS that limit the amount of debug data in the binaries. "-g1" in gcc should be enough to get stack traces on crashes, while reducing the binaries quite considerably compared to the default. "-g0" will give another v

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Ticket 24287 is a duplicate of this one and has some additional discussion. -- ___ Python tracker <https://bugs.python.org/issue9

[issue28460] Minidom, order of attributes, datachars

2019-04-27 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue28460> ___ ___

[issue24287] Let ElementTree prolog include comments and processing instructions

2019-04-27 Thread Stefan Behnel
Change by Stefan Behnel : -- superseder: -> xml.etree.ElementTree skips processing instructions when parsing ___ Python tracker <https://bugs.python.org/issu

[issue18304] ElementTree -- provide a way to ignore namespace in tags and searches

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: I was referring to issue 28238 and issue 30485. -- ___ Python tracker <https://bugs.python.org/issue18304> ___ ___ Python-bug

[issue5166] ElementTree and minidom don't prevent creation of not well-formed XML

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: This is a tricky decision. lxml, for example, validates user input, but that's because it has to process it anyway and does it along the way directly on input (and very efficiently in C code). ET, on the other hand, is rather lenient about what it a

[issue24287] Let ElementTree prolog include comments and processing instructions

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: This is a duplicate of 9521, but it's difficult to say which ticket is better. -- ___ Python tracker <https://bugs.python.org/is

[issue18304] ElementTree -- provide a way to ignore namespace in tags and searches

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Coming back to this issue after a while, I think it's still a relevant problem in some use cases. However, it's not currently clear what an improved solution would look like. The fully qualified tag names in Clark notation are long, sure, but also

[issue35502] Memory leak in xml.etree.ElementTree.iterparse

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

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Issue 24287 is a duplicate of this one and has some additional discussion. -- ___ Python tracker <https://bugs.python.org/issue9

[issue32235] test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Closing as outdated / third-party. -- nosy: +scoder stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2019-04-27 Thread Stefan Behnel
Change by Stefan Behnel : -- Removed message: https://bugs.python.org/msg340994 ___ Python tracker <https://bugs.python.org/issue9521> ___ ___ Python-bugs-list m

[issue28460] Minidom, order of attributes, datachars

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: I'll close this as a duplicate of issue 34160. I'm aware that you also proposed to reduce the text escaping, but it's still needed for attribute values. Not sure if it's really worth having two different escape functions. Feel free to pro

[issue35502] Memory leak in xml.etree.ElementTree.iterparse

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: This ticket looks like it's done for 3.7/8. Can it be closed? I guess 3.6 isn't relevant anymore, right? -- ___ Python tracker <https://bugs.python.o

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

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: I don't think there is a need for a close() method. Instead, the iterator should close the file first thing when it's done with it, but only if it owns it. Therefore, the fix in issue 25688 seems correct. Closing can also be done explicitly in a fi

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Closing as a duplicate of the more general issue 18304. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> ElementTree -- provide a way to ignore namespace in tags a

[issue33303] ElementTree Comment text isn't escaped

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Yes, comment text should be escaped internally like all other text, not by the user. The same applies to processing instructions. This suggests that it's probably also untested currently. Could you provide a PR for that changes both and adds

[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.pyth

[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/cpyt

[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

[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
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

[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

[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 bet

[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

[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/cpyt

[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

[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/cpyt

[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/e1d5dd645d5f59867cb0ad63179110

[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
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
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-02 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +12971 ___ Python tracker <https://bugs.python.org/issue13611> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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.

[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/0d5864fa07ab4f03188c690a5eb07b

[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

[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 c

[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:

[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-

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

2019-05-02 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.

[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

[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

[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

[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/6b95149eccac540a911a5ada03fcb7

[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

[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

[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:

[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/is

[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: 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/cpyt

[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
Change by Stefan Behnel : -- stage: needs patch -> resolved ___ Python tracker <https://bugs.python.org/issue36831> ___ ___ Python-bugs-list mailing list Un

[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:

[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/e9a465f3ea22c61e05ffe7b44

[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 sa

[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

[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-05-10 Thread Stefan Hölzl
Stefan Hölzl added the comment: It would allow to use Futures with a customized interface for a specific domain. e.g. to not only save the result of a task but also some context informations or provide properties/methods which are result specific. But when subclassing Future the builtin Thread

[issue33303] ElementTree Comment text isn't escaped

2019-05-10 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

[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

[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] 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

[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-05-11 Thread Stefan Hölzl
Stefan Hölzl added the comment: Here is a complete example. Please consider this is a very simple example just to demonstrate what would be possible with my proposed changes. In the following example you can see two things: * saving informations about the context in which a workload was

[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 allow

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-14 Thread Stefan Krah
Stefan Krah added the comment: +16% for float seems pretty high though. -- ___ Python tracker <https://bugs.python.org/issue27987> ___ ___ Python-bugs-list m

[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 t

[issue36928] linkt threading.settrace to sys.settrace

2019-05-15 Thread Stefan Hölzl
New submission from Stefan Hölzl : The documentation of sys.settrace suggest to call it from every created thread to enable tracing within threads. I would suggest to add a link to threading.settrace which automatically sets a trace function for every by threading module created thread. link

[issue36928] linkt threading.settrace to sys.settrace

2019-05-15 Thread Stefan Hölzl
Change by Stefan Hölzl : -- keywords: +patch pull_requests: +13255 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue29209] Remove old-deprecated ElementTree features

2018-01-13 Thread Stefan Behnel
Stefan Behnel added the comment: Patch looks right to me. I'd personally be ok with applying it to 3.7, but I'll leave the decision to you. Most of the removed "features" are non-controversial, except: - "getchildren()" is probably still in use, also because i

[issue31900] localeconv() should decode numeric fields from LC_NUMERIC encoding, not from LC_CTYPE encoding

2018-01-15 Thread Stefan Krah
Stefan Krah added the comment: On Mon, Jan 15, 2018 at 12:37:28PM +, Marc-Andre Lemburg wrote: > If you first set LC_ALL and then one of the other categories such as > LC_NUMERIC, locale C functions will still use the LC_ALL setting for > everything. LC_NUMERIC does not ove

<    15   16   17   18   19   20   21   22   23   24   >