]> jfr.im git - yt-dlp.git/commitdiff
Deprecate support for python versions < 3.6
authorpukkandan <redacted>
Sat, 8 May 2021 22:24:44 +0000 (03:54 +0530)
committerpukkandan <redacted>
Sat, 8 May 2021 23:02:23 +0000 (04:32 +0530)
Closes #267

README.md
yt_dlp/YoutubeDL.py

index ca69aef049b200c06e2190b93e2ec08c5091bc26..30673d70444f9856361deca53c0d675ec1d684c3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -111,9 +111,11 @@ # INSTALLATION
 
 You can install yt-dlp using one of the following methods:
 * Download the binary from the [latest release](https://github.com/yt-dlp/yt-dlp/releases/latest) (recommended method)
-* Use [PyPI package](https://pypi.org/project/yt-dlp): `python -m pip install --upgrade yt-dlp`
-* Use pip+git: `python -m pip install --upgrade git+https://github.com/yt-dlp/yt-dlp.git@release`
-* Install master branch: `python -m pip install --upgrade git+https://github.com/yt-dlp/yt-dlp`
+* Use [PyPI package](https://pypi.org/project/yt-dlp): `python3 -m pip install --upgrade yt-dlp`
+* Use pip+git: `python3 -m pip install --upgrade git+https://github.com/yt-dlp/yt-dlp.git@release`
+* Install master branch: `python3 -m pip install --upgrade git+https://github.com/yt-dlp/yt-dlp`
+
+Note that on some systems, you may need to use `py` or `python` instead of `python3`
 
 UNIX users (Linux, macOS, BSD) can also install the [latest release](https://github.com/yt-dlp/yt-dlp/releases/latest) one of the following ways:
 
@@ -133,7 +135,7 @@ # INSTALLATION
 ```
 
 ### DEPENDENCIES
-Python versions 2.6, 2.7, or 3.2+ are currently supported. However, 3.2+ is strongly recommended and python2 support will be deprecated in the future.
+Python versions 3.6+ (CPython and PyPy) are officially supported. Other versions and implementations may or maynot work correctly.
 
 Although there are no required dependencies, `ffmpeg` and `ffprobe` are highly recommended. Other optional dependencies are `sponskrub`, `AtomicParsley`, `mutagen`, `pycryptodome` and any of the supported external downloaders. Note that the windows releases are already built with the python interpreter, mutagen and pycryptodome included.
 
@@ -146,9 +148,9 @@ ### COMPILE
 **For Windows**:
 To build the Windows executable, you must have pyinstaller (and optionally mutagen and pycryptodome)
 
-    python -m pip install --upgrade pyinstaller mutagen pycryptodome
+    python3 -m pip install --upgrade pyinstaller mutagen pycryptodome
 
-Once you have all the necessary dependencies installed, just run `py pyinst.py`. The executable will be built for the same architecture (32/64 bit) as the python used to build it. It is strongly recommended to use python3 although python2.6+ is supported.
+Once you have all the necessary dependencies installed, just run `py pyinst.py`. The executable will be built for the same architecture (32/64 bit) as the python used to build it.
 
 You can also build the executable without any version info or metadata by using:
 
index e5079a8590a37cb32d4c50a491db2e5b45f1477b..0111246caa7b500ec2cefc7c83478bd57a3cff88 100644 (file)
@@ -463,6 +463,11 @@ def __init__(self, params=None, auto_init=True):
         self.params.update(params)
         self.cache = Cache(self)
 
+        if sys.version_info < (3, 6):
+            self.report_warning(
+                'Support for Python version %d.%d have been deprecated and will break in future versions of yt-dlp! '
+                'Update to Python 3.6 or above' % sys.version_info[:2])
+
         def check_deprecated(param, option, suggestion):
             if self.params.get(param) is not None:
                 self.report_warning(