Поддержка Python 3.12 (#628)

このコミットが含まれているのは:
Ilya Siamionau 2023-12-24 19:38:17 +01:00 committed by GitHub
コミット 8aafa15ccb
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 4AEE18F83AFDEB23
5個のファイルの変更9行の追加6行の削除

ファイルの表示

@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
python-version: [ 3.7, 3.8, 3.9, "3.10", "3.11" ]
python-version: [ 3.7, 3.8, 3.9, "3.10", "3.11", "3.12" ]
steps:
- name: Checkout repository.

ファイルの表示

@ -12,10 +12,10 @@ class PyTest(test):
sys.exit(pytest.main(['tests']))
with open('yandex_music/__init__.py', encoding='utf-8') as f:
with open('yandex_music/__init__.py', encoding='UTF-8') as f:
version = re.findall(r"__version__ = '(.+)'", f.read())[0]
with open('README.md', 'r', encoding='utf-8') as f:
with open('README.md', 'r', encoding='UTF-8') as f:
readme = f.read()
setup(
@ -50,6 +50,7 @@ setup(
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
@ -59,6 +60,8 @@ setup(
tests_require=['pytest'],
project_urls={
'Documentation': 'https://yandex-music.rtfd.io',
'Changes': 'https://github.com/MarshalX/yandex-music-api/blob/main/CHANGES.md',
'Tracker': 'https://github.com/MarshalX/yandex-music-api/issues',
'Telegram chat': 'https://t.me/yandex_music_api',
'Codecov': 'https://codecov.io/gh/MarshalX/yandex-music-api',
'Codacy': 'https://app.codacy.com/gh/MarshalX/yandex-music-api',

ファイルの表示

@ -56,7 +56,7 @@ class DownloadInfo(YandexMusicObject):
path = self._get_text_node_data(doc.getElementsByTagName('path'))
ts = self._get_text_node_data(doc.getElementsByTagName('ts'))
s = self._get_text_node_data(doc.getElementsByTagName('s'))
sign = md5((SIGN_SALT + path[1::] + s).encode('utf-8')).hexdigest() # noqa: S324
sign = md5((SIGN_SALT + path[1::] + s).encode('UTF-8')).hexdigest() # noqa: S324
return f'https://{host}/get-mp3/{sign}/{ts}{path}'

ファイルの表示

@ -167,7 +167,7 @@ class Request:
:class:`yandex_music.exceptions.YandexMusicError`: Базовое исключение библиотеки.
"""
try:
decoded_s = json_data.decode('utf-8')
decoded_s = json_data.decode('UTF-8')
data = json.loads(decoded_s, object_hook=Request._object_hook)
except UnicodeDecodeError as e:

ファイルの表示

@ -173,7 +173,7 @@ class Request:
:class:`yandex_music.exceptions.YandexMusicError`: Базовое исключение библиотеки.
"""
try:
decoded_s = json_data.decode('utf-8')
decoded_s = json_data.decode('UTF-8')
data = json.loads(decoded_s, object_hook=Request._object_hook)
except UnicodeDecodeError as e: