Skip to content

Commit

Permalink
SDK-780: Correct protobuf imports, update PyPi package
Browse files Browse the repository at this point in the history
  • Loading branch information
echarrod committed Mar 25, 2019
1 parent 513dae5 commit f7b0aa8
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion requirements.in
Expand Up @@ -4,7 +4,7 @@ cryptography>=2.3.0
itsdangerous==0.24
mock==2.0.0
pbr==1.10.0
protobuf==3.1.0.post1
protobuf==3.7.0
pyopenssl==18.0.0
pytest==3.3.2
requests>=2.20.0
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -19,7 +19,7 @@ itsdangerous==0.24
mock==2.0.0
pbr==1.10.0
pluggy==0.6.0 # via pytest, tox
protobuf==3.1.0.post1
protobuf==3.7.0
py==1.5.3 # via pytest, tox
pycparser==2.18 # via cffi
pyopenssl==18.0.0
Expand Down
2 changes: 1 addition & 1 deletion yoti_python_sdk/activity_details.py
Expand Up @@ -5,7 +5,7 @@

from yoti_python_sdk import config
from yoti_python_sdk.profile import Profile
from protobuf.protobuf import Protobuf
from yoti_python_sdk.protobuf.protobuf import Protobuf


class ActivityDetails:
Expand Down
2 changes: 1 addition & 1 deletion yoti_python_sdk/anchor.py
Expand Up @@ -4,7 +4,7 @@
import asn1
from OpenSSL import crypto

import protobuf.common_public_api.SignedTimestamp_pb2 as compubapi
import yoti_python_sdk.protobuf.common_public_api.SignedTimestamp_pb2 as compubapi
from yoti_python_sdk import config

UNKNOWN_EXTENSION = ""
Expand Down
2 changes: 1 addition & 1 deletion yoti_python_sdk/client.py
Expand Up @@ -14,7 +14,7 @@
from yoti_python_sdk.activity_details import ActivityDetails
from yoti_python_sdk.crypto import Crypto
from yoti_python_sdk.endpoint import Endpoint
from protobuf import protobuf
from yoti_python_sdk.protobuf import protobuf
from .config import *

NO_KEY_FILE_SPECIFIED_ERROR = 'Please specify the correct private key file ' \
Expand Down
2 changes: 1 addition & 1 deletion yoti_python_sdk/profile.py
Expand Up @@ -5,7 +5,7 @@
from yoti_python_sdk import config
from yoti_python_sdk.anchor import Anchor
from yoti_python_sdk.attribute import Attribute
from protobuf.protobuf import Protobuf
from yoti_python_sdk.protobuf.protobuf import Protobuf


class Profile:
Expand Down
6 changes: 3 additions & 3 deletions yoti_python_sdk/protobuf/protobuf.py
Expand Up @@ -3,8 +3,8 @@

from cryptography.fernet import base64

import protobuf.common_public_api.EncryptedData_pb2 as compubapi
from protobuf.attribute_public_api import Attribute_pb2, List_pb2
from yoti_python_sdk.protobuf.attribute_public_api import Attribute_pb2, List_pb2
from yoti_python_sdk.protobuf.common_public_api import EncryptedData_pb2


class Protobuf(object):
Expand All @@ -23,7 +23,7 @@ def current_user(receipt):
profile_content = receipt['other_party_profile_content']
decoded_profile_content = base64.b64decode(profile_content)

merged_user = compubapi.EncryptedData()
merged_user = EncryptedData_pb2.EncryptedData()
merged_user.MergeFromString(decoded_profile_content)
return merged_user

Expand Down
2 changes: 1 addition & 1 deletion yoti_python_sdk/tests/anchor_parser.py
Expand Up @@ -3,7 +3,7 @@
from os.path import abspath, dirname, join

from yoti_python_sdk import anchor
from protobuf import protobuf
from yoti_python_sdk.protobuf import protobuf

FIXTURES_DIR = join(dirname(abspath(__file__)), 'fixtures')
ANCHOR_DRIVING_LICENSE = join(FIXTURES_DIR, 'anchor_driving_license.txt')
Expand Down
2 changes: 1 addition & 1 deletion yoti_python_sdk/tests/protobuf_attribute.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from protobuf.protobuf import Protobuf
from yoti_python_sdk.protobuf.protobuf import Protobuf


class ProtobufAttribute(object):
Expand Down
2 changes: 1 addition & 1 deletion yoti_python_sdk/tests/test_activity_details.py
Expand Up @@ -7,7 +7,7 @@

from yoti_python_sdk import config
from yoti_python_sdk.activity_details import ActivityDetails
from protobuf.protobuf import Protobuf
from yoti_python_sdk.protobuf.protobuf import Protobuf
from yoti_python_sdk.tests.conftest import successful_receipt, failure_receipt, \
no_values_receipt, user_id, parent_remember_me_id, empty_strings

Expand Down
2 changes: 1 addition & 1 deletion yoti_python_sdk/tests/test_profile.py
Expand Up @@ -4,7 +4,7 @@

from yoti_python_sdk import config
from yoti_python_sdk.profile import Profile
from protobuf.protobuf import Protobuf
from yoti_python_sdk.protobuf.protobuf import Protobuf
from yoti_python_sdk.tests.protobuf_attribute import ProtobufAttribute

ADDRESS_FORMAT_KEY = "address_format"
Expand Down
2 changes: 1 addition & 1 deletion yoti_python_sdk/tests/test_protobuf.py
Expand Up @@ -2,7 +2,7 @@
import pytest
from past.builtins import basestring

from protobuf import protobuf
from yoti_python_sdk.protobuf import protobuf


@pytest.fixture(scope='module')
Expand Down

0 comments on commit f7b0aa8

Please sign in to comment.