[issue16731] xxlimited/xxmodule docstrings ambiguous

2015-12-30 Thread Daniel Shahaf
Daniel Shahaf added the comment: I don't mind at all. Go ahead :) -- ___ Python tracker <http://bugs.python.org/issue16731> ___ ___ Python-bugs-list m

[issue17050] argparse.REMAINDER doesn't work as first argument

2015-09-29 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- nosy: +danielsh ___ Python tracker <http://bugs.python.org/issue17050> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16379] SQLite error code not exposed to python

2015-08-24 Thread Daniel Shahaf
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 pro

[issue23802] patch: __deepcopy__ memo dict argument usage

2015-03-28 Thread Daniel Shahaf
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

[issue14208] No way to recover original argv with python -m

2013-01-13 Thread Daniel Shahaf
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 ex

[issue2209] mailbox module doesn't support compressed mbox

2013-01-12 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- nosy: +danielsh ___ Python tracker <http://bugs.python.org/issue2209> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14208] No way to recover original argv with python -m

2013-01-12 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- nosy: +danielsh ___ Python tracker <http://bugs.python.org/issue14208> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10544] yield expression inside generator expression does nothing

2013-01-12 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- nosy: +danielsh ___ Python tracker <http://bugs.python.org/issue10544> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2013-01-11 Thread Daniel Shahaf
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._

[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2013-01-08 Thread Daniel Shahaf
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

[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2013-01-08 Thread Daniel Shahaf
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 picklea

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-08 Thread Daniel Shahaf
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,

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-07 Thread Daniel Shahaf
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 at

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-07 Thread Daniel Shahaf
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&

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-06 Thread Daniel Shahaf
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 t

[issue16808] inspect.stack() should return list of named tuples

2013-01-04 Thread Daniel Shahaf
Changes by Daniel Shahaf : Added file: http://bugs.python.org/file28572/inspect-v5.diff ___ Python tracker <http://bugs.python.org/issue16808> ___ ___ Python-bugs-list m

[issue16808] inspect.stack() should return list of named tuples

2013-01-04 Thread Daniel Shahaf
Changes by Daniel Shahaf : Removed file: http://bugs.python.org/file28571/inspect-v4.diff ___ Python tracker <http://bugs.python.org/issue16808> ___ ___ Python-bugs-list m

[issue16808] inspect.stack() should return list of named tuples

2013-01-04 Thread Daniel Shahaf
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 p

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-03 Thread Daniel Shahaf
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 wrote: > > I added the "_elementtree" to the tp_name in order to bypass the above > > error. Module-qualified names were in us

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-01 Thread Daniel Shahaf
Daniel Shahaf added the comment: Also, the class inheritance in the tests should be amended to follow #16835. -- ___ Python tracker <http://bugs.python.org/issue16

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-01 Thread Daniel Shahaf
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 va

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-01 Thread Daniel Shahaf
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:

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2012-12-31 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- nosy: +danielsh ___ Python tracker <http://bugs.python.org/issue9334> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16808] inspect.stack() should return list of named tuples

2012-12-31 Thread Daniel Shahaf
Daniel Shahaf added the comment: Fixed that in v3. -- Added file: http://bugs.python.org/file28515/inspect-v3.diff ___ Python tracker <http://bugs.python.org/issue16

[issue7735] socket.create_connection() creates IPv6 DNS requests even when built with --disable-ipv6

2012-12-30 Thread Daniel Shahaf
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 of

[issue7735] socket.create_connection() creates IPv6 DNS requests even when built with --disable-ipv6

2012-12-30 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- 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 <http://bugs.pyth

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-30 Thread Daniel Shahaf
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'

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-30 Thread Daniel Shahaf
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

[issue16379] SQLite error code not exposed to python

2012-12-30 Thread Daniel Shahaf
Daniel Shahaf added the comment: New patch fixing indentation of versionadded markup. -- Added file: http://bugs.python.org/file28497/i16379-v3.diff ___ Python tracker <http://bugs.python.org/issue16

[issue16379] SQLite error code not exposed to python

2012-12-30 Thread Daniel Shahaf
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 t

[issue16379] SQLite error code not exposed to python

2012-12-30 Thread Daniel Shahaf
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 <http://bugs.python.org/is

[issue16808] inspect.stack() should return list of named tuples

2012-12-29 Thread Daniel Shahaf
Daniel Shahaf added the comment: Add versionchanged per review. -- keywords: +patch Added file: http://bugs.python.org/file28488/inspect-v2.diff ___ Python tracker <http://bugs.python.org/issue16

[issue16817] test___all__ has to save and restore sys.modules while it does all the importing

2012-12-29 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- nosy: +danielsh ___ Python tracker <http://bugs.python.org/issue16817> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2012-12-29 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- nosy: +danielsh ___ Python tracker <http://bugs.python.org/issue15083> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-29 Thread Daniel Shahaf
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 wha

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-29 Thread Daniel Shahaf
Daniel Shahaf added the comment: I wrote the patch against default (3.4), but it applies cleanly to 3.3. -- ___ Python tracker <http://bugs.python.org/issue16

[issue16808] inspect.stack() should return list of named tuples

2012-12-29 Thread Daniel Shahaf
Daniel Shahaf added the comment: Why did you set stage to 'needs patch'? One is already attached. -- ___ Python tracker <http://bugs.python.o

[issue16808] inspect.stack() should return list of named tuples

2012-12-28 Thread Daniel Shahaf
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])'

[issue16379] SQLite error code not exposed to python

2012-12-28 Thread Daniel Shahaf
Daniel Shahaf added the comment: I didn't compile-test the Doc/ part of the patch. -- ___ Python tracker <http://bugs.python.org/issue16379> ___ ___ Pytho

[issue16379] SQLite error code not exposed to python

2012-12-28 Thread Daniel Shahaf
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_rol

[issue16379] SQLite error code not exposed to python

2012-12-28 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- nosy: +danielsh ___ Python tracker <http://bugs.python.org/issue16379> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16731] xxlimited/xxmodule docstrings ambiguous

2012-12-21 Thread Daniel Shahaf
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 <

[issue16732] setup.py support for xxmodule without tkinker

2012-12-19 Thread Daniel Shahaf
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 attache

[issue16731] xxlimited/xxmodule docstrings ambiguous

2012-12-19 Thread Daniel Shahaf
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

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-19 Thread Daniel Shahaf
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 black

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-16 Thread Daniel Shahaf
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 <http://bugs.python.org/is

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-08 Thread Daniel Shahaf
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

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-07 Thread Daniel Shahaf
Changes by Daniel Shahaf : Removed file: http://bugs.python.org/file28251/i16076-v2-combined.diff ___ Python tracker <http://bugs.python.org/issue16076> ___ ___ Python-bug

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-07 Thread Daniel Shahaf
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 <http://bugs.python.org/issue16

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-07 Thread Daniel Shahaf
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

[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2012-12-03 Thread Daniel Shahaf
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.

[issue16593] Have BSD 'make -s' DTRT

2012-12-01 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- keywords: +patch Added file: http://bugs.python.org/file28182/makedashs.diff ___ Python tracker <http://bugs.python.org/issue16

[issue16593] Have BSD 'make -s' DTRT

2012-12-01 Thread Daniel Shahaf
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