◐ Shell
clean mode source ↗

Message 207704 - Python tracker

Here are completed patches for the _bz2 and _lzma modules (only constructors 
are not converted) and preliminary patch for the zlib module.

There are issues in the zlib module:

* Argument Clinic generates invalid code for zlib_Decompress_flush 
(issue20196).

* Argument Clinic can simulate optional positional parameters without default 
Python values only using groups, and resulting code differs from original and 
is too cumbersome (see code for zlib_compress, zlib_decompress, 
zlib_Decompress_flush).

* I have experimented in zlib_decompressobj, and I got good compact code, but 
wrong docstring ("decompressobj(wbits=None, zdict=None)"). Needed a way to 
specify optional parameters without default Python values. Correct signature 
should be something like "decompressobj([wbits], [zdict])".

* Previous approach is not applicable to compressobj because Py_buffer can't 
have default value. Seems as compressobj is not compatible with Argument 
Clinic.

* This is not specific to this patch, but pydoc produces wrong outputs for 
compressobj.

Perhaps there are other issues, this is only preliminary patch.

Larry, I don't want to scatter patches for these related modules and merge 
them with patches for totally unrelated modules. And I think it would be 
cumbersome to Nadeem Vawda to make reviews in such circumstances.