Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 511580 Details for
Bug 611600
dev-python/keyczar: support dev-python/pycryptodome
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Remove keyczar support; migrate from pycrypto to pycryptodome.
keyrings-remove-keyczar-pycryptodome.patch (text/plain), 5.91 KB, created by
Daniel Robbins
on 2017-12-25 01:44:03 UTC
(
hide
)
Description:
Remove keyczar support; migrate from pycrypto to pycryptodome.
Filename:
MIME Type:
Creator:
Daniel Robbins
Created:
2017-12-25 01:44:03 UTC
Size:
5.91 KB
patch
obsolete
>diff --git a/docs/index.rst b/docs/index.rst >index 8798b95..33c0bd3 100644 >--- a/docs/index.rst >+++ b/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: >diff --git a/keyrings/alt/Google.py b/keyrings/alt/Google.py >index 705992e..a027988 100644 >--- a/keyrings/alt/Google.py >+++ b/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 >diff --git a/keyrings/alt/file.py b/keyrings/alt/file.py >index 317c140..4110d3a 100644 >--- a/keyrings/alt/file.py >+++ b/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.") >diff --git a/keyrings/alt/pyfs.py b/keyrings/alt/pyfs.py >index 0165cd5..fa99c6e 100644 >--- a/keyrings/alt/pyfs.py >+++ b/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()) >diff --git a/setup.py b/setup.py >index 9e074bd..61aecdd 100644 >--- a/setup.py >+++ b/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', >diff --git a/tests/requirements.txt b/tests/requirements.txt >index cc5a1e9..8b4adf0 100644 >--- a/tests/requirements.txt >+++ b/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" >diff --git a/tests/test_Google.py b/tests/test_Google.py >index 4e1afca..a00f8cb 100644 >--- a/tests/test_Google.py >+++ b/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): >diff --git a/tests/test_crypto.py b/tests/test_crypto.py >index 2f8571b..5875ff1 100644 >--- a/tests/test_crypto.py >+++ b/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 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 611600
: 511580