summaryrefslogtreecommitdiff
path: root/pymemcache/serde.py
Commit message (Collapse)AuthorAgeFilesLines
* Start to add type hintsJoe Gordon2022-09-121-5/+5
| | | | | First pass at adding some type hints to pymemcache to make it easier to develop against etc.
* add some compression benchmarksJohn Anderson2022-07-151-10/+2
|
* add pluggable compression serdeJohn Anderson2022-07-121-4/+59
|
* Apply black formattingJoe Gordon2021-12-031-3/+5
| | | | https://black.readthedocs.io/en/stable/index.html
* Fixes for rebase and further cleanupsJoe Gordon2021-07-201-6/+0
|
* Remove six dependency and run pyupgradeJoe Gordon2021-07-201-13/+5
| | | | | | | Now that we don't require Python 2 support no need for six. Code upgraded with pyupgrade and manual fixes to remove remaining six usage.
* Upgrade to Sphinx 3 for generated documentation (#282)Jon Parise2020-04-281-3/+2
|
* Change serialization interface to be an object (#245)Stephen Rosen2019-08-261-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change serialization interface to be an object Rather than passing separate serialization and deserialization methods to a pymemcache client, pass an object implementing a very simple two-method interface. This is a rather significant breaking change and should be part of an x.0.0 major release. Resolves #56 As suggested in that issue, this is a cleaner interface, as there's no sensible context in which you would provide only one of these two methods and it should therefore be thought of as a serialization/deserialization protocol. Also adds a note to the documentation's Best Practices list that you should use the built-in serializer object unless you have a reason to do otherwise. * Support "de/serializer" in addition to "serde" In order to support older client usage in addition to the new serialization object (protocol), restore the "serializer" and "deserializer" arguments to the Client classes. These are marked as deprecated and will be automatically wrapped into a small "serde" object. In order to make the various object names more distinguishable and more informative, the built-in default serializer is now called "python_memcache_pickle_serde" Additionally, default client.serde to a "no-op serializer". This object does no transforms on the data. By putting this in place, we can skip some conditionals in the code around presence or absence of a serializer and therefore simplify internally (at the cost of an extra, unnecessary, functional call in some cases). It also simplifies logic around the handling of flags because we are now *guaranteed* the presence of a serializer object which returns some flags. i.e. "default flags" are no longer the responsibility of the various serializer usage sites. This is done carefully to ensure that passing a `serializer` without a `deserializer` is respected.
* Make pickle version for python_memcache_serializer adjustableJoe Gordon2018-09-071-4/+13
| | | | | | | | It's unsafe to use the max pickle version when you are switching between versions of python with different max versions. Add a new function get_python_memcache_serializer that returns a python_memcache_serializer with any pickle version.
* correct spelling mistakeEdward Betts2017-09-011-1/+1
|
* Use only the highest, premium quality picklers available at runtime.Trevor Joynson (trevorj)2017-05-311-1/+9
| | | | Also include a forewarning note on Python "pickleableness".
* Add FLAG_BYTESAlex Tomkins2016-12-041-0/+1
| | | | Unused in serde itself (it's a default), but used for testing comparisons
* Switch to is bytes for bytes comparisionAlex Tomkins2016-12-041-1/+1
| | | | Works across all versions of Python, no need to use six for it
* Use is type for type comparisonsAlex Tomkins2016-12-041-4/+4
| | | | More pythonic
* Improve serdeAlex Tomkins2016-12-041-7/+26
| | | | | - Add text serializer/deserializer - Now more strict with serializing a type
* Use cPickle for six.movesSuhail Patel2016-10-041-9/+1
|
* We only need to import cPickle explicitly if Python 2Suhail Patel2016-10-031-5/+9
|
* Use cPickle as pickle if availableSuhail Patel2016-10-031-1/+5
|
* Make serde use BytesIO for Python 3 compatAdam Chainz2016-08-171-3/+3
|
* Add tests for serde moduleAdam Chainz2016-08-171-5/+1
|
* Make serde import on Python 3Adam Chainz2016-08-161-2/+7
|
* Flake8/pep8 the codeJohn Anderson2015-06-191-4/+5
|
* Add exception loggingMark Shirley2013-06-191-0/+2
|
* Remove errant log statementMark Shirley2013-06-191-1/+0
|
* Fixing a lot of small bugs, adding set_many and delete_many, adding ↵Charles Gordon2013-01-281-0/+67
python-memcache compatible serializer