Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disable limited API for free-threaded Python#1051

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
rostan-t wants to merge1 commit intoopencv:4.x
base:4.x
Choose a base branch
Loading
fromrostan-t:ft-python-limited-api

Conversation

@rostan-t
Copy link

@rostan-trostan-t commentedNov 29, 2024
edited
Loading

Free-threaded Python does not support the Limited C API.1

This PR should make it possible to build OpenCV wheels for Python 3.13t (#1029).

Footnotes

  1. https://docs.python.org/3/howto/free-threading-extensions.html#limited-c-api-and-stable-abi

mgrinshpon reacted with thumbs up emoji
@rostan-t
Copy link
Author

With this change, I was able to build a wheel for free-threaded Python with bothpip wheel . andpython setup.py bdist_wheel. It works with Python 3.13.2t, and I also tested it with older versions.

Is there any additional information I can provide to help move this forward?

@wk-xbkaishui
Copy link

hello, how to run the build process

@rostan-t
Copy link
Author

hello, how to run the build process

This PR allows installing the library for free-threaded Python the same way as any version. This can be done like this:

pip install git+https://github.com/rostan-t/opencv-python.git@ft-python-limited-api

I can confirm that it works on x86_64 Linux but I haven't tried on other platforms.

JiaPai12138 reacted with thumbs up emoji

@rostan-t
Copy link
Author

Hi@sergregory, just checking in. Is there any more information I can provide to help move this forward? Thanks!

Copy link

@rgommersrgommers left a comment

Choose a reason for hiding this comment

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

This PR is correct, and merging it as is will prevent a build failure. By itself this PR doesn't make free-threaded Python supported but it's helpful to unblock other improvements, and cannot hurt. I recommend hitting the green button here.

@rgommers
Copy link

@asmorkalov sorry for the direct ping, but it would be really helpful if you could merge this one-liner fix - it avoids a build failure, and makes it possible to install directly from the default branch (or an sdist after the next release) in the absence of wheels for free-threaded Python.

asmorkalov reacted with eyes emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@rgommersrgommersrgommers approved these changes

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

@sergregorysergregory

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@rostan-t@wk-xbkaishui@rgommers@sergregory

[8]ページ先頭

©2009-2025 Movatter.jp