Re: JSON-encoding very long iterators

2014-10-01 Thread Alfred Morgan
Excellent, thank you. http://bugs.python.org/issue14573 -alfred -- https://mail.python.org/mailman/listinfo/python-list

Re: JSON-encoding very long iterators

2014-10-01 Thread Chris Angelico
On Thu, Oct 2, 2014 at 4:05 PM, Alfred Morgan wrote: > On Wednesday, October 1, 2014 3:55:19 PM UTC-7, Chris Angelico wrote: >> At some point, you'll have to port your patch to the latest codebase > > Okay, done. > > https://github.com/Zectbumo/cpython/compare/master > > Iterators for JSON is now

Re: JSON-encoding very long iterators

2014-10-01 Thread Alfred Morgan
On Wednesday, October 1, 2014 3:55:19 PM UTC-7, Chris Angelico wrote: > At some point, you'll have to port your patch to the latest codebase Okay, done. https://github.com/Zectbumo/cpython/compare/master Iterators for JSON is now Python 3 ready. -- https://mail.python.org/mailman/listinfo/pytho

Re: JSON-encoding very long iterators

2014-10-01 Thread Chris Angelico
On Thu, Oct 2, 2014 at 8:01 AM, Alfred Morgan wrote: > On Wednesday, October 1, 2014 6:07:23 AM UTC-7, Chris Angelico wrote: >> On Wed, Oct 1, 2014 at 8:13 PM, Alfred Morgan wrote: >> > What do you think now? >> >> I think that you're adding features to Python 2.7, which isn't getting >> new featu

Re: JSON-encoding very long iterators

2014-10-01 Thread Alfred Morgan
On Wednesday, October 1, 2014 6:07:23 AM UTC-7, Chris Angelico wrote: > On Wed, Oct 1, 2014 at 8:13 PM, Alfred Morgan wrote: > > What do you think now? > > I think that you're adding features to Python 2.7, which isn't getting > new features. That won't be merged into trunk. Does your patch apply

Re: JSON-encoding very long iterators

2014-10-01 Thread Chris Angelico
On Wed, Oct 1, 2014 at 8:13 PM, Alfred Morgan wrote: > I added a stream flag (off by default) and also added file streaming (thanks > for the idea). > > https://github.com/Zectbumo/cpython/compare/2.7 > > What do you think now? I think that you're adding features to Python 2.7, which isn't getti

Re: JSON-encoding very long iterators

2014-10-01 Thread Alfred Morgan
On Monday, September 29, 2014 7:10:18 PM UTC-7, Ian wrote: > This would cause things that aren't lists to be encoded as lists. > Sometimes that may be desirable, but in general if e.g. a file object > sneaks its way into your JSON encode call, it is more likely correct > to raise an error than to s

Re: JSON-encoding very long iterators

2014-09-29 Thread Ian Kelly
On Mon, Sep 29, 2014 at 7:19 PM, wrote: > I would like to add the ability to JSONEncode large iterators. Right now > there is no way to do this without modifying the code. > > The JSONEncoder.default() doc string suggests to do this: > For example, to support arbitrary iterators, you cou