DEV Community

Chris White
Chris White

Posted on

Python Looking Towards Potential No GIL Future

A Python Steering Council announcement hit today discussing a potential No-GIL future. The removal of GIL is certainly not a simple task. However, if all works out it would help in cases where performance could be an issue.

It's Not Guaranteed

Before the crowd applauds that the GIL is finally gone it's not a hard guarantee. As the announcement notes:

"We want to be able to change our mind if it turns out, any time before we make no-GIL the default, that it’s just going to be too disruptive for too little gain. Such a decision could mean rolling back all of the work, so until we’re certain we want to make no-GIL the default, code specific to no-GIL should be somewhat identifiable."

Given big Python is this is very understandable. There are many people who use it for automation and even as part of functions as a service builds (ala AWS Lambda). Having that suddenly not work would be very detrimental to the language as a whole.

Experimental Builds

The first steps talk about it being in an experimental phase:

"Short term, we add the no-GIL build as an experimental build mode, presumably in 3.13 (if it slips to 3.14, that is not a problem). We want the build mode to be experimental to make it clear that while the core devs support that build mode, we can’t expect the community to support it outright."

Personally I'll be interested to see how it plays out and maybe run some benchmarking on a socket server threaded server to see how things work out load wise. Then I might check out how it builds with various pip packages to test the waters a bit. Sometimes things that take a good amount of effort to fix feel the most rewarding!

Conclusion

I really think that this is an excellent step forward. Even if things don't work out at least we'll have documentation on what went wrong. Then who knows, someone might overcome that in the future and make it doable. It's important to remember though that Python is a pretty decent sized language so things will take time. More time will be needed as well to handle the wide variety of community packages. Excited to see what the future holds!

Top comments (0)