| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
| |
Regression tests for bug discussed in pull request #10676.
Lines matching the multiline or f2py enhancement pattern should not be
split by ';'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* BUG: improve parsing of quoted control characters in numpy.f2py.
See #10634. Fixes a couple of cases where quoted control
characters are parsed as if they are unquoted. The control
characters considered are "()!;".
* TST: quoted characters parsing by numpy.f2py.
Basic test of parsing quoted Fortran control characters. See #10634.
* BUG: add missing space character when reconstructing fortran line.
The missing space caused a line starting with "!f2py" to be considered
a continuation line.
|
| |
|
|
|
|
| |
This makes the contents of `typeinfo` look liked namedtuples
|
|
|
|
| |
See #10027.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WRITEBACKIFCOPY (#9639)
* ENH: add API to resolve UPDATEONCOPY outside dealloc, test and use
* BUG: Fix usage of keyword "from" as argument name for "can_cast".
Also removed inconsistency between the second argument name
between documentation ("totype") and code ("to").
* UPDATEIFCOPY -> WRITEBACKIFCOPY, documentation
* fixes for review
* review2, fix new test
* fix new test for using self.assert_deprecated
* change deprecation logic as per review
* new logic exposed places where PyArray_ResolveWritebackIfCopy not called
* deprecate PyArray_XDECREF_ERR in favor of PyArray_DiscardWritebackIfCopy
* code review changes
* clean up merge cruft
* fix from review
* fixes from review
* extend the release note
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
1. fail tests related to DLL load failure as they were previously untested.
2. fix have_compiler to return false on old compilers
3. xfail some tests that were not working on old Python versions.
|
| |
|
| |
|
| |
|