| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Tests using MD5 algorithms fail in FIPS Mode because MD5 is not FIPS
compliant.
Replace MD5 with SHA256 to overcome that.
Signed-off-by: Nikola Forró <nforro@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In fortran functions passed to f2py, calculations that occur in the
dimensions of array declarations are interpreted as floats. Valid
fortran requires integers. Problem only occurs with fortran functions
not subroutines as only for the former does f2py generate fortran
wrapper code that fails to compile.
Relevant code is in numpy.f2py.crackfortran.getlincoef(), which
calculates and returns the coefficients to getarrlen() for writing to
the fortran wrapper code.
Fixes gh-8062.
|
| |
|
| |
|
|
|
|
| |
Fixes gh-15325
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
We no longer need to use the compatibility function after dropping
support for Python 2.7. In some cases unicode was the correct string
type rather than the bytes of the compatibility version and bugs in the
array `__complex__` and array `__array_interface__` methods have been
fixed by changing that.
|
|/
|
|
| |
Unlike the others, PyInt_Check has a special meaning distinc from PyLong_Check, so only the places where the difference doesn't matter have been updated here.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In https://github.com/python/cpython/pull/20290 CPython changed
`Py_TYPE` from a macro to an inline function. This requires a code
change to us `Py_SET_TYPE` instead when using `Py_TYPE()` as a lvalue
in c code.
In https://github.com/python/cpython/pull/20429 CPython changed
`Py_SIZE` from a macro to an inline function. This requires a code
change to us `Py_SET_SIZE` instead of using `Py_SIZE` as a lvalue in c
code.
|
|
|
|
|
| |
types (#15816)
Cleanup from the dropping of python 2
|
|\
| |
| | |
BUG: don't add 'public' or 'private' if the other one exists
|
| |
| |
| |
| |
| |
| | |
Currently, setting 'public' or 'private' attribute is adding
one even if the other one already exists because of the else:
part that is always appending.
|
|/ |
|
|
|
| |
* BUG, TST: fix f2py for PyPy, skip one test for PyPy, xfail tests for s390x
|
|
|
|
|
|
|
| |
* Cleanup unused imports (F401) of mostly standard Python modules,
or some internal but unlikely referenced modules
* Where internal imports are potentially used, mark with noqa
* Avoid redefinition of imports (F811)
|
| |
|
| |
|
|
|
|
|
|
|
| |
Inheriting from object was necessary for Python 2 compatibility to use
new-style classes. In Python 3, this is unnecessary as there are no
old-style classes.
Dropping the object is more idiomatic Python.
|
|\
| |
| | |
MAINT: Cleaning up PY_MAJOR_VERSION/PY_VERSION_HEX
|
| | |
|
|\ \
| |/
|/| |
MAINT: Remove unnecessary 'from __future__ import ...' statements
|
| |
| |
| |
| |
| | |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|/
|
|
|
| |
Dropping the support for python 2, the difference in module setup do not have to be accounted
for anymore. This removes the macros and ifdef's related to module setup code and python 2
support.
|
|
|
|
|
|
| |
Distutils code needs to run in different temporary directories, probably
because they create `_configtest.c` files for compiler detection in the
current directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, f2py loaded the type mappings from a file ``.f2py_f2cmap``
in current directory, at import time.
Make the file name customizable by adding a ``--f2cmap`` command line
option, and postpone loading the file to f2py.run_main().
Moreover, restore the default type mapping in f2py.run_main() before
loading the customizations, so that multiple calls to f2py.run_main() do
not interfere with each other. (For example, numpy.distutils calls f2py
multiple times in the same process.)
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Note that the extension module dict seems to be never dereferenced
(there is an additional reference to it kept around somewhere).
This reference seems to part of the C python module loading
(possibly intentionally), and I could not find how to remove it or
where it originates from.
|
| |
|
| |
|
|
|
|
| |
Don't touch the fortran files, since indentation is signficant there and it makes things more error-prone
|
|
|
|
|
|
|
| |
The test should not be run if there is no Fortran compiler. This PR
moves it to `numpy/f2py/tests/test_compile_function.py`, which is
appropriate for the test and a place where the presence of the needed
compilers is already checked for.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#12448)
* Review F401,F841,F842 flake8 errors (unused variables, imports)
* Review comments
* More tests in test_installed_npymath_ini
* Review comments
|
|
|
|
|
|
| |
There is a not yet understood problem in testing f2py C modules (*.pyf)
files on the Mac that manifests as erratic module import failures.'
This disables those tests until we can figure out what the problem is.
|
| |
|
| |
|
|\
| |
| | |
TST: Parametrize f2py tests.
|
| |
| |
| |
| |
| | |
This allows to parametrize the entire class without having to do any
trickery with eval.
|
| | |
|
|\ \
| | |
| | | |
TST: prefer pytest.skip() over SkipTest
|
| | |
| | |
| | | |
`test_array_from_pyobj.py` needs to import pytest.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* replace most usage of SkipTest() with
pytest.skip()
* where possible, we avoid use of the standard
library SkipTest because unittest skipping
is routed through the pytest nose compatibility
layer in that scenario, which can prevent an easy
trace back to the test line where the skip
occurred
|
| | |
| | |
| | |
| | |
| | |
| | | |
The tests were failing on platforms without a fortran compiler as that
was not being checked for. Add that check among others and clean up the
test functions a bit.
|
|/ /
| |
| |
| |
| |
| |
| | |
Create new file `test_compile_function.py` for the test, transferring
the content from `test_quoted_characters.py` where it was before. The
tricky part here is maintaining the history in both files after the
move.
|
|/
|
|
|
| |
* replaced the usage of exec_command() in the
f2py init with standard library equivalent
|
|
|
|
|
| |
That function is nose specific and has not worked since `__init__` files
were added to the tests directories.
|
|
|
|
|
|
|
|
|
|
|
| |
Use standard pytest markers everywhere in the numpy tests. At this point
there should be no nose dependency. However, nose is required to test
the legacy decorators if so desired.
At this point, numpy test cannot be run in the way with runtests, rather
installed numpy can be tested with `pytest --pyargs numpy` as long as
that is not run from the repo. Run it from the tools directory or some
such.
|