summaryrefslogtreecommitdiff
path: root/numpy/distutils/cpuinfo.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: revise OSError aliases (IOError, EnvironmentError)Mike Taves2021-09-021-2/+2
|
* convert shebang from python to python3 (#15687)Changqing Li2020-03-041-1/+1
| | | | Signed-off-by: Changqing Li <changqing.li@windriver.com>
* STY,MAINT: avoid 'multiple imports on one line' (flake8 E401)Mike Taves2020-01-281-3/+5
| | | | | | * PEP 8: "Imports should usually be on separate lines" * Where modified, sort imported modules alphabetically * Clean-up unused imports from these expanded lines
* [MAINT] Cleanup python2 sys.version checksSeth Troisi2020-01-201-8/+2
|
* Merge pull request #15248 from eric-wieser/avoid-exc_infoCharles Harris2020-01-051-8/+4
|\ | | | | MAINT: cleanup use of sys.exc_info
| * MAINT: cleanup use of sys.exc_infoEric Wieser2020-01-051-8/+4
| | | | | | | | | | | | This code originates from python 2.6, before there was an `as` clause in `except`. This removes all callers of `numpy.distutils.compat.get_exception`.
* | MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-1/+1
| | | | | | | | | | | | | | 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: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
|/ | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* MAINT: Remove unnecessary backslashes when not needed.MSeifert042019-07-021-14/+14
| | | | See also: #13880
* BUG: fix distutils/cpuinfo.py:getoutput()Mike Nolta2017-08-151-1/+1
| | | | | | | | | If getstatusoutput() throws an exception, getoutput() tries to catch it, but then crashes with: UnboundLocalError: local variable 'output' referenced before assignment because it tries to return the non-existent result of getstatusoutput().
* BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-3/+3
| | | | Bare except is very rarely the right thing
* DEP: Fix escaped string characters deprecated in Python 3.6.Charles Harris2016-12-141-3/+3
| | | | | | | In Python 3.6 a number of escape sequences that were previously accepted -- for instance "\(" that was translated to "\\(" -- are deprecated. To retain the previous behavior either raw strings must be used or the backslash must be properly escaped itself.
* Fix test code on cpuinfo's main functionGustavo Serra Scalet2016-09-301-4/+4
| | | | | Due to future print import (py3k style), the commented code should also have the strings enclosed with parentheses or else it'll break.
* ENH: Add stacklevel to all (or almost all) our function callsSebastian Berg2016-09-021-1/+1
|
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-49/+49
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* MAINT: Apply 2to3 idioms fixer.Charles Harris2013-05-021-2/+2
| | | | | | | | | | | | | | | | | | | The idioms fixer makes the following replacements. 1) int <- bool 2) comparison or identity of types <- isinstance 3) a.sort() <- sorted(a) There were two problems that needed to be dealt with after the application of the fixer. First, the replacement of comparison or identity of types by isinstance was not always correct. The isinstance function returns true for subtypes whereas many of the places where the fixer made a substitution needed to check for exact type equality. Second, the sorted function was applied to arrays, but because it treats them as iterators and constructs a sorted list from the result, that is the wrong thing to do. Closes #3062.
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* 2to3: Apply `imports` fixer.Charles Harris2013-04-021-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Use absolute imports.Charles Harris2013-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+2
| | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* 2to3: Apply `sys_exc` fixes. Closes #3086.Charles Harris2013-02-281-1/+1
| | | | | This uses sys.exc_info in place of sys.exc_value. The new function goes back to at least 2002, so should be safe.
* Py3k: make cpuinfo py3k-importable.David Cournapeau2009-12-031-22/+29
|
* ran reindent in preparation for the 1.1 releaseJarrod Millman2008-04-201-2/+2
|
* mimic gcc driver detection for nocona cpu detection.David Cournapeau2008-03-231-1/+1
|
* Fix has_sse3 and add has_ssse3 function for cpuinfo on linux.David Cournapeau2008-03-231-1/+4
|
* Include patch from jsbronder to fix ticket #644 related to nocona cpu detection.David Cournapeau2008-03-221-1/+5
|
* Handle typo (sse3 vs ssse3) in the cpu arch flags as found in /proc/cpuinfo ↵David Cournapeau2008-03-221-1/+1
| | | | for some linux kernels (at least 2.6.23).
* Apply David's patch to fix ticket 653.Charles Harris2008-03-061-20/+10
|
* use 'in' keyword to test dictionary membershipJarrod Millman2007-11-281-1/+1
|
* Update distutils/cpuinfo.pycookedm2007-10-021-171/+155
| | | | | | | | | | | | * convert class names to CamelCase * Add PentiumM to LinuxCPUInfo and Win32CPUInfo. Also add it to SSE2 detection. * remove is_Athlon64() and is_Operton() from Win32CPUInfo, and add is_AMD64(). We can't reliably distinguish between the two (or from other 64-bit Athlons). Also add is_AMD64() to LinuxCPUInfo. * Factor out common command output checking, and remove (most) of the bare try/excepts used in the __init__ methods (exception is Win32CPUInfo; don't know what exceptions could be thrown). Use warnings.warn instead of printing exceptions to stderr
* Remove use of the string module in distutils/cpuinfo.pycookedm2007-10-021-26/+28
|
* Get rid of print statement.Travis Oliphant2007-09-201-1/+0
|
* cpuinfo: Nocona is a PentiumIV, not 686. Fixes #438cookedm2007-03-291-3/+3
|
* Fixed detection of Core2 CPUs (scipy ticket #349)edschofield2007-02-051-2/+7
|
* remove some remaining references to scipy. fixes #428Tim Leslie2007-01-261-1/+1
|
* Add Intel EM64T Fortran Compiler support.Pearu Peterson2006-04-091-1/+1
|
* Applied http://projects.scipy.org/scipy/numpy/ticket/39Pearu Peterson2006-03-311-0/+4
|
* Run reindent.py (script distributed with Python) over the source to remove ↵cookedm2006-03-101-7/+7
| | | | extraneous whitespace
* Moved scipy directory to numpyTravis Oliphant2006-01-041-0/+687