diff options
author | Ilya Etingof <etingof@gmail.com> | 2017-10-29 16:04:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-29 16:04:01 +0100 |
commit | 4d7232a5dfdedf38d80bb406f1814b40f638e2f2 (patch) | |
tree | 658c3b3622514c16d2c548f93becee592f8978f0 /pyasn1/type/base.py | |
parent | 8c5a8a9caa3ddbf659e4c260c78f3a4a37ae714c (diff) | |
download | pyasn1-4d7232a5dfdedf38d80bb406f1814b40f638e2f2.tar.gz |
Pickle protocol fixes (#99)
* do not blow up on pickle protocol attributes look up
* added Pickle tests
* More fixes to pickle protocol support
* __slots__ lookup allowed at NoValue
* SizedInteger moved from BitString scope to the univ module scope
Diffstat (limited to 'pyasn1/type/base.py')
-rw-r--r-- | pyasn1/type/base.py | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/pyasn1/type/base.py b/pyasn1/type/base.py index f22823b..73755cc 100644 --- a/pyasn1/type/base.py +++ b/pyasn1/type/base.py @@ -155,9 +155,31 @@ class NoValue(object): Any operation attempted on the *noValue* object will raise the *PyAsn1Error* exception. """ - skipMethods = ('__getattribute__', '__getattr__', '__setattr__', '__delattr__', - '__class__', '__init__', '__del__', '__new__', '__repr__', - '__qualname__', '__objclass__', 'im_class', '__sizeof__') + skipMethods = set( + ('__slots__', + # attributes + '__getattribute__', + '__getattr__', + '__setattr__', + '__delattr__', + # class instance + '__class__', + '__init__', + '__del__', + '__new__', + '__repr__', + '__qualname__', + '__objclass__', + 'im_class', + '__sizeof__', + # pickle protocol + '__reduce__', + '__reduce_ex__', + '__getnewargs__', + '__getinitargs__', + '__getstate__', + '__setstate__') + ) _instance = None |