Missing peice of PEP 237 (int unification)

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?

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).
Sounds like a good idea. I totally forgot about this part, because it's so nearyly invisible. :-)
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?
I would keep the APIs for one release and then nuke them, but not add any deprecation code. Just document them as on the way out. --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (2)
-
Guido van Rossum
-
Tim Peters