The problem is that the first implementation of WithItemBuilder that you linked makes use of features of the ast module that were introduced in python3.8. The second one should be compatible with 3.8 as well as older versions and was introduced because of a previous bug report that WithItemBuilder did not work in 3.6.