The client keeps a variable server_version, which is initialised once with a call to self.get_versions().
After FlexMeasures/flexmeasures#2020, the server will send version information with each response.
Update server_version with this after each call (and log detected server version changes to the command line).
This should simply make all version checks use up-to-date information.
I believe that self.ensure_server_version() is not necessary anymore, and calls to it can also be removed (it is called 3 times, only to perfom a version check to see if a feature is supported). self.get_versions() is only used there, and I advocate to remove it, too, but we can keep it around.
The client keeps a variable
server_version, which is initialised once with a call toself.get_versions().After FlexMeasures/flexmeasures#2020, the server will send version information with each response.
Update
server_versionwith this after each call (and log detected server version changes to the command line).This should simply make all version checks use up-to-date information.
I believe that
self.ensure_server_version()is not necessary anymore, and calls to it can also be removed (it is called 3 times, only to perfom a version check to see if a feature is supported).self.get_versions()is only used there, and I advocate to remove it, too, but we can keep it around.