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

setup.py: explicitly specify cython's language_level #52

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

tchaikov
Copy link
Contributor

this series restructures get_extensions(), and also silences the warning like:

/tmp/build-env-p23crgfa/lib64/python3.11/site-packages/Cython/Compiler/Main.py:384: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/kefu/dev/scylladb/tools/cqlsh/cqlshlib/copyutil.py
  tree = Parsing.p_module(s, pxd, full_module_name)

and void not in condition expression, for better readability.

Signed-off-by: Kefu Chai <[email protected]>
less indent, for better readability.

Signed-off-by: Kefu Chai <[email protected]>
according to Cython document, the first parameter passed to
`cythonize()` should be "a glob pattern, a list of glob patterns or
a list of Extension objects". so let's pass a list of Extensions
instead of a single instance of `Extension`.

Signed-off-by: Kefu Chai <[email protected]>
to silence the warning of
```
/tmp/build-env-p23crgfa/lib64/python3.11/site-packages/Cython/Compiler/Main.py:384: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/kefu/dev/scylladb/tools/cqlsh/cqlshlib/copyutil.py
  tree = Parsing.p_module(s, pxd, full_module_name)
```

"3str" is the new default. so this change has no impact on the
cythonized python code. with this option, the unprefixed strings
are considered "str" objects. for more details, please see
https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html#python-3-syntax-semantics

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov tchaikov requested a review from fruch September 14, 2023 02:29
@tchaikov
Copy link
Contributor Author

@fruch hi Israel, could you help review this change as well?

Copy link
Collaborator

@fruch fruch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fruch fruch merged commit e651e12 into scylladb:master Sep 14, 2023
7 checks passed
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