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

Free-threaded support? #2303

Open
clin1234 opened this issue Jun 23, 2024 · 5 comments
Open

Free-threaded support? #2303

clin1234 opened this issue Jun 23, 2024 · 5 comments

Comments

@clin1234
Copy link
Contributor

Has anyone here given thought on testing this module with the no-GIL version of the Python interpreter yet?

@mhammond
Copy link
Owner

I'm not aware of anyone looking at this. It's worth noting that there are quite a few places where the GIL is used to prevent concurrent access, so identifying these seems like the first step.

@Avasam
Copy link
Collaborator

Avasam commented Jun 24, 2024

As far as CI builds go, actions/setup-python#771 would be nice. But if it's somehow not available by the time pywin32 has nogil support, deadsnakes already offer a nogil python action: https://github.com/deadsnakes/action

@clin1234
Copy link
Contributor Author

As far as CI builds go, actions/setup-python#771 would be nice. But if it's somehow not available by the time pywin32 has nogil support, deadsnakes already offer a nogil python action: https://github.com/deadsnakes/action

deadsnakes is only tested on Ubuntu

@Avasam
Copy link
Collaborator

Avasam commented Oct 12, 2024

As far as CI builds go, actions/setup-python#771 would be nice.

It's also possible uv gets to it first: astral-sh/uv#7193

@Avasam
Copy link
Collaborator

Avasam commented Oct 14, 2024

Here's a workflow manually installing Python 3.13t: #2395
It builds, but as expected, tests don't get very far:

--- Running 'D:\a\pywin32\pywin32\win32/test/testall.py' ---
*** Test script 'D:\a\pywin32\pywin32\win32/test/testall.py' exited with 3221225477
--- Running 'D:\a\pywin32\pywin32\Pythonwin/pywin/test/all.py' ---
Fatal Python error: PyWinInterpreterState_Ensure: pywintypes: can not setup interpreter state, as current state is invalid
Python runtime state: unknown

*** Test script 'D:\a\pywin32\pywin32\Pythonwin/pywin/test/all.py' exited with 3221226505
--- Running 'D:\a\pywin32\pywin32\com\win32com\test\testall.py' ---
*** Test script 'D:\a\pywin32\pywin32\com\win32com\test\testall.py' exited with 3221225477
The following scripts failed
> D:\a\pywin32\pywin32\win32/test/testall.py
> D:\a\pywin32\pywin32\Pythonwin/pywin/test/all.py
> D:\a\pywin32\pywin32\com\win32com\test\testall.py

This is unfortunately not something I'll be able to provide much help with. Contributions are more than welcome !

@Avasam Avasam pinned this issue Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants