-
-
Notifications
You must be signed in to change notification settings - Fork 33
Does PEP 387 apply when correcting deviations from PEP 399? #228
Description
Modules (like datetime and zoneinfo) that have both pure Python and C-accelerated versions are subject to PEP 399 which says specifically that both the Python and C modules must pass the test suite — though the spirit of the PEP is that the modules should be drop-in replacements for each other with regards to any intentionally-public behavior.
We occasionally find that there is an unintentional discrepancy in behavior between the pure Python and C modules, and we would like to correct it — usually by making the Python version do what the C version does. A recent example of this is when it was discovered that datetime.timezone can be subclassed in the Python module, but not the C module. We decided to remove this capability from the Python module, and the question is: do we need a PEP 387 deprecation period in the pure Python version before we do so, even though we're just bringing it into alignment wth what the C module already does?