From a40faffee79dedf3f24382378b98d1955e534af1 Mon Sep 17 00:00:00 2001 From: Ali Hamdi Ali Fadel Date: Mon, 1 Jul 2024 16:11:51 +0300 Subject: [PATCH] Add Python 3.10 support --- .sonarcloud.properties | 2 +- README.en.md | 2 +- README.md | 2 +- poetry.lock | 10 +++++----- pyproject.toml | 5 +++-- tafrigh/types/segment_type.py | 7 ++++++- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.sonarcloud.properties b/.sonarcloud.properties index ac39d36..ae4308e 100644 --- a/.sonarcloud.properties +++ b/.sonarcloud.properties @@ -1,3 +1,3 @@ sonar.sources=tafrigh/ -sonar.python.version=3.11,3.12 +sonar.python.version=3.10,3.11,3.12 diff --git a/README.en.md b/README.en.md index fe458a7..7c307d4 100644 --- a/README.en.md +++ b/README.en.md @@ -40,7 +40,7 @@ diff --git a/README.md b/README.md index 15167b1..a9a54df 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ diff --git a/poetry.lock b/poetry.lock index 9a087f7..e662174 100644 --- a/poetry.lock +++ b/poetry.lock @@ -465,13 +465,13 @@ files = [ [[package]] name = "faster-whisper" -version = "1.0.2" +version = "1.0.3" description = "Faster Whisper transcription with CTranslate2" optional = false python-versions = ">=3.8" files = [ - {file = "faster-whisper-1.0.2.tar.gz", hash = "sha256:54d9fc698f7c665e00a0d5ed65d6e975b72a8862b8214f20a22e79b115c41511"}, - {file = "faster_whisper-1.0.2-py3-none-any.whl", hash = "sha256:d968c289222e766a49ed97eecec24e934bdef405183f57d6d434a364bb3569c1"}, + {file = "faster-whisper-1.0.3.tar.gz", hash = "sha256:1a145db86450b56aaa623c8df7d4ef86e8a1159900f60533e2890e98e8453a17"}, + {file = "faster_whisper-1.0.3-py3-none-any.whl", hash = "sha256:364d0e378ab232ed26f39656e5c98548b38045224e206b20f7d8c90e2745b9d3"}, ] [package.dependencies] @@ -1967,5 +1967,5 @@ wit = ["auditok", "pydub", "requests"] [metadata] lock-version = "2.0" -python-versions = ">=3.11" -content-hash = "ec39740bc4e999a5b0427665d22280fb68852f22cadaa87671ada839fe36b949" +python-versions = ">=3.10" +content-hash = "85f15071c06873f08b07997689530f8f8600e2e61dd31b745b7c1394bb7f1450" diff --git a/pyproject.toml b/pyproject.toml index 32c0566..4d1b4c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tafrigh" -version = "1.4.13" +version = "1.5.0" description = "تفريغ النصوص وإنشاء ملفات SRT و VTT باستخدام نماذج Whisper وتقنية wit.ai." authors = ["EasyBooks "] license = "MIT" @@ -15,6 +15,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Artificial Intelligence", @@ -23,7 +24,7 @@ homepage = "https://tafrigh.ieasybooks.com" repository = "https://github.com/ieasybooks/tafrigh" [tool.poetry.dependencies] -python = ">=3.11" +python = ">=3.10" tqdm = ">=4.66.4" yt-dlp = ">=2024.4.9" auditok = ">=0.2.0" diff --git a/tafrigh/types/segment_type.py b/tafrigh/types/segment_type.py index abe47bd..d1a473e 100644 --- a/tafrigh/types/segment_type.py +++ b/tafrigh/types/segment_type.py @@ -1,4 +1,9 @@ -from typing import NotRequired, TypedDict +import sys + +if sys.version_info < (3, 11): + from typing_extensions import NotRequired, TypedDict +else: + from typing import NotRequired, TypedDict class SegmentType(TypedDict):