black-playground icon indicating copy to clipboard operation
black-playground copied to clipboard

Use Python 3.10 in the playground

Open isidentical opened this issue 3 years ago • 5 comments
trafficstars

It seems like the project is still using 3.8, but it is causing some problems when experimenting with new syntax. I wonder whether we can bump it to Python 3.10?

isidentical avatar Jan 19 '22 08:01 isidentical

Can easily bump today to 3.9 since its a supported lambda runtime. 3.10 would require a custom docker image and I most likely wouldnt get to it for a bit.

jpadilla avatar Jan 19 '22 14:01 jpadilla

That works, 3.10 would be also important for the new users of pattern matching but it is not urgent at all. Thanks!

isidentical avatar Jan 19 '22 14:01 isidentical

done in https://github.com/jpadilla/black-playground/commit/97bf2f50439d1568b965bfceef0f2d36a1a92210

jpadilla avatar Jan 19 '22 16:01 jpadilla

black running on 3.9 cannot format code with Python 3.10's pattern matching syntax as discussed in https://github.com/psf/black/issues/2242#issuecomment-1372350750.

Is there any change 3.10 is a supported lambda runtime by now?

ilyagr avatar Mar 02 '23 00:03 ilyagr

I found that checking "Skip temporary sanity checks." makes the playground format Python code with match statements. I'm not sure if that formatting is what it's supposed to be, but it worked well enough for me.

ilyagr avatar Mar 07 '23 03:03 ilyagr