I wouldn’t be surprised if someone out there was using allow_nan=None to mean allow_nan=False. We shouldn’t change the meaning silently.
Solutions I can think of:
-
Adding a new argument, like
nonfinite=None. Initially it would only takeNonebut it could be extended in the future, if necessary. -
Using a specific value that’s very unlikely to be used currently, like
allow_nan='null'. To allow future extensions, start emitting aDeprecationWarningwhen a non-boolis passed toallow_nan.This would technically be a backwards incompatible change, but it could get a SC exception.