I had the same issue when updating my system.
sudo pacman -Syu
I tried removing python-gast.
sudo pacman -R python-gast
I was told that python-tensorflow-opt-cuda was dependent on that package. So, I updated it.
sudo pacman -S python-tensorflow-opt-cuda
It replaced gast with gast03 at that point. Then, I could do a system update.
sudo pacman -Syu
Everything worked as expected after that.