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

COMPAT: cpow=True for Cython >= 3.0 compatibility #8961

Closed
wants to merge 1 commit into from

Conversation

ChadFulton
Copy link
Member

These relatively minor changes allowed local compilation with Python 3.11 / Cython 3.0.0. Will be interesting to see if CI passes.

@hroncok
Copy link

hroncok commented Dec 11, 2023

I am testing this in Fedora and I've noticed a lot of:

performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:83:5: Exception check on 'shamilton_filter_log_iteration' will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:231:5: Exception check on 'dhamilton_filter_log_iteration' will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:379:5: Exception check on 'chamilton_filter_log_iteration' will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:527:5: Exception check on 'zhamilton_filter_log_iteration' will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:71:42: Exception check will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:219:42: Exception check will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:362:32: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:365:26: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:367:42: Exception check will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:425:22: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:428:18: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:451:14: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:452:41: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:510:32: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:513:26: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:515:42: Exception check will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:573:22: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:576:18: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:599:14: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_hamilton_filter.pyx:600:41: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:56:5: Exception check on 'skim_smoother_log_iteration' will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:155:5: Exception check on 'dkim_smoother_log_iteration' will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:254:5: Exception check on 'ckim_smoother_log_iteration' will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:353:5: Exception check on 'zkim_smoother_log_iteration' will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:46:39: Exception check will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:145:39: Exception check will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:244:39: Exception check will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:312:20: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:315:18: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:343:39: Exception check will always require the GIL to be acquired.
Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:411:20: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
performance hint: statsmodels/tsa/regime_switching/_kim_smoother.pyx:414:18: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

Seem like this is worth considering before switching to cython 3.

@bashtage
Copy link
Member

These are all fixed in the main branch, and will be out in the next release.

@bashtage bashtage closed this Dec 11, 2023
@hroncok
Copy link

hroncok commented Dec 11, 2023

I see, in #9078

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

Successfully merging this pull request may close these issues.

Compilation failures with Cython 3.0
3 participants