diff --git a/poetry.lock b/poetry.lock index 5bc85ad0b..024787de8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -560,14 +560,14 @@ protobuf = ["grpcio-tools (>=1.69.0)"] [[package]] name = "h11" -version = "0.12.0" +version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" groups = ["main"] files = [ - {file = "h11-0.12.0-py3-none-any.whl", hash = "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6"}, - {file = "h11-0.12.0.tar.gz", hash = "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042"}, + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, ] [[package]] @@ -634,47 +634,50 @@ files = [ [[package]] name = "httpcore" -version = "0.13.7" +version = "0.16.3" description = "A minimal low-level HTTP client." optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" groups = ["main"] files = [ - {file = "httpcore-0.13.7-py3-none-any.whl", hash = "sha256:369aa481b014cf046f7067fddd67d00560f2f00426e79569d99cb11245134af0"}, - {file = "httpcore-0.13.7.tar.gz", hash = "sha256:036f960468759e633574d7c121afba48af6419615d36ab8ede979f1ad6276fa3"}, + {file = "httpcore-0.16.3-py3-none-any.whl", hash = "sha256:da1fb708784a938aa084bde4feb8317056c55037247c787bd7e19eb2c2949dc0"}, + {file = "httpcore-0.16.3.tar.gz", hash = "sha256:c5d6f04e2fc530f39e0c077e6a30caa53f1451096120f1f38b954afd0b17c0cb"}, ] [package.dependencies] -anyio = "==3.*" -h11 = ">=0.11,<0.13" +anyio = ">=3.0,<5.0" +certifi = "*" +h11 = ">=0.13,<0.15" sniffio = "==1.*" [package.extras] http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] [[package]] name = "httpx" -version = "0.19.0" +version = "0.23.3" description = "The next generation HTTP client." optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" groups = ["main"] files = [ - {file = "httpx-0.19.0-py3-none-any.whl", hash = "sha256:9bd728a6c5ec0a9e243932a9983d57d3cc4a87bb4f554e1360fce407f78f9435"}, - {file = "httpx-0.19.0.tar.gz", hash = "sha256:92ecd2c00c688b529eda11cedb15161eaf02dee9116712f621c70d9a40b2cdd0"}, + {file = "httpx-0.23.3-py3-none-any.whl", hash = "sha256:a211fcce9b1254ea24f0cd6af9869b3d29aba40154e947d2a07bb499b3e310d6"}, + {file = "httpx-0.23.3.tar.gz", hash = "sha256:9818458eb565bb54898ccb9b8b251a28785dd4a55afbc23d0eb410754fe7d0f9"}, ] [package.dependencies] certifi = "*" -charset-normalizer = "*" h2 = {version = ">=3,<5", optional = true, markers = "extra == \"http2\""} -httpcore = ">=0.13.3,<0.14.0" +httpcore = ">=0.15.0,<0.17.0" rfc3986 = {version = ">=1.3,<2", extras = ["idna2008"]} sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<13)"] http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] [[package]] name = "hyperframe" @@ -1270,8 +1273,8 @@ files = [ [package.dependencies] numpy = [ {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, - {version = ">=1.20.3", markers = "python_version < \"3.10\""}, {version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, + {version = ">=1.20.3", markers = "python_version < \"3.10\""}, ] python-dateutil = ">=2.8.1" pytz = ">=2020.1" @@ -2416,4 +2419,4 @@ evaluation = ["musdb", "museval"] [metadata] lock-version = "2.1" python-versions = ">=3.8,<3.12" -content-hash = "c184b834b87336d2361ab6899b7fe64e7c5441b4d65e15a026087a3a38437fb1" +content-hash = "8bf43427898384f280251949103d462f2578bfb3d3ec8bb1f0c4cddb4b5b71c0" diff --git a/pyproject.toml b/pyproject.toml index 8c0af86e2..9ca4a0b88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ include = ["LICENSE", "spleeter/resources/*.json"] [tool.poetry.dependencies] python = ">=3.8,<3.12" ffmpeg-python = "^0.2.0" -httpx = {extras = ["http2"], version = "^0.19.0"} +httpx = {extras = ["http2"], version = "^0.23.1"} typer = "^0.3.2" musdb = {version = "^0.4.0", optional = true} museval = {version = "^0.4.0", optional = true} diff --git a/spleeter/model/provider/github.py b/spleeter/model/provider/github.py index 10a1232ba..4ec60bc1f 100644 --- a/spleeter/model/provider/github.py +++ b/spleeter/model/provider/github.py @@ -121,7 +121,7 @@ def checksum(self, name: str) -> str: self.CHECKSUM_INDEX, ) ) - response: httpx.Response = httpx.get(url) + response: httpx.Response = httpx.get(url, follow_redirects=True) response.raise_for_status() index: Dict = response.json() if name not in index: @@ -144,7 +144,7 @@ def download(self, name: str, path: str) -> None: url = f"{url}.tar.gz" logger.info(f"Downloading model archive {url}") with httpx.Client(http2=True) as client: - with client.stream("GET", url) as response: + with client.stream("GET", url, follow_redirects=True) as response: response.raise_for_status() archive = NamedTemporaryFile(delete=False) try: