[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-21 Thread Jim Jewett
Jim Jewett jimjjew...@gmail.com added the comment: Just saw this on the checkins list; where are the other options documented? PyDoc_STRVAR(compressobj__doc__, -compressobj([level]) -- Return a compressor object.\n +compressobj([level[, method[, wbits[, memlevel[, strategy[, zdict]])\n

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-21 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Just saw this on the checkins list; where are the other options documented? They aren't, AFAIK. I've been planning on adding them when I've got time (based on the zlib manual at http://zlib.net/manual.html), but with the upcoming feature

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1cfa44cb5af0 by Nadeem Vawda in branch 'default': Document the rest of zlib.compressobj()'s arguments. http://hg.python.org/cpython/rev/1cfa44cb5af0 -- ___ Python tracker

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset dd4f7d5c51c7 by Nadeem Vawda in branch 'default': Issue #14684: Add support for predefined compression dictionaries to the zlib module. http://hg.python.org/cpython/rev/dd4f7d5c51c7 -- nosy: +python-dev

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-20 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Committed. Once again, thanks for the patch! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-19 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: To restate my position: the need is for an immutable string of bytes, [...] I disagree that we should require the dictionary to be immutable - if the caller wishes to use a mutable buffer here, it is their responsibility to ensure that it

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-19 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: So my question is easy: could we apply this patch as is and defer any improvement to 3.4?. The risk of not doing so would be to miss 3.3 completely. -- ___ Python tracker rep...@bugs.python.org

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-19 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: I plan to commit it (along with the buffer API changes) tomorrow. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-18 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Sam, the window for Python 3.3 integration is almost close. Could you possibly update your patch with Nadeem's feedback?. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-18 Thread Sam Rushing
Sam Rushing rushing@gmail.com added the comment: I think other than the disagreement about whether the dictionary constructor arg should be a buffer object, it's good to go. To restate my position: the need is for an immutable string of bytes, and that's exactly what PyBytes_Type is for.

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-19 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: The code should be changed to use the buffer API (instead of accepting only bytes objects). Other than that, I think it's ready for integration. -- ___ Python tracker rep...@bugs.python.org

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-18 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Status of this feature?. Ready to integrate? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +needs review stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-05 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___ ___

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-05 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: I've posted a review on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-05 Thread Sam Rushing
Sam Rushing rushing@gmail.com added the comment: renames dict-zdict, splits the test, adds BEGIN/END around inflate call. -- Added file: http://bugs.python.org/file25472/zlib_set_dictionary_4.patch ___ Python tracker rep...@bugs.python.org

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: A dictionary could be provided an init time. Then, the Z_NEED_DICT could be intercepted in the binding and automatically inject the dictionary provided in the init. Anyway, for a patch to be approved, we need a test too. PS: Why is this NOT

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing rushing@gmail.com added the comment: I'm currently reworking this so that the dictionaries are provided in the constructor, and inflateSetDictionary() is called automatically. I've gone over the zlib RFC's and zlibmodule.c, and I'm fairly certain that whatever usage mode

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Retargetting to python 3.3. If you hurry a bit and I find your patch acceptable (remember the tests!), I will try to integrate it. -- assignee: - serwy nosy: +serwy versions: +Python 3.3 -Python 3.4

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- assignee: serwy - nosy: -serwy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___ ___

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing rushing@gmail.com added the comment: Ok, here's the patch. It has a single short test. For use with SPDY, it's necessary to test that the following stream data also correctly decompresses, I'll attach that to the next comment. -- Added file:

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing rushing@gmail.com added the comment: This test is rather large, since it includes the predefined SPDY draft 2 dictionary, and some real-world data. Not sure what the policy is on including so much data in a test. If there's enough time I could make a smaller test that also

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing rushing@gmail.com added the comment: Argh, probably need to add the 'dict' field to the copy() method. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing rushing@gmail.com added the comment: Updated version of the patch: extends the test, including a test of the streaming behavior needed for SPDY (both compression and decompression). Also wik: copy()/uncopy() are aware of the 'dict' attribute. --

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Changes by Sam Rushing rushing@gmail.com: Added file: http://bugs.python.org/file25449/zlib_set_dictionary_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Added a few comments on Rietveld. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___

[issue14684] zlib set dictionary support inflateSetDictionary

2012-04-27 Thread Sam Rushing
New submission from Sam Rushing rushing@gmail.com: Google's SPDY protocol requires the use of a pre-defined compression dictionary. The current zlib module doesn't expose the two functions for setting the dictionary. This patch is minimal in the sense that it only exposes the two