You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f2py tries to report the version of f2py in the docstring of the extension module. However, as the import of __svn_version__ in numpy/numpy/f2py/__version__.py always fails, the f2py version reported in the docstrings always has the value of '2'.
f2py should instead use a versioning mechanism that actually works, or at least include the NumPy version in the resported f2py version. This way it would be possible for projects like SciPy to query the version of f2py used for cmpilation (which might be different from the currently imported numpy) and correct for known bugs, such as the recently fixed issue with callbacks to Python not being threadsafe.
>>> _cobyla.__doc__
"This module '_cobyla' is auto-generated with f2py (version:2).\nFunctions:\n x,dinfo = minimize(calcfc,m,x,rhobeg,rhoend,dinfo,iprint=1,maxfun=100,calcfc_extra_args=())\n."
The text was updated successfully, but these errors were encountered:
sturlamolden
changed the title
BUG: f2py does not correctly resport the f2py version used for compilation
BUG: f2py does not correctly report the f2py version used for compilation
Jun 7, 2020
sturlamolden
changed the title
BUG: f2py does not correctly report the f2py version used for compilation
BUG: f2py does not correctly report the f2py version in the docstrings of compiled modules
Jun 7, 2020
sturlamolden
changed the title
BUG: f2py does not correctly report the f2py version in the docstrings of compiled modules
BUG: f2py does not correctly report the f2py version in the docstrings of compiled extension modules
Jun 7, 2020
This way it would be possible for projects like SciPy to query the version of f2py used for cmpilation (which might be different from the currently imported numpy) and correct for known bugs
I don't think a comment in a docstring is the proper interface for versioning extensions. We should remove this part of the docstring entirely. If we wish to version the extensions, we should do so in a way that provides a proper interface. For instance we could add a _f2py_version attribute to the extension.
I suggest __f2py_numpy_version__ to avoid confusion as it is the version of NumPy with which f2py is associated. The version of f2py itself is probably unknown after it became a part of NumPy.
Uh oh!
There was an error while loading. Please reload this page.
f2py tries to report the version of f2py in the docstring of the extension module. However, as the import of
__svn_version__
innumpy/numpy/f2py/__version__.py
always fails, the f2py version reported in the docstrings always has the value of'2'
.f2py should instead use a versioning mechanism that actually works, or at least include the NumPy version in the resported f2py version. This way it would be possible for projects like SciPy to query the version of f2py used for cmpilation (which might be different from the currently imported numpy) and correct for known bugs, such as the recently fixed issue with callbacks to Python not being threadsafe.
numpy/numpy/f2py/__version__.py
Lines 1 to 8 in 581eab3
Here is an example showing the problem:
The text was updated successfully, but these errors were encountered: