
On Thu, 4 Jun 2020 at 17:37, Victor Stinner <vstinner@python.org> wrote:
Compiler warnings for deprecation and deprecation in the documentation are good. But in my experience, even if a deprecation is documented for 10 years, people only start to pay attention when the compilation actually fails.
Maybe by default allow extensions using the deprecated function to fail compilation, but have an easy escape hatch, e.g. if you add -DPYTHON_ALLOW_DEPRECATED_XXXX to your compiler flags, to acknowledge that you're using a deprecated function, but at least you can move on for now.
Having that -DPYTHON_ALLOW_DEPRECATED_XXXX compiler flag in your build scripts will be a constant reminder that you need to fix it eventually.
And to be effective, I suggest that there should be several relatively fine grained PYTHON_ALLOW_DEPRECATED_XXXX flags, for small groups of functions. Otherwise it's too easy, people will just turn on the -DPYTHON_DEPRECATED_FUNCTIONS once, and forget about it for years.
Victor
Le jeu. 4 juin 2020 à 16:46, Petr Viktorin <encukou@gmail.com> a écrit :
On 2020-06-04 15:56, Victor Stinner wrote:
Hi Petr,
(I already replied to some of your questions in my reply to Hugh.)
Le jeu. 4 juin 2020 à 12:09, Petr Viktorin <encukou@gmail.com> a
écrit :
I see that the current documentation of Py_TYPE, Py_REFCNT ans Py_SIZE suggest that using them as lvalues is perfectly valid. There is no mention that anything changed.
Oh, it seems like https://docs.python.org/dev/ is no longer updated for an unknown reason.
The documentation was updated.
If you look into the up to date Git repository, Py_TYPE() got a ".. versionchanged:: 3.10" markup, and the change is mentioned in "Porting to Python 3.10: C API Changes" section of What's New in Python 3.10. https://github.com/python/cpython/blob/master/Doc/c-api/structures.rst
AFAIK, the deprecation period should be at least a release. Wouldn't that translate to documenting the new behavior 3.10, but only actually breaking in 3.11?
-- Night gathers, and now my watch begins. It shall not end until my death.
capi-sig mailing list -- capi-sig@python.org To unsubscribe send an email to capi-sig-leave@python.org https://mail.python.org/mailman3/lists/capi-sig.python.org/ Member address: gjcarneiro@gmail.com
-- Gustavo J. A. M. Carneiro Gambit Research "The universe is always one step beyond logic." -- Frank Herbert