ENH: Use the semantic version instead of the C-API version in the error message for C-API incompatibility
See original GitHub issueProposed new feature or change:
In the module generate_numpy_api
, which is inside the sub package numpy.core.code_generators
, there is the generation of the C method static int _import_array(void)
, which has an if statement like the following:
if (NPY_FEATURE_VERSION > PyArray_GetNDArrayCFeatureVersion()) {
PyErr_Format(PyExc_RuntimeError, "module compiled against "\
"API version 0x%%x but this version of numpy is 0x%%x", \
(int) NPY_FEATURE_VERSION, (int) PyArray_GetNDArrayCFeatureVersion());
return -1;
}
I would like to change this error message to, instead of telling about the C-API version, tell about the semantic version of the numpy package. The motivation is that the error seems obscure when using this hexadecimal version that seems to have no relation to the semantic version. Would it be welcome ?
If so, I can try a PR. However, how could I trigger this error for the matter of testing my solution ? Also, is there some way to get the semantic version from the C-API ? Or should I introduce a new macro for it ?
Issue Analytics
- State:
- Created a year ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Semnatic version not extracted from jar filename when using CLI
Calling japcmp and generating the report works just fine, but I'm unable to use the --error-on-semantic-incompatibility flag. That's how it's integrated in ...
Read more >Semantic Versioning 2.0.0 | Semantic Versioning
Given a version number MAJOR.MINOR.PATCH, increment the: MAJOR version when you make incompatible API changes; MINOR version when you add functionality in a ......
Read more >Terraform AzureRM provider version history - Microsoft Learn
This article contains the following change logs from the HashiCorp site showing the Terraform AzureRM provider versions:.
Read more >VMware Cloud on AWS Release Notes
Optional Release: VMware Cloud on AWS (SDDC Version 1.19) | 29 June 2022 ... To customers and partners: No need for upfront capital...
Read more >TABLE OF CONTENTS CHAPTER 49-000 CASH ...
Eligibility for Cash Assistance Program for Immigrants (CAPI) . ... signed prior to the formulation and implementation of the new version of the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We have the troubleshooting guide, the source is here. PRs are welcome. I think the date, the message, what two packages+versions caused the problem, and what version of NumPy provided a solution would be specific enough to be helpful.
@mattip @seberg I opened a PR for this one (https://github.com/numpy/numpy/pull/21943)