mirror of https://github.com/streamlink/streamlink
build: add exceptiongroup dependency
Add the `exceptiongroup` dependency directly to Streamlink, so we can write `ExceptionGroup` handling code on all supported versions of Python without having to rely on `trio`'s conditional dependency.
This commit is contained in:
parent
764beeca4f
commit
af4c69188a
|
@ -442,6 +442,9 @@ Streamlink defines a `build system <pyproject.toml_>`__ according to `PEP-517`_
|
|||
* - runtime
|
||||
- `certifi`_
|
||||
- Used for loading the CA bundle extracted from the Mozilla Included CA Certificate List
|
||||
* - runtime
|
||||
- `exceptiongroup`_
|
||||
- Used for ``ExceptionGroup`` handling, to allow writing async trio code on older Python versions.
|
||||
* - runtime
|
||||
- `isodate`_
|
||||
- Used for parsing ISO8601 strings
|
||||
|
@ -492,6 +495,7 @@ Streamlink defines a `build system <pyproject.toml_>`__ according to `PEP-517`_
|
|||
.. _versioningit: https://versioningit.readthedocs.io/en/stable/
|
||||
|
||||
.. _certifi: https://certifiio.readthedocs.io/en/latest/
|
||||
.. _exceptiongroup: https://github.com/agronholm/exceptiongroup
|
||||
.. _isodate: https://pypi.org/project/isodate/
|
||||
.. _lxml: https://lxml.de/
|
||||
.. _pycountry: https://pypi.org/project/pycountry/
|
||||
|
|
|
@ -56,6 +56,7 @@ dynamic = [
|
|||
requires-python = ">=3.8"
|
||||
dependencies = [
|
||||
"certifi",
|
||||
"exceptiongroup",
|
||||
"isodate",
|
||||
"lxml >=4.6.4,<6",
|
||||
"pycountry",
|
||||
|
|
|
@ -5,6 +5,9 @@ import sys
|
|||
import warnings
|
||||
from typing import Any, Callable, Dict, Optional, Tuple
|
||||
|
||||
# import exceptiongroup, so it can monkeypatch ExceptionGroup logic on <=py311
|
||||
import exceptiongroup # noqa: F401
|
||||
|
||||
from streamlink.exceptions import StreamlinkDeprecationWarning
|
||||
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import warnings
|
|||
from functools import lru_cache
|
||||
from typing import Any, Dict, Optional, Tuple, Type
|
||||
|
||||
import streamlink.compat # noqa: F401
|
||||
from streamlink import __version__
|
||||
from streamlink.exceptions import NoPluginError, PluginError, StreamlinkDeprecationWarning
|
||||
from streamlink.logger import StreamlinkLogger
|
||||
|
|
Loading…
Reference in New Issue