[Python-Dev] Missing peice of PEP 237 (int unification)

Tim Peters tim.peters at gmail.com
Tue Aug 24 05:02:34 CEST 2004


We're still generating OverflowWarnings in CVS:

>>> import warnings
>>> warnings.filterwarnings("error", "", OverflowWarning)
>>> import sys
>>> sys.maxint + 1
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
OverflowError: integer addition
>>>

The PEP says OverflowWarning was for "transition phase A":

     Here are the rules that guide warnings generated in situations
     that currently raise OverflowError.  This applies to transition
     phase A.

Phase A was done in 2.2.  Phase B0 was done in 2.3, and 2.4 is
supposed to be phase B1.  The OverflowWarnings are still there, but
should have gone away in 2.3 already.

It would be a lot of fun to rip out the bletcherous code raising
OverflowWarning, and finding the infinite loop that will then occur in
the test suite (you think I'm kidding -- heh).

One question the PEP doesn't answer:  does PyExc_OverflowWarning
vanish from the C API at the same time?  Does OverflowWarning vanish
from Python too?  Or do we need to add a PendingDeprecationWarning for
OverflowWarning in 2.4, a DeprecationWarning for OverflowWarning in
2.5, and finally nuke the silly bastard tin 2.6?


More information about the Python-Dev mailing list