summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix `DeprecationWarning: __int__ returned non-int` on Py3HEADmasterIlya Etingof2020-03-211-1/+1
| | | | In `BitString.__int__()`
* Fix tox docs watningIlya Etingof2020-03-141-0/+1
|
* Fix tox deps inheritanceIlya Etingof2020-03-141-0/+2
|
* Run unittests from tox across many PythonsIlya Etingof2020-03-141-7/+34
|
* Add tox.ini with some basic runnersIlya Etingof2020-03-082-0/+50
|
* Advance copyright statement to year 2020Ilya Etingof2020-03-0857-58/+59
|
* Update FUNDING.ymlIlya Etingof2019-12-151-1/+1
|
* Update CHANGES.rstIlya Etingof2019-11-231-2/+2
|
* Make BER/CER/DER decodersstreaming and suspendible (#176)Ilya Etingof2019-11-2318-612/+1737
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this change is to make the decoder yielding on input data starvation and resuming from where it stopped whenever the caller decides to try again (hopefully making sure that some more input becomes available). This change makes it possible for the decoder to operate on streams of data (meaning that the entire DER blob might not be immediately available on input). On top of that, the decoder yields partially reconstructed ASN.1 object on input starvation making it possible for the caller to inspect what has been decoded so far and possibly consume partial ASN.1 data. All these new feature are natively available through `StreamingDecoder` class. Previously published API is implemented as a thin wrapper on top of that ensuring backward compatibility.
| * Update CHANGES.rstIlya Etingof2019-11-231-1/+1
| |
| * Merge branch 'master' into streamoptimum37Ilya Etingof2019-11-2346-515/+128
| |\ | |/ |/|
* | Prepare to branch 0.4.xIlya Etingof2019-11-232-2/+2
| |
* | Add Py3.8 Travis jobIlya Etingof2019-11-171-0/+1
| |
* | Add support for Python 3.8, drop EOL 3.4 (#182)Hugo van Kemenade2019-11-167-57/+16
| | | | | | | | | | | | | | * Drop support for EOL Python 3.4 * Remove Py2.5 workarounds * Change Travis setup to test on default Xenial * Add support for Python 3.8 and update changelog
* | Drop support for EOL Pythons (#131)Jon Dufresne2019-11-1646-461/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 2.4, 2.5, 2.6, 3.2 and 3.3 are end of life. They are no longer receiving bug fixes, including for security issues. These Pythons went EOL on: Python 2.6: 2013-10-29 Python 3.2: 2016-02-20 Python 3.3: 2017-09-29 For additional details on supported Python versions, see: https://devguide.python.org/#status-of-python-branches Removing support for EOL Pythons will reduce testing and maintenance resources. Using pypinfo, here are the download statistics of the project for the last 30 days, showing limited downloads from EOL Pythons: | python_version | percent | download_count | | -------------- | ------: | -------------: | | 2.7 | 90.33% | 7,975,885 | | 3.6 | 4.95% | 437,261 | | 3.5 | 2.99% | 263,637 | | 3.4 | 1.02% | 89,723 | | 2.6 | 0.69% | 60,511 | | 3.7 | 0.02% | 2,024 | | 3.3 | 0.00% | 441 | | 3.2 | 0.00% | 38 | | 3.8 | 0.00% | 9 | | None | 0.00% | 2 | By removing support for older Pythons, can remove or update the following workarounds and code: * Built-in function bin() is always available. * Built-in function callable() is always available. * Built-in function all() is always available. * The collections.OrderedDict class is always available. * The datetime.strptime() method is always available. * The platform module is always available. * The string.partition() method is always available. * The NullHandler class is always available. * The method .__trunc__() is always available. * Can use set literals. * Updated unittest is always available. The unittest2 module is unnecessary. Users on older versions of Python can continue to download, install, and use older versions of the library that continue to have support for older Pythons.
* | Prepare for 0.5.0Ilya Etingof2019-11-162-1/+6
| |
* | Release 0.4.8v0.4.8Ilya Etingof2019-11-161-1/+1
| |
| * Merge pull request #1 from janpipek/support-incomplete-substrateIlya Etingof2019-11-2318-917/+1637
| |\ | | | | | | Turn BER decoder into a suspendible generator
| | * Pass `tagMap` and `typeMap` to decoder instanceIlya Etingof2019-11-166-32/+37
| | | | | | | | | | | | | | | This change should simplify decoder specialization by means of parameterization in addition to subclassing.
| | * Refactor codec classes linkageIlya Etingof2019-11-169-22/+34
| | | | | | | | | | | | Make it looking more uniform and easier to override if needed.
| | * Fix streaming unit testIlya Etingof2019-11-151-1/+1
| | |
| | * Merge branch 'support-incomplete-substrate' of github.com:janpipek/pyasn1 ↵Ilya Etingof2019-11-150-0/+0
| | |\ | | | | | | | | | | | | into support-incomplete-substrate
| | | * Fix Integer decoder to handle empty payloadIlya Etingof2019-11-071-3/+4
| | | |
| | | * Reuse `SingleItemDecoder` object in `StreamingDecoder`Ilya Etingof2019-10-039-20/+14
| | | | | | | | | | | | | | | | Try to reuse `SingleItemDecoder` object to leverage its caches.
| | | * Add minor performance optimising changesIlya Etingof2019-10-012-4/+9
| | | |
| | | * Optimize `streaming` objects access for performanceIlya Etingof2019-10-014-53/+53
| | | |
| | | * Update `streaming.read` docstringIlya Etingof2019-10-011-1/+1
| | | | | | | | | | | | Co-Authored-By: Jan Pipek <jan.pipek@gmail.com>
| | | * Update docstring on streaming.readIlya Etingof2019-10-011-1/+1
| | | | | | | | | | | | Co-Authored-By: Jan Pipek <jan.pipek@gmail.com>
| | | * Refactor BER decoder into a suspendable coroutineIlya Etingof2019-09-2818-903/+1604
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this change is to make the decoder stopping on input data starvation and resuming from where it stopped whenever the caller decides to try again (hopefully making sure that some more input becomes available). This change makes it possible for the decoder to operate on streams of data (meaning that the entire DER blob might not be immediately available on input). On top of that, the decoder yields partially reconstructed ASN.1 object on input starvation making it possible for the caller to inspect what has been decoded so far and possibly consume partial ASN.1 data. All these new feature are natively available through `StreamingDecoder` class. Previously published API is implemented as a thin wrapper on top of that ensuring backward compatibility.
| | * | Fix Integer decoder to handle empty payloadIlya Etingof2019-11-151-3/+4
| | | |
| | * | Reuse `SingleItemDecoder` object in `StreamingDecoder`Ilya Etingof2019-11-159-20/+14
| | | | | | | | | | | | | | | | Try to reuse `SingleItemDecoder` object to leverage its caches.
| | * | Add minor performance optimising changesIlya Etingof2019-11-152-4/+9
| | | |
| | * | Optimize `streaming` objects access for performanceIlya Etingof2019-11-154-53/+53
| | | |
| | * | Update `streaming.read` docstringIlya Etingof2019-11-151-1/+1
| | | | | | | | | | | | Co-Authored-By: Jan Pipek <jan.pipek@gmail.com>
| | * | Update docstring on streaming.readIlya Etingof2019-11-151-1/+1
| | | | | | | | | | | | Co-Authored-By: Jan Pipek <jan.pipek@gmail.com>
| | * | Refactor BER decoder into a suspendable coroutineIlya Etingof2019-11-1518-902/+1605
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this change is to make the decoder stopping on input data starvation and resuming from where it stopped whenever the caller decides to try again (hopefully making sure that some more input becomes available). This change makes it possible for the decoder to operate on streams of data (meaning that the entire DER blob might not be immediately available on input). On top of that, the decoder yields partially reconstructed ASN.1 object on input starvation making it possible for the caller to inspect what has been decoded so far and possibly consume partial ASN.1 data. All these new feature are natively available through `StreamingDecoder` class. Previously published API is implemented as a thin wrapper on top of that ensuring backward compatibility.
| * | Merge branch 'streamoptimum37' of github.com:janpipek/pyasn1 into ↵Ilya Etingof2019-11-150-0/+0
| |\ \ | | |/ | | | | | | streamoptimum37
| | * CachingStreamWrapperTestCaseJan Pipek2019-09-132-1/+52
| | |
| | * Simplify _CachingStreamWrapperJan Pipek2019-09-131-8/+17
| | |
| | * Hide other auxiliary functions.Jan Pipek2019-09-131-4/+4
| | |
| | * Address several pull requests comments + hide asSeekableStreamJan Pipek2019-09-134-46/+44
| | |
| | * Additional test on ZIP filesJan Pipek2019-09-101-0/+14
| | |
| | * Implement _CachedStreamWrapperJan Pipek2019-09-102-13/+66
| | |
| | * Docstrings in requested format.Jan Pipek2019-09-101-8/+38
| | |
| | * Trivial changes from the MR.Jan Pipek2019-09-101-3/+3
| | |
| | * Update tests with more streams for ber.decoderJan Pipek2019-09-101-2/+53
| | |
| | * UnsupportedSubstrateErrorJan Pipek2019-09-102-5/+12
| | |
| | * Fail with unseekable streams.Jan Pipek2019-09-101-5/+5
| | |
| | * API that work with pyasn1-modulesJan Pipek2019-09-063-9/+9
| | |
| | * Prepare for streamsJan Pipek2019-09-064-261/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite Decoder in terms of BytesIO BER Decoders implemented with BytesIO but for the most complex BER UniversalConstructedTypeDecoder in terms of BytesIO BER Decoder (stream-based) suggestion Fixed some of the failing tests Fixed several failed tests Fix all remaining tests but the non-implemented Any Implement untagged Any with back-seek Fix cer and der to work with streams Simplify unnecessary added complexity Make use of IOBase hierarchy (properly?) - in progress Tests failing Fixed most failing tests 1 remaining Severaů small optimizations Fix logging Note: As we do not want to read the whole stream, explicit output of remaining bytes is not used. Rename and document utility functions for BER decoder Fixed ínverted condition in BitStringDecoder.valueDecoder Fixed wrongly acquired fullPosition in AnyDecoder.indefLenValueDecoder Fixed logging None length endOfStream(BytesIO) working in 2.7 Microoptimizations for endOfStream (not using it) Test for checking binary files as substrate Python 2.7 BytesIO wrapper for `file`s Refactor keep API compatibility with original version