From 356b9d40299de10ae34d637ca2b4e996da912863 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 24 Mar 2022 10:23:10 +0300 Subject: [PATCH] Unsupported .memoryview() lint-friendly exception --- VERSION | 2 +- doc/install.rst | 12 ++++++------ doc/news.rst | 7 +++++++ pyderasn.py | 4 ++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/VERSION b/VERSION index 1a2c355..c3cae12 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.2 +9.3 diff --git a/doc/install.rst b/doc/install.rst index 41b4cb0..64edda0 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -4,11 +4,11 @@ Install Preferable way is to :ref:`download ` tarball with the signature from `official website `__:: - $ [fetch|wget] http://www.pyderasn.cypherpunks.ru/download/pyderasn-9.2.tar.zst - $ [fetch|wget] http://www.pyderasn.cypherpunks.ru/download/pyderasn-9.2.tar.zst.sig - $ gpg --verify pyderasn-9.2.tar.zst.sig pyderasn-9.2.tar.zst - $ zstd -d < pyderasn-9.2.tar.zst | tar xf - - $ cd pyderasn-9.2 + $ [fetch|wget] http://www.pyderasn.cypherpunks.ru/download/pyderasn-9.3.tar.zst + $ [fetch|wget] http://www.pyderasn.cypherpunks.ru/download/pyderasn-9.3.tar.zst.sig + $ gpg --verify pyderasn-9.3.tar.zst.sig pyderasn-9.3.tar.zst + $ zstd -d < pyderasn-9.3.tar.zst | tar xf - + $ cd pyderasn-9.3 $ python setup.py install # or copy pyderasn.py (possibly termcolor.py) to your PYTHONPATH @@ -18,7 +18,7 @@ signature from `official website `__:: You could use pip (**no** OpenPGP authentication is performed!) with PyPI:: - $ echo pyderasn==9.2 --hash=sha256:TO-BE-FILLED > requirements.txt + $ echo pyderasn==9.3 --hash=sha256:TO-BE-FILLED > requirements.txt $ pip install --requirement requirements.txt You have to verify downloaded tarballs integrity and authenticity to be diff --git a/doc/news.rst b/doc/news.rst index ae6db17..92f0646 100644 --- a/doc/news.rst +++ b/doc/news.rst @@ -1,6 +1,13 @@ News ==== +.. _release9.3: + +9.3 +--- +* CommonString's ``.memoryview()`` raises ValueError now for + friendliness with linters + .. _release9.2: 9.2 diff --git a/pyderasn.py b/pyderasn.py index 3c84666..99c771c 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -1196,7 +1196,7 @@ except ImportError: # pragma: no cover tzUTC = "missing" -__version__ = "9.2" +__version__ = "9.3" __all__ = ( "agg_octet_string", @@ -4763,7 +4763,7 @@ class CommonString(OctetString): return str(self._value) def memoryview(self): - raise NotImplementedError() + raise ValueError("CommonString does not support .memoryview()") def __repr__(self): return pp_console_row(next(self.pps())) -- 2.44.0