Eli Bendersky added the comment:
moijes,
Yes, it's open. You can examine the comments for the previous patch by clicking
on the "review" link near the patch. You need to be logged in to the issue
tracker to see that.
--
___
Python
Eli Bendersky added the comment:
On Wed, Feb 6, 2013 at 4:17 AM, Ezio Melotti wrote:
>
> Ezio Melotti added the comment:
>
> I'm still a bit skeptic about this.
>
> To summarize my position, I am:
> +0 about adding something like this to test.support and use it for ne
Eli Bendersky added the comment:
etree's doctest tests are a painful relic of the past, which will hopefully go
away one day (issue #15083), at which point conformance to PEP 399 shouldn't be
an issue.
More generally, and this applies to etree's test too, a lot of trouble is b
Eli Bendersky added the comment:
> That wouldn't work if there is a skip decorator that checks that the C
module is available :)
Yes, but that's easily amended with just raising SkipTest in the setUp
instead. Not polluting the global namespace has its merits, especially when
the im
Eli Bendersky added the comment:
Brett - you approach is certainly less magical. While you're at it, how about
PEP 399 recommending the import_fresh_modules calls not being in the global
context, but rather class/instance attributes of the test cases? This is what
both yours and E
Eli Bendersky added the comment:
On Sat, Jan 26, 2013 at 9:10 AM, Eric Snow wrote:
>
> Eric Snow added the comment:
>
> In my case I've been doing PEP 399 for collections.OrderedDict. It struck
> me that the boilerplate could be stowed away in a decorator. It's
Eli Bendersky added the comment:
Antoine - I think I can see the use case. ATM, to conform to PEP399, every test
_class_ has to be subclassed twice with appropriate assignment to the relevant
tested class. This leads to a lot of repetition. As an example, see
test_decimal.py, which does this
Eli Bendersky added the comment:
Nice work, although I worry this is starting to get into "too much magic"
territory. Do you have a real use case for the 'names' argument?
--
nosy: +eli.bendersky
___
Python tracker
<
Eli Bendersky added the comment:
Eric, yes the key code in test_xml_etree that handles this is:
def pickleRoundTrip(self, obj, name, dumper, loader):
save_m = sys.modules[name]
try:
sys.modules[name] = dumper
temp = pickle.dumps(obj
Eli Bendersky added the comment:
> I agree that [0] should be treated as a visible error as it's easy to get
> wrong. It's certainly too late to change this to 0-based indexing and I
> think it's ok to keep it 1-based for XPath compatibility (or at least
> similarity)
Eli Bendersky added the comment:
On Thu, Jan 24, 2013 at 10:02 AM, Ezio Melotti wrote:
>
> Ezio Melotti added the comment:
>
> I would suggest to adapt the comments to follow PEP 257, and in particular:
> """
> The docstring is a phrase ending in a period
Changes by Eli Bendersky :
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Eli Bendersky added the comment:
Fix to 3.2 committed in 5b02d622d625
--
___
Python tracker
<http://bugs.python.org/issue9708>
___
___
Python-bugs-list mailin
Eli Bendersky added the comment:
Support added in 3.3 and default
Documentation patches should be done for 2.7 and 3.2
--
___
Python tracker
<http://bugs.python.org/issue9
Eli Bendersky added the comment:
Agreed. I strengthened the error checking when parsing the path, so now
hopefully many non-sensical positions will be rejected.
Note that this is only for the default branch (the future Python 3.4), because
I don't think this is important enough to wa
Eli Bendersky added the comment:
Patches to documentation of 3.2 and 2.7 are welcome
--
___
Python tracker
<http://bugs.python.org/issue11367>
___
___
Python-bug
Eli Bendersky added the comment:
The official documentation of XML ET is at
http://docs.python.org/dev/library/xml.etree.elementtree.html
The arguments to XPath are clearly described, and the implementation behaves
correctly. We will continue supporting XPath syntax there, rather than Python
Eli Bendersky added the comment:
Could you point out specifically which methods in ET don't work with the
argument, and describe the problem in general?
--
___
Python tracker
<http://bugs.python.org/i
Changes by Eli Bendersky :
--
nosy: -eli.bendersky
___
Python tracker
<http://bugs.python.org/issue10590>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
I looked at the patch a bit more in depth and must admit that I'm reluctant to
apply it. It's a very large patch with very little documentation about what
steps are taken and why, and I just don't see the motivation.
The way I see it, PEP 3
Eli Bendersky added the comment:
OK, thanks.
--
___
Python tracker
<http://bugs.python.org/issue14377>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
Definitely. And this is one of those issues where I can wholeheartedly say that
patches are welcome :-)
Even incremental patching will be OK (i.e. patches documenting single methods
or groups of methods).
Incidentally, while replacing the comment by docstring
Eli Bendersky added the comment:
On Sun, Jan 13, 2013 at 6:09 AM, Éric Araujo wrote:
>
> Éric Araujo added the comment:
>
> I don’t think a space before the slash should be added. (It was common in
> the days of XHTML 1 because of an SGML parsing hack.)
Changes by Eli Bendersky :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eli Bendersky added the comment:
PyUnicode_New has been added in 3.3, so the 3.2 patch doesn't compile.
--
___
Python tracker
<http://bugs.python.org/is
Eli Bendersky added the comment:
What? Where did you see 3.3? It says 3.4 ;-)
Thanks, fixed in 72ddb250f058
--
___
Python tracker
<http://bugs.python.org/issue15
Eli Bendersky added the comment:
Tests ported in 3.3 and 3.4
--
___
Python tracker
<http://bugs.python.org/issue16922>
___
___
Python-bugs-list mailing list
Unsub
Eli Bendersky added the comment:
It should be noted that the doctests complicate things considerably, and should
be rewritten to be unittest, which are easier to manipulate in terms of modules
used.
--
___
Python tracker
<http://bugs.python.
Eli Bendersky added the comment:
Serhiy, indeed - that's issue #15083.
But since rewriting all tests is a large task no one is willing to take at this
point, my strategy has been incremental: rewrite a chunk at a time when tests
are being touched. Just adding new doctests goes agains
Changes by Eli Bendersky :
--
nosy: -eli.bendersky
___
Python tracker
<http://bugs.python.org/issue10541>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
The fix looks good, but please don't add tests to the doctests - they are
deprecated (from 3.3)
--
___
Python tracker
<http://bugs.python.org/is
Eli Bendersky added the comment:
Ariel, are you interested in pursuing this issue?
Serhiy, I see you assigned this to yourself - would you like to submit a patch?
--
___
Python tracker
<http://bugs.python.org/issue14
Eli Bendersky added the comment:
Attaching an alternative patch, that goes one (little) step further. Instead of
repeating the ignored list all over the place (code, docstrings, ReST docs),
the module exposes DEFAULT_IGNORES so everything can refer to it.
Also added some tests for this
Eli Bendersky added the comment:
Fixed. Thanks.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eli Bendersky added the comment:
Fixed in 3.3 and default. Thanks for the good work, Daniel. A separate issue
can be opened for TreeBuilder.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Pytho
Eli Bendersky added the comment:
On Tue, Jan 8, 2013 at 2:51 PM, Daniel Shahaf wrote:
>
> Daniel Shahaf added the comment:
>
> Eli Bendersky wrote on Tue, Jan 08, 2013 at 15:00:42 +0000:
> >
> > Eli Bendersky added the comment:
> >
> > P = import_fresh_modul
Eli Bendersky added the comment:
P = import_fresh_module('xml.etree.ElementTree', blocked=['_elementtree'])
tb = P.TreeBuilder(element_factory=lambda a, b: [a, b])
print(pickle.dumps(tb))
Gives: _pickle.PicklingError: Can't pickle : attribute lookup
Eli Bendersky added the comment:
Daniel, thanks for this patch, it looks very good. I had some comments in the
code review.
As for TreeBuilder, let's split it into a separate issue - I think it's much
less critical. We can discuss it later once we're done with Element. If
anyt
Eli Bendersky added the comment:
I think that changing the _elementtree's Element's name to match the Python
version, and then making sure the same serialized object is returned - is a
worthy option to try.
Then it will hopefully "just work". When pickle deserializes a
Eli Bendersky added the comment:
Issue #16817 discusses a similar problem arising with test___all__. The patches
have to be updated to provide a generic way to delegate certain tests to
separate subprocesses.
Arfrever, it's not necessary to update all the patches at once. Start with the
Changes by Eli Bendersky :
--
dependencies: +sys.path in tests contains system directories
___
Python tracker
<http://bugs.python.org/issue16817>
___
___
Pytho
Changes by Eli Bendersky :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eli Bendersky added the comment:
I investigated a bit, and type checks were added to protect from such mixing.
Please open a new patch with a speficic reproducer if you run into similar
problems (interepreter crash).
--
___
Python tracker
<h
Eli Bendersky added the comment:
The patch was committed with some minor modifications to 3.3 (c1fc6b6d1cfc) and
default branch (e1bee8b09828).
New tests were added to the test classes (please don't add new tests to the
doctests, they are depre
Eli Bendersky added the comment:
On Jan 4, 2013 2:09 AM, "Stefan Krah" wrote:
>
>
> Stefan Krah added the comment:
>
> Daniel Shahaf wrote:
> > Is there a requirement that it loads a particular module? Would etree
> > users notice the difference if pic
Eli Bendersky added the comment:
Thank you for the patch, Franck. I will review it when I have the time.
--
assignee: -> eli.bendersky
stage: -> patch review
versions: +Python 3.4
___
Python tracker
<http://bugs.python.org/i
Eli Bendersky added the comment:
On Tue, Jan 1, 2013 at 2:56 PM, Daniel Shahaf wrote:
>
> Daniel Shahaf added the comment:
>
> Eli Bendersky wrote on Tue, Jan 01, 2013 at 15:54:00 +:
> > Why did you change the class name, by the way, I don't think it's
> >
Eli Bendersky added the comment:
Thank you for the input Stefan. I was actually glancing at _decimal as an
example of implementing pickling and inter-compatibility between the C and Py
versions of pickles.
You've chosen compatibility by having the same class name and __reduce__
returnin
Eli Bendersky added the comment:
Other thoughts.
I'm not sure why you're surprised the C->Python pickle/unpickle works. You've
changed the type name from Element to _elementtree.Element, so I would guess
Python always uses the C version to unpickle as well. Can you deb
Eli Bendersky added the comment:
A couple of high-level questions about the C code (this isn't a detailed review
yet):
1. Why did you choose to implement __reduce__ and not __getstate__?
2. A lot of code appears to be shared between element_setstate_from_attributes
and the init m
Changes by Eli Bendersky :
--
nosy: +eli.bendersky
___
Python tracker
<http://bugs.python.org/issue1674555>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eli Bendersky :
--
title: test___all__ has to save and restore sys.modules while it does all the
importing -> test___all__ affects other tests by doing too much importing
___
Python tracker
<http://bugs.python.org/issu
Eli Bendersky added the comment:
I'm renaming the issue to just mention the problem, not the initially proposed
solution (following the python-dev discussion).
--
___
Python tracker
<http://bugs.python.org/is
Eli Bendersky added the comment:
I've added some (currently pyET specific) pickling tests. Daniel, could you
re-generate the patch? Note that for the C version of pickling you can now
enable the pickle test. Point to consider - can elements pickled in C be
unpickled in Python and vice
Eli Bendersky added the comment:
David, how would this help pickle not find _elementtree though? It's already in
sys.modules *before* fresh_import is used, because test___all__ put it there.
I'm experimenting with just deleting _elementtree from sys.modules before
running the tes
Changes by Eli Bendersky :
--
Removed message: http://bugs.python.org/msg178576
___
Python tracker
<http://bugs.python.org/issue16817>
___
___
Python-bugs-list m
Eli Bendersky added the comment:
David, how would this help pickle not find _elementtree though? It's already in
sys.modules *before* fresh_import is used, because test___all__ put it there.
I'm experimenting with just deleting _elementtree from sys.modules before
running the tes
Eli Bendersky added the comment:
Yes, but pickle doesn't use this helper function. And the problem is because
*pickle* tries to __import__ this module.
--
___
Python tracker
<http://bugs.python.org/is
New submission from Eli Bendersky:
http://mail.python.org/pipermail/python-dev/2012-December/123368.html
This came up while investigating some test-order-dependency failures in
issue 16076.
test___all__ goes over modules that have `__all__` in them and does 'from
import *' on
Eli Bendersky added the comment:
I think I understand what's going on there. Pickle, to make sure an object can
be picked, looks at the module it comes from and tries to import its class, to
make sure they're the same.
What happens since 3.3 is that for the Python Element class,
Eli Bendersky added the comment:
Thanks for the patch. I'll take a look.
--
assignee: -> eli.bendersky
___
Python tracker
<http://bugs.python.org
Eli Bendersky added the comment:
Also, could you explain what makes test___all__ start failing with this patch?
What are you adding that makes that happen?
P.S. I suspect the root reason is the bad way etree tests are structured in
general. See issue 15083
Eli Bendersky added the comment:
Daniel, is your patch made vs. the 3.3 branch? I'll need to apply there first,
and then merge up to default (3.4).
[Also, removing the 3.2 tag here. 3.2 won't be fixed to make _elementtree
pickleable - it never was].
--
versions: -
Changes by Eli Bendersky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue16219>
___
___
Python-bugs-list mailing list
Unsubscri
Eli Bendersky added the comment:
I have no plans adding this feature to etree.
--
___
Python tracker
<http://bugs.python.org/issue16798>
___
___
Python-bugs-list m
Eli Bendersky added the comment:
Thanks for working on it, Daniel. Unfortunately I won't have time to look at it
in the near future, but I will definitely look at the patch once I get some
free time to hack on Python again.
--
___
Python tr
Changes by Eli Bendersky :
--
nosy: +eli.bendersky
___
Python tracker
<http://bugs.python.org/issue15351>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
Chris Calloway, let's move this forward. I want to see more tests for filecmp
ASAP.
Please address Chris Jerdonek's points in a new patch made vs. fresh default
branch (3.4), at this point "cd"ing (before the test_cwd thing is done
Eli Bendersky added the comment:
Moving to 3.4
In 3.3 we won't add functionality to filecmp, but in 3.4 we will, so the new
tests should go there.
--
nosy: +eli.bendersky
versions: +Python 3.4 -Python 3.3
___
Python tracker
<http://bugs.py
Eli Bendersky added the comment:
Finally found time to look at this, sorry for the delay.
I agree with Amaury, and don't think any change is necessary in 2.7, the
behavior there is quite consistent with what was usually done in 2.x. For
porting or keeping the code 2/3 compatible, Ama
Changes by Eli Bendersky :
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eli Bendersky added the comment:
I tend to agree with Éric here.
moijes12, would you like to send an updated patch without the raw literals, and
with added tests for the new/changed functionality?
--
___
Python tracker
<http://bugs.python.
Eli Bendersky added the comment:
moijes12, why are the added names "raw" ?
--
___
Python tracker
<http://bugs.python.org/issue15442>
___
___
Python-b
Eli Bendersky added the comment:
I think this may be intentional. Absolute searches on a ElementTree are
discouraged with a warning:
def find(self, path, namespaces=None):
# assert self._root is not None
if path[:1] == "/":
path =
Changes by Eli Bendersky :
--
versions: +Python 3.4
___
Python tracker
<http://bugs.python.org/issue12321>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eli Bendersky :
Removed file: http://bugs.python.org/file22406/unnamed
___
Python tracker
<http://bugs.python.org/issue12321>
___
___
Python-bugs-list mailin
Changes by Eli Bendersky :
--
title: Optimize BytesIO to so less reallocations when written, similarly to
StringIO -> Optimize BytesIO to do less reallocations when written, similarly
to StringIO
___
Python tracker
<http://bugs.pyth
Eli Bendersky added the comment:
Closing, since this isn't a bug and append's behavior is properly documented.
Regarding the error message, yes it could probably be better but you would need
to enable input validation for that. Since Python is duck typed, often when
argumen
Eli Bendersky added the comment:
Einar, TypeError is raised because tostring/tostringlist return bytes with the
default encoding, and you can't join bytes on "" (which is unicode).
--
___
Python tracker
<http://bugs.pyt
Eli Bendersky added the comment:
Changes pushed. Thanks for the report and patches.
Mike - a note for the future: when you create an updated patch, create it anew
vs. a clean repo. Don't "compound" patches.
--
resolution: -> fixed
stage: needs patch -> committed/
Eli Bendersky added the comment:
Pushed to 3.3 and 3.4
Thanks for the report and patch
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eli Bendersky added the comment:
Thanks, Chris. I'll take a look
--
___
Python tracker
<http://bugs.python.org/issue15888>
___
___
Python-bugs-list m
Eli Bendersky added the comment:
Thanks for the report. I'll take a look.
Patches always welcome :)
--
stage: -> patch review
title: xml.etree.ElementTree.tostringlist does conform to it's documentation ->
xml.etree.ElementTree.tostringlist does not conform to i
Eli Bendersky added the comment:
Thanks for the report, Patrick. Yes, documenting this limitation would make
sense. Have you tested to see how it behaves?
Anyhow, a patch would be welcome ;-)
--
stage: -> needs patch
___
Python tracker
&l
Eli Bendersky added the comment:
Will look into it, thanks for the report.
--
___
Python tracker
<http://bugs.python.org/issue16076>
___
___
Python-bugs-list m
Eli Bendersky added the comment:
Ah, OK. I was actually putting off refactorings in that code to after
refactoring the test suite. The latter is in progress, it was paused by my
vacation but I do plan to resume it eventually. Once the test suite is
sufficiently humane (esp. moves off doctest
Eli Bendersky added the comment:
Antoine, Thanks!
You said :
> the coding style there is quite old
It would be great if you could elaborate, however briefly, if there's anything
else besides your fixes that is old and should be modernized. I will admit to
writing some of that c
Eli Bendersky added the comment:
Thank you, Antoine, for looking into this. I wish I could participate in a
meaningful way, but alas it will be days or weeks before I can recreate a
suitable setup to get back hacking on Python.
--
___
Python
Eli Bendersky added the comment:
I'm currently somewhat "offline" for a while (cross-continental move), but I'll
do my best to try to recreate my setup to test this problem and the proposed
solution.
--
___
Python tracker
<
Eli Bendersky added the comment:
Thanks for the patch, David.
Alas, due to personal reasons I will not be able to work on core Python in the
next 2-3 months. I may throw in a review here and there, but that's not a
promise ;-)
--
___
P
Eli Bendersky added the comment:
I'm just waiting for a review. If Nick has no time for that, perhaps I can
commit anyway since this is just adding documentation.
--
___
Python tracker
<http://bugs.python.org/is
Eli Bendersky added the comment:
I think implementing this is very important, and +1 to Georg's suggestion,
because no one is suddenly going to convert KLOCs of code samples to be
testable (many code samples are partial, and will need to be completed in one
way or another to be act
Eli Bendersky added the comment:
Fixed, thanks for the report.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Changes by Eli Bendersky :
--
nosy: +eli.bendersky
___
Python tracker
<http://bugs.python.org/issue15656>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
Daniel, this looks good except that the section numbering is different from 3.3
where the object/function reference sections were nested under "Reference".
Could you fix your patch to align the 2.7 doc to this structure?
P.S. Éric's comment
Eli Bendersky added the comment:
I committed your patch to default (3.3) with some minor fixes. Please go over
them as you will need to apply them to the 2.7 patch. I've reviewed the 2.7
patch as well - it's an initial review. Did you execute all the code sampl
Eli Bendersky added the comment:
I agree with Georg. As far as I understand the word "arbitrary" - it describes
the situation exactly.
--
nosy: +eli.bendersky
___
Python tracker
<http://bugs.python.o
Eli Bendersky added the comment:
Attaching a new patch that fixes the with_* methods to be more consistent, and
the relevant tests too. The doc is now consistent as well.
For some reason IPv6Interface.with_netmask also returned the prefixlen
representation. The test justified it by quoting
Eli Bendersky added the comment:
pmoody - you mean IPv?Interface, right? The network classes consistently return
strings in with_* methods
--
___
Python tracker
<http://bugs.python.org/issue14
Changes by Eli Bendersky :
Added file: http://bugs.python.org/file26736/ipaddr_refdoc_interface.1.patch
___
Python tracker
<http://bugs.python.org/issue14814>
___
___
401 - 500 of 1229 matches
Mail list logo