Before I could learn my password and type it on twine. If my machine was stolen no upload on pypi was possible.
Now it's a token file on my disk so if my machine is stolen, then token can be used to publish.
Using github to publish doesn't change anything: if my machine is stolen the token needed to publish is still there, but instead of directly to pypi it will need to go via github first.
Not the way they implement things. When they started forcing people to use 2FA, google also made a titan keys giveaway. But you set it up on your account, generate a token and that's it.
Identical situation on github. Setup 2FA with an hardware key, then generate a token and never use the hardware key ever again.
But they didn't touch twine at all. They just made me create a token and save it in a .txt file. That's it.