Repository: yt-dlp/yt-dlp (branch: mx3)
Commit date: 2024-01-21T02:27:27Z

Workflow file: .github/workflows/quick-test.yml (Quick Test)
name: Quick Test
on: [push, pull_request]
permissions:
  contents: read

jobs:
  tests:
    name: Core Test
    if: "!contains(github.event.head_commit.message, 'ci skip all')"
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    steps:
    - uses: actions/checkout@v4
    - name: Set up Python 3.11
      uses: actions/setup-python@v4
      with:
        python-version: '3.11'
    - name: Install test requirements
      run: pip install pytest -r requirements.txt
    - name: Run tests
      run: |
        python3 -m yt_dlp -v || true
        ./devscripts/run_tests.sh core
  flake8:
    name: Linter
    if: "!contains(github.event.head_commit.message, 'ci skip all')"
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-python@v4
    - name: Install flake8
      run: pip install flake8
    - name: Make lazy extractors
      run: python devscripts/make_lazy_extractors.py
    - name: Run flake8
      run: flake8 .

env:
  PIP_INDEX_URL: http://localhost:8629/2024-01-21
  UV_INDEX_URL: http://localhost:8629/2024-01-21


Failed build logs:
step_name: Core Test/5_Run tests.txt
log: ##[group]Run python3 -m yt_dlp -v || true
[36;1mpython3 -m yt_dlp -v || true[0m
[36;1mpython3 ./devscripts/run_tests.py core[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
##[endgroup]
[debug] Command-line config: ['-v']
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/__main__.py", line 17, in <module>
    yt_dlp.main()
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/__init__.py", line 1009, in main
    _exit(*variadic(_real_main(argv)))
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/__init__.py", line 963, in _real_main
    with YoutubeDL(ydl_opts) as ydl:
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 689, in __init__
    self.print_debug_header()
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 3919, in print_debug_header
    from .extractor.extractors import _LAZY_LOADER
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/extractor/extractors.py", line 17, in <module>
    from ._extractors import *  # noqa: F403
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/extractor/_extractors.py", line 1140, in <module>
    from .mx3 import (
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/extractor/mx3.py", line 80, in <module>
    class Mx3IE(Mx3BaseIE):
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/extractor/mx3.py", line 82, in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
NameError: name '_Mx3BaseIE' is not defined
Running ['pytest', '-Werror', '--tb=short', '--color=yes', '-m', 'not download']
[1m============================= test session starts ==============================[0m
platform linux -- Python 3.8.18, pytest-7.4.4, pluggy-1.3.0 -- /opt/hostedtoolcache/Python/3.8.18/x64/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/yt-dlp/yt-dlp
configfile: setup.cfg
[1mcollecting ... [0mcollected 653 items / 9 errors / 6 deselected / 647 selected

==================================== ERRORS ====================================
[31m[1m_________________ ERROR collecting test/test_InfoExtractor.py __________________[0m
[1m[31mtest/test_InfoExtractor.py[0m:16: in <module>
    from yt_dlp.extractor import YoutubeIE, get_info_extractor
[1m[31m<frozen importlib._bootstrap>[0m:1039: in _handle_fromlist
    ???
[1m[31myt_dlp/compat/compat_utils.py[0m:36: in __getattribute__
    ret = super().__getattribute__(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:54: in __getattr__
    ret = from_child(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:68: in from_child
    child = importlib.import_module(child, parent.__name__)
[1m[31m/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py[0m:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
[1m[31myt_dlp/extractor/extractors.py[0m:17: in <module>
    from ._extractors import *  # noqa: F403
[1m[31myt_dlp/extractor/_extractors.py[0m:1140: in <module>
    from .mx3 import (
[1m[31myt_dlp/extractor/mx3.py[0m:80: in <module>
    class Mx3IE(Mx3BaseIE):
[1m[31myt_dlp/extractor/mx3.py[0m:82: in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
[1m[31mE   NameError: name '_Mx3BaseIE' is not defined[0m
[31m[1m___________________ ERROR collecting test/test_YoutubeDL.py ____________________[0m
[1m[31mtest/test_YoutubeDL.py[0m:17: in <module>
    from yt_dlp.extractor import YoutubeIE
[1m[31m<frozen importlib._bootstrap>[0m:1039: in _handle_fromlist
    ???
[1m[31myt_dlp/compat/compat_utils.py[0m:36: in __getattribute__
    ret = super().__getattribute__(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:54: in __getattr__
    ret = from_child(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:68: in from_child
    child = importlib.import_module(child, parent.__name__)
[1m[31m/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py[0m:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
[1m[31myt_dlp/extractor/extractors.py[0m:17: in <module>
    from ._extractors import *  # noqa: F403
[1m[31myt_dlp/extractor/_extractors.py[0m:1140: in <module>
    from .mx3 import (
[1m[31myt_dlp/extractor/mx3.py[0m:80: in <module>
    class Mx3IE(Mx3BaseIE):
[1m[31myt_dlp/extractor/mx3.py[0m:82: in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
[1m[31mE   NameError: name '_Mx3BaseIE' is not defined[0m
[31m[1m____________________ ERROR collecting test/test_all_urls.py ____________________[0m
[1m[31mtest/test_all_urls.py[0m:14: in <module>
    from yt_dlp.extractor import FacebookIE, YoutubeIE, gen_extractors
[1m[31m<frozen importlib._bootstrap>[0m:1039: in _handle_fromlist
    ???
[1m[31myt_dlp/compat/compat_utils.py[0m:36: in __getattribute__
    ret = super().__getattribute__(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:54: in __getattr__
    ret = from_child(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:68: in from_child
    child = importlib.import_module(child, parent.__name__)
[1m[31m/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py[0m:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
[1m[31myt_dlp/extractor/extractors.py[0m:17: in <module>
    from ._extractors import *  # noqa: F403
[1m[31myt_dlp/extractor/_extractors.py[0m:1140: in <module>
    from .mx3 import (
[1m[31myt_dlp/extractor/mx3.py[0m:80: in <module>
    class Mx3IE(Mx3BaseIE):
[1m[31myt_dlp/extractor/mx3.py[0m:82: in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
[1m[31mE   NameError: name '_Mx3BaseIE' is not defined[0m
[31m[1m____________________ ERROR collecting test/test_download.py ____________________[0m
[1m[31mtest/test_download.py[0m:286: in <module>
    inject_tests(normal_test_cases)
[1m[31mtest/test_download.py[0m:275: in inject_tests
    for test_case in test_cases:
[1m[31mtest/helper.py[0m:91: in gettestcases
    for ie in yt_dlp.extractor.gen_extractors():
[1m[31myt_dlp/extractor/__init__.py[0m:20: in gen_extractors
    return [klass() for klass in gen_extractor_classes()]
[1m[31myt_dlp/extractor/__init__.py[0m:11: in gen_extractor_classes
    from .extractors import _ALL_CLASSES
[1m[31myt_dlp/extractor/extractors.py[0m:17: in <module>
    from ._extractors import *  # noqa: F403
[1m[31myt_dlp/extractor/_extractors.py[0m:1140: in <module>
    from .mx3 import (
[1m[31myt_dlp/extractor/mx3.py[0m:80: in <module>
    class Mx3IE(Mx3BaseIE):
[1m[31myt_dlp/extractor/mx3.py[0m:82: in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
[1m[31mE   NameError: name '_Mx3BaseIE' is not defined[0m
[31m[1m_____________ ERROR collecting test/test_iqiyi_sdk_interpreter.py ______________[0m
[1m[31mtest/test_iqiyi_sdk_interpreter.py[0m:12: in <module>
    from yt_dlp.extractor import IqiyiIE
[1m[31m<frozen importlib._bootstrap>[0m:1039: in _handle_fromlist
    ???
[1m[31myt_dlp/compat/compat_utils.py[0m:36: in __getattribute__
    ret = super().__getattribute__(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:54: in __getattr__
    ret = from_child(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:68: in from_child
    child = importlib.import_module(child, parent.__name__)
[1m[31m/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py[0m:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
[1m[31myt_dlp/extractor/extractors.py[0m:17: in <module>
    from ._extractors import *  # noqa: F403
[1m[31myt_dlp/extractor/_extractors.py[0m:1140: in <module>
    from .mx3 import (
[1m[31myt_dlp/extractor/mx3.py[0m:80: in <module>
    class Mx3IE(Mx3BaseIE):
[1m[31myt_dlp/extractor/mx3.py[0m:82: in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
[1m[31mE   NameError: name '_Mx3BaseIE' is not defined[0m
[31m[1m___________________ ERROR collecting test/test_subtitles.py ____________________[0m
[1m[31mtest/test_subtitles.py[0m:12: in <module>
    from yt_dlp.extractor import (
[1m[31m<frozen importlib._bootstrap>[0m:1039: in _handle_fromlist
    ???
[1m[31myt_dlp/compat/compat_utils.py[0m:36: in __getattribute__
    ret = super().__getattribute__(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:54: in __getattr__
    ret = from_child(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:68: in from_child
    child = importlib.import_module(child, parent.__name__)
[1m[31m/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py[0m:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
[1m[31myt_dlp/extractor/extractors.py[0m:17: in <module>
    from ._extractors import *  # noqa: F403
[1m[31myt_dlp/extractor/_extractors.py[0m:1140: in <module>
    from .mx3 import (
[1m[31myt_dlp/extractor/mx3.py[0m:80: in <module>
    class Mx3IE(Mx3BaseIE):
[1m[31myt_dlp/extractor/mx3.py[0m:82: in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
[1m[31mE   NameError: name '_Mx3BaseIE' is not defined[0m
[31m[1m_________________ ERROR collecting test/test_youtube_lists.py __________________[0m
[1m[31mtest/test_youtube_lists.py[0m:12: in <module>
    from yt_dlp.extractor import YoutubeIE, YoutubeTabIE
[1m[31m<frozen importlib._bootstrap>[0m:1039: in _handle_fromlist
    ???
[1m[31myt_dlp/compat/compat_utils.py[0m:36: in __getattribute__
    ret = super().__getattribute__(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:54: in __getattr__
    ret = from_child(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:68: in from_child
    child = importlib.import_module(child, parent.__name__)
[1m[31m/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py[0m:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
[1m[31myt_dlp/extractor/extractors.py[0m:17: in <module>
    from ._extractors import *  # noqa: F403
[1m[31myt_dlp/extractor/_extractors.py[0m:1140: in <module>
    from .mx3 import (
[1m[31myt_dlp/extractor/mx3.py[0m:80: in <module>
    class Mx3IE(Mx3BaseIE):
[1m[31myt_dlp/extractor/mx3.py[0m:82: in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
[1m[31mE   NameError: name '_Mx3BaseIE' is not defined[0m
[31m[1m__________________ ERROR collecting test/test_youtube_misc.py __________________[0m
[1m[31mtest/test_youtube_misc.py[0m:11: in <module>
    from yt_dlp.extractor import YoutubeIE
[1m[31m<frozen importlib._bootstrap>[0m:1039: in _handle_fromlist
    ???
[1m[31myt_dlp/compat/compat_utils.py[0m:36: in __getattribute__
    ret = super().__getattribute__(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:54: in __getattr__
    ret = from_child(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:68: in from_child
    child = importlib.import_module(child, parent.__name__)
[1m[31m/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py[0m:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
[1m[31myt_dlp/extractor/extractors.py[0m:17: in <module>
    from ._extractors import *  # noqa: F403
[1m[31myt_dlp/extractor/_extractors.py[0m:1140: in <module>
    from .mx3 import (
[1m[31myt_dlp/extractor/mx3.py[0m:80: in <module>
    class Mx3IE(Mx3BaseIE):
[1m[31myt_dlp/extractor/mx3.py[0m:82: in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
[1m[31mE   NameError: name '_Mx3BaseIE' is not defined[0m
[31m[1m_______________ ERROR collecting test/test_youtube_signature.py ________________[0m
[1m[31mtest/test_youtube_signature.py[0m:17: in <module>
    from yt_dlp.extractor import YoutubeIE
[1m[31m<frozen importlib._bootstrap>[0m:1039: in _handle_fromlist
    ???
[1m[31myt_dlp/compat/compat_utils.py[0m:36: in __getattribute__
    ret = super().__getattribute__(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:54: in __getattr__
    ret = from_child(attr)
[1m[31myt_dlp/compat/compat_utils.py[0m:68: in from_child
    child = importlib.import_module(child, parent.__name__)
[1m[31m/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py[0m:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
[1m[31myt_dlp/extractor/extractors.py[0m:17: in <module>
    from ._extractors import *  # noqa: F403
[1m[31myt_dlp/extractor/_extractors.py[0m:1140: in <module>
    from .mx3 import (
[1m[31myt_dlp/extractor/mx3.py[0m:80: in <module>
    class Mx3IE(Mx3BaseIE):
[1m[31myt_dlp/extractor/mx3.py[0m:82: in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
[1m[31mE   NameError: name '_Mx3BaseIE' is not defined[0m
[36m[1m=========================== short test summary info ============================[0m
[31mERROR[0m test/test_InfoExtractor.py - NameError: name '_Mx3BaseIE' is not defined
[31mERROR[0m test/test_YoutubeDL.py - NameError: name '_Mx3BaseIE' is not defined
[31mERROR[0m test/test_all_urls.py - NameError: name '_Mx3BaseIE' is not defined
[31mERROR[0m test/test_download.py - NameError: name '_Mx3BaseIE' is not defined
[31mERROR[0m test/test_iqiyi_sdk_interpreter.py - NameError: name '_Mx3BaseIE' is not defined
[31mERROR[0m test/test_subtitles.py - NameError: name '_Mx3BaseIE' is not defined
[31mERROR[0m test/test_youtube_lists.py - NameError: name '_Mx3BaseIE' is not defined
[31mERROR[0m test/test_youtube_misc.py - NameError: name '_Mx3BaseIE' is not defined
[31mERROR[0m test/test_youtube_signature.py - NameError: name '_Mx3BaseIE' is not defined
!!!!!!!!!!!!!!!!!!! Interrupted: 9 errors during collection !!!!!!!!!!!!!!!!!!!!
[31m======================= [33m6 deselected[0m, [31m[1m9 errors[0m[31m in 1.32s[0m[31m ========================[0m
##[error]Process completed with exit code 2.

step_name: Linter/5_Make lazy extractors.txt
log: ##[group]Run python devscripts/make_lazy_extractors.py
[36;1mpython devscripts/make_lazy_extractors.py[0m
shell: /usr/bin/bash -e {0}
##[endgroup]
Traceback (most recent call last):
  File "/home/runner/work/yt-dlp/yt-dlp/devscripts/make_lazy_extractors.py", line 132, in <module>
    main()
  File "/home/runner/work/yt-dlp/yt-dlp/devscripts/make_lazy_extractors.py", line 41, in main
    _ALL_CLASSES = get_all_ies()  # Must be before import
  File "/home/runner/work/yt-dlp/yt-dlp/devscripts/make_lazy_extractors.py", line 68, in get_all_ies
    from yt_dlp.extractor.extractors import _ALL_CLASSES
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/extractor/extractors.py", line 17, in <module>
    from ._extractors import *  # noqa: F403
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/extractor/_extractors.py", line 1140, in <module>
    from .mx3 import (
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/extractor/mx3.py", line 80, in <module>
    class Mx3IE(Mx3BaseIE):
  File "/home/runner/work/yt-dlp/yt-dlp/yt_dlp/extractor/mx3.py", line 82, in Mx3IE
    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
NameError: name '_Mx3BaseIE' is not defined. Did you mean: 'Mx3BaseIE'?
##[error]Process completed with exit code 1.


Changed files:
yt_dlp/extractor/mx3.py

Fix diff:
diff --git a/yt_dlp/extractor/mx3.py b/yt_dlp/extractor/mx3.py
index b4fd5ab72..e39334a6e 100644
--- a/yt_dlp/extractor/mx3.py
+++ b/yt_dlp/extractor/mx3.py
@@ -79,7 +79,7 @@ def get_info_field(name):
 
 class Mx3IE(Mx3BaseIE):
     _DOMAIN = 'mx3.ch'
-    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
+    _VALID_URL = Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
     _TESTS = [{
         'url': 'https://mx3.ch/t/1Cru',
         'md5': '7ba09e9826b4447d4e1ce9d69e0e295f',
@@ -131,7 +131,7 @@ class Mx3IE(Mx3BaseIE):
 
 class Mx3NeoIE(Mx3BaseIE):
     _DOMAIN = 'neo.mx3.ch'
-    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
+    _VALID_URL = Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
     _TESTS = [{
         'url': 'https://neo.mx3.ch/t/1hpd',
         'md5': '6d9986bbae5cac3296ec8813bf965eb2',
@@ -152,7 +152,7 @@ class Mx3NeoIE(Mx3BaseIE):
 
 class Mx3VolksmusikIE(Mx3BaseIE):
     _DOMAIN = 'volksmusik.mx3.ch'
-    _VALID_URL = _Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
+    _VALID_URL = Mx3BaseIE._VALID_URL_TMPL % re.escape(_DOMAIN)
     _TESTS = [{
         'url': 'https://volksmusik.mx3.ch/t/Zx',
         'md5': 'dd967a7b0c1ef898f3e072cf9c2eae3c',