mirror of
https://github.com/python/cpython.git
synced 2025-07-29 22:24:49 +00:00

The fact that this was failing and went unnoticed so long seems like a good argument for being able to enable and disble py3kwarnings through Python.
7 lines
293 B
Python
7 lines
293 B
Python
# Filter out warnings about signed/unsigned constants
|
|
import warnings
|
|
warnings.filterwarnings("ignore", "", FutureWarning, ".*Controls")
|
|
warnings.filterwarnings("ignore", "", FutureWarning, ".*MacTextEditor")
|
|
|
|
from warnings import warnpy3k
|
|
warnpy3k("In 3.x, Carbon is removed.", stacklevel=2)
|