Skip to content

Commit

Permalink
Use connect spelling and capitalization on KeePassXC
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 7, 2022
1 parent 28b5a0a commit d35fc44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CHANGES.rst
Expand Up @@ -4,14 +4,14 @@ v23.8.0
* #448: ``SecretService`` and ``libsecret`` backends now support a
new ``SelectableScheme``, allowing the keys for "username" and
"service" to be overridden for compatibility with other schemes
such as KeypassXC.
such as KeePassXC.

* Introduced a new ``.with_properties`` method on backends to
produce a new keyring with different properties. Use for example
to get a keyring with a different ``keychain`` (macOS) or
``scheme`` (SecretService/libsecret). e.g.::

keypass = keyring.get_keyring().with_properties(scheme='KeypassXC')
keypass = keyring.get_keyring().with_properties(scheme='KeePassXC')

* ``.with_keychain`` method on macOS is superseded by ``.with_properties``
and so is now deprecated.
Expand Down
4 changes: 2 additions & 2 deletions keyring/backend.py
Expand Up @@ -230,7 +230,7 @@ class SchemeSelectable:
{'username': 'alice', 'service': 'contoso'}
>>> backend._query('contoso')
{'service': 'contoso'}
>>> backend.scheme = 'KeypassXC'
>>> backend.scheme = 'KeePassXC'
>>> backend._query('contoso', 'alice')
{'UserName': 'alice', 'Title': 'contoso'}
>>> backend._query('contoso', 'alice', foo='bar')
Expand All @@ -240,7 +240,7 @@ class SchemeSelectable:
scheme = 'default'
schemes = dict(
default=dict(username='username', service='service'),
KeypassXC=dict(username='UserName', service='Title'),
KeePassXC=dict(username='UserName', service='Title'),
)

def _query(self, service, username=None, **base):
Expand Down

0 comments on commit d35fc44

Please sign in to comment.