Without this fix applied, these tests could fail if Python warning filtering was configured in a way that interfered with the emission of the warnings - for example, when PYTHONWARNINGS="ignore" is configured as an environment variable.
By adding a simplefilter to always-emit DeprecationWarning notices, we can ensure that the test assertions apply correctly regardless of Python warning configuration.
Without this fix applied, these tests could fail if Python warning filtering was configured in a way that interfered with the emission of the warnings - for example, when
PYTHONWARNINGS="ignore"
is configured as an environment variable.By adding a
simplefilter
to always-emitDeprecationWarning
notices, we can ensure that the test assertions apply correctly regardless of Python warning configuration.