For background see FreeCAD/FreeCAD#25810
The Addon Manager calls pip with a predefined timeout. This is problematic for several reasons:
- The main mechanism for doing the update does not update the UI with any kind of indication that it's still going, and the timeout is now very long.
- It's not cancellable by the user, even though the underlying call is, so it could be.
- On Windows, when the
pip --upgrade call is terminated by a timeout, it deletes the contents of the target directory. So we need to make a backup before beginning. This would be a good idea anyway, so if the upgrade fails it can be dealt with.