facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

Get Buck working for 3.10 (backport to main) #2697

Closed bigfootjon closed 2 years ago

bigfootjon commented 2 years ago

Cherry-picked from https://github.com/facebook/buck/commit/1ae1e6c078255529930a31e49f55e5bfff7b9d3f (#2696)

Fixes: https://github.com/facebook/buck/issues/2678

Test plan:

I ran buck for a personal project that uses py3.10 syntax (Foo | None) and it was able to build and run correctly

Original commit message:

On 3.10 some collections classes have been moved to collections.abc and it causes Buck 1 to crash. This diff fixes those instances.

Really pex should be upgraded, but I made an attempt and it was very difficult due to our custom changes to pex.

Reviewed By: bigfootjon

fbshipit-source-id: 15a7bb96e664d5169b12de09e9157571782c861f