Remove deprecated space-based behavior names

This commit is contained in:
lericson 2010-06-03 16:36:21 +02:00
parent 74d5f9ac0b
commit f357c00f2b

View File

@ -63,7 +63,6 @@ See http://sendapatch.se/projects/pylibmc/
""" """
import _pylibmc import _pylibmc
from warnings import warn
from Queue import Queue from Queue import Queue
__all__ = ["hashers", "distributions", "Client"] __all__ = ["hashers", "distributions", "Client"]
@ -158,11 +157,6 @@ class Client(_pylibmc.client):
This also happens for `distribution`. This also happens for `distribution`.
""" """
behaviors = behaviors.copy() behaviors = behaviors.copy()
if any(" " in k for k in behaviors):
warn(DeprecationWarning("space-delimited behavior names "
"are deprecated"))
for k in [k for k in behaviors if " " in k]:
behaviors[k.replace(" ", "_")] = behaviors.pop(k)
if behaviors.get("hash") is not None: if behaviors.get("hash") is not None:
behaviors["hash"] = hashers[behaviors["hash"]] behaviors["hash"] = hashers[behaviors["hash"]]
if behaviors.get("ketama_hash") is not None: if behaviors.get("ketama_hash") is not None: