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
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
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
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
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
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
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
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
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
Change by Stefan Behnel :
--
pull_requests: +14929
pull_request: https://github.com/python/cpython/pull/15200
___
Python tracker
<https://bugs.python.org/issue14
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
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.
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() ==
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
Change by Stefan Behnel :
--
pull_requests: +14709
pull_request: https://github.com/python/cpython/pull/14936
___
Python tracker
<https://bugs.python.org/issue37
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
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
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
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
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
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
Change by Stefan Behnel :
--
pull_requests: +14654
pull_request: https://github.com/python/cpython/pull/14867
___
Python tracker
<https://bugs.python.org/issue34
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
>
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
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 ->
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
Stefan Behnel added the comment:
> Is it part of Cython 0.29.11 released yesterday?
Yes.
--
___
Python tracker
<https://bugs.python.org/issue37221>
___
_
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
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:
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
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
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
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
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
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
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
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
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
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
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
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Change by Stefan Behnel :
--
resolution: fixed ->
stage: resolved -> backport needed
status: closed -> open
versions: +Python 3.7
___
Python tracker
<https://bugs.python.or
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
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
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
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
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
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
Change by Stefan Behnel :
--
title: Clean up makeunicode.py script -> Make makeunicode.py script more
readable
___
Python tracker
<https://bugs.python.org/issu
Change by Stefan Behnel :
--
keywords: +patch
pull_requests: +13154
___
Python tracker
<https://bugs.python.org/issue36885>
___
___
Python-bugs-list mailin
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
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
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
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
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
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
Change by Stefan Behnel :
--
pull_requests: +13136
___
Python tracker
<https://bugs.python.org/issue36676>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Stefan Behnel :
--
stage: needs patch -> resolved
___
Python tracker
<https://bugs.python.org/issue36831>
___
___
Python-bugs-list mailing list
Un
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
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
Change by Stefan Behnel :
--
keywords: +patch
pull_requests: +13112
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
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
Change by Stefan Behnel :
--
nosy: -scoder
___
Python tracker
<https://bugs.python.org/issue25541>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Behnel added the comment:
Looks like the issue was originally reported against Python 3.4.
--
___
Python tracker
<https://bugs.python.org/issue25
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
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
Change by Stefan Behnel :
--
keywords: +patch
pull_requests: +13024
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36811>
___
___
Py
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
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Stefan Behnel added the comment:
> Maybe complete Doc/license.rst?
Thanks, done.
--
___
Python tracker
<https://bugs.python.org/issue13611>
___
___
Python-
Change by Stefan Behnel :
--
pull_requests: +12972
___
Python tracker
<https://bugs.python.org/issue13611>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Change by Stefan Behnel :
--
pull_requests: +12971
___
Python tracker
<https://bugs.python.org/issue13611>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Stefan Behnel :
--
pull_requests: -12811
___
Python tracker
<https://bugs.python.org/issue36673>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Stefan Behnel :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue36676>
___
___
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
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
Change by Stefan Behnel :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
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
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
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
Stefan Behnel added the comment:
PR submitted, feedback welcome.
--
assignee: -> scoder
type: behavior -> enhancement
___
Python tracker
<https://bugs.python.org/i
Change by Stefan Behnel :
--
keywords: +patch
pull_requests: +12919
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
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
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
401 - 500 of 7113 matches
Mail list logo