ssut / py-googletrans

(unofficial) Googletrans: Free and Unlimited Google translate API for Python. Translates totally free of charge.
http://py-googletrans.rtfd.io
MIT License
3.8k stars 704 forks source link

httpx lib has too old version (with security vulnerability) #368

Open diwert-ai opened 1 year ago

diwert-ai commented 1 year ago

Googletrans version:

I'm submitting a bug report

googletrans uses too old httpx library (version 0.13.3) which has a security vulnerability. More info here https://github.com/advisories/GHSA-h8pj-cxx2-jfg2

But when i bumped httpx (from 0.13.3 to 0.23.0) in my project there were errors when initializing the googletrans library:

File "E:\PyCharmProjects\TelegramBot\venv\lib\site-packages\googletrans\__init__.py", line 6, in <module>
    from googletrans.client import Translator
File "E:\PyCharmProjects\TelegramBot\venv\lib\site-packages\googletrans\client.py", line 25, in <module>
    class Translator:
File "E:\PyCharmProjects\TelegramBot\venv\lib\site-packages\googletrans\client.py", line 55, in Translator
    proxies: typing.Dict[str, httpcore.SyncHTTPTransport] = None, timeout: Timeout = None):
AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport'
123385918 commented 1 year ago

@diwert-ai just install googletrans-py==4.0.0 to resovle the issue.

shiyishiaa commented 12 months ago

@diwert-ai just install googletrans-py==4.0.0 to resovle the issue.

Pity. That author has no intention to maintain the project.

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.