diff options
author | Mike Crute <mike@crute.us> | 2017-10-07 01:06:00 +0000 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2017-10-07 01:06:02 +0000 |
commit | 1ff624aaf720f6e953c8475ad56a7a59f47ea956 (patch) | |
tree | e7ada66e9bb444d461720983f1b0e70bdf5aafba | |
parent | 44570223ea9c72ef8c89ea76632df1ecb69b5fab (diff) | |
download | pydora-1ff624aaf720f6e953c8475ad56a7a59f47ea956.tar.bz2 pydora-1ff624aaf720f6e953c8475ad56a7a59f47ea956.tar.xz pydora-1ff624aaf720f6e953c8475ad56a7a59f47ea956.zip |
Import directly from modules
Importing from the base of a module is deprecated and will be removed in
a future major version. Nothing internally should be doing this.
-rw-r--r-- | pandora/clientbuilder.py | 3 | ||||
-rw-r--r-- | pandora/models/pandora.py | 4 | ||||
-rw-r--r-- | tests/test_pandora/test_clientbuilder.py | 3 | ||||
-rw-r--r-- | tests/test_pandora/test_models.py | 7 |
4 files changed, 11 insertions, 6 deletions
diff --git a/pandora/clientbuilder.py b/pandora/clientbuilder.py index 6c29678..53abdf4 100644 --- a/pandora/clientbuilder.py +++ b/pandora/clientbuilder.py | |||
@@ -7,7 +7,8 @@ configuration formats into a fully built APIClient. | |||
7 | import os.path | 7 | import os.path |
8 | 8 | ||
9 | from .py2compat import ConfigParser | 9 | from .py2compat import ConfigParser |
10 | from . import Encryptor, APITransport, DEFAULT_API_HOST, APIClient | 10 | from .client import APIClient |
11 | from .transport import Encryptor, APITransport, DEFAULT_API_HOST | ||
11 | 12 | ||
12 | 13 | ||
13 | class TranslatingDict(dict): | 14 | class TranslatingDict(dict): |
diff --git a/pandora/models/pandora.py b/pandora/models/pandora.py index 3ffac7d..c041b40 100644 --- a/pandora/models/pandora.py +++ b/pandora/models/pandora.py | |||
@@ -1,6 +1,6 @@ | |||
1 | from .. import BaseAPIClient | 1 | from ..client import BaseAPIClient |
2 | from . import Field, PandoraModel, PandoraListModel, PandoraDictListModel | ||
3 | from ..errors import ParameterMissing | 2 | from ..errors import ParameterMissing |
3 | from . import Field, PandoraModel, PandoraListModel, PandoraDictListModel | ||
4 | 4 | ||
5 | 5 | ||
6 | class Station(PandoraModel): | 6 | class Station(PandoraModel): |
diff --git a/tests/test_pandora/test_clientbuilder.py b/tests/test_pandora/test_clientbuilder.py index 5ac6e7d..aaccdf8 100644 --- a/tests/test_pandora/test_clientbuilder.py +++ b/tests/test_pandora/test_clientbuilder.py | |||
@@ -3,7 +3,8 @@ from unittest import TestCase | |||
3 | 3 | ||
4 | import pandora.clientbuilder as cb | 4 | import pandora.clientbuilder as cb |
5 | from pandora.py2compat import Mock | 5 | from pandora.py2compat import Mock |
6 | from pandora import APIClient, DEFAULT_API_HOST | 6 | from pandora.client import APIClient |
7 | from pandora.transport import DEFAULT_API_HOST | ||
7 | 8 | ||
8 | 9 | ||
9 | class TestTranslatingDict(TestCase): | 10 | class TestTranslatingDict(TestCase): |
diff --git a/tests/test_pandora/test_models.py b/tests/test_pandora/test_models.py index 37a760f..2ae7d11 100644 --- a/tests/test_pandora/test_models.py +++ b/tests/test_pandora/test_models.py | |||
@@ -1,12 +1,15 @@ | |||
1 | from unittest import TestCase | 1 | from unittest import TestCase |
2 | from datetime import datetime | 2 | from datetime import datetime |
3 | from pandora.py2compat import Mock, patch | 3 | from pandora.py2compat import Mock, patch |
4 | from pandora import APIClient | 4 | |
5 | from pandora.models.pandora import AdItem, PlaylistModel, SearchResultItem, SearchResult | 5 | from pandora.client import APIClient |
6 | from pandora.errors import ParameterMissing | 6 | from pandora.errors import ParameterMissing |
7 | from pandora.models.pandora import SearchResult | ||
8 | from pandora.models.pandora import AdItem, PlaylistModel, SearchResultItem | ||
7 | 9 | ||
8 | import pandora.models as m | 10 | import pandora.models as m |
9 | 11 | ||
12 | |||
10 | class TestField(TestCase): | 13 | class TestField(TestCase): |
11 | 14 | ||
12 | def test_defaults(self): | 15 | def test_defaults(self): |