Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pymkv/BCP47.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import warnings
from functools import cache

import bcp47
Expand All @@ -18,6 +19,11 @@ def is_bcp47(language_ietf: str) -> bool:
bool
True if the language tag is a valid BCP 47 language tag, False otherwise.
"""
warnings.warn(
"The function 'is_bcp47' is deprecated and will be removed in a future release.",
category=DeprecationWarning,
stacklevel=2,
)
if language_ietf != "und":
return language_ietf in bcp47.languages.values()
else: # noqa: RET505
Expand Down