cpython/Include
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
..
Python.h Stop defining NDEBUG in Python.h, because it can interfere with 2001-12-04 20:06:11 +00:00
abstract.h Fix SF bug [ #476852 ] Some bad macros in abstract.h 2001-11-28 16:20:07 +00:00
bitset.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
bufferobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
cStringIO.h Cast the result of xxxPyCObject_Import to PycStringIO_CAPI*. 2001-06-09 07:59:43 +00:00
cellobject.h PEP 227 implementation 2001-01-25 20:04:14 +00:00
ceval.h Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
classobject.h Add PyMethod_Function(), PyMethod_Self(), PyMethod_Class() back. 2001-09-05 22:52:50 +00:00
cobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
codecs.h Changing the CNRI copyright notice according to CNRI's instructions. 2000-08-03 16:24:25 +00:00
compile.h Refactor future feature handling 2001-08-10 21:38:04 +00:00
complexobject.h Again perhaps the end of [#460020] bug or feature: unicode() and subclasses. 2001-09-12 19:12:49 +00:00
descrobject.h Methods of built-in types now properly check for keyword arguments 2001-10-22 00:43:43 +00:00
dictobject.h Add PyDict_Merge(a, b, override): 2001-08-10 20:28:28 +00:00
errcode.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
eval.h Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
fileobject.h PyFile_WriteString(): change prototype so that the string arg is 2001-11-28 22:13:25 +00:00
floatobject.h More for SF bug [#460020] bug or feature: unicode() and subclasses 2001-09-10 21:28:20 +00:00
frameobject.h Make frames a PyVarObject instead of a PyObject. 2001-08-29 23:45:25 +00:00
funcobject.h Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
graminit.h Very subtle syntax change: in a list comprehension, the testlist in 2001-10-15 15:44:05 +00:00
grammar.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
import.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
intobject.h SF bug #460020: bug or feature: unicode() and subclasses. 2001-09-10 20:52:51 +00:00
intrcheck.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
iterobject.h Mondo changes to the iterator stuff, without changing how Python code 2001-04-23 14:08:49 +00:00
listobject.h Introduced the oddly-missing PyList_CheckExact(), and used it to replace 2001-10-05 20:41:38 +00:00
longintrepr.h SF bug #460020: bug or feature: unicode() and subclasses. 2001-09-10 20:52:51 +00:00
longobject.h SF bug #460020: bug or feature: unicode() and subclasses. 2001-09-10 20:52:51 +00:00
marshal.h It's unclear whether PyMarshal_XXX() are part of the public or private API. 2001-01-28 00:27:39 +00:00
metagrammar.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
methodobject.h Remove much dead code from ceval.c 2001-08-12 21:52:24 +00:00
modsupport.h PyArg_UnpackTuple(): New argument unpacking function suggested by Jim 2001-10-23 21:09:29 +00:00
moduleobject.h SF bug [#460467] file objects should be subclassable. 2001-09-13 05:38:56 +00:00
node.h Use an assert() for the REQ() macro instead of making up our own 2001-10-15 17:23:13 +00:00
object.h SF bug #475327: type() produces incorrect error msg 2001-10-27 19:37:48 +00:00
objimpl.h SF bug [#467145] Python 2.2a4 build problem on HPUX 11.0. 2001-10-11 18:31:31 +00:00
opcode.h Implement PEP 238 in its (almost) full glory. 2001-08-08 05:00:18 +00:00
osdefs.h RISCOS patch by dschwertberger 2001-03-02 06:10:17 +00:00
parsetok.h Ugly. A pile of new xxxFlags() functions, to communicate to the parser 2001-07-16 05:37:24 +00:00
patchlevel.h Bumping version number. 2001-11-16 21:12:25 +00:00
pgenheaders.h Add function attributes that allow GCC to check the arguments of printf-like 2001-10-23 02:21:22 +00:00
py_curses.h Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and 2001-10-24 17:10:49 +00:00
pydebug.h SF bug #488514: -Qnew needs work 2001-12-06 06:23:26 +00:00
pyerrors.h mysnprintf.c: Massive rewrite of PyOS_snprintf and PyOS_vsnprintf, to 2001-12-03 00:43:33 +00:00
pyfpe.h Some patches to Lee Busby's fpectl mods that accidentally didn't make it 1997-10-20 23:50:01 +00:00
pygetopt.h Move our own getopt() implementation to _PyOS_GetOpt(), and use it 2000-11-03 08:18:37 +00:00
pymactoolbox.h Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me. 2001-11-05 14:39:22 +00:00
pymem.h Repair more now-obsolete references to config.h. 2001-07-26 21:34:59 +00:00
pyport.h SF patch #475657 (Dietmar Schwertberger) 2001-10-27 21:16:16 +00:00
pystate.h Add a low-level API to access interpreters, for David Beazley. 2001-07-19 12:19:27 +00:00
pythonrun.h Add warning mode for classic division, almost exactly as specified in 2001-08-31 17:40:15 +00:00
pythread.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
rangeobject.h Re-add 'advanced' xrange features, adding DeprecationWarnings as discussed 2001-07-09 12:30:54 +00:00
sliceobject.h ANSI-fication and Py_PROTO extermination. 2000-07-09 00:55:06 +00:00
stringobject.h Add function attributes that allow GCC to check the arguments of printf-like 2001-10-23 02:21:22 +00:00
structmember.h Fix SF bug #486144: Uninitialized __slot__ vrbl is None. 2001-12-04 16:23:42 +00:00
structseq.h SF patch #462296: Add attributes to os.stat results; by Nick Mathewson. 2001-10-18 20:34:25 +00:00
symtable.h Remove st_nested_scopes from struct symtable, 2001-08-11 21:51:24 +00:00
sysmodule.h Add function attributes that allow GCC to check the arguments of printf-like 2001-10-23 02:21:22 +00:00
token.h Implement PEP 238 in its (almost) full glory. 2001-08-08 05:00:18 +00:00
traceback.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
tupleobject.h More on SF bug [#460020] bug or feature: unicode() and subclasses. 2001-09-10 23:37:46 +00:00
ucnhash.h refactored the unicodeobject/ucnhash interface, to hide the 2001-01-19 09:45:02 +00:00
unicodeobject.h SF patch #470578: Fixes to synchronize unicode() and str() 2001-10-19 02:01:31 +00:00
weakrefobject.h Remove bogus declaration. 2001-10-05 22:06:45 +00:00