From aed33d3190319fb191ca600cb858c3557adc0d2c Mon Sep 17 00:00:00 2001 From: Davide Galilei Date: Sat, 4 Feb 2023 22:20:08 +0100 Subject: [PATCH 1/4] Attempt to bypass rate limiting, update copyright notice, added constants, gitignore pycache, update version to 1.5.0 Update tests and minimum python version: python 3.6 is EOL --- .github/workflows/test-suite.yml | 2 +- .gitignore | 1 + LICENSE | 2 +- README.md | 2 +- examples/async/example.py | 2 +- examples/async/https_proxy.py | 2 +- examples/async/socks5_proxy.py | 2 +- examples/async/tts.py | 2 +- examples/sync/example.py | 2 +- examples/sync/https_proxy.py | 2 +- examples/sync/socks5_proxy.py | 2 +- gpytranslate/__init__.py | 2 +- gpytranslate/gpytranslate.py | 14 +++++-- gpytranslate/sync/sync_translator.py | 14 +++++-- gpytranslate/types/__init__.py | 50 ++++++++++++++++++------- gpytranslate/types/base_translator.py | 2 +- gpytranslate/types/translated_object.py | 2 +- setup.py | 6 +-- tests/async/test_detect.py | 2 +- tests/async/test_gather.py | 2 +- tests/async/test_translate.py | 4 +- tests/async/test_tts.py | 2 +- tests/sync/test_sync_detect.py | 2 +- tests/sync/test_sync_translate.py | 4 +- tests/sync/test_sync_tts.py | 2 +- 25 files changed, 83 insertions(+), 46 deletions(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 000f5a8..eb00c07 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - version: [ "3.6", "3.7", "3.8", "3.9" ] + version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] steps: - uses: "actions/checkout@v2" diff --git a/.gitignore b/.gitignore index e932ec6..3a43d53 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /venv/ /.idea/ /gpytranslate.egg-info/ +**/__pycache__ diff --git a/LICENSE b/LICENSE index f24e493..74b32a0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Davide Galilei +Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 09f1097..51314a3 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ A Python3 library for translating text using Google Translate API. ### Installation Requirements: -- Python 3.6 or higher. +- Python 3.7 or higher. ```bash diff --git a/examples/async/example.py b/examples/async/example.py index 2b148a6..5fd76b0 100644 --- a/examples/async/example.py +++ b/examples/async/example.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/examples/async/https_proxy.py b/examples/async/https_proxy.py index abde655..8f55c63 100644 --- a/examples/async/https_proxy.py +++ b/examples/async/https_proxy.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/examples/async/socks5_proxy.py b/examples/async/socks5_proxy.py index 3a39cef..550a13c 100644 --- a/examples/async/socks5_proxy.py +++ b/examples/async/socks5_proxy.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/examples/async/tts.py b/examples/async/tts.py index 5602355..eb7395f 100644 --- a/examples/async/tts.py +++ b/examples/async/tts.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/examples/sync/example.py b/examples/sync/example.py index afb5bc1..41816fc 100644 --- a/examples/sync/example.py +++ b/examples/sync/example.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/examples/sync/https_proxy.py b/examples/sync/https_proxy.py index e32212c..6b95399 100644 --- a/examples/sync/https_proxy.py +++ b/examples/sync/https_proxy.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/examples/sync/socks5_proxy.py b/examples/sync/socks5_proxy.py index 82e2ea6..f62e1c5 100644 --- a/examples/sync/socks5_proxy.py +++ b/examples/sync/socks5_proxy.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/gpytranslate/__init__.py b/gpytranslate/__init__.py index 32033f7..60d875f 100644 --- a/gpytranslate/__init__.py +++ b/gpytranslate/__init__.py @@ -3,7 +3,7 @@ from .types import TranslatedObject from .exceptions import GpytranslateException, TranslationError -__version__ = "1.4.0" +__version__ = "1.5.0" __all__ = [ "Translator", "SyncTranslator", diff --git a/gpytranslate/gpytranslate.py b/gpytranslate/gpytranslate.py index 8d50c7c..f41bfdc 100644 --- a/gpytranslate/gpytranslate.py +++ b/gpytranslate/gpytranslate.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31,15 +31,21 @@ from aiofiles.threadpool import AsyncBufferedIOBase from .exceptions import TranslationError -from .types import TranslatedObject, BaseTranslator, get_base_headers +from .types import ( + TranslatedObject, + BaseTranslator, + get_base_headers, + DEFAULT_TRANSLATION_ENDPOINT, + DEFAULT_TTS_ENDPOINT, +) class Translator(BaseTranslator): def __init__( self, proxies: Dict[str, str] = None, - url: str = "https://translate.googleapis.com/translate_a/single", - tts_url: str = "https://translate.google.com/translate_tts", + url: str = DEFAULT_TRANSLATION_ENDPOINT, + tts_url: str = DEFAULT_TTS_ENDPOINT, headers: Union[dict, callable] = ..., **options ): diff --git a/gpytranslate/sync/sync_translator.py b/gpytranslate/sync/sync_translator.py index a156445..adbf24c 100644 --- a/gpytranslate/sync/sync_translator.py +++ b/gpytranslate/sync/sync_translator.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -29,15 +29,21 @@ import httpx from ..exceptions import TranslationError -from ..types import TranslatedObject, BaseTranslator, get_base_headers +from ..types import ( + TranslatedObject, + BaseTranslator, + get_base_headers, + DEFAULT_TRANSLATION_ENDPOINT, + DEFAULT_TTS_ENDPOINT, +) class SyncTranslator(BaseTranslator): def __init__( self, proxies: Dict[str, str] = None, - url: str = "https://translate.googleapis.com/translate_a/single", - tts_url: str = "https://translate.google.com/translate_tts", + url: str = DEFAULT_TRANSLATION_ENDPOINT, + tts_url: str = DEFAULT_TTS_ENDPOINT, headers: Union[dict, callable] = ..., **options ): diff --git a/gpytranslate/types/__init__.py b/gpytranslate/types/__init__.py index 69ae7cf..1d8148e 100644 --- a/gpytranslate/types/__init__.py +++ b/gpytranslate/types/__init__.py @@ -3,20 +3,44 @@ from .translated_object import TranslatedObject from .base_translator import BaseTranslator -USER_AGENTS: tuple = ( - "GoogleTranslate/6.6.1.RC09.302039986 (Linux; U; Android 9; Redmi Note 8)", - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36", - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36", - "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0", - "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0", - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36", - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36", -) +DEFAULT_TRANSLATION_ENDPOINT: str = "https://translate.google.com/translate_a/single" +DEFAULT_TTS_ENDPOINT: str = "https://translate.google.com/translate_tts" + + +class Device: + DEVICES: tuple = ( + "Linux; U; Android 10; Pixel 4", + "Linux; U; Android 10; Pixel 4 XL", + "Linux; U; Android 10; Pixel 4a", + "Linux; U; Android 10; Pixel 4a XL", + "Linux; U; Android 11; Pixel 4", + "Linux; U; Android 11; Pixel 4 XL", + "Linux; U; Android 11; Pixel 4a", + "Linux; U; Android 11; Pixel 4a XL", + "Linux; U; Android 11; Pixel 5", + "Linux; U; Android 11; Pixel 5a", + "Linux; U; Android 12; Pixel 4", + "Linux; U; Android 12; Pixel 4 XL", + "Linux; U; Android 12; Pixel 4a", + "Linux; U; Android 12; Pixel 4a XL", + "Linux; U; Android 12; Pixel 5", + "Linux; U; Android 12; Pixel 5a", + "Linux; U; Android 12; Pixel 6", + "Linux; U; Android 12; Pixel 6 Pro", + ) + + __i = 0 + + @classmethod + def shift(cls) -> str: + cls.__i += 1 + cls.__i %= len(cls.DEVICES) + return cls.DEVICES[cls.__i] def get_base_headers() -> dict: - BASE_HEADERS: dict = { - "User-Agent": random.choice(USER_AGENTS) + return { + "User-Agent": "GoogleTranslate/6.28.0.05.421483610 ({device})".format( + device=Device.shift(), + ) } - - return BASE_HEADERS diff --git a/gpytranslate/types/base_translator.py b/gpytranslate/types/base_translator.py index 1bb47dd..b80a5bd 100644 --- a/gpytranslate/types/base_translator.py +++ b/gpytranslate/types/base_translator.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/gpytranslate/types/translated_object.py b/gpytranslate/types/translated_object.py index 37203be..1b564cb 100644 --- a/gpytranslate/types/translated_object.py +++ b/gpytranslate/types/translated_object.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/setup.py b/setup.py index 849b22e..c69e28d 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -38,7 +38,7 @@ setuptools.setup( name="gpytranslate", - version="1.4.0", + version="1.5.0", author="Davide Galilei", author_email="davidegalilei2018@gmail.com", description="A Python3 library for translating text using Google Translate API.", @@ -51,6 +51,6 @@ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], - python_requires=">=3.6", + python_requires=">=3.7", install_requires=requires, ) diff --git a/tests/async/test_detect.py b/tests/async/test_detect.py index abc0f25..fe02548 100644 --- a/tests/async/test_detect.py +++ b/tests/async/test_detect.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/tests/async/test_gather.py b/tests/async/test_gather.py index fedc910..6cb5c8c 100644 --- a/tests/async/test_gather.py +++ b/tests/async/test_gather.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/tests/async/test_translate.py b/tests/async/test_translate.py index 42edd79..0e7f507 100644 --- a/tests/async/test_translate.py +++ b/tests/async/test_translate.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -46,7 +46,7 @@ async def test_translate_source(): "Ciao.", sourcelang="it", targetlang="en" ) - assert translation.text == "Hello.", "Translations are not equal." + assert translation.text in ("Hello.", "HI."), "Translations are not equal." @pytest.mark.asyncio diff --git a/tests/async/test_tts.py b/tests/async/test_tts.py index 9f9ae2d..c0c59e6 100644 --- a/tests/async/test_tts.py +++ b/tests/async/test_tts.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/tests/sync/test_sync_detect.py b/tests/sync/test_sync_detect.py index 5959d49..408b824 100644 --- a/tests/sync/test_sync_detect.py +++ b/tests/sync/test_sync_detect.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/tests/sync/test_sync_translate.py b/tests/sync/test_sync_translate.py index 7f27687..07702e2 100644 --- a/tests/sync/test_sync_translate.py +++ b/tests/sync/test_sync_translate.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -40,7 +40,7 @@ def test_sync_translate_source(): "Ciao.", sourcelang="it", targetlang="en" ) - assert translation.text == "Hello.", "Translations are not equal." + assert translation.text in ("Hello.", "HI."), "Translations are not equal." def test_sync_translate_list(): diff --git a/tests/sync/test_sync_tts.py b/tests/sync/test_sync_tts.py index 3c7c56e..d3de7de 100644 --- a/tests/sync/test_sync_tts.py +++ b/tests/sync/test_sync_tts.py @@ -2,7 +2,7 @@ gpytranslate - A Python3 library for translating text using Google Translate API. MIT License - Copyright (c) 2022 Davide Galilei + Copyright (c) 2023 Davide Galilei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From b22364b55b94ea4aa3bb17a47e71ce46614fecca Mon Sep 17 00:00:00 2001 From: Davide Galilei Date: Sat, 4 Feb 2023 22:34:55 +0100 Subject: [PATCH 2/4] Switch from setup.py to pyproject.toml --- .github/workflows/test-suite.yml | 2 +- pyproject.toml | 31 ++++++++++++++++++ setup.py | 56 -------------------------------- 3 files changed, 32 insertions(+), 57 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index eb00c07..afe052a 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -22,7 +22,7 @@ jobs: with: python-version: "${{ matrix.version }}" - name: "Install Gpytranslate" - run: python setup.py install + run: python -m pip install . - name: "Install pytest" run: python -m pip install pytest-asyncio - name: "Run tests" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d00c36b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,31 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "gpytranslate" +version = "1.5.0" +dynamic = ["dependencies"] + +authors = [ + { name="Davide Galilei", email="davidegalilei2018@gmail.com" }, +] +maintainers = [ + { name="Davide Galilei", email="davidegalilei2018@gmail.com" }, +] + +description = "A Python3 library for translating text using Google Translate API." +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +[project.urls] +"Homepage" = "https://github.com/DavideGalilei/gpytranslate" +"Bug Tracker" = "https://github.com/DavideGalilei/gpytranslate/issues" + +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} diff --git a/setup.py b/setup.py deleted file mode 100644 index c69e28d..0000000 --- a/setup.py +++ /dev/null @@ -1,56 +0,0 @@ -""" - gpytranslate - A Python3 library for translating text using Google Translate API. - MIT License - - Copyright (c) 2023 Davide Galilei - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -""" - -import setuptools - -from pathlib import Path - -root: Path = Path(__file__).parent.resolve() -readme_path: Path = root / "README.md" -requirements_path: Path = root / "requirements.txt" - -with readme_path.open(encoding="utf8") as readme,\ - requirements_path.open(encoding="utf8") as requirements: - long_description = readme.read() - requires = requirements.read().splitlines(keepends=False) - -setuptools.setup( - name="gpytranslate", - version="1.5.0", - author="Davide Galilei", - author_email="davidegalilei2018@gmail.com", - description="A Python3 library for translating text using Google Translate API.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/DavideGalilei/gpytranslate", - packages=setuptools.find_packages(), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - ], - python_requires=">=3.7", - install_requires=requires, -) From dc0c555afa6619d820aacab3df61238f2a4a51bd Mon Sep 17 00:00:00 2001 From: Davide Galilei Date: Sat, 4 Feb 2023 22:35:05 +0100 Subject: [PATCH 3/4] Update reference in README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 51314a3..5198d1d 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ with open("test.mp3", "wb") as file: ## Useful Resources https://danpetrov.xyz/programming/2021/12/30/telegram-google-translate.html https://vielhuber.de/en/blog/google-translation-api-hacking/ +https://github.com/OwlGramDev/OwlGram/blob/b9bb8a247758adbf7be7aaf3eb150f680bec1269/TMessagesProj/src/main/java/it/owlgram/android/translator/GoogleAppTranslator.java ---- ## Development From 2194bef66878fbfe2dc57ef2836c1d0a4114c940 Mon Sep 17 00:00:00 2001 From: Davide Galilei Date: Sat, 4 Feb 2023 22:43:50 +0100 Subject: [PATCH 4/4] Fix pyproject.toml --- gpytranslate/__init__.py | 2 +- pyproject.toml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gpytranslate/__init__.py b/gpytranslate/__init__.py index 60d875f..bdf6510 100644 --- a/gpytranslate/__init__.py +++ b/gpytranslate/__init__.py @@ -3,7 +3,7 @@ from .types import TranslatedObject from .exceptions import GpytranslateException, TranslationError -__version__ = "1.5.0" +__version__ = "1.5.1" __all__ = [ "Translator", "SyncTranslator", diff --git a/pyproject.toml b/pyproject.toml index d00c36b..220b760 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,11 @@ build-backend = "hatchling.build" [project] name = "gpytranslate" -version = "1.5.0" -dynamic = ["dependencies"] +version = "1.5.1" +dependencies = [ + "httpx", + "aiofiles", +] authors = [ { name="Davide Galilei", email="davidegalilei2018@gmail.com" }, @@ -26,6 +29,3 @@ classifiers = [ [project.urls] "Homepage" = "https://github.com/DavideGalilei/gpytranslate" "Bug Tracker" = "https://github.com/DavideGalilei/gpytranslate/issues" - -[tool.setuptools.dynamic] -dependencies = {file = ["requirements.txt"]}