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

PyJQ: Migrate Cython 0.29 -> 3.0 #1439

Closed
mfeit-internet2 opened this issue Jun 12, 2024 · 2 comments
Closed

PyJQ: Migrate Cython 0.29 -> 3.0 #1439

mfeit-internet2 opened this issue Jun 12, 2024 · 2 comments
Assignees

Comments

@mfeit-internet2
Copy link
Member

PyJQ has problems with Cython 3.0 on u24:

cython3 -I/usr/include/python3.12 -I/usr/include/python3.12 _pyjq.pyx

Error compiling Cython file:
------------------------------------------------------------
...
    def __init__(self, const char* script, vars={}, library_paths=[]):
        self._errors = []
        self._jq = jq_init()
        if not self._jq:
            raise RuntimeError('Failed to initialize jq')
        jq_set_error_cb(self._jq, Script_error_cb, <void*>self)
                                  ^
------------------------------------------------------------

_pyjq.pyx:176:34: Cannot assign type 'void (void *, jv) except *' to 'jq_err_cb'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (void *, jv) except *'.

Already have a patch for this, need to check if it breaks d11/d12/u20 and probably EL.

See https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html#exception-values-and-noexcept

@mfeit-internet2
Copy link
Member Author

Added a patch and it works on all versions:

U24: Cython 3.0.8 - Build OK Run OK
U22: Cython 0.29 - Build OK Run OK
U20: Cython 0.29 - Build OK Run OK
D12: Cython 0.29 - Build OK Run OK
D11: Cython 0.29 - Build OK Run OK
EL9: Cython 0.29 - Build OK Run OK
OL8: Cython 0.29 - Build OK Run OK

@mfeit-internet2
Copy link
Member Author

This was fixed and merged.

@github-project-automation github-project-automation bot moved this from Ready to Done in perfSONAR Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

1 participant