Merge branch 'master' into discogs-404

This commit is contained in:
Šarūnas Nejus 2025-08-08 21:57:46 +01:00 committed by GitHub
commit 9e4559b8e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 11 additions and 30 deletions

View file

@ -26,8 +26,9 @@ from abc import ABC
from collections import defaultdict
from collections.abc import Generator, Iterable, Iterator, Mapping, Sequence
from sqlite3 import Connection
from typing import TYPE_CHECKING, Any, AnyStr, Callable, Generic, TypeVar
from typing import TYPE_CHECKING, Any, AnyStr, Callable, Generic
from typing_extensions import TypeVar # default value support
from unidecode import unidecode
import beets
@ -49,10 +50,7 @@ if TYPE_CHECKING:
from .query import SQLiteType
D = TypeVar("D", bound="Database", default=Any)
else:
D = TypeVar("D", bound="Database")
D = TypeVar("D", bound="Database", default=Any)
FlexAttrs = dict[str, str]

View file

@ -10,20 +10,16 @@ from __future__ import annotations
import abc
import inspect
import re
import sys
import warnings
from typing import TYPE_CHECKING, Generic, Literal, Sequence, TypedDict, TypeVar
from typing_extensions import NotRequired
from beets.util import cached_classproperty
from beets.util.id_extractors import extract_release_id
from .plugins import BeetsPlugin, find_plugins, notify_info_yielded, send
if sys.version_info >= (3, 11):
from typing import NotRequired
else:
from typing_extensions import NotRequired
if TYPE_CHECKING:
from collections.abc import Iterable

View file

@ -19,7 +19,6 @@ from __future__ import annotations
import abc
import inspect
import re
import sys
import traceback
from collections import defaultdict
from functools import wraps
@ -27,6 +26,7 @@ from types import GenericAlias
from typing import TYPE_CHECKING, Any, Callable, Sequence, TypeVar
import mediafile
from typing_extensions import ParamSpec
import beets
from beets import logging
@ -34,11 +34,6 @@ from beets import logging
if TYPE_CHECKING:
from beets.event_types import EventType
if sys.version_info >= (3, 10):
from typing import ParamSpec
else:
from typing_extensions import ParamSpec
if TYPE_CHECKING:
from collections.abc import Iterable

View file

@ -38,10 +38,7 @@ import sys
from threading import Lock, Thread
from typing import Callable, Generator, TypeVar
if sys.version_info >= (3, 11):
from typing import TypeVarTuple, Unpack
else:
from typing_extensions import TypeVarTuple, Unpack
from typing_extensions import TypeVarTuple, Unpack
BUBBLE = "__PIPELINE_BUBBLE__"
POISON = "__PIPELINE_POISON__"

View file

@ -16,7 +16,6 @@
import os
import re
import sys
from collections.abc import Mapping
from dataclasses import dataclass
from mimetypes import guess_type
@ -30,11 +29,7 @@ from flask import (
request,
send_file,
)
if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self
from typing_extensions import Self
from beets import config
from beets.dbcore.query import (

View file

@ -63,6 +63,7 @@ For packagers:
* Optional ``extra_tags`` parameter has been removed from
``BeetsPlugin.candidates`` method signature since it is never passed in. If
you override this method in your plugin, feel free to remove this parameter.
* Loosened `typing_extensions`` dependency in pyproject.toml to apply to every python version.
For plugin developers:
@ -92,7 +93,6 @@ For plugin developers:
Old imports are now deprecated and will be removed in version ``3.0.0``.
* ``beets.ui.decargs`` is deprecated and will be removed in version ``3.0.0``.
Other changes:
* Refactor: Split responsibilities of Plugins into MetaDataPlugins and general Plugins.

2
poetry.lock generated
View file

@ -3292,4 +3292,4 @@ web = ["flask", "flask-cors"]
[metadata]
lock-version = "2.0"
python-versions = ">=3.9,<4"
content-hash = "b3f2746a43227fe639d17eb22d7924e30c9d83eef53dce2c10388c602f0c6665"
content-hash = "c98049afba33c3cb22359ae75bb73bcc5d74b27c5a45802292a56f8d3c547f1e"

View file

@ -52,7 +52,7 @@ musicbrainzngs = ">=0.4"
numpy = ">=1.24.4"
platformdirs = ">=3.5.0"
pyyaml = "*"
typing_extensions = { version = "*", python = "<=3.10" }
typing_extensions = "*"
unidecode = ">=1.3.6"
beautifulsoup4 = { version = "*", optional = true }