terryyin / terryyin/translate-python
Add ability to pass timeout parameter to translate api
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 759
- Forks
- 152
- PR merge metrics
- No merged PRs in 30d
Description
I sometimes run into the issue of an external API call timing out:
ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f3945ef3680>, 'Connection to api.mymemory.translated.net timed out. (connect timeout=None)')
It would be good to have the ability to pass the timeout parameter so code doesn't hang until the connection is closed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the translation API request path and locating where calls to api.mymemory.translated.net are made. Check how the connection timeout is currently selected, then verify that callers can provide a timeout and that the request no longer hangs indefinitely when the external API is slow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100