Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 463160 Details for
Bug 608882
dev-python/python-axolotl - python wrapper for curve25519 library with ed25519 signatures
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
dev-python/python-axolotl/files/0001-Keep-the-_pb2-suffix-in-the-name-for-protobuf-genera.patch
0001-Keep-the-_pb2-suffix-in-the-name-for-protobuf-genera.patch (text/plain), 8.38 KB, created by
Kristian
on 2017-02-10 17:14:47 UTC
(
hide
)
Description:
dev-python/python-axolotl/files/0001-Keep-the-_pb2-suffix-in-the-name-for-protobuf-genera.patch
Filename:
MIME Type:
Creator:
Kristian
Created:
2017-02-10 17:14:47 UTC
Size:
8.38 KB
patch
obsolete
>From 79146a47d21c826d4c3aee8a6af5a6004a670677 Mon Sep 17 00:00:00 2001 >From: Antonio Ospite <ao2@ao2.it> >Date: Thu, 25 Aug 2016 09:53:26 +0200 >Subject: [PATCH] Keep the _pb2 suffix in the name for protobuf generated files >X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM<pyWR#k60!#=#>/Vb;]yA5<GWI5`6u&+ > ;6b'@y|8w"wB;4/e!7wYYrcqdJFY,~%Gk_4]cq$Ei/7<j&N3ah(m`ku?pX.&+~:_/wC~dwn^)MizBG > !pE^+iDQQ1yC6^,)YDKkxDd!T>\I~93>J<_`<4)A{':UrE > >In protobuf 3+ there is a check to verify that the files generated by >protoc still have the _pb2 prefix: >https://github.com/google/protobuf/blob/2fe0556c7abbe31c02147b9171397737a35bfe3b/python/google/protobuf/pyext/descriptor.cc#L94 > >When the suffix is not there, trying to use the generated protocols >fails with this message: > > File "/usr/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 501, in __new__ > _message.Message._CheckCalledFromGeneratedFile() > TypeError: Descriptors should not be created directly, but only retrieved from their parent. > >So rename the generated files to keep the suffix, and adjust the user >code accordingly. >--- > axolotl/groups/state/senderkeyrecord.py | 2 +- > axolotl/groups/state/senderkeystate.py | 2 +- > axolotl/identitykeypair.py | 2 +- > axolotl/protocol/keyexchangemessage.py | 2 +- > axolotl/protocol/prekeywhispermessage.py | 2 +- > axolotl/protocol/senderkeydistributionmessage.py | 2 +- > axolotl/protocol/senderkeymessage.py | 2 +- > axolotl/protocol/whispermessage.py | 2 +- > axolotl/protocol/{whisperprotos.py => whisperprotos_pb2.py} | 0 > axolotl/state/prekeyrecord.py | 2 +- > axolotl/state/sessionrecord.py | 2 +- > axolotl/state/sessionstate.py | 2 +- > axolotl/state/signedprekeyrecord.py | 2 +- > axolotl/state/{storageprotos.py => storageprotos_pb2.py} | 0 > 14 files changed, 12 insertions(+), 12 deletions(-) > rename axolotl/protocol/{whisperprotos.py => whisperprotos_pb2.py} (100%) > rename axolotl/state/{storageprotos.py => storageprotos_pb2.py} (100%) > >diff --git a/axolotl/groups/state/senderkeyrecord.py b/axolotl/groups/state/senderkeyrecord.py >index 1f74887..6adf7a2 100644 >--- a/axolotl/groups/state/senderkeyrecord.py >+++ b/axolotl/groups/state/senderkeyrecord.py >@@ -1,6 +1,6 @@ > # -*- coding: utf-8 -*- > >-from ...state.storageprotos import SenderKeyRecordStructure >+from ...state.storageprotos_pb2 import SenderKeyRecordStructure > from .senderkeystate import SenderKeyState > from ...invalidkeyidexception import InvalidKeyIdException > >diff --git a/axolotl/groups/state/senderkeystate.py b/axolotl/groups/state/senderkeystate.py >index c70129a..c247fca 100644 >--- a/axolotl/groups/state/senderkeystate.py >+++ b/axolotl/groups/state/senderkeystate.py >@@ -1,6 +1,6 @@ > # -*- coding: utf-8 -*- > >-from ...state import storageprotos >+from ...state import storageprotos_pb2 as storageprotos > from ..ratchet.senderchainkey import SenderChainKey > from ..ratchet.sendermessagekey import SenderMessageKey > from ...ecc.curve import Curve >diff --git a/axolotl/identitykeypair.py b/axolotl/identitykeypair.py >index 47a318c..c577f08 100644 >--- a/axolotl/identitykeypair.py >+++ b/axolotl/identitykeypair.py >@@ -1,6 +1,6 @@ > # -*- coding: utf-8 -*- > >-from .state.storageprotos import IdentityKeyPairStructure >+from .state.storageprotos_pb2 import IdentityKeyPairStructure > from .identitykey import IdentityKey > from .ecc.curve import Curve > >diff --git a/axolotl/protocol/keyexchangemessage.py b/axolotl/protocol/keyexchangemessage.py >index 3966f51..3cd789d 100644 >--- a/axolotl/protocol/keyexchangemessage.py >+++ b/axolotl/protocol/keyexchangemessage.py >@@ -2,7 +2,7 @@ > > from .ciphertextmessage import CiphertextMessage > from ..util.byteutil import ByteUtil >-from . import whisperprotos >+from . import whisperprotos_pb2 as whisperprotos > from ..legacymessageexception import LegacyMessageException > from ..invalidversionexception import InvalidVersionException > from ..invalidmessageexception import InvalidMessageException >diff --git a/axolotl/protocol/prekeywhispermessage.py b/axolotl/protocol/prekeywhispermessage.py >index 9ce3663..4b63278 100644 >--- a/axolotl/protocol/prekeywhispermessage.py >+++ b/axolotl/protocol/prekeywhispermessage.py >@@ -11,7 +11,7 @@ from ..invalidversionexception import InvalidVersionException > from ..invalidmessageexception import InvalidMessageException > from ..legacymessageexception import LegacyMessageException > from ..invalidkeyexception import InvalidKeyException >-from . import whisperprotos >+from . import whisperprotos_pb2 as whisperprotos > > > class PreKeyWhisperMessage(CiphertextMessage): >diff --git a/axolotl/protocol/senderkeydistributionmessage.py b/axolotl/protocol/senderkeydistributionmessage.py >index 6a47445..326fb45 100644 >--- a/axolotl/protocol/senderkeydistributionmessage.py >+++ b/axolotl/protocol/senderkeydistributionmessage.py >@@ -1,7 +1,7 @@ > # -*- coding: utf-8 -*- > > from .ciphertextmessage import CiphertextMessage >-from . import whisperprotos >+from . import whisperprotos_pb2 as whisperprotos > from ..util.byteutil import ByteUtil > from ..legacymessageexception import LegacyMessageException > from ..invalidmessageexception import InvalidMessageException >diff --git a/axolotl/protocol/senderkeymessage.py b/axolotl/protocol/senderkeymessage.py >index 70f3bb5..d2a9d44 100644 >--- a/axolotl/protocol/senderkeymessage.py >+++ b/axolotl/protocol/senderkeymessage.py >@@ -6,7 +6,7 @@ from ..legacymessageexception import LegacyMessageException > from ..invalidmessageexception import InvalidMessageException > from ..invalidkeyexception import InvalidKeyException > from ..ecc.curve import Curve >-from . import whisperprotos >+from . import whisperprotos_pb2 as whisperprotos > > > class SenderKeyMessage(CiphertextMessage): >diff --git a/axolotl/protocol/whispermessage.py b/axolotl/protocol/whispermessage.py >index e965d51..b2e4c12 100644 >--- a/axolotl/protocol/whispermessage.py >+++ b/axolotl/protocol/whispermessage.py >@@ -6,7 +6,7 @@ import hashlib > from .ciphertextmessage import CiphertextMessage > from ..util.byteutil import ByteUtil > from ..ecc.curve import Curve >-from . import whisperprotos >+from . import whisperprotos_pb2 as whisperprotos > from ..legacymessageexception import LegacyMessageException > from ..invalidmessageexception import InvalidMessageException > from ..invalidkeyexception import InvalidKeyException >diff --git a/axolotl/protocol/whisperprotos.py b/axolotl/protocol/whisperprotos_pb2.py >similarity index 100% >rename from axolotl/protocol/whisperprotos.py >rename to axolotl/protocol/whisperprotos_pb2.py >diff --git a/axolotl/state/prekeyrecord.py b/axolotl/state/prekeyrecord.py >index 5e428d6..8bdbd0d 100644 >--- a/axolotl/state/prekeyrecord.py >+++ b/axolotl/state/prekeyrecord.py >@@ -1,6 +1,6 @@ > # -*- coding: utf-8 -*- > >-from .storageprotos import PreKeyRecordStructure >+from .storageprotos_pb2 import PreKeyRecordStructure > from ..ecc.curve import Curve > from ..ecc.eckeypair import ECKeyPair > >diff --git a/axolotl/state/sessionrecord.py b/axolotl/state/sessionrecord.py >index e5ecb7e..b53701e 100644 >--- a/axolotl/state/sessionrecord.py >+++ b/axolotl/state/sessionrecord.py >@@ -1,6 +1,6 @@ > # -*- coding: utf-8 -*- > >-from . import storageprotos >+from . import storageprotos_pb2 as storageprotos > from .sessionstate import SessionState > > >diff --git a/axolotl/state/sessionstate.py b/axolotl/state/sessionstate.py >index 5ef86be..b7c1277 100644 >--- a/axolotl/state/sessionstate.py >+++ b/axolotl/state/sessionstate.py >@@ -1,6 +1,6 @@ > # -*- coding: utf-8 -*- > >-from . import storageprotos >+from . import storageprotos_pb2 as storageprotos > from ..identitykeypair import IdentityKey, IdentityKeyPair > from ..ratchet.rootkey import RootKey > from ..kdf.hkdf import HKDF >diff --git a/axolotl/state/signedprekeyrecord.py b/axolotl/state/signedprekeyrecord.py >index 5942456..727cc1d 100644 >--- a/axolotl/state/signedprekeyrecord.py >+++ b/axolotl/state/signedprekeyrecord.py >@@ -1,6 +1,6 @@ > # -*- coding; utf-8 -*- > >-from .storageprotos import SignedPreKeyRecordStructure >+from .storageprotos_pb2 import SignedPreKeyRecordStructure > from ..ecc.curve import Curve > from ..ecc.eckeypair import ECKeyPair > >diff --git a/axolotl/state/storageprotos.py b/axolotl/state/storageprotos_pb2.py >similarity index 100% >rename from axolotl/state/storageprotos.py >rename to axolotl/state/storageprotos_pb2.py >-- >2.9.3 >
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 608882
:
463156
|
463158
|
463160
|
463162
|
467894
|
526518