zope.interface icon indicating copy to clipboard operation
zope.interface copied to clipboard

feat: Do not use C speedups on Python 3.13+ freethreading

Open mgorny opened this issue 1 year ago • 5 comments

Do not enable C speedups by default if running Python 3.13+ in freethreading mode (with GIL disabled). Since the extension does not support this mode explicitly at the moment, loading it would cause CPython to reenable GIL with a warning and penalize the whole environment.

Discussed in issue #330.


I've signed the CLA today, but I suppose it will take some time for it to be processed.

mgorny avatar Oct 19 '24 14:10 mgorny

@tseaver @davisagli I thought that the refactoring of the C code was done to support free threading. Am I wrong here?

icemac avatar Oct 22 '24 06:10 icemac

@icemac That's my understanding too. I'll need to find some time to look more closely and see if we just need to declare now that we support it, or if more changes are also needed.

davisagli avatar Oct 22 '24 16:10 davisagli

@davisagli

I'll need to find some time to look more closely and see if we just need to declare now that we support it, or if more changes are also needed. (notes move to #332).

tseaver avatar Oct 22 '24 17:10 tseaver

My CLA has just been approved. Should this be merged then, or should I close it pending proper FT support?

mgorny avatar Oct 23 '24 10:10 mgorny

Michał Górny wrote at 2024-10-23 03:07 -0700:

My CLA has just been approved. Should this be merged then, or should I close it pending proper FT support?

I got the impression that Tres and David are interested in full FT support. Maybe, it will be available soon.

I would say we delay the merging for some time waiting if FT support will arive soon. If this should not happen, we can merge in a few weeks.

d-maurer avatar Oct 23 '24 10:10 d-maurer