Skip to content

Conversation

jdemeyer
Copy link
Contributor

Get rid of the warning

UserWarning: got unknown compilation option, please remove: cache

when calling cythonize(..., cache=something).

@robertwb
Copy link
Contributor

@jdemeyer
Copy link
Contributor Author

Wouldn't that require changing https://github.com/jdemeyer/cython/blob/a712a4904e4836a49caf56317a67284942417acb/Cython/Build/Dependencies.py#L883 as well?

I don't see why because it also goes through CompilationOptions and CompilationOptions.__init__ now deals with the cache option just fine.

@robertwb
Copy link
Contributor

I was thinking that it could be set, but equal to None. But looks like we have a special case for this at

elif options['cache'] in (False, None):
(though ugly).

@robertwb robertwb merged commit 0fe4f39 into cython:master Sep 28, 2016
sageb0t pushed a commit to sagemath/sage-archive-2023-02-01 that referenced this pull request Oct 21, 2016
In `src/setup.py`, we should not run `cythonize()` manually. It would be
better to use a custom `build_ext` command for that.

This is inspired by the `build_ext` from Cython 0.25: https://github.com
/cython/cython/blob/master/Cython/Distutils/build_ext.py
Unfortunately, we cannot really use that since it doesn't allow to pass
options to `cythonize()`.

Due to a [cython/cython#1476 Cython bug], this
warning gets displayed even though the `cache` option is valid:
{{{UserWarning: got unknown compilation option, please remove: cache}}}.

URL: https://trac.sagemath.org/21600
Reported by: jdemeyer
Ticket author(s): Jeroen Demeyer
Reviewer(s): Matthias Koeppe, Erik Bray
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.

2 participants