mitya57 / secretstorage

Python bindings to Freedesktop.org Secret Service API
https://secretstorage.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
116 stars 21 forks source link

Support other Jeepney I/O options? #25

Open takluyver opened 4 years ago

takluyver commented 4 years ago

Hi @mitya57 :slightly_smiling_face:

As you know, SecretStorage is probably the biggest user of Jeepney. One aim of Jeepney is to decouple the structure of messages from sending and receiving data. It should be possible to define the methods for something like the secrets service in a way that can easily be used with different I/O options, like asyncio or Trio.

Would you be interested in exploring what this might look like for SecretStorage? I don't have a specific use case that needs it, but I'd be interested to see how well the principle works in a real module.

mitya57 commented 4 years ago

Hi!

I'm all for it — but I don't have much time, nor a use case that needs it. The biggest user of SecretStorage is Python-Keyring, and that library doesn't have any asynchronous API.

If I were writing SecretStorage from scratch (using Jeepney), I would probably design API in such a way that one can use it with different I/O options. But the current API was designed when it was using dbus-python, and then I ported from that to Jeepney trying to remain compatible.

So let's keep this issue open. If someone chimes in and says that they have a use case for SecretStorage with a different I/O option, I will try to implement it.

takluyver commented 4 years ago

That makes sense - compatibility is definitely important for something like this, and I understand having limited time. As and when I have some time to spare myself, I might look into what it would take to do this without breaking the documented API.

mitya57 commented 4 years ago

Of course I will gladly accept pull requests!

Also adding new API is fine. Marking old as deprecated is also fine.