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

python3.10 gpy SyntaxWarning (literal with is) #1023

Open
DaanVanVugt opened this issue Jul 20, 2023 · 2 comments
Open

python3.10 gpy SyntaxWarning (literal with is) #1023

DaanVanVugt opened this issue Jul 20, 2023 · 2 comments
Labels
qol quality of life

Comments

@DaanVanVugt
Copy link

DaanVanVugt commented Jul 20, 2023

Hi, I'm encountering the following warning (turned error by our CI) with python3.9 and python3.10 (did not check others)

run_bq.py:10: in
import GPy
/app/.venv/lib/python3.10/site-packages/GPy/init.py:6: in
from . import core
/app/.venv/lib/python3.10/site-packages/GPy/core/init.py:49: in
from .gp import GP
/app/.venv/lib/python3.10/site-packages/GPy/core/gp.py:9: in
from .. import kern
/app/.venv/lib/python3.10/site-packages/GPy/kern/init.py:63: in
from .src.symmetric import Symmetric
E File "/app/.venv/lib/python3.10/site-packages/GPy/kern/src/symmetric.py", line 56
E if symmetry_type is 'odd':
E ^^^^^^^^^^^^^^^^^^^^^^
E SyntaxError: "is" with a literal. Did you mean "=="?

Note that to reproduce I need to remove the .pyc file generated

@DaanVanVugt DaanVanVugt changed the title python3.10 gpy SyntaxError (literal with is) python3.10 gpy SyntaxWarning (literal with is) Jul 20, 2023
@MartinBubel MartinBubel added the qol quality of life label Oct 4, 2023
@MartinBubel
Copy link
Contributor

Thanks for pointing this out!

We will consider this as a quality of life improvement in an upcoming release.

Would you be interested in doing a PR?

@DaanVanVugt
Copy link
Author

Hi Martin, Thanks for considering. I don't have time to make a PR for this unfortunately, sorry.

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

No branches or pull requests

2 participants