1
0
mirror of https://github.com/Zulko/moviepy.git synced 2021-07-27 01:17:47 +03:00

Remove requests as a dependency (#1567)

This commit is contained in:
Álvaro Mondéjar
2021-05-18 20:15:11 +02:00
committed by GitHub
parent 2947e4a036
commit c8887f03f6
3 changed files with 5 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Renamed `colorx` FX by `multiply_color` [\#1475](https://github.com/Zulko/moviepy/pull/1475)
- Renamed `speedx` FX by `multiply_speed` [\#1478](https://github.com/Zulko/moviepy/pull/1478)
- `make_loopable` transition must be used as FX [\#1477](https://github.com/Zulko/moviepy/pull/1477)
- `requests` package is no longer a dependency [\#1566](https://github.com/Zulko/moviepy/pull/1566)
### Deprecated <!-- for soon-to-be removed features -->
- `moviepy.video.fx.all` and `moviepy.audio.fx.all`. Use the fx method directly from the clip instance or import the fx function from `moviepy.video.fx` and `moviepy.audio.fx`. [\#1105](https://github.com/Zulko/moviepy/pull/1105)

View File

@@ -1,8 +1,8 @@
"""Utilities to get a file from the internet."""
import os
import requests
import shutil
import urllib.request
from moviepy.tools import subprocess_call
@@ -18,10 +18,8 @@ def download_webfile(url, filename, overwrite=False):
return
if "." in url:
r = requests.get(url, stream=True)
with open(filename, "wb") as fd:
for chunk in r.iter_content(chunk_size=128):
fd.write(chunk)
with urllib.request.urlopen(url) as req, open(filename, "wb") as f:
shutil.copyfileobj(req, f, 128)
else:
try:

View File

@@ -77,7 +77,6 @@ requires = [
"imageio>=2.5,<3.0",
"imageio_ffmpeg>=0.2.0",
"numpy>=1.17.3,<=1.20",
"requests>=2.8.1,<3.0",
"proglog<=1.0.0",
]