Skip to content

Commit

Permalink
Remove pycrypto from requirements
Browse files Browse the repository at this point in the history
Remove pycrypto completely from requirements and fix the
related tests.

Closes-Bug: #1749574
Depends-On: I5c0c1a238023c116af5a84d899e629f1c7c3513f
Change-Id: Ibfedd9e2ab0a5e78959108112f57103a089f02d1
Signed-off-by: Fan Zhang <zh.f@outlook.com>
  • Loading branch information
zh-f committed Jun 14, 2018
1 parent 9cdb08c commit 4279fd2
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 8 deletions.
Expand Up @@ -28,5 +28,4 @@ oslo.concurrency>=1.8.0 # Apache-2.0
pexpect>=3.1,!=3.3
enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD
cryptography>=2.1.4 # BSD/Apache-2.0
pycrypto>=2.6 # Public Domain
xmltodict>=0.10.1 # MIT
Expand Up @@ -27,5 +27,4 @@ osprofiler>=0.3.0
oslo.concurrency>=0.3.0
enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD
cryptography>=2.1.4 # BSD/Apache-2.0
pycrypto>=2.6 # Public Domain
xmltodict>=0.10.1 # MIT
1 change: 0 additions & 1 deletion lower-constraints.txt
Expand Up @@ -105,7 +105,6 @@ psycopg2==2.6.2
ptyprocess==0.5.2
pycadf==2.7.0
pycparser==2.18
pycrypto==2.6
pyflakes==1.0.0
Pygments==2.2.0
pyinotify==0.9.6
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Expand Up @@ -45,6 +45,5 @@ oslo.db>=4.27.0 # Apache-2.0
enum34>=1.0.4;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD
xmltodict>=0.10.1 # MIT
cryptography>=2.1.4 # BSD/Apache-2.0
pycrypto>=2.6 # Public Domain
oslo.policy>=1.30.0 # Apache-2.0
diskimage-builder!=1.6.0,!=1.7.0,!=1.7.1,>=1.1.2 # Apache-2.0
4 changes: 2 additions & 2 deletions trove/tests/scenario/runners/module_runners.py
Expand Up @@ -14,7 +14,7 @@
# under the License.
#

import Crypto.Random
import os
from proboscis import SkipTest
import re
import tempfile
Expand Down Expand Up @@ -42,7 +42,7 @@ def __init__(self):
self.MODULE_NEG_CONTENTS = 'contents for negative tests'
self.MODULE_BINARY_SUFFIX = '_bin_auto'
self.MODULE_BINARY_SUFFIX2 = self.MODULE_BINARY_SUFFIX + '_2'
self.MODULE_BINARY_CONTENTS = Crypto.Random.new().read(20)
self.MODULE_BINARY_CONTENTS = os.urandom(20)
self.MODULE_BINARY_CONTENTS2 = '\x00\xFF\xea\x9c\x11\xfeok\xb1\x8ax'

self.module_name_order = [
Expand Down
4 changes: 2 additions & 2 deletions trove/tests/unittests/common/test_stream_codecs.py
Expand Up @@ -14,7 +14,7 @@
# under the License.
#

from Crypto import Random
import os

from trove.common import stream_codecs
from trove.tests.unittests import trove_testtools
Expand All @@ -29,7 +29,7 @@ def tearDown(self):
super(TestStreamCodecs, self).tearDown()

def test_serialize_deserialize_base64codec(self):
random_data = bytearray(Random.new().read(12))
random_data = bytearray(os.urandom(12))
data = [b'abc',
b'numbers01234',
b'non-ascii:\xe9\xff',
Expand Down

0 comments on commit 4279fd2

Please sign in to comment.