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:
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
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:
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:
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
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
Changes by Eli Bendersky :
--
nosy: +eli.bendersky
___
Python tracker
<http://bugs.python.org/issue1674555>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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:
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:
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 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 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:
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:
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
Changes by Eli Bendersky :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Eli Bendersky :
--
dependencies: +sys.path in tests contains system directories
___
Python tracker
<http://bugs.python.org/issue16817>
___
___
Pytho
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
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:
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:
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:
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:
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:
Fixed. Thanks.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
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:
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:
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
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:
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
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:
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:
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:
PyUnicode_New has been added in 3.3, so the 3.2 patch doesn't compile.
--
___
Python tracker
<http://bugs.python.org/is
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:
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.)
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:
OK, thanks.
--
___
Python tracker
<http://bugs.python.org/issue14377>
___
___
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
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:
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
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:
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:
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:
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:
Fix to 3.2 committed in 5b02d622d625
--
___
Python tracker
<http://bugs.python.org/issue9708>
___
___
Python-bugs-list mailin
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:
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
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:
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:
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:
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:
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:
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:
> 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:
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:
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:
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:
Thanks Vlad, committed to 3.3/3.4; would you like to provide the 2.7 patch?
--
___
Python tracker
<http://bugs.python.org/issue18
Changes by Eli Bendersky :
--
nosy: -eli.bendersky
___
Python tracker
<http://bugs.python.org/issue18911>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
I can't reproduce it with the most recent default branch (Python 3.4.0a2+
(default:c7fdb0637d0b, Sep 13 2013, 05:29:00)) either.
Unless I'm missing something, there's no issue here. Let me know if something
else can be done. Otherwise I'll
Eli Bendersky added the comment:
Fixed the patch and committed. Thanks.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eli Bendersky added the comment:
On Fri, Sep 13, 2013 at 6:28 AM, R. David Murray wrote:
>
> R. David Murray added the comment:
>
> We don't generally backport tests unless they are part of a bug fix. It's
> not a blanket prohibition, but normally the risk of false pos
Changes by Eli Bendersky :
--
nosy: -eli.bendersky
___
Python tracker
<http://bugs.python.org/issue18844>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
I agree with David. This is yet another case where we try to go against Python
and make enum special, and I'm against this. Nothing prevents users from
accidentally overriding their own members and methods in normal classes as
well. This is triv
Eli Bendersky added the comment:
Benjamin, what do you think?
--
nosy: +benjamin.peterson
___
Python tracker
<http://bugs.python.org/issue18945>
___
___
Python-bug
Changes by Eli Bendersky :
--
nosy: -eli.bendersky
___
Python tracker
<http://bugs.python.org/issue18059>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
On Fri, Sep 13, 2013 at 7:11 PM, Nick Coghlan wrote:
>
> Nick Coghlan added the comment:
>
> +1 from me to just allow the names to be overwritten, even by another enum
> member.
>
Even though I was in favor of this in the initial discussions
Changes by Eli Bendersky :
--
resolution: -> works for me
stage: test needed -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eli Bendersky added the comment:
Hi Nick,
I disagree with this change. The way the APIs are currently defined, XMLParser
and XMLPullParser are different animals. XMLParser can be considered to only
have one "front" in the API - feed() and close(). You feed() until the document
i
Eli Bendersky added the comment:
On Sat, Sep 21, 2013 at 5:52 AM, Nick Coghlan wrote:
>
> Nick Coghlan added the comment:
>
> Actually, I think it's reasonable to define the custom target nominally
> abstracted by PullParser as always returning None from close(). As Eli
&g
Eli Bendersky added the comment:
On Sat, Sep 21, 2013 at 7:26 AM, Nick Coghlan wrote:
>
> Nick Coghlan added the comment:
>
> Right, the minimum change needed is to prefix it with an underscore, but if
> it isn't actually needed for anything, we may as well remove it ent
Eli Bendersky added the comment:
+1 to delete
--
nosy: +eli.bendersky
___
Python tracker
<http://bugs.python.org/issue19074>
___
___
Python-bugs-list mailin
Eli Bendersky added the comment:
LGTM, Ethan. You know how I feel about customization in general ;-) We should
give Enum a term or two in the stdlib to learn how it's being used and abused -
we can always *add* customization in the f
Eli Bendersky added the comment:
On Sun, Sep 22, 2013 at 9:04 PM, Ethan Furman wrote:
>
> Ethan Furman added the comment:
>
> Yup, just trying to add some explanation on how it currently works.
>
> Drekin, I'm sure you've already figured this out, but for those who m
Eli Bendersky added the comment:
Did anyone ended up updating the devguide about this? I can't find anything
related in there.
--
nosy: +eli.bendersky
___
Python tracker
<http://bugs.python.org/is
New submission from Eli Bendersky:
Background: we'd like to enable running 'make touch' on the bots before 'make
-jN', to avoid problems with scripts that auto-generate code for the Python
build (bootstrapping). pydev thread:
https://mail.python.org/pipermail/python-
Changes by Eli Bendersky :
--
Removed message: http://bugs.python.org/msg198484
___
Python tracker
<http://bugs.python.org/issue19016>
___
___
Python-bugs-list m
Eli Bendersky added the comment:
.hgtouch fixed in ac19ff225280 (I specified the issue number incorrectly so
this one wasn't notified).
Curiously, `make touch` seems to think there's still things to do even after
the first round of "touching":
$ touch Parser/asdl_c
Eli Bendersky added the comment:
Ooh, I think that's because the "# try processing all rules in topological
order" in do_touch doesn't actually topo-sort.
--
___
Python tracker
<http://bug
Eli Bendersky added the comment:
The problem in this case is different, actually. It's the comparison:
if o_time <= i_time:
# generated file is older, touch
need_touch = True
In check_rule. The script is pretty quick so when it touches both Python-ast.h
Changes by Eli Bendersky :
--
nosy: -eli.bendersky
___
Python tracker
<http://bugs.python.org/issue18594>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eli Bendersky :
--
resolution: -> wont fix
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eli Bendersky added the comment:
Discussed in #18990
Future discussions of this class belong in #18902
--
___
Python tracker
<http://bugs.python.org/issue19
Eli Bendersky added the comment:
LGTM
--
___
Python tracker
<http://bugs.python.org/issue19106>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
With your fix, `make touch` now behaves as expected. Also, I can see the step
added to the bots (e.g.
http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/2597/steps/shell/logs/stdio)
Thanks, I think the issue is resolved then. We should
Eli Bendersky added the comment:
`make touch` was added to the bots in #19106 and is now also recommended in the
devguide for folks running into this problem. IMHO this is all we need here,
because there's no point toiling to make the auto-generation scripts in every
version to work wit
Eli Bendersky added the comment:
I've updated the devguide about `make touch`.
As for the buildbot configuration, I agree we shouldn't document a static
snapshot and also there's the passwords problem.
I was talking to Antoine about this the other day, and maybe there's
Eli Bendersky added the comment:
I'm not sure a separate document is right here because that's one more
repository to have. The devguide already contains sections for somewhat more
esoteric things like compiler internals guide, coverity scans. Besides, section
18 already has som
Eli Bendersky added the comment:
On Tue, Oct 1, 2013 at 7:00 AM, Antoine Pitrou wrote:
>
> Antoine Pitrou added the comment:
>
> > I'm not sure a separate document is right here because that's one
> > more repository to have. The devguide already contains sections
Eli Bendersky added the comment:
+nick,guido,benjamin: in case you're interested in the discussion that takes
place in the most recent messages of this issue
--
nosy: +benjamin.peterson, gvanrossum, ncoghlan
___
Python tracker
Eli Bendersky added the comment:
I think this issue can be closed, since Martin's touch step runs on the bots
successfully, and the ASDL dependencies in .hgtouch were fixed.
--
resolution: -> fixed
stage: -> committed/rejected
status: ope
Changes by Eli Bendersky :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Eli Bendersky :
--
nosy: -eli.bendersky
___
Python tracker
<http://bugs.python.org/issue9317>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eli Bendersky :
--
nosy: -eli.bendersky
___
Python tracker
<http://bugs.python.org/issue8957>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eli Bendersky :
--
nosy: -eli.bendersky
___
Python tracker
<http://bugs.python.org/issue9398>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eli Bendersky added the comment:
Tim, any suggestions?
--
___
Python tracker
<http://bugs.python.org/issue14332>
___
___
Python-bugs-list mailing list
Unsub
Eli Bendersky added the comment:
This is superceded by:
http://bugs.python.org/issue18906
--
superseder: -> Create a way to always run tests in subprocesses within regrtest
___
Python tracker
<http://bugs.python.org/issu
Eli Bendersky added the comment:
Martin, do you see a way to work around the problem?
I'm not sure it's serious enough to warrant committing to the 2.7.x branch at
this point.
--
___
Python tracker
<http://bugs.python.o
901 - 1000 of 1229 matches
Mail list logo