cpython/Modules
Barry Warsaw 00decd7835 Patch #1520294: Support for getset and member descriptors in types.py,
inspect.py, and pydoc.py.  Specifically, this allows for querying the type of
an object against these built-in C types and more importantly, for getting
their docstrings printed in the interactive interpreter's help() function.

This patch includes a new built-in module called _types which provides
definitions of getset and member descriptors for use by the types.py module.
These types are exposed as types.GetSetDescriptorType and
types.MemberDescriptorType.  Query functions are provided as
inspect.isgetsetdescriptor() and inspect.ismemberdescriptor().  The
implementations of these are robust enough to work with Python implementations
other than CPython, which may not have these fundamental types.

The patch also includes documentation and test suite updates.

I commit these changes now under these guiding principles:

1. Silence is assent.  The release manager has not said "no", and of the few
   people that cared enough to respond to the thread, the worst vote was "0".

2. It's easier to ask for forgiveness than permission.

3. It's so dang easy to revert stuff in svn, that you could view this as a
   forcing function. :)

Windows build patches will follow.
2006-07-27 23:43:15 +00:00
..
_ctypes Check the allocation of b_objects and return if there was a failure. 2006-07-23 07:55:55 +00:00
_sqlite The sqlite3 module did cut off data from the SQLite database at the first null 2006-07-02 17:48:30 +00:00
cjkcodecs Fix a potentially invalid memory access of CJKCodecs' shift-jis 2006-06-05 00:59:54 +00:00
expat - back out Expat change; the final fix to Expat will be different 2006-07-06 05:13:22 +00:00
zlib Remove unneeded directories. 2006-01-03 06:48:38 +00:00
Setup.config.in Patch to make _codecs a builtin module. This is necessary since 2002-12-12 17:37:50 +00:00
Setup.dist patch #1493701: performance enhancements for struct module 2006-05-23 19:11:34 +00:00
_bisectmodule.c More unconsting. 2006-02-27 17:20:04 +00:00
_bsddb.c Ensure we don't write beyond errText. I think I got this right, but 2006-07-23 08:01:43 +00:00
_codecsmodule.c Patch #1455898: Incremental mode for "mbcs" codec. 2006-06-14 05:21:04 +00:00
_csv.c Fix problems found by Coverity. 2006-05-10 06:57:58 +00:00
_curses_panel.c Coverity-found bug: don't use temp->next *before* checking it for NULL. Also 2006-03-07 13:38:14 +00:00
_cursesmodule.c Correct error message 2006-07-26 17:18:01 +00:00
_elementtree.c Upgrade pyexpat to expat 2.0.0 (http://python.org/sf/1462338). 2006-06-19 23:21:25 +00:00
_functoolsmodule.c Apply modified version of Collin Winter's patch #1478788 2006-05-29 12:43:05 +00:00
_hashopenssl.c Make use of METH_O and METH_NOARGS where possible. 2006-05-29 21:04:52 +00:00
_heapqmodule.c Also make _heapq.nlargest() use Py_ssize_t instead of ints, to iter over 2006-02-16 19:21:53 +00:00
_hotshot.c Patch #1495999: Part two of Windows CE changes. 2006-06-10 12:23:46 +00:00
_localemodule.c Patch #1495999: Part two of Windows CE changes. 2006-06-10 12:23:46 +00:00
_lsprof.c Initialize structseq types only once. 2006-04-16 18:55:50 +00:00
_randommodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
_sre.c Impl ssize_t 2006-06-12 03:05:40 +00:00
_ssl.c #1494314: Fix a regression with high-numbered sockets in 2.4.3. This 2006-07-11 02:04:09 +00:00
_struct.c Wrap some long lines 2006-06-11 05:45:25 +00:00
_testcapimodule.c Part of bug #1523610: fix miscalculation of buffer length. 2006-07-26 08:03:10 +00:00
_tkinter.c self is dereffed (and passed as first arg), so it's known to be good. 2006-07-16 02:02:57 +00:00
_typesmodule.c Patch #1520294: Support for getset and member descriptors in types.py, 2006-07-27 23:43:15 +00:00
_weakref.c Make weak references subclassable: 2004-07-02 18:57:45 +00:00
addrinfo.h Add comments at end of every #endif and fix ones already there when for closing 2004-07-10 19:30:39 +00:00
almodule.c Fix some missing checks after PyTuple_New, PyList_New, PyDict_New 2006-03-17 19:03:25 +00:00
ar_beos Moved BeOS/ar-fake and BeOS/linkmodule to Modules/ar_beos and 2001-02-16 03:24:50 +00:00
arraymodule.c Patch #1495999: Part two of Windows CE changes. 2006-06-10 12:23:46 +00:00
audioop.c Convert audioop over to METH_VARARGS. 2006-05-28 22:34:51 +00:00
binascii.c Make binascii.hexlify() use s# for its arguments instead of t# to actually 2006-06-08 16:23:04 +00:00
bsddbmodule.c Merge ssize_t branch. 2006-02-15 17:27:45 +00:00
bz2module.c Fix more memory allocation issues found with failmalloc. 2006-07-22 16:20:49 +00:00
cPickle.c Fix memory leaks spotted by Klocwork #37. 2006-07-23 07:57:11 +00:00
cStringIO.c Remove unnecessary casts from type object initializers. 2006-03-30 11:58:57 +00:00
cdmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
cgen.py Whitespace normalization, via reindent.py. 2004-07-18 06:16:08 +00:00
cgensupport.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
cgensupport.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
clmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
cmathmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
collectionsmodule.c Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for 2006-04-15 17:28:34 +00:00
config.c.in Patch #1520294: Support for getset and member descriptors in types.py, 2006-07-27 23:43:15 +00:00
cryptmodule.c Patch #1516912: improve Modules support for OpenVMS. 2006-07-10 01:18:57 +00:00
cstubs REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
datetimemodule.c Bug #1478429: make datetime.datetime.fromtimestamp accept every float, 2006-04-28 19:09:24 +00:00
dbmmodule.c Make use of METH_O and METH_NOARGS where possible. 2006-05-29 21:04:52 +00:00
dlmodule.c Patch #1516912: improve Modules support for OpenVMS. 2006-07-10 01:18:57 +00:00
errnomodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
fcntlmodule.c Fix function name in error msg 2006-07-12 05:26:35 +00:00
flmodule.c Convert more modules to METH_VARARGS. 2006-05-29 21:58:42 +00:00
fmmodule.c Convert fmmodule to METH_VARARGS. 2006-05-29 13:53:16 +00:00
fpectlmodule.c Patch #1516912: improve Modules support for OpenVMS. 2006-07-10 01:18:57 +00:00
fpetestmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
gc_weakref.txt SF 1055820: weakref callback vs gc vs threads 2004-10-30 23:09:22 +00:00
gcmodule.c Replace PyObject_CallFunction calls with only object args 2006-05-25 19:15:31 +00:00
gdbmmodule.c Make use of METH_O and METH_NOARGS where possible. 2006-05-29 21:04:52 +00:00
getaddrinfo.c SF #784031: Byte-order bug in socket-module getaddrinfo.c 2003-08-17 21:28:39 +00:00
getbuildinfo.c Generate getbuildinfo.o each time the linker is invoked; 2006-01-18 09:13:51 +00:00
getnameinfo.c Remove INET6 define. Use ENABLE_IPV6 instead. 2001-12-02 10:15:37 +00:00
getpath.c Patch #1516912: improve Modules support for OpenVMS. 2006-07-10 01:18:57 +00:00
glmodule.c SF patch #577031, remove PyArg_NoArgs() since it's deprecated 2002-07-28 15:23:23 +00:00
grpmodule.c Move over to use of METH_O and METH_NOARGS. 2006-05-25 22:00:14 +00:00
imageop.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
imgfile.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
itertoolsmodule.c nextlink can be NULL if teedataobject_new fails, so use XINCREF. 2006-07-23 07:59:00 +00:00
ld_so_aix SF Bug # 941346, AIX shared library fix 2005-10-03 03:57:09 +00:00
ld_so_beos Remove a hard coded Python version, and a now incorrect relative path. Closes 2001-02-16 03:27:35 +00:00
linuxaudiodev.c Make use of METH_O and METH_NOARGS where possible. 2006-05-29 21:04:52 +00:00
main.c Accept long options "--help" and "--version". 2006-07-12 15:31:17 +00:00
makesetup [Patch #536769] Add -Xcompiler flag for adding arguments and switches for 2002-03-29 18:00:19 +00:00
makexp_aix - Changes donated by Elemental Security to make it work on AIX 5.3 2005-09-14 18:09:42 +00:00
mathmodule.c Whoops. 2006-05-29 22:00:30 +00:00
md5.c - Patch #360466: Replace the MD5 implementation from RSA Data Security Inc 2006-04-03 16:27:50 +00:00
md5.h - Patch #360466: Replace the MD5 implementation from RSA Data Security Inc 2006-04-03 16:27:50 +00:00
md5module.c - Patch #360466: Replace the MD5 implementation from RSA Data Security Inc 2006-04-03 16:27:50 +00:00
mmapmodule.c Patch #1495999: Part two of Windows CE changes. 2006-06-10 12:23:46 +00:00
nismodule.c Revert backwards-incompatible const changes. 2006-02-27 16:46:16 +00:00
operator.c Fix more ssize_t problems. 2006-04-22 11:15:41 +00:00
ossaudiodev.c Make use of METH_O and METH_NOARGS where possible. 2006-05-29 21:04:52 +00:00
parsermodule.c Replace PyObject_CallFunction calls with only object args 2006-05-25 19:15:31 +00:00
posixmodule.c Bug #1524310: Properly report errors from FindNextFile in os.listdir. 2006-07-24 12:54:17 +00:00
puremodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
pwdmodule.c Initialize structseq types only once. 2006-04-16 18:55:50 +00:00
pyexpat.c - back out Expat change; the final fix to Expat will be different 2006-07-06 05:13:22 +00:00
python.c Apparently FreeBSD enables some HW floating-point exceptions by default. 2002-12-28 21:56:08 +00:00
readline.c Fix memory leaks in some conditions. 2006-07-16 02:15:27 +00:00
resource.c Make use of METH_O and METH_NOARGS where possible. 2006-05-29 21:04:52 +00:00
rgbimgmodule.c Add deprecation warning to modules deprecated since 2000. 2006-02-17 11:29:04 +00:00
rotatingtree.c randombits(): Stop compiler warning about mixing 2006-02-15 03:01:30 +00:00
rotatingtree.h Fix comment typo 2006-04-22 01:58:40 +00:00
selectmodule.c Patch #1516912: improve Modules support for OpenVMS. 2006-07-10 01:18:57 +00:00
sgimodule.c Convert more METH_OLDARGS & PyArg_Parse() 2002-04-02 18:26:33 +00:00
sha256module.c Make use of METH_O and METH_NOARGS where possible. 2006-05-29 21:04:52 +00:00
sha512module.c Make use of METH_O and METH_NOARGS where possible. 2006-05-29 21:04:52 +00:00
shamodule.c Make use of METH_O and METH_NOARGS where possible. 2006-05-29 21:04:52 +00:00
signalmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
socketmodule.c #1494314: Fix a regression with high-numbered sockets in 2.4.3. This 2006-07-11 02:04:09 +00:00
socketmodule.h Get socketmodule to build after adding netlink support. 2006-01-16 04:31:40 +00:00
spwdmodule.c Initialize structseq types only once. 2006-04-16 18:55:50 +00:00
sre.h Impl ssize_t 2006-06-12 03:05:40 +00:00
sre_constants.h Implemented non-recursive SRE matching. 2003-10-17 22:13:16 +00:00
stropmodule.c Replace INT_MAX with PY_SSIZE_T_MAX. 2006-04-13 07:34:09 +00:00
sunaudiodev.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
svmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
symtablemodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
syslogmodule.c Make use of METH_O and METH_NOARGS where possible. 2006-05-29 21:04:52 +00:00
termios.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
testcapi_long.h Fix error in comment, and in test_long_api and test_longlong_api remove 2001-06-16 08:10:13 +00:00
threadmodule.c Remove unused variable. 2006-06-13 16:06:55 +00:00
timemodule.c Remove an XXX marker in a comment. 2006-07-21 22:44:07 +00:00
timing.h remove rcs history 1996-01-26 21:10:22 +00:00
timingmodule.c Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototype 2002-08-02 02:27:13 +00:00
tkappinit.c Remove warning about implicit declaration of strcmp() 2004-06-13 20:29:55 +00:00
unicodedata.c No functional change. Add comment and assert to describe why there cannot be overflow which was reported by Klocwork. Discussed on python-dev 2006-07-27 04:04:50 +00:00
unicodedata_db.h Update Unicode database to Unicode 4.1. 2006-03-09 23:38:20 +00:00
unicodename_db.h Update Unicode database to Unicode 4.1. 2006-03-09 23:38:20 +00:00
xxmodule.c Move test code out of xxmodule and into _testcapimodule.c where it belongs. 2006-03-15 05:43:10 +00:00
xxsubtype.c remove forward declarations. No constructors to move for these files. Makes 2006-04-12 04:29:01 +00:00
yuv.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
yuvconvert.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
zipimport.c Use Py_VISIT in all tp_traverse methods, instead of traversing manually or 2006-04-15 21:47:09 +00:00
zlibmodule.c Patch #1503046, Conditional compilation of zlib.(de)compressobj.copy 2006-06-12 03:33:09 +00:00