Skip to content

Commit 41b6ac0

Browse files
authored
Merge pull request numpy#21558 from bsipocz/python36_37_cleanup
MAINT: Python <3.8 related cleanups
2 parents 4a2751c + 22afd8c commit 41b6ac0

22 files changed

+62
-145
lines changed

INSTALL.rst.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Prerequisites
1414

1515
Building NumPy requires the following installed software:
1616

17-
1) Python__ 3.7.x or newer.
17+
1) Python__ 3.8.x or newer.
1818

1919
Please note that the Python development headers also need to be installed,
2020
e.g., on Debian/Ubuntu one needs to install both `python3` and
2121
`python3-dev`. On Windows and macOS this is normally not an issue.
2222

23-
2) Cython >= 0.29.30
23+
2) Cython >= 0.29.30 but < 3.0
2424

25-
3) pytest__ (optional) 1.15 or later
25+
3) pytest__ (optional)
2626

2727
This is required for testing NumPy, but not for using it.
2828

azure-pipelines.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -299,31 +299,3 @@ stages:
299299
testResultsFiles: '**/test-*.xml'
300300
failTaskOnFailedTests: true
301301
testRunTitle: 'Publish test results for conda installation'
302-
303-
304-
#- job: Linux_gcc48
305-
#pool:
306-
## ubuntu-20.04 does not provide a gcc-4.8 package
307-
#vmImage: 'ubuntu-18.04'
308-
#steps:
309-
#- script: |
310-
#sudo apt update
311-
#sudo apt install python3.7
312-
#sudo apt install python3.7-dev
313-
#if ! `gcc-4.8 2>/dev/null`; then
314-
#sudo apt install gcc-4.8
315-
#fi
316-
#displayName: 'add gcc 4.8'
317-
#- script: |
318-
## python3 has no setuptools, so install one to get us going
319-
#python3.7 -m pip install --user --upgrade pip 'setuptools<49.2.0'
320-
#python3.7 -m pip install --user -r test_requirements.txt
321-
#CPPFLAGS='' CC=gcc-4.8 F77=gfortran-5 F90=gfortran-5 \
322-
#python3.7 runtests.py --debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml
323-
#displayName: 'Run gcc4.8 Build / Tests'
324-
#- task: PublishTestResults@2
325-
#condition: succeededOrFailed()
326-
#inputs:
327-
#testResultsFiles: '**/test-*.xml'
328-
#failTaskOnFailedTests: true
329-
#testRunTitle: 'Publish test results for gcc 4.8'

azure-steps-windows.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,6 @@ steps:
7272
}
7373
displayName: 'Build NumPy'
7474

75-
- bash: |
76-
pushd . && cd .. && target=$(python -c "import numpy, os; print(os.path.abspath(os.path.join(os.path.dirname(numpy.__file__), '.libs')))") && popd
77-
python -m pip download -d destination --only-binary :all: --no-deps numpy==1.14
78-
cd destination && unzip numpy*.whl && cp numpy/.libs/*.dll $target
79-
ls $target
80-
displayName: 'Add extraneous & older DLL to numpy/.libs to probe DLL handling robustness'
81-
condition: eq(variables['PYTHON_VERSION'], '3.6')
82-
- script: pushd . && cd .. && python -c "from ctypes import windll; windll.kernel32.SetDefaultDllDirectories(0x00000800); import numpy" && popd
83-
displayName: 'For gh-12667; Windows DLL resolution'
84-
condition: eq(variables['PYTHON_VERSION'], '3.6')
85-
8675
- script: python runtests.py -n --show-build-log --mode=$(TEST_MODE) -- -rsx --junitxml=junit/test-results.xml
8776
displayName: 'Run NumPy Test Suite'
8877

doc/HOWTO_RELEASE.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ What is released
153153

154154
Wheels
155155
------
156-
We currently support Python 3.6-3.8 on Windows, OSX, and Linux
156+
We currently support Python 3.8-3.10 on Windows, OSX, and Linux
157157

158158
* Windows: 32-bit and 64-bit wheels built using Appveyor;
159159
* OSX: x64_86 OSX wheels built using travis-ci;

doc/source/dev/development_environment.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ That also takes extra arguments, like ``--pdb`` which drops you into the Python
194194
debugger when a test fails or an exception is raised.
195195

196196
Running tests with `tox`_ is also supported. For example, to build NumPy and
197-
run the test suite with Python 3.7, use::
197+
run the test suite with Python 3.9, use::
198198

199-
$ tox -e py37
199+
$ tox -e py39
200200

201201
For more extensive information, see :ref:`testing-guidelines`
202202

doc/source/f2py/code/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
1414
)
1515
endif()
1616

17-
# Grab Python, 3.7 or newer
18-
find_package(Python 3.7 REQUIRED
17+
# Grab Python, 3.8 or newer
18+
find_package(Python 3.8 REQUIRED
1919
COMPONENTS Interpreter Development.Module NumPy)
2020

2121
# Grab the variables from a local Python installation

doc/source/f2py/code/CMakeLists_skbuild.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ endif()
1717

1818
# Ensure scikit-build modules
1919
if (NOT SKBUILD)
20-
find_package(PythonInterp 3.7 REQUIRED)
20+
find_package(PythonInterp 3.8 REQUIRED)
2121
# Kanged --> https://github.com/Kitware/torch_liberator/blob/master/CMakeLists.txt
2222
# If skbuild is not the driver; include its utilities in CMAKE_MODULE_PATH
2323
execute_process(

doc/source/user/absolute_beginners.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ followed by the docstring of ``ndarray`` of which ``a`` is an instance):
13441344
Type: ndarray
13451345
String form: [1 2 3 4 5 6]
13461346
Length: 6
1347-
File: ~/anaconda3/lib/python3.7/site-packages/numpy/__init__.py
1347+
File: ~/anaconda3/lib/python3.9/site-packages/numpy/__init__.py
13481348
Docstring: <no docstring>
13491349
Class docstring:
13501350
ndarray(shape, dtype=float, buffer=None, offset=0,

doc/source/user/basics.rec.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,14 @@ summary they are:
146146

147147
4. A dictionary of field names
148148

149-
The use of this form of specification is discouraged, but documented here
150-
because older numpy code may use it. The keys of the dictionary are the
151-
field names and the values are tuples specifying type and offset::
149+
The keys of the dictionary are the field names and the values are tuples
150+
specifying type and offset::
152151

153152
>>> np.dtype({'col1': ('i1', 0), 'col2': ('f4', 1)})
154153
dtype([('col1', 'i1'), ('col2', '<f4')])
155154

156-
This form is discouraged because Python dictionaries do not preserve order
157-
in Python versions before Python 3.6, and the order of the fields in a
158-
structured dtype has meaning. :ref:`Field Titles <titles>` may be
155+
This form was discouraged because Python dictionaries did not preserve order
156+
in Python versions before Python 3.6. :ref:`Field Titles <titles>` may be
159157
specified by using a 3-tuple, see below.
160158

161159
Manipulating and Displaying Structured Datatypes

numpy/core/tests/test_deprecations.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,6 @@ def test_non_exact_match(self):
613613

614614
class TestDeprecatedGlobals(_DeprecationTestCase):
615615
# 2020-06-06
616-
@pytest.mark.skipif(
617-
sys.version_info < (3, 7),
618-
reason='module-level __getattr__ not supported')
619616
def test_type_aliases(self):
620617
# from builtins
621618
self.assert_deprecated(lambda: np.bool(True))

0 commit comments

Comments
 (0)