Skip to content

chore(docker): run on Python 3.12 - #176

Merged
Rushaway merged 1 commit into
masterfrom
chore/python-3.12
Sep 7, 2026
Merged

chore(docker): run on Python 3.12#176
Rushaway merged 1 commit into
masterfrom
chore/python-3.12

Conversation

@Rushaway

@Rushaway Rushaway commented Sep 7, 2026

Copy link
Copy Markdown
Member

Problem

Running !yt / !yts prints a yt-dlp deprecation notice:

Deprecated Feature: Support for Python version 3.10 has been deprecated. Please update to Python 3.11 or above

yt-dlp 2026.8.19 raised its recommended interpreter to 3.11:

# yt_dlp/update.py
MIN_SUPPORTED, MIN_RECOMMENDED = (3, 10), (3, 11)

YoutubeDL.deprecated_feature() writes the message straight to stderr and honours neither quiet nor no_warnings (both already set in URLInfo.get_url_youtube_info). Because a fresh YoutubeDL is built per call, yt-dlp's once-per-process guard never applies — the line repeats on every lookup (and every retry in get_first_valid_entry).

The image currently runs python:3.10-bookworm / python:3.10-slim-bookworm. 3.10 is still MIN_SUPPORTED, so !yts works today, but the next yt-dlp bump of MIN_SUPPORTED to 3.11 would break the YouTube path outright.

Change

Move to Python 3.12 — the newest interpreter every pinned dependency still ships wheels for (pillow==10.2.0 / lxml==5.1.0 have no cp313 wheels).

  • Dockerfile: python:3.10-{,slim-}bookworm3.12, digests refreshed to the current multi-arch indexes
  • pyproject.toml: requires-python = ">=3.12", 3.12 classifier, ruff target-version = "py312", mypy python_version = "3.12"
  • .github/workflows/lint.yml: CI matrix 3.103.12
  • README.md: stated requirement
  • No stdlib usage removed in 3.11/3.12 (distutils, imp, asynchat, …) is present in src/

No operator config change — VERSION bumped 1.8.251.8.26 as a patch. If #173-line geoip PR lands first and also claims 1.8.26, this needs a rebase bump to 1.8.27.

🤖 Generated with Claude Code

yt-dlp 2026.8.19 raised its recommended interpreter to Python 3.11
(update.py: `MIN_SUPPORTED, MIN_RECOMMENDED = (3, 10), (3, 11)`), so every
`!yt` / `!yts` now prints

    Deprecated Feature: Support for Python version 3.10 has been deprecated.
    Please update to Python 3.11 or above

`YoutubeDL.deprecated_feature()` writes this straight to stderr and honours
neither `quiet` nor `no_warnings`, and URLInfo builds a fresh `YoutubeDL`
per call so yt-dlp's once-per-process guard never kicks in - the line
repeats on every lookup. The next yt-dlp bump of `MIN_SUPPORTED` to 3.11
would break the YouTube path outright.

Move the image (and the lint/type/format toolchain) to Python 3.12, the
newest interpreter every pinned dependency still ships wheels for
(pillow 10.2.0 / lxml 5.1.0 have no cp313 wheels). No operator config
change - this is a patch bump.

- Dockerfile: python:3.10-{,slim-}bookworm -> 3.12, refreshed digests
- pyproject.toml: requires-python >=3.12, classifier, ruff target-version,
  mypy python_version
- .github/workflows/lint.yml: CI matrix 3.10 -> 3.12
- README.md: stated requirement

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Rushaway
Rushaway merged commit e6c5eab into master Sep 7, 2026
2 checks passed
@Rushaway
Rushaway deleted the chore/python-3.12 branch September 7, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant