Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20489
Nick Coghlan added the comment:
For 3.4, I'd prefer to just not convert these functions. The right fix is to
figure out how to get __name__ set appropriately, and that's something the C
extension module improvements in 3.5 should be able to help with.
--
Nick Coghlan added the comment:
For example, see the builtins patch on issue 20184 where I initially converted
sorted() to AC, but then found that making it *work* as an AC function was
actually quite difficult due to the PyList implementation expecting to be given
a arg tuple and kwds dict.
Serhiy Storchaka added the comment:
Expressly writing the name of the module in the expression solves this issue.
--
stage: - patch review
Added file: http://bugs.python.org/file33901/zlib_parameters_defaults.patch
___
Python tracker
Yury Selivanov added the comment:
The problem is that 'zlib.compressobj().flush.__module__ is None'
Can we fix that in zlib?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20489
___
Larry Hastings added the comment:
Nope, we can't fix it in zlib. As far as I can tell, the problem is that
method_get() in descrobject.c passes in NULL for the module to
PyCFunction_NewEx(). method_get gets the type as part of the descriptor
protocol, but type objects in C don't appear to
Yury Selivanov added the comment:
One way, albeit ugly, would be to further extend __text_signature__ format, to
allow something like:
sig=(...);module=zlib
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20489
Yury Selivanov added the comment:
One way, albeit ugly, would be to further extend
__text_signature__ format, to allow something like:
sig=(...);module=zlib
OR
sig=zlib.Compress.flush(...)
--
___
Python tracker rep...@bugs.python.org
Yury Selivanov added the comment:
Attached is an experimental patch (issue20489_01.patch) that implements the
idea of encoding full function name in its 'sig=' spec.
Test file:
import zlib
import inspect
print(zlib.compressobj().flush.__text_signature__)
New submission from Serhiy Storchaka:
import zlib
d = zlib.decompressobj()
d
zlib.Decompress object at 0xb70a9288
c = zlib.compressobj()
c
zlib.Compress object at 0xb6f85ac8
zlib.DEF_BUF_SIZE
16384
zlib.Z_FINISH
4
help(c)
Traceback (most recent call last):
File
10 matches
Mail list logo