<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pymemcache.git, branch github-actions</title>
<subtitle>github.com: pinterest/pymemcache.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/'/>
<entry>
<title>Install libmemcached-dev</title>
<updated>2019-09-03T17:17:13+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@pinterest.com</email>
</author>
<published>2019-09-03T17:17:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/commit/?id=51e2f879fe83c77ad9262f0ecd2dda1aec142c31'/>
<id>51e2f879fe83c77ad9262f0ecd2dda1aec142c31</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove .travis.yml</title>
<updated>2019-09-03T17:17:03+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@pinterest.com</email>
</author>
<published>2019-09-03T17:17:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/commit/?id=384f26bc21a94dac266361d667c7fdba93a34563'/>
<id>384f26bc21a94dac266361d667c7fdba93a34563</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Pass the memcached port</title>
<updated>2019-09-03T17:12:15+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@pinterest.com</email>
</author>
<published>2019-09-03T17:12:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/commit/?id=28fa91d30c6c46af8f1f0c625d1d1d9a9e09f42f'/>
<id>28fa91d30c6c46af8f1f0c625d1d1d9a9e09f42f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Try the built-in memcached service</title>
<updated>2019-09-03T16:59:19+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@pinterest.com</email>
</author>
<published>2019-09-03T16:59:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/commit/?id=0eb2d8b951b3aa26624417aae628a45582cecfcd'/>
<id>0eb2d8b951b3aa26624417aae628a45582cecfcd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update and rename pythonpackage.yml to tests.yml</title>
<updated>2019-09-03T16:49:24+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@pinterest.com</email>
</author>
<published>2019-09-03T16:34:35+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/commit/?id=bee1029da6e4c33516e0f465a73c16135d2be938'/>
<id>bee1029da6e4c33516e0f465a73c16135d2be938</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Validate cas inputs as strings of digits (#250)</title>
<updated>2019-08-26T23:20:04+00:00</updated>
<author>
<name>Stephen Rosen</name>
<email>sirosen@globus.org</email>
</author>
<published>2019-08-26T23:20:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/commit/?id=d5dafc1490b26fc8109571bd30311c9b729ea8a5'/>
<id>d5dafc1490b26fc8109571bd30311c9b729ea8a5</id>
<content type='text'>
For consideration for v3.0.0

'cas' is documented as needing to be an int or bytestring of the digits
0-9. However, this is not actually enforced and it is possible to pass a
value to pymemcache which doesn't conform to these rules. In fact, you
can do weird things like `cas=b'noreply'` and potentially trigger
"unexpected" behavior.

To go along with validating int inputs, validate cas inputs. However,
these are not necessarily integers. Instead, if an int or string is
given, it will be encoded as a bytestring. But in order to validate the
value given, it is checked against isdigit() .

(NB: You could also use `int(cas)` for very similar checking.)

Rationale for allowing non-integer inputs to cas is not obvious.
Presumably it allows callers using `gets()` to pass the `cas` value they
get back into a `cas` command without issue. But it may be debatable.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For consideration for v3.0.0

'cas' is documented as needing to be an int or bytestring of the digits
0-9. However, this is not actually enforced and it is possible to pass a
value to pymemcache which doesn't conform to these rules. In fact, you
can do weird things like `cas=b'noreply'` and potentially trigger
"unexpected" behavior.

To go along with validating int inputs, validate cas inputs. However,
these are not necessarily integers. Instead, if an int or string is
given, it will be encoded as a bytestring. But in order to validate the
value given, it is checked against isdigit() .

(NB: You could also use `int(cas)` for very similar checking.)

Rationale for allowing non-integer inputs to cas is not obvious.
Presumably it allows callers using `gets()` to pass the `cas` value they
get back into a `cas` command without issue. But it may be debatable.</pre>
</div>
</content>
</entry>
<entry>
<title>Change serialization interface to be an object (#245)</title>
<updated>2019-08-26T18:11:31+00:00</updated>
<author>
<name>Stephen Rosen</name>
<email>sirosen@globus.org</email>
</author>
<published>2019-08-26T18:11:31+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/commit/?id=5699c9dfa7067a99000e281091dd6400a1e84122'/>
<id>5699c9dfa7067a99000e281091dd6400a1e84122</id>
<content type='text'>
* 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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.</pre>
</div>
</content>
</entry>
<entry>
<title>Inaugurate pymemcache 3.0 development</title>
<updated>2019-08-20T16:43:13+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@pinterest.com</email>
</author>
<published>2019-08-20T16:43:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/commit/?id=f6ca790148cacb9b1144248d531adeffac0f7d3c'/>
<id>f6ca790148cacb9b1144248d531adeffac0f7d3c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Check integer input values to Client methods (#243)</title>
<updated>2019-08-20T16:38:26+00:00</updated>
<author>
<name>Stephen Rosen</name>
<email>sirosen@globus.org</email>
</author>
<published>2019-08-20T16:38:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/commit/?id=782d3ea20e671325a2125f17a3bdaf20ee3d3a7a'/>
<id>782d3ea20e671325a2125f17a3bdaf20ee3d3a7a</id>
<content type='text'>
If a caller tries to send
- a fractional expiration time
- a string for the "incr" command
- delay=None (instead of delay=0)

The pymemcache base client will now catch these usage mistakes a
throw a MemcacheIllegalInputError.

Although there are existing valid (but undocumented) usages of the
current string conversion behavior, the docs state that these values
are supposed to be ints. Now if a non-int value is used, it will
immediately trigger an error.

This behavior is superior to the prior behavior especially in the
case where a command is used with `noreply=True`. It can fail to
parse, but the client won't pick up on this until the next call to
memcache which reads the reply.

The especially bad case we're seeking to avoid is this:

    from pymemcache.client.base import Client
    client = Client(("localhost", 11211))
    client.set("foo", "bar", expire=1.5, noreply=True)
    client.get("foo")  # triggers MemcacheUnknownCommandError

Applies to all commands using `expire`, `delay`, incr and decr
inputs, and memlimit.

Because this is can be a breaking change for some users, the changelog
entry is written under 3.0.0 (unreleased).

closes #240</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a caller tries to send
- a fractional expiration time
- a string for the "incr" command
- delay=None (instead of delay=0)

The pymemcache base client will now catch these usage mistakes a
throw a MemcacheIllegalInputError.

Although there are existing valid (but undocumented) usages of the
current string conversion behavior, the docs state that these values
are supposed to be ints. Now if a non-int value is used, it will
immediately trigger an error.

This behavior is superior to the prior behavior especially in the
case where a command is used with `noreply=True`. It can fail to
parse, but the client won't pick up on this until the next call to
memcache which reads the reply.

The especially bad case we're seeking to avoid is this:

    from pymemcache.client.base import Client
    client = Client(("localhost", 11211))
    client.set("foo", "bar", expire=1.5, noreply=True)
    client.get("foo")  # triggers MemcacheUnknownCommandError

Applies to all commands using `expire`, `delay`, incr and decr
inputs, and memlimit.

Because this is can be a breaking change for some users, the changelog
entry is written under 3.0.0 (unreleased).

closes #240</pre>
</div>
</content>
</entry>
<entry>
<title>Fix long_description string in Python packaging (#249)</title>
<updated>2019-08-06T19:06:21+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@pinterest.com</email>
</author>
<published>2019-08-06T19:06:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pymemcache.git/commit/?id=762856daf858360e4bd848fd82040f266bfdb2e2'/>
<id>762856daf858360e4bd848fd82040f266bfdb2e2</id>
<content type='text'>
When defining `long_description` in setup.cfg using the `file:`
directive, we need to keep everything on one line. Otherwise, it will
treat the value as a block of literal text.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When defining `long_description` in setup.cfg using the `file:`
directive, we need to keep everything on one line. Otherwise, it will
treat the value as a block of literal text.</pre>
</div>
</content>
</entry>
</feed>
