-
Notifications
You must be signed in to change notification settings - Fork 80
Conversation
Motivation: `backends.jsonrpc` was already probably longer than it needed to be. I split up the logic for `JSONRPCDaemon` and `JSONRPCWallet` in order to increase readibility. This will be especially important in the future as more backends are written. In particular, an issue (#73) is currently open which suggests adding MyMonero API support. If this is added, it might be worth also adding the OpenMonero API. Both of these are JSON RPC APIs, but I think it wouldn't necesarily make a lot of sense to put these all into the same file so I went ahead and split the backends up. Also, because of the default backends PR (#79), to the most basic of users, it will matter much less how the backends are named, if you chose to take issue with my naming. I hope this PR is useful for future development! Changes: 1. Moved `JSONRPCDaemon` to `backends.rpcdaemon` 2. Moved `JSONRPCWallet` to `backends.rpcwallet` 3. Moved `jsonrpc` exceptions to `backends.rpcexceptions` 4. `monero.backends.jsonrpc` now only imports the backends and exceptions 5. Edited test files accordingly Notes: * This change is backwards compatible
Sorry about all the PR confusion, git merges are hard apparently ;). This is the one I'm requesting at the moment. |
Splitting the file is a good idea but you also have introduced backward-incompatible namespace change. All module users would have to modify their imports. The backend coul still live under |
Sorry if I do not understand but I'm 90% sure that this change is backwards compatible unless there is something I missed. Any library user can still import
This is because
|
We may have two different approaches there:
IIUC, you have chosen the latter option. However, I find that solution a bit confusing and I think it pollutes namespace under |
#82 shows what I mean by variant 1. |
Yeah that seems to accomplish the same goal while being cleaner. I like it !
…On Tue, Jan 19, 2021 at 19:16 Michał Sałaban ***@***.***> wrote:
#82 <#82> shows
what I mean by variant 1.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#81 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSWLOWX5HUZZAA2JEASZZTS2YVFPANCNFSM4WIMEVAA>
.
|
Good, I'm closing it then. |
Motivation:
backends.jsonrpc
was already probably longer than it needed to be. I splitup the logic for
JSONRPCDaemon
andJSONRPCWallet
in order to increase readibility.This will be especially important in the future as more backends are written.
In particular, an issue (#73) is currently open which suggests adding MyMonero
API support. If this is added, it might be worth also adding the OpenMonero API.
Both of these are JSON RPC APIs, but I think it wouldn't necesarily make a lot
of sense to put these all into the same file so I went ahead and split the backends
up. Also, because of the default backends PR (#79), to the most basic of users, it
will matter much less how the backends are named, if you chose to take issue with
my naming. I hope this PR is useful for future development!
Changes:
1. Moved
JSONRPCDaemon
tobackends.rpcdaemon
2. Moved
JSONRPCWallet
tobackends.rpcwallet
3. Moved
jsonrpc
exceptions tobackends.rpcexceptions
4.
monero.backends.jsonrpc
now only imports the backends and exceptions5. Edited test files accordingly
Notes:
* This change is backwards compatible