I am currently porting to a new platform and so I am going through all config parameters and checking which of them I have to set. While doing so I noticed that there are quite a few unused configs. Some of them both in the manually maintained windows version and the configure solution and some of them in only one of them. Some examples would be:
HAVE_PROTOTYPES
HAVE_GLIBC_MEMMOVE_BUG
HAVE_IPA_PURE_CONST_BUG
a big chunk of HAVE_LIB*
I was wondering whether those are kept around on purpose or whether they just didn’t get cleaned up at some point in time.
By a strict reading of our Backwards Compatibility Policy, these are supported public API. And since they’re macros used for #ifdef, we can’t add deprecation warnings for them.
Haven’t we discussed exceptions before for the HAVE_* constants? They aren’t Py_ prefixed, so could arguably be cluttering up the user’s own namespace and we are obliged to clean them up. We shouldn’t have any that users use to detect CPython functionality.
That said, it’s very much in the same category as removing transitive includes, which always breaks users even though they’re not meant to rely on them… maybe pull them out and see who screams?
There was discussion, yes; I have an entry deep in the TODO list as well. I’m not aware of a decision.
It would make sense to remove them, and I don’t think the WG would object if asked about HAVE_GLIBC_MEMMOVE_BUG. But removing them all at once is disruptive in unknown ways.
“See who screams” is euphemism for an entry in What’s New that tells people how to deal with ancient code that breaks because it’s been doing things it shouldn’t. Right? :‍)
That one is safe, because undefined WITH_FREELISTalways meant “we don’t use freelists”.
Many of these HAVE_* defines originate directly from standard autoconf, so there is a proper standard for many them (not all, since autoconf also includes ways of defining your own checks, of course).
While extensions can certainly do their own discovery of many of these features or bugs, I have always found it helpful to make use of the ones that Python already provides for the platform.
It means ship alpha/beta without them and be prepared to bring them back before release. Usually we’re caught by surprise that we have to bring something back, so it’s just a euphemism for not being surprised.