Daniel Shahaf added the comment:
I don't mind at all. Go ahead :)
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16731>
___
___
Changes by Daniel Shahaf <pyt...@danielsh.fastmail.net>:
--
nosy: +danielsh
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17050>
___
Daniel Shahaf added the comment:
What's the reasoning behind offering a error code to name mapping?
Allowing code that runs into an error to print the error name rather than its
numeric value. This saves whoever reads the error message having to look it up
himself.
his seem problematic
New submission from Daniel Shahaf:
In the 'copy' module documentation, it wasn't fully clear to me how
__deepcopy__ implementations should treat the memo dict argument. The attached
patch clarifies that __deepcopy__ implementations should treat the memo dict
argument as an opaque type
Daniel Shahaf added the comment:
Antoine Pitrou wrote on Sun, Jan 13, 2013 at 10:19:20 +:
Antoine Pitrou added the comment:
I'm not seeing a good justification for doing anything more, though:
- needing to access this information is an exceedingly niche use case
- I don't see
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
--
nosy: +danielsh
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10544
___
___
Python-bugs
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
--
nosy: +danielsh
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14208
___
___
Python-bugs
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
--
nosy: +danielsh
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2209
___
___
Python-bugs
Daniel Shahaf added the comment:
Ezio Melotti wrote on Fri, Jan 11, 2013 at 08:44:43 +:
### one ref leaked for every child in __setstate__:
e2.__setstate__(p2)
[76810 refs]
e2.__setstate__(p2)
[76813 refs]
e2.__setstate__(p2)
[76816 refs]
I'm not working on this anymore now, so
Daniel Shahaf added the comment:
Eli Bendersky wrote on Tue, Jan 08, 2013 at 15:00:42 +:
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
Daniel Shahaf added the comment:
Dissociating TreeBuilder from this issue per recent comments.
--
title: xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are
no longer pickleable - xml.etree.ElementTree.Element is no longer pickleable
Daniel Shahaf added the comment:
v8 removes TreeBuilder handling (code + tests) and removes memcpy per review.
(Outstanding issues in the review can be fixed post-v8, if needed.)
--
Added file: http://bugs.python.org/file28639/i16076-v8.diff
Daniel Shahaf added the comment:
In the meantime, unrelated question: should TreeBuilder be pickleable too, and
interchangeably (pickle|unpickle)able between the Python and C implementations?
Asking because the Python TreeBuilder has a _factory member which it
initializes to 'Element
Daniel Shahaf added the comment:
New iteration.
Open issues:
- Share code with the init method. The issue with sharing code with either
element_init() or create_new_element() would be malloc+realloc: unlike either
of these methods, we know both the attributes and the number of children
Daniel Shahaf added the comment:
Eli Bendersky wrote on Thu, Jan 03, 2013 at 14:44:02 +:
If this change is required (even if we choose to name it
xml.etree.ElementTree.Element for Py compatibility to fix the pickling
regression, we may find ourselves in a need to change it between 3.3
Daniel Shahaf added the comment:
Terry J. Reedy wrote on Sat, Jan 05, 2013 at 01:33:50 +:
Should a test be added to or changed in test_inspect? Line 163 has
a test_stack method that calls inspect.stack.
Makes sense; added a test that tests named attribute access. Thanks for
the pointer
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
Removed file: http://bugs.python.org/file28571/inspect-v4.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16808
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
Added file: http://bugs.python.org/file28572/inspect-v5.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16808
Daniel Shahaf added the comment:
Eli Bendersky wrote on Thu, Jan 03, 2013 at 14:44:02 +:
On Tue, Jan 1, 2013 at 2:56 PM, Daniel Shahaf rep...@bugs.python.orgwrote:
I added the _elementtree to the tp_name in order to bypass the above
error. Module-qualified names were in use elsewhere
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
a valid change at least for 3.3 in terms of backwards compatibility.
With unmodified tip of 3.4:
import pickle
Daniel Shahaf added the comment:
Eli Bendersky wrote on Tue, Jan 01, 2013 at 00:32:51 +:
1. Why did you choose to implement __reduce__ and not __getstate__?
Maybe I was simply imitating what some other extension module was doing ;)
By using __reduce__ with the type as first return value
Daniel Shahaf added the comment:
Also, the class inheritance in the tests should be amended to follow #16835.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16076
Daniel Shahaf added the comment:
Fixed that in v3.
--
Added file: http://bugs.python.org/file28515/inspect-v3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16808
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
--
nosy: +danielsh
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9334
___
___
Python-bugs
Daniel Shahaf added the comment:
New patch, with better docs and less error leaks, per Ezio's review.
--
Added file: http://bugs.python.org/file28496/i16379-v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16379
Daniel Shahaf added the comment:
A couple of random eyebrow-raisers I noticed while working on v2:
- sqlite3.Warning is a subclass of Exception, rather than sqlite3.Error
or builtins.Warning. (Also, the docs say will raise a Warning,
intending to refer to sqlite3.Warning, but the lack
Daniel Shahaf added the comment:
New patch fixing indentation of versionadded markup.
--
Added file: http://bugs.python.org/file28497/i16379-v3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16379
Daniel Shahaf added the comment:
Attached. Differences to previous version:
- Avoid the test___all__ issue (#16817) by manipulating sys.modules
directly
- Support pickling interoperability between the C and Python
implementations
--
Added file: http://bugs.python.org/file28502
Daniel Shahaf added the comment:
BTW, maybe I'm just confused, but I'm a little surprised that C pickling -
Python unpickling works: the C __reduce__ returns a 3-element tuple, which
according to pickle docs[1] must either be a dictionary or be passed to
__setstate__; it's not a dictionary
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
--
title: python creates IPv6 DNS requests even when built with --disable-ipv6 -
socket.create_connection() creates IPv6 DNS requests even when built with
--disable-ipv6
___
Python tracker rep
Daniel Shahaf added the comment:
Victor, thanks for the summary. I view things a little differently, so I'll
offer my POV:
1. The OPs (Evan and Ralf) build with --disable-ipv6.
2. --disable-ipv6 disables support for IPv6 sockets. (as per Martin, and AFAIK
as per the common meaning
Daniel Shahaf added the comment:
Why did you set stage to 'needs patch'? One is already attached.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16808
Daniel Shahaf added the comment:
I wrote the patch against default (3.4), but it applies cleanly to 3.3.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16076
Daniel Shahaf added the comment:
Any attempt to pickle an Element object in test_xml_etree.py causes that test
to fail if test___all__ had been run before it; see attached transcript. It's
against 3.4, with no changes other than the testsuite changes shown within.
I don't know what the root
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
--
nosy: +danielsh
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15083
___
___
Python-bugs
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
--
nosy: +danielsh
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16817
___
___
Python-bugs
Daniel Shahaf added the comment:
Add versionchanged per review.
--
keywords: +patch
Added file: http://bugs.python.org/file28488/inspect-v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16808
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
--
nosy: +danielsh
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16379
___
___
Python-bugs
Daniel Shahaf added the comment:
Attached patch that:
- Adds sqlite3.SQLITE_OK constants
- Adds sqlite3.errorcode dictionary
- Adds sqlite_errcode attribute to sqlite.Error instances
The patch does not add support for extended result codes
(http://www.sqlite.org/c3ref/c_abort_rollback.html
Daniel Shahaf added the comment:
I didn't compile-test the Doc/ part of the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16379
New submission from Daniel Shahaf:
Currently inspect.stack() returns a list of 6-tuples. I suggest to make it
return a list of named tuples, so code that only needs one tuple element can
get it by name.
Current behaviour:
% ./python -c 'import inspect; print(inspect.stack()[0])'
(frame
Daniel Shahaf added the comment:
Re the review, yes there is a typo in the comment: the comment in xxlimited.c
should say xxmodule.c rather than xxlimited.c. (Got a traceback from the
review app)
--
___
Python tracker rep...@bugs.python.org
http
Daniel Shahaf added the comment:
Re the problem from msg 177134 ('./python -mtest test___all__ test_xml_etree'
failing), it is a a preexisting problem, in the sense that applying just the
Lib/test/ part of this patch suffices to trigger it. Adding 'xml.etree' to the
blacklist in test___all__
New submission from Daniel Shahaf:
Tweak the docstrings of xxmodule and xxlimited to clarify the difference
between them (as derived from setup.py). While at it also add a defensive
coding guard to xxlimited to ensure it remains Py_LIMITED_API-safe.
--
assignee: docs@python
New submission from Daniel Shahaf:
In setup.py, the logic or enabling xxmodule/xxlimited is currently in
detect_tkinker(), so it's not run when one of the 'return' statements in the
latter is executed. On a box without tk installed, xxmodule.o gets built with
the attached patch
Daniel Shahaf added the comment:
Haven't had a chance to look at the test___all__ -related failures yet. Still
planning to do so once I have some time.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16076
Daniel Shahaf added the comment:
@Eli, thanks. In the meantime, attaching a patch addressing Ezio's review; the
caveats from msg 177134 still apply.
--
Added file: http://bugs.python.org/file28261/i16076-v4-combined.diff
___
Python tracker rep
Daniel Shahaf added the comment:
TreeBuilder was also pickleable in 3.2 but now isn't so; updating summary
accordingly.
Attaching a checkpoint patch. It addresses both Element and TreeBuilder, and
adds tests. The added tests fail if test___all__ is included in the test run,
so the patch
Daniel Shahaf added the comment:
Reattaching without the unrelated Python-ast.c change.
--
Added file: http://bugs.python.org/file28252/i16076-v3-combined.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16076
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
Removed file: http://bugs.python.org/file28251/i16076-v2-combined.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16076
Daniel Shahaf added the comment:
Attached patch for your consideration.
I've tested pickling/unpickling and comparing the resulting object attribute by
attribute (.tag, .attrib, .text, .tail for equality; and recursively
.getchildren()), and 'make test' --- all seems to work.
If the approach
New submission from Daniel Shahaf:
FreeBSD make sets $$MAKEFLAGS differently than GNU make does. Attached patch
updates Makefile.pre.in to recognise that syntax too.
Preliminary versions discussed with Crys on #python-dev.
--
components: Build
messages: 176768
nosy: danielsh
priority
Changes by Daniel Shahaf pyt...@danielsh.fastmail.net:
--
keywords: +patch
Added file: http://bugs.python.org/file28182/makedashs.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16593
53 matches
Mail list logo