Skip to content

Commit

Permalink
MAINT: Revert f2py Python 2.6 workaround (numpygh-15415)
Browse files Browse the repository at this point in the history
Revert ed916ff#diff-c9eccf467e5f6561061d6a5ac4730330 which was needed to workaround http://bugs.python.org/issue4720 which was fixed 12 years ago.
  • Loading branch information
sethtroisi authored and seberg committed Jan 24, 2020
1 parent 68224f4 commit 31e53bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion numpy/f2py/f2py2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
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)
Expand Down
12 changes: 1 addition & 11 deletions numpy/f2py/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
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*/
Expand Down Expand Up @@ -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']))
Expand Down

0 comments on commit 31e53bf

Please sign in to comment.