Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing parentheses for python 3.10 compatibility #190

Merged
merged 1 commit into from Sep 19, 2021
Merged

Add missing parentheses for python 3.10 compatibility #190

merged 1 commit into from Sep 19, 2021

Conversation

jamesjer
Copy link
Contributor

With python 3.10a6, the cvxopt build has started to fail, with errors such as this:

In file included from /usr/include/python3.10/Python.h:87,
                 from src/C/base.c:24:
src/C/base.c: In function ‘get_id’:
/usr/include/python3.10/object.h:242:38: error: expected ‘(’ before ‘_PyObject_TypeCheck’
  242 | #define PyObject_TypeCheck(ob, type) _PyObject_TypeCheck(_PyObject_CAST(ob), type)
      |                                      ^~~~~~~~~~~~~~~~~~~
src/C/cvxopt.h:73:28: note: in expansion of macro ‘PyObject_TypeCheck’
   73 | #define Matrix_Check(self) PyObject_TypeCheck(self, &matrix_tp)
      |                            ^~~~~~~~~~~~~~~~~~
src/C/base.c:356:8: note: in expansion of macro ‘Matrix_Check’
  356 |     if Matrix_Check((PyObject *)val)
      |        ^~~~~~~~~~~~
src/C/base.c:371:1: warning: control reaches end of non-void function [-Wreturn-type]
  371 | }
      | ^
error: command '/usr/bin/gcc' failed with exit code 1

Reminiscent of #164, the cause is an if expression that used to expand to a parenthesized expression, but no longer does.

@mkoeppe
Copy link

mkoeppe commented Sep 16, 2021

@martinandersen Any chance that this can be merged and a new release compatible with python 3.10 be cut?

sageb0t pushed a commit to sagemath/sagetrac-mirror that referenced this pull request Sep 16, 2021
sageb0t pushed a commit to sagemath/sagetrac-mirror that referenced this pull request Sep 16, 2021
@orlitzky
Copy link

FWIW the tentative python-3.10 release date is about three weeks from now: https://www.python.org/dev/peps/pep-0619/

@martinandersen
Copy link
Contributor

@mkoeppe Sure, I'll see if I can get to it on Monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants