cpython/Modules
Tim Peters 3caca2326e SF bug #488514: -Qnew needs work
Big Hammer to implement -Qnew as PEP 238 says it should work (a global
option affecting all instances of "/").

pydebug.h, main.c, pythonrun.c:  define a private _Py_QnewFlag flag, true
iff -Qnew is passed on the command line.  This should go away (as the
comments say) when true division becomes The Rule.  This is
deliberately not exposed to runtime inspection or modification:  it's
a one-way one-shot switch to pretend you're using Python 3.

ceval.c:  when _Py_QnewFlag is set, treat BINARY_DIVIDE as
BINARY_TRUE_DIVIDE.

test_{descr, generators, zipfile}.py:  fiddle so these pass under
-Qnew too.  This was just a matter of s!/!//! in test_generators and
test_zipfile.  test_descr was trickier, as testbinop() is passed
assumptions that "/" is the same as calling a "__div__" method; put
a temporary hack there to call "__truediv__" instead when the method
name is "__div__" and 1/2 evaluates to 0.5.

Three standard tests still fail under -Qnew (on Windows; somebody
please try the Linux tests with -Qnew too!  Linux runs a whole bunch
of tests Windows doesn't):
    test_augassign
    test_class
    test_coercion
I can't stay awake longer to stare at this (be my guest).  Offhand
cures weren't obvious, nor was it even obvious that cures are possible
without major hackery.

Question:  when -Qnew is in effect, should calls to __div__ magically
change into calls to __truediv__?  See "major hackery" at tail end of
last paragraph <wink>.
2001-12-06 06:23:26 +00:00
..
.cvsignore
Setup.config.in gcmodule is now always compiled 2001-08-30 00:13:38 +00:00
Setup.dist The Python symtable module depends on .h files that setup.py doesn't track. 2001-10-17 13:46:44 +00:00
_codecsmodule.c Patch #435971: UTF-7 codec by Brian Quinlan. 2001-09-20 10:35:46 +00:00
_curses_panel.c Cast argument to set_panel_userptr to void*. Fixes bug #417240. 2001-10-13 08:50:10 +00:00
_cursesmodule.c Limit string size on one-character-strings. Fixes #480384. 2001-11-11 14:49:15 +00:00
_hotshot.c Make sure to propogate errors that arise when profiling data cannot be 2001-12-04 21:40:53 +00:00
_localemodule.c sprintf -> PyOS_snprintf in some "obviously safe" cases. 2001-11-28 20:27:42 +00:00
_sre.c (experimental) "finditer" method/function. this works pretty much 2001-10-24 22:16:30 +00:00
_testcapimodule.c sprintf -> PyOS_snprintf in some "obviously safe" cases. 2001-11-28 20:27:42 +00:00
_tkinter.c sprintf -> PyOS_snprintf in some "obviously safe" cases. 2001-11-28 20:27:42 +00:00
_weakref.c Convert the ref() and proxy() implementations to use the new 2001-10-23 21:12:47 +00:00
addrinfo.h Fix portability problems with glibc 2.0, as reported in #449157. 2001-08-15 17:14:33 +00:00
almodule.c More sprintf -> PyOS_snprintf. 2001-11-28 22:07:30 +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 sprintf -> PyOS_snprintf in some "obviously safe" cases. 2001-11-28 20:27:42 +00:00
audioop.c audioop_ratecv(): I left a potentially unsafe multiply unchecked 2001-12-05 22:30:21 +00:00
binascii.c Change the limit on the input size for b2a_base64 to what will fit in 2001-10-30 03:00:52 +00:00
bsddbmodule.c Don't raise MemoryError in keys() when the database is empty. 2001-03-22 00:19:22 +00:00
cPickle.c Use PyOS_snprintf() instead of sprintf(). 2001-11-28 21:49:51 +00:00
cStringIO.c StringIO patch #462596: let's [c]StringIO accept read buffers on 2001-09-24 17:34:52 +00:00
ccpython.cc
cdmodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
cgen.py
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 REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
cmathmodule.c Revert parts of patch #453627, documenting the resulting test failures 2001-09-06 08:16:17 +00:00
config.c.in gcmodule is now enabled here 2001-08-30 00:12:32 +00:00
cryptmodule.c Use METH_OLDARGS instead of numeric constant 0 in method def. tables 2000-08-03 02:34:44 +00:00
cstubs REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dbmmodule.c SF Patch #103185, by jlt63: Some more standard modules cleanup for Cygwin 2001-01-22 15:29:14 +00:00
dlmodule.c Patch #404680: disables the nis module and enables the dl module when 2001-02-27 20:54:23 +00:00
errnomodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
fcntlmodule.c fcntl.ioctl(): Update error message; necessity noted by Michael Hudson. 2001-05-14 21:02:36 +00:00
flmodule.c sprintf -> PyOS_snprintf in some "obviously safe" cases. 2001-11-28 20:27:42 +00:00
fmmodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
fpectlmodule.c Define sunmath prototypes if sunmath.h was not included. 2001-03-07 10:22:20 +00:00
fpetestmodule.c
gcmodule.c Check for NULL return value of PyList_New (follow-up to patch #486743). 2001-12-02 18:31:02 +00:00
gdbmmodule.c sprintf -> PyOS_snprintf in some "obviously safe" cases. 2001-11-28 20:27:42 +00:00
getaddrinfo.c Remove INET6 define. Use ENABLE_IPV6 instead. 2001-12-02 10:15:37 +00:00
getbuildinfo.c More sprintf -> PyOS_snprintf. 2001-12-04 01:11:32 +00:00
getnameinfo.c Remove INET6 define. Use ENABLE_IPV6 instead. 2001-12-02 10:15:37 +00:00
getpath.c Changed logic for finding python home in Mac OS X framework Pythons. 2001-12-02 23:56:28 +00:00
glmodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
grpmodule.c Make sure we close the group and password databases when we are done with 2001-03-11 03:03:07 +00:00
imageop.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
imgfile.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
ld_so_aix
ld_so_beos Remove a hard coded Python version, and a now incorrect relative path. Closes 2001-02-16 03:27:35 +00:00
license.terms
linuxaudiodev.c Applying SF patch #412553 by Christopher Lee: fix linuxaudiodev 2001-04-02 17:59:02 +00:00
main.c SF bug #488514: -Qnew needs work 2001-12-06 06:23:26 +00:00
makesetup Separate CFLAGS and CPPFLAGS. CFLAGS should not contain preprocessor 2001-06-02 06:16:02 +00:00
makexp_aix
mathmodule.c Revert parts of patch #453627, documenting the resulting test failures 2001-09-06 08:16:17 +00:00
md5.h Rationalize use of limits.h, moving the inclusion to Python.h. 2000-09-26 05:46:01 +00:00
md5c.c Patch #463421: speed up md5 module with real memcpy/set. 2001-09-24 17:14:40 +00:00
md5module.c Simplify initmd5() to use PyModule_AddIntConstant(). 2001-11-02 22:05:06 +00:00
mmapmodule.c CVS patch #477161: New "access" keyword for mmap, from Jay T Miller. 2001-11-13 23:11:19 +00:00
mpzmodule.c Python.h: Don't attempt to redefine NDEBUG if it's already defined. 2001-07-15 18:38:47 +00:00
newmodule.c new_code(): The last patch to this left behind an unreferenced local; 2001-11-13 20:11:55 +00:00
nismodule.c Move declaration of 'clnt_create()' NIS function to pyport.h, as it's 2001-01-21 23:34:12 +00:00
operator.c Add wrappers around the rich-comparison operations. 2001-08-09 20:14:34 +00:00
parsermodule.c Fix memory leak in the parser module: There were two leaks in 2001-12-05 22:10:44 +00:00
pcre-int.h
pcre.h
pcremodule.c sprintf -> PyOS_snprintf in some "obviously safe" cases. 2001-11-28 20:27:42 +00:00
posixmodule.c posix_execve(), posix_spawnve(), posix_putenv(): 2001-12-03 20:41:00 +00:00
puremodule.c Do the absolute minimal amount of modifications to eradicate 2000-09-01 09:01:32 +00:00
pwdmodule.c Make sure we close the group and password databases when we are done with 2001-03-11 03:03:07 +00:00
pyexpat.c sprintf -> PyOS_snprintf in some "obviously safe" cases. 2001-11-28 20:27:42 +00:00
pypcre.c
python.c
readline.c sprintf -> PyOS_snprintf in some "obviously safe" cases. 2001-11-28 20:27:42 +00:00
regexmodule.c initregex(): this function is declared void, so the recent change to 2001-07-09 18:15:38 +00:00
regexpr.c Python.h: Don't attempt to redefine NDEBUG if it's already defined. 2001-07-15 18:38:47 +00:00
regexpr.h
resource.c [Patch #462255, from Jason Tishler] Re-enables building the resouce 2001-09-17 16:19:16 +00:00
rgbimgmodule.c
rotormodule.c Part of SF patch #102409 by jlt63 to support building these modules 2001-01-10 21:03:32 +00:00
selectmodule.c Fix SF bug #474538: Memory (reference) leak in poller.register (Dave Brueck) 2001-10-25 20:18:35 +00:00
sgimodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
shamodule.c Clean up a Tab inconsistency. 2001-11-02 22:04:17 +00:00
signalmodule.c SF patch [#466877] SIGBREAK is missing from signal module. 2001-10-01 17:58:40 +00:00
socketmodule.c Remove INET6 define. Use ENABLE_IPV6 instead. 2001-12-02 10:15:37 +00:00
sre.h merged with pythonware's SRE 2.1.1 codebase 2001-07-02 16:42:49 +00:00
sre_constants.h added martin's BIGCHARSET patch to SRE 2.1.1. martin reports 2x 2001-07-02 16:58:38 +00:00
stropmodule.c More sprintf -> PyOS_snprintf. 2001-11-28 22:07:30 +00:00
structmodule.c SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
sunaudiodev.c Fix memory leak. This is part of SF patch #478006. 2001-11-09 16:00:41 +00:00
svmodule.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
symtablemodule.c Export three optimization (fast locals) flags 2001-04-16 18:42:13 +00:00
syslogmodule.c Do the absolute minimal amount of modifications to eradicate 2000-09-01 09:01:32 +00:00
tclNotify.c
termios.c Forward-port revision 2.24.2.4 from the release21-maint branch: 2001-06-15 12:05:44 +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 Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
timemodule.c Patch #481718: Time module doc string changes. 2001-12-02 12:27:43 +00:00
timing.h
timingmodule.c Do the absolute minimal amount of modifications to eradicate 2000-09-01 09:01:32 +00:00
tkappinit.c Removing warnings discovered by gcc -Wall 2000-08-04 15:53:06 +00:00
unicodedata.c unicodedata_decomposition(): sprintf -> PyOS_snprintf. 2001-11-30 07:23:05 +00:00
unicodedata_db.h compress unicode decomposition tables (this saves another 55k) 2001-01-21 22:41:08 +00:00
unicodename_db.h compress unicode decomposition tables (this saves another 55k) 2001-01-21 22:41:08 +00:00
xreadlinesmodule.c Remove bogus PyGC_HEAD_SIZE. 2001-08-29 23:50:42 +00:00
xxmodule.c Remove a couple of tp_xxx fields that you are not expected to 2001-10-15 21:24:12 +00:00
xxsubtype.c Adding missing "static" declarations (found by "make smelly"). 2001-10-21 22:26:43 +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
zlibmodule.c Added missing cast. 2001-10-23 22:29:06 +00:00