On 30Sep2019 1625, Nick Coghlan wrote:
After merging your PR and closing mine, I had an idea for Python 3.9: what if we offered a separate public "int Py_CheckVersionCompatibility(uint64_t header_version)" call? (64 bit input rather than 32 to allow for possible future changes to the version number formatting scheme)

The basic variant of that API would be what I had in my PR: release candidates and final releases allow an inexact match, other releases require the hex version to match exactly.

As I posted on the issue tracker, I don't think this kind of version verification is necessary unless we're genuinely going to get into the business of adding built-in shims for API changes.

Every supported platform is going to make you link against a dynamic library with the version number in its name. (Every approach that avoids this is not supported or does not support embedding.) So you get run-time checking for free, and you can add a compile-time check in three or four different ways depending on what makes the most sense for your build system.

Let's not complicate the embedding API further with unnecessary new APIs. I'm keen to design something broadly useful and simpler than what we have now, and this is not going to help with it.

Cheers,
Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/35WNLKQL4DWZZ6MS7OEZEDV7AM2IZFKV/

Reply via email to