Skip to content

Commit 4dbef23

Browse files
author
brentru
committed
deprecating stream in v2 client, handled by API
1 parent 204889e commit 4dbef23

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

Adafruit_IO/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
from .client import Client
2222
from .mqtt_client import MQTTClient
2323
from .errors import AdafruitIOError, RequestError, ThrottlingError
24-
from .model import Data, Stream, Feed, Group
24+
from .model import Data, Feed, Group
2525
from _version import __version__

Adafruit_IO/model.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
'position',
3939
'id' ]
4040

41-
STREAM_FIELDS = [ 'completed_at',
42-
'created_at',
43-
'id',
44-
'value' ]
45-
4641
FEED_FIELDS = [ 'name',
4742
'key',
4843
'description',
@@ -71,19 +66,16 @@
7166
# client it might be prudent to revisit this decision and consider making these
7267
# full fledged classes that are mutable.
7368
Data = namedtuple('Data', DATA_FIELDS)
74-
Stream = namedtuple('Stream', STREAM_FIELDS)
7569
Feed = namedtuple('Feed', FEED_FIELDS)
7670
Group = namedtuple('Group', GROUP_FIELDS)
7771

7872

7973
# Magic incantation to make all parameters to the initializers optional with a
8074
# default value of None.
8175
Data.__new__.__defaults__ = tuple(None for x in DATA_FIELDS)
82-
Stream.__new__.__defaults__ = tuple(None for x in STREAM_FIELDS)
83-
Feed.__new__.__defaults__ = tuple(None for x in FEED_FIELDS)
76+
Feed.__new__.__defaults__ = tuple(None for x in FEED_FIELDS)
8477
Group.__new__.__defaults__ = tuple(None for x in GROUP_FIELDS)
8578

86-
8779
# Define methods to convert from dicts to the data types.
8880
def _from_dict(cls, data):
8981
# Convert dict to call to class initializer (to work with the data types
@@ -108,6 +100,5 @@ def _group_from_dict(cls, data):
108100

109101
# Now add the from_dict class methods defined above to the data types.
110102
Data.from_dict = classmethod(_from_dict)
111-
Stream.from_dict = classmethod(_from_dict)
112103
Feed.from_dict = classmethod(_feed_from_dict)
113104
Group.from_dict = classmethod(_group_from_dict)

0 commit comments

Comments
 (0)