| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
First pass at adding some type hints to pymemcache to make it easier to
develop against etc.
|
| | |
|
| | |
|
| |
|
|
| |
https://black.readthedocs.io/en/stable/index.html
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Also include a forewarning note on Python "pickleableness".
|
| |
|
|
| |
Unused in serde itself (it's a default), but used for testing comparisons
|
| |
|
|
| |
Works across all versions of Python, no need to use six for it
|
| |
|
|
| |
More pythonic
|
| |
|
|
|
| |
- Add text serializer/deserializer
- Now more strict with serializing a type
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|
|
python-memcache compatible serializer
|