-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLN: Start definition of Backend API, and implement version #2883
Conversation
|
@jreback if you don't mind prioritizing this one, this is blocking me from finishing the stuff for the release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks generally ok
|
@jreback whenever you've got time, would be great if you can check my comments. I think this should be ready, and it's blocking me from continuing with clarifying the API for the backends. Thanks! |
|
thanks @datapythonista prob should add a release note about the version string change next time. |
Good point, added it in #2895, thanks for merging anyway. |
xref #2678
First step towards defining the Backend API properly with abstract methods (Backend will replace Client).
To make PRs small, I define a first set of methods that Backend/Client must have, and so far I implement version.
To be able to do this step by step, I move the implementation from Client to Backend, and I created the property in the base Client, calling the Backend implementation. Eventually,
connectwill returnBackendinstead ofClient, and Client will be removed.I'm making a backward-incompatible change here, returning version as a string, instead of a setuptools object. I think this will match user expactations, since libraries rarely parse it (i.e.
any_library.__version__) and it will also make our life easier with type annotations (setuptools have different version objects that can be returned).