| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
In some cases, the replacement is clearly not what is intended,
in those (where setup was called explicitly), I mostly renamed
`setup` to `_setup`.
The `test_ccompile_opt` is a bit confusing, so left it right now
(this will probably fail)
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
| |
|
|
|
|
|
| |
That function is nose specific and has not worked since `__init__` files
were added to the tests directories.
|
|
|
|
| |
Also rename some classes that should not begin 'Test'.
|
|
|
| |
Echo is a command in the Windows command interpreter
|
| |
|
|
|
|
|
|
|
| |
Add `print_function` to all `from __future__ import ...` statements
and use the python3 print function syntax everywhere.
Closes #3078.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `imports` fixer deals with the standard packages that have been
renamed, removed, or methods that have moved.
cPickle -- removed, use pickle
commands -- removed, getoutput, getstatusoutput moved to subprocess
urlparse -- removed, urlparse moved to urllib.parse
cStringIO -- removed, use StringIO or io.StringIO
copy_reg -- renamed copyreg
_winreg -- renamed winreg
ConfigParser -- renamed configparser
__builtin__ -- renamed builtins
In the case of `cPickle`, it is imported as `pickle` when python < 3 and
performance may be a consideration, but otherwise plain old `pickle` is
used.
Dealing with `StringIO` is a bit tricky. There is an `io.StringIO`
function in the `io` module, available since Python 2.6, but it expects
unicode whereas `StringIO.StringIO` expects ascii. The Python 3
equivalent is then `io.BytesIO`. What I have done here is used BytesIO
for anything that is emulating a file for testing purposes. That is more
explicit than using a redefined StringIO as was done before we dropped
support for Python 2.4 and 2.5.
Closes #3180.
|
|\
| |
| | |
2to3 apply import fixer
|
| |
| |
| |
| |
| |
| |
| | |
With the exception of numpy/distutils/tests/test_exec_command.py, all
of these files are script files in tools/osxbuild and tools/win32build.
The import in the script files omits `absolute_import` as they are
not part of a package.
|
|/
|
|
|
|
| |
The tests in test_exec_command.py used with blocks with a context
manager that could redirect stderr and stdout to temporary files but
those files were not closed on exit from the block.
|
|
|
|
|
|
|
| |
This should fix gh-3165.
Conflicts:
numpy/distutils/tests/test_exec_command.py
|
|
|
|
| |
Add a comment explaining the issue.
|
|
|
|
|
|
|
| |
Now things behave the same if executed with either of:
nosetests
nosetests -s
|
|
|
|
| |
And enable a test for this that was failing before.
|
|
|
|
|
|
|
|
|
| |
First, we test both stdout and stderr.
Second, we now test both _exec_command_posix() and _exec_command(), see
numpy/distutils/exec_command.py. This reveals a bug in the implementation which
will be fixed in the next commit. For now the failing test is commented out so
that all tests still pass.
|
|
Closes gh-2999 and gh-2915.
There are several packages (nose, scipy.weave.inline, Sage inline Fortran) that
replace stdout, in which case it doesn't have a fileno method. This method was
attempted to be used (change in gh-2766 to fix a py3k issue).
|