Merge pull request #289 from pylast/rm-2-3.4

Drop support for legacy Python 3.4
This commit is contained in:
Hugo 2018-12-30 00:18:54 +02:00 committed by GitHub
commit 718fba04b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 17 deletions

View file

@ -25,8 +25,6 @@ matrix:
env: TOXENV=py36 env: TOXENV=py36
- python: 3.5 - python: 3.5
env: TOXENV=py35 env: TOXENV=py35
- python: 3.4
env: TOXENV=py34
- python: pypy3 - python: pypy3
env: TOXENV=pypy3 env: TOXENV=pypy3
- python: 3.8-dev - python: 3.8-dev

View file

@ -29,7 +29,7 @@ Or from requirements.txt:
Note: Note:
* pylast 3.0.0+ supports Python 3.4+ ([#265](https://github.com/pylast/pylast/issues/265)) * pylast 3.0.0+ supports Python 3.5+ ([#265](https://github.com/pylast/pylast/issues/265))
* pyLast 2.2.0 - 2.4.0 supports Python 2.7.10+, 3.4, 3.5, 3.6, 3.7. * pyLast 2.2.0 - 2.4.0 supports Python 2.7.10+, 3.4, 3.5, 3.6, 3.7.
* pyLast 2.0.0 - 2.1.0 supports Python 2.7.10+, 3.4, 3.5, 3.6. * pyLast 2.0.0 - 2.1.0 supports Python 2.7.10+, 3.4, 3.5, 3.6.
* pyLast 1.7.0 - 1.9.0 supports Python 2.7, 3.3, 3.4, 3.5, 3.6. * pyLast 1.7.0 - 1.9.0 supports Python 2.7, 3.3, 3.4, 3.5, 3.6.

View file

@ -138,7 +138,7 @@ logger = logging.getLogger(__name__)
logging.getLogger(__name__).addHandler(logging.NullHandler()) logging.getLogger(__name__).addHandler(logging.NullHandler())
class _Network(object): class _Network:
""" """
A music social network website such as Last.fm or A music social network website such as Last.fm or
one with a Last.fm-compatible API. one with a Last.fm-compatible API.
@ -795,7 +795,7 @@ class LibreFMNetwork(_Network):
) )
class _ShelfCacheBackend(object): class _ShelfCacheBackend:
"""Used as a backend for caching cacheable requests.""" """Used as a backend for caching cacheable requests."""
def __init__(self, file_path=None): def __init__(self, file_path=None):
@ -816,7 +816,7 @@ class _ShelfCacheBackend(object):
self.shelf[key] = xml_string self.shelf[key] = xml_string
class _Request(object): class _Request:
"""Representing an abstract web service operation.""" """Representing an abstract web service operation."""
def __init__(self, network, method_name, params=None): def __init__(self, network, method_name, params=None):
@ -981,7 +981,7 @@ class _Request(object):
raise WSError(self.network, status, details) raise WSError(self.network, status, details)
class SessionKeyGenerator(object): class SessionKeyGenerator:
"""Methods of generating a session key: """Methods of generating a session key:
1) Web Authentication: 1) Web Authentication:
a. network = get_*_network(API_KEY, API_SECRET) a. network = get_*_network(API_KEY, API_SECRET)
@ -1104,7 +1104,7 @@ def _string_output(func):
return r return r
class _BaseObject(object): class _BaseObject:
"""An abstract webservices object.""" """An abstract webservices object."""
network = None network = None
@ -1193,7 +1193,7 @@ class _BaseObject(object):
return _extract(node, section) return _extract(node, section)
class _Chartable(object): class _Chartable:
"""Common functions for classes with charts.""" """Common functions for classes with charts."""
def __init__(self, ws_prefix): def __init__(self, ws_prefix):
@ -1264,7 +1264,7 @@ class _Chartable(object):
return seq return seq
class _Taggable(object): class _Taggable:
"""Common functions for classes with tags.""" """Common functions for classes with tags."""
def __init__(self, ws_prefix): def __init__(self, ws_prefix):
@ -1593,7 +1593,7 @@ class Album(_Opus):
__hash__ = _Opus.__hash__ __hash__ = _Opus.__hash__
def __init__(self, artist, title, network, username=None, info=None): def __init__(self, artist, title, network, username=None, info=None):
super(Album, self).__init__(artist, title, network, "album", username, info) super().__init__(artist, title, network, "album", username, info)
def get_tracks(self): def get_tracks(self):
"""Returns the list of Tracks on this album.""" """Returns the list of Tracks on this album."""
@ -2062,7 +2062,7 @@ class Track(_Opus):
__hash__ = _Opus.__hash__ __hash__ = _Opus.__hash__
def __init__(self, artist, title, network, username=None, info=None): def __init__(self, artist, title, network, username=None, info=None):
super(Track, self).__init__(artist, title, network, "track", username, info) super().__init__(artist, title, network, "track", username, info)
def get_correction(self): def get_correction(self):
"""Returns the corrected track name.""" """Returns the corrected track name."""

View file

@ -10,7 +10,7 @@ with open("pylast/version.py") as f:
version = version_dict["__version__"] version = version_dict["__version__"]
if sys.version_info < (3, 4): if sys.version_info < (3, 5):
error = """pylast 3.0 and above are no longer compatible with Python 2. error = """pylast 3.0 and above are no longer compatible with Python 2.
This is pylast {} and you are using Python {}. This is pylast {} and you are using Python {}.
@ -64,7 +64,6 @@ setup(
"Topic :: Multimedia :: Sound/Audio", "Topic :: Multimedia :: Sound/Audio",
"Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.7",
@ -72,7 +71,7 @@ setup(
"Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python :: Implementation :: PyPy",
], ],
python_requires=">=3.4", python_requires=">=3.5",
keywords=["Last.fm", "music", "scrobble", "scrobbling"], keywords=["Last.fm", "music", "scrobble", "scrobbling"],
packages=find_packages(exclude=("tests*",)), packages=find_packages(exclude=("tests*",)),
license="Apache2", license="Apache2",

View file

@ -1,5 +1,5 @@
[tox] [tox]
envlist = py37, py36, py35, py34, pypy3, py38dev envlist = py37, py36, py35, pypy3, py38dev
recreate = False recreate = False
[testenv] [testenv]