diff options
| author | James Socol <me@jamessocol.com> | 2018-08-21 10:48:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-21 10:48:26 -0400 |
| commit | 9aa28fa454ebe0bd0834578d568a331e69c24299 (patch) | |
| tree | afc4356f0cb3b2197899d9aff1efca789ff74ac9 | |
| parent | f32bb2ece62f77b234150ba3b047a7e324bd1452 (diff) | |
| parent | 561780e1315300db612fca49b06a11053821e88e (diff) | |
| download | pystatsd-9aa28fa454ebe0bd0834578d568a331e69c24299.tar.gz | |
Merge pull request #109 from jsocol/remove-abc
Remove dependency on ABCMeta.
| -rw-r--r-- | statsd/client.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/statsd/client.py b/statsd/client.py index 6d8a921..f59ae62 100644 --- a/statsd/client.py +++ b/statsd/client.py @@ -3,7 +3,6 @@ from collections import deque import functools import random import socket -import abc # Use timer that's not susceptable to time of day adjustments. try: @@ -81,15 +80,11 @@ class Timer(object): class StatsClientBase(object): """A Base class for various statsd clients.""" - __metaclass__ = abc.ABCMeta - - @abc.abstractmethod def _send(self): - pass + raise NotImplementedError() - @abc.abstractmethod def pipeline(self): - pass + raise NotImplementedError() def timer(self, stat, rate=1): return Timer(self, stat, rate) @@ -213,16 +208,13 @@ class TCPStatsClient(StatsClientBase): class PipelineBase(StatsClientBase): - __metaclass__ = abc.ABCMeta - def __init__(self, client): self._client = client self._prefix = client._prefix self._stats = deque() - @abc.abstractmethod def _send(self): - pass + raise NotImplementedError() def _after(self, data): if data is not None: |
