--- a/docs/index.rst +++ a/docs/index.rst @@ -22,11 +22,6 @@ Welcome to keyrings.alt documentation! :undoc-members: :show-inheritance: -.. automodule:: keyrings.alt.keyczar - :members: - :undoc-members: - :show-inheritance: - .. automodule:: keyrings.alt.multi :members: :undoc-members: --- a/keyrings/alt/Google.py +++ a/keyrings/alt/Google.py @@ -15,7 +15,6 @@ try: except ImportError: pass -from . import keyczar from keyring import errors from keyring import credentials from keyring.backend import KeyringBackend @@ -69,8 +68,6 @@ class DocsKeyring(KeyringBackend): def priority(cls): if not cls._has_gdata(): raise RuntimeError("Requires gdata") - if not keyczar.has_keyczar(): - raise RuntimeError("Requires keyczar") return 3 @classmethod @@ -297,27 +294,3 @@ class DocsKeyring(KeyringBackend): result = self.FAIL return result - -class KeyczarDocsKeyring(DocsKeyring): - """Google Docs keyring using keyczar initialized from environment - variables - """ - - def __init__(self): - crypter = keyczar.EnvironCrypter() - credential = EnvironCredential() - source = os.environ.get('GOOGLE_KEYRING_SOURCE') - super(KeyczarDocsKeyring, self).__init__( - credential, source, crypter) - - def supported(self): - """Return if this keyring supports current environment: - -1: not applicable - 0: suitable - 1: recommended - """ - try: - from keyczar import keyczar - return super(KeyczarDocsKeyring, self).supported() - except ImportError: - return -1 --- a/keyrings/alt/file.py +++ a/keyrings/alt/file.py @@ -37,7 +37,7 @@ class PlaintextKeyring(Keyring): class Encrypted(object): """ - PyCrypto-backed Encryption support + Pycryptodome-backed Encryption support """ scheme = '[PBKDF2] AES256.CFB' version = '1.0' @@ -68,7 +68,7 @@ class Encrypted(object): class EncryptedKeyring(Encrypted, Keyring): - """PyCrypto File Keyring""" + """Cryptodome File Keyring""" filename = 'crypted_pass.cfg' pw_prefix = 'pw:'.encode() @@ -82,7 +82,7 @@ class EncryptedKeyring(Encrypted, Keyring): __import__('Crypto.Protocol.KDF') __import__('Crypto.Random') except ImportError: # pragma: no cover - raise RuntimeError("PyCrypto required") + raise RuntimeError("Pycryptodome required") if not json: # pragma: no cover raise RuntimeError("JSON implementation such as simplejson " "required.") --- a/keyrings/alt/pyfs.py +++ a/keyrings/alt/pyfs.py @@ -8,7 +8,6 @@ from keyring import errors from keyring.util.escape import escape as escape_for_ini from keyring.util import platform_, properties from keyring.backend import KeyringBackend, NullCrypter -from . import keyczar try: import fs.opener @@ -261,12 +260,3 @@ class EncryptedKeyring(BasicKeyring): super(EncryptedKeyring, self).__init__( crypter, filename=filename, can_create=can_create, cache_timeout=cache_timeout) - -class KeyczarKeyring(EncryptedKeyring): - """Encrypted Pyfilesystem Keyring using Keyczar keysets specified in - environment vars - """ - - def __init__(self): - super(KeyczarKeyring, self).__init__( - keyczar.EnvironCrypter()) --- a/setup.py +++ a/setup.py @@ -26,6 +26,7 @@ params = dict( python_requires='>=2.7', install_requires=[ 'six', + 'pycryptodome' ], extras_require={ }, @@ -44,7 +45,6 @@ params = dict( 'file = keyrings.alt.file', 'Gnome = keyrings.alt.Gnome', 'Google = keyrings.alt.Google', - 'keyczar = keyrings.alt.keyczar', 'multi = keyrings.alt.multi', 'pyfs = keyrings.alt.pyfs', 'Windows (alt) = keyrings.alt.Windows', --- a/tests/requirements.txt +++ a/tests/requirements.txt @@ -4,13 +4,8 @@ backports.unittest_mock keyring[test] >= 10.3.1 fs>=0.5,<2 -pycrypto +pycryptodome # gdata doesn't currently install on Python 3 # http://code.google.com/p/gdata-python-client/issues/detail?id=229 gdata; python_version=="2.7" - - -# keyczar doesn't currently install on Python 3. -# http://code.google.com/p/keyczar/issues/detail?id=125 -python-keyczar; python_version=="2.7" --- a/tests/test_Google.py +++ a/tests/test_Google.py @@ -10,7 +10,7 @@ from keyrings.alt import Google from keyring.credentials import SimpleCredential from keyring.backend import NullCrypter from keyring import errors -from . import mocks +import mocks def is_gdata_supported(): try: @@ -58,7 +58,7 @@ class GoogleDocsKeyringInteractionTestCase(unittest.TestCase): listfeed = mocks.MockListFeed() listfeed._entry = [mocks.MockDocumentListEntry(), mocks.MockDocumentListEntry() - ] + ] return listfeed def _encode_data(self, data): --- a/tests/test_crypto.py +++ a/tests/test_crypto.py @@ -1,7 +1,7 @@ import unittest from unittest import mock -from .test_file import FileKeyringTests +from test_file import FileKeyringTests from keyrings.alt import file