Skip to content

Commit c6930e3

Browse files
authored
release: v4.0.0 (#426)
1 parent 934981f commit c6930e3

25 files changed

+1467
-1278
lines changed

.github/workflows/ci.yml

+21-16
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,28 @@ on:
55
- pull_request
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
8+
test:
9+
runs-on: ubuntu-24.04
1010
strategy:
1111
matrix:
12-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
12+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1313

1414
steps:
15-
- uses: actions/checkout@v3
16-
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: ${{ matrix.python-version }}
20-
- name: Install dependencies
21-
run: |
22-
python -m pip install --upgrade pip
23-
python -m pip install tox tox-gh-actions
24-
- name: Test with tox
25-
run: tox
26-
27-
15+
- uses: actions/checkout@v4
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v3
18+
with:
19+
enable-cache: true
20+
cache-dependency-glob: "requirements**.txt"
21+
- name: Set up Python ${{ matrix.python-version }}
22+
run: uv python install ${{ matrix.python-version }}
23+
- name: Install dependencies
24+
run: uv sync --all-extras --dev
25+
- name: Run tests with coverage
26+
run: |
27+
uv run python -m pytest --cov=googletrans --cov-report=xml
28+
- name: Upload coverage to Codecov
29+
uses: codecov/codecov-action@v4
30+
with:
31+
files: ./coverage.xml
32+
token: ${{ secrets.CODECOV_TOKEN }}

.zed/settings.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"languages": {
3+
"Python": {
4+
"language_servers": ["pyright", "ruff"],
5+
"format_on_save": "on",
6+
"formatter": [
7+
{
8+
"code_actions": {
9+
"source.fixAll.ruff": true,
10+
"source.organizeImports.ruff": true
11+
}
12+
},
13+
{
14+
"language_server": {
15+
"name": "ruff"
16+
}
17+
}
18+
]
19+
}
20+
},
21+
"lsp": {
22+
"ruff": {
23+
"initialization_options": {
24+
"settings": {
25+
"path": "./pyproject.toml"
26+
}
27+
}
28+
}
29+
}
30+
}

Pipfile

-16
This file was deleted.

Pipfile.lock

-646
This file was deleted.

README.rst

+4-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ implemented Google Translate API. This uses the `Google Translate Ajax
1111
API <https://translate.google.com>`__ to make calls to such methods as
1212
detect and translate.
1313

14-
Compatible with Python 3.6+.
14+
Compatible with Python 3.8+.
1515

1616
For details refer to the `API
1717
Documentation <https://py-googletrans.readthedocs.io/en/latest>`__.
@@ -24,15 +24,10 @@ Features
2424
- Auto language detection
2525
- Bulk translations
2626
- Customizable service URL
27+
- Async support
2728
- HTTP/2 support
28-
29-
TODO
30-
~~~~
31-
32-
more features are coming soon.
33-
3429
- Proxy support
35-
- Internal session management (for better bulk translations)
30+
- Complete type hints
3631

3732
HTTP/2 support
3833
~~~~~~~~~~~~~~
@@ -109,7 +104,7 @@ URLs are provided, it then randomly chooses a domain.
109104
Customize service URL to point to standard api
110105
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111106

112-
Considering translate.google.<domain> url services use the webapp requiring a token,
107+
Considering translate.google.<domain> url services use the webapp requiring a token,
113108
you can prefer to use the direct api than does not need any token to process.
114109
It can solve your problems of unstable token providing processes (refer to issue #234)
115110

0 commit comments

Comments
 (0)