summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Troisi <sethtroisi@google.com>2020-01-23 20:24:01 -0800
committerSebastian Berg <sebastian@sipsolutions.net>2020-01-23 20:24:01 -0800
commit31e53bfddef063eba9c023999f8e5923a608ba71 (patch)
tree16f5d016d2b554b26ea61f872d55b7f31a240ac9
parent68224f43d09393c1981bb83ee3c13a5158d2817c (diff)
downloadnumpy-31e53bfddef063eba9c023999f8e5923a608ba71.tar.gz
MAINT: Revert f2py Python 2.6 workaround (gh-15415)
Revert ed916ff#diff-c9eccf467e5f6561061d6a5ac4730330 which was needed to workaround http://bugs.python.org/issue4720 which was fixed 12 years ago.
-rwxr-xr-xnumpy/f2py/f2py2e.py2
-rwxr-xr-xnumpy/f2py/rules.py12
2 files changed, 2 insertions, 12 deletions
diff --git a/numpy/f2py/f2py2e.py b/numpy/f2py/f2py2e.py
index a6751154b..9707d6f7d 100755
--- a/numpy/f2py/f2py2e.py
+++ b/numpy/f2py/f2py2e.py
@@ -169,7 +169,7 @@ Extra options (only effective with -c):
Version: %s
numpy Version: %s
-Requires: Python 2.3 or higher.
+Requires: Python 3.5 or higher.
License: NumPy license (see LICENSE.txt in the NumPy source code)
Copyright 1999 - 2011 Pearu Peterson all rights reserved.
http://cens.ioc.ee/projects/f2py2e/""" % (f2py_version, numpy_version)
diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py
index 459c87aa3..14d6dd8f2 100755
--- a/numpy/f2py/rules.py
+++ b/numpy/f2py/rules.py
@@ -276,7 +276,7 @@ static PyObject *#apiname#(const PyObject *capi_self,
f2py_start_clock();
#endif
\tif (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\\
-\t\t\"#argformat##keyformat##xaformat#:#pyname#\",\\
+\t\t\"#argformat#|#keyformat##xaformat#:#pyname#\",\\
\t\tcapi_kwlist#args_capi##keys_capi##keys_xa#))\n\t\treturn NULL;
#frompyobj#
/*end of frompyobj*/
@@ -1445,16 +1445,6 @@ def buildapi(rout):
['\\begin{description}'] + rd[k][1:] +\
['\\end{description}']
- # Workaround for Python 2.6, 2.6.1 bug: https://bugs.python.org/issue4720
- if rd['keyformat'] or rd['xaformat']:
- argformat = rd['argformat']
- if isinstance(argformat, list):
- argformat.append('|')
- else:
- assert isinstance(argformat, str), repr(
- (argformat, type(argformat)))
- rd['argformat'] += '|'
-
ar = applyrules(routine_rules, rd)
if ismoduleroutine(rout):
outmess('\t\t\t %s\n' % (ar['docshort']))