Skip to content

Commit 77d919e

Browse files
committed
Merge branch 'master' into mysql-support
2 parents 91f9336 + 8131fb0 commit 77d919e

66 files changed

Lines changed: 3814 additions & 1055 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,39 @@ on:
99
- 'v*.*.*'
1010

1111
jobs:
12-
test:
12+
gettext:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: [ '3.8' ]
17+
steps:
18+
- name: Checkout source code
19+
uses: actions/checkout@v1
20+
- name: Set up Python
21+
uses: actions/setup-python@v1
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: virtualenv cache
25+
uses: actions/cache@preview
26+
with:
27+
path: ~/.cache/pypoetry/virtualenvs
28+
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
29+
restore-keys: |
30+
${{ runner.os }}-${{ matrix.python-version }}-poetry-
31+
- name: Install Python dependencies
32+
run: |
33+
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
34+
$HOME/.poetry/bin/poetry install
35+
- name: Upload pot to Transifex
36+
run: |
37+
$HOME/.poetry/bin/poetry run sphinx-intl create-transifexrc
38+
$HOME/.poetry/bin/poetry run make -C docs gettext push
39+
env:
40+
SPHINXINTL_TRANSIFEX_USERNAME: api
41+
SPHINXINTL_TRANSIFEX_PASSWORD: ${{ secrets.TRANSIFEX_TOKEN }}
42+
build:
43+
runs-on: ubuntu-latest
44+
needs: gettext
1445
strategy:
1546
matrix:
1647
python-version: [ '3.8' ]
@@ -62,7 +93,7 @@ jobs:
6293
with open('docs/versions.json', 'w') as f:
6394
json.dump(versions, f)
6495
- name: Publish to GitHub Pages
65-
uses: fantix/ghaction-github-pages@master
96+
uses: python-gino/ghaction-github-pages@master
6697
with:
6798
repo: python-gino/python-gino.org
6899
target_branch: master

.github/workflows/test.yml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
matrix:
2020
python-version: [ '3.5', '3.6', '3.7', '3.8' ]
2121
postgres-version: [ '9.6', '12.1' ]
22+
deps-version: [ 'lowest', 'highest' ]
2223
services:
2324
postgres:
2425
image: fantix/postgres-ssl:${{ matrix.postgres-version }}
@@ -39,13 +40,27 @@ jobs:
3940
uses: actions/cache@preview
4041
with:
4142
path: ~/.cache/pypoetry/virtualenvs
42-
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
43+
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.deps-version }}-venv-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
4344
restore-keys: |
44-
${{ runner.os }}-${{ matrix.python-version }}-poetry-
45+
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.deps-version }}-venv-
46+
- name: Poetry cache
47+
uses: actions/cache@preview
48+
with:
49+
path: ~/.poetry
50+
key: ${{ runner.os }}-${{ matrix.python-version }}-dotpoetry
51+
restore-keys: |
52+
${{ runner.os }}-${{ matrix.python-version }}-dotpoetry-
4553
- name: Install Python dependencies
4654
run: |
47-
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
48-
$HOME/.poetry/bin/poetry install
55+
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
56+
$HOME/.poetry/bin/poetry install --no-interaction
57+
- name: Use lowest dependencies versions
58+
if: matrix.deps-version == 'lowest'
59+
run: |
60+
$HOME/.poetry/bin/poetry run pip install asyncpg==0.18 SQLAlchemy==1.3
61+
- name: List installed packages
62+
run: |
63+
$HOME/.poetry/bin/poetry run pip list
4964
- name: Test with pytest
5065
env:
5166
DB_HOST: localhost
@@ -57,7 +72,7 @@ jobs:
5772
run: |
5873
$HOME/.poetry/bin/poetry run black --check src
5974
- name: Submit coverage report
60-
if: matrix.python-version == '3.8' && matrix.postgres-version == '12.1' && github.ref == 'refs/heads/master'
75+
if: matrix.python-version == '3.8' && matrix.postgres-version == '12.1' && matrix.deps-version == 'highest' && github.ref == 'refs/heads/master'
6176
env:
6277
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_TOKEN }}
6378
run: |
@@ -78,20 +93,12 @@ jobs:
7893
uses: actions/setup-python@v1
7994
with:
8095
python-version: ${{ matrix.python-version }}
81-
- name: virtualenv cache
82-
if: startsWith(github.ref, 'refs/tags/')
83-
uses: actions/cache@preview
84-
with:
85-
path: ~/.cache/pypoetry/virtualenvs
86-
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
87-
restore-keys: |
88-
${{ runner.os }}-${{ matrix.python-version }}-poetry-
8996
- name: Release to PyPI
9097
if: startsWith(github.ref, 'refs/tags/')
9198
env:
9299
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
93100
run: |
94-
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
95-
$HOME/.poetry/bin/poetry install
101+
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
102+
$HOME/.poetry/bin/poetry install --no-interaction --no-dev
96103
$HOME/.poetry/bin/poetry build
97104
$HOME/.poetry/bin/poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,7 @@ target/
6969
.DS_Store
7070

7171
# VS Code
72-
.vscode
72+
.vscode
73+
74+
# extension stub files
75+
src/gino/ext/*.pyi

AUTHORS.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ Contributors
4040
* Roald Storm <roaldstorm@gmail.com>
4141
* Tiago Requeijo <tiago.requeijo.dev@gmail.com>
4242
* Olexiy <alosha969@gmail.com>
43+
* Galden <wudenggang0@163.com>
44+
* Iuliia Volkova <xnuinside@gmail.com>
45+
* Roman Averchenkov <aragentum@gmail.com>
46+
* AustinPena <austincollinpena@gmail.com>
4347

4448

4549
Special thanks to my wife Daisy and her outsourcing company `DecentFoX Studio`_,

HISTORY.rst

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,80 @@
22
History
33
=======
44

5+
GINO 1.1
6+
--------
7+
8+
1.1.0 (pending)
9+
^^^^^^^^^^^^^^^
10+
11+
* Added baked query feature (#478 #659 #667)
12+
* Added ``Query.gino.execution_options`` shortcut (#659)
13+
* Added ``@db.declared_attr(with_table=True)`` (#659)
14+
15+
16+
GINO 1.0
17+
--------
18+
19+
Migrating to GINO 1.0
20+
^^^^^^^^^^^^^^^^^^^^^
21+
22+
GINO 1.0 moved the built-in Web framework extensions into separate PyPI
23+
packages. If you're using one of them, you should install GINO 1.0 with extras:
24+
25+
+------------------------+---------------------------------+
26+
| Extension Module | Installation in GINO 1.0 |
27+
+========================+=================================+
28+
| ``gino.ext.starlette`` | ``pip install gino[starlette]`` |
29+
+------------------------+---------------------------------+
30+
| ``gino.ext.aiohttp`` | ``pip install gino[aiohttp]`` |
31+
+------------------------+---------------------------------+
32+
| ``gino.ext.sanic`` | ``pip install gino[sanic]`` |
33+
+------------------------+---------------------------------+
34+
| ``gino.ext.tornado`` | ``pip install gino[tornado]`` |
35+
+------------------------+---------------------------------+
36+
| ``gino.ext.quart`` | ``pip install gino[quart]`` |
37+
+------------------------+---------------------------------+
38+
39+
The new extension packages are backward-compatible, so there's no need to
40+
update the import statements. For example, this will still work in GINO 1.0 if
41+
you installed ``gino[starlette]``::
42+
43+
from gino.ext.starlette import Gino
44+
45+
GINO 1.0 switched to `Poetry <https://python-poetry.org/>`__ for package and
46+
dependency management and started to use the
47+
`src layout <https://hynek.me/articles/testing-packaging/>`__. This shouldn't
48+
cause any problem using GINO as a dependency, but it does introduce some
49+
changes to the GINO development process:
50+
51+
* Source files are now located under ``src`` directory.
52+
* The src dist on PyPI does not include tests, docs and some other files due to
53+
a limitation of Poetry.
54+
55+
1.0.1 (2020-06-08)
56+
^^^^^^^^^^^^^^^^^^
57+
58+
* Fixed dependency version range (SQLAlchemy >=1.2.16, <1.4)
59+
* Updated docs (Including contribution by Galden in #660, and Iuliia Volkova in #672)
60+
* Multiple JSON property fixes (#661 #662 #695)
61+
* Fixed extension typing issue (#673 #674)
62+
* Fixed model override behavior (#694)
63+
* Fixed multiple JSON profiles issue (Contributed by Roman Averchenkov in #693 #696)
64+
65+
1.0.0 (2020-04-26)
66+
^^^^^^^^^^^^^^^^^^
67+
68+
* Switched to Poetry for package and dependency management.
69+
* [Breaking] Moved built-in extension modules to separate PyPI packages.
70+
* Switched to src layout.
71+
* Switched to black code style.
72+
* Better documentation.
73+
* [Breaking] ``none_as_none()`` is now always enabled.
74+
* Added representation method for engine.
75+
* Protected the URL instance fed to ``set_bind()`` from manipulation.
76+
* Replaced some ``assert`` with ``AssertionError`` (#258 #655)
77+
78+
579
GINO 0.8
680
--------
781

@@ -45,6 +119,12 @@ won't be called with any ``setattr(child, 'parent', ...)`` at all. (If you need
45119
Please note, it is deprecated to disable ``none_as_none``, and disabling will
46120
be removed in GINO 1.0.
47121

122+
0.8.7 (2020-04-19)
123+
^^^^^^^^^^^^^^^^^^
124+
125+
* Improved error handling when attribute names collide (Contributed by Reskov in #637 #638)
126+
* Fixed ``with_bind`` usability in aiohttp extension (#518)
127+
48128
0.8.6 (2020-02-10)
49129
^^^^^^^^^^^^^^^^^^
50130

docs/.tx/config

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,33 @@ source_file = _build/gettext/tutorials/tutorial.pot
235235
source_lang = en
236236
type = PO
237237

238+
[gino_1_0.how-to--json-props]
239+
file_filter = locale/<lang>/LC_MESSAGES/how-to/json-props.po
240+
source_file = _build/gettext/how-to/json-props.pot
241+
source_lang = en
242+
type = PO
243+
244+
[gino_1_0.how-to--bakery]
245+
file_filter = locale/<lang>/LC_MESSAGES/how-to/bakery.po
246+
source_file = _build/gettext/how-to/bakery.pot
247+
source_lang = en
248+
type = PO
249+
250+
[gino_1_0.reference--api--gino_bakery]
251+
file_filter = locale/<lang>/LC_MESSAGES/reference/api/gino.bakery.po
252+
source_file = _build/gettext/reference/api/gino.bakery.pot
253+
source_lang = en
254+
type = PO
255+
256+
[gino_1_0.tutorials--announcement]
257+
file_filter = locale/<lang>/LC_MESSAGES/tutorials/announcement.po
258+
source_file = _build/gettext/tutorials/announcement.pot
259+
source_lang = zh
260+
type = PO
261+
262+
[gino_1_0.explanation--async]
263+
file_filter = locale/<lang>/LC_MESSAGES/explanation/async.po
264+
source_file = _build/gettext/explanation/async.pot
265+
source_lang = en
266+
type = PO
267+

docs/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line, and also
55
# from the environment for the first two.
6-
SPHINXOPTS ?=
6+
SPHINXOPTS ?= -D language='en' -A GAID='xxx' -A VERSION='refs/heads/master'
77
TX ?= tx
88
SPHINXBUILD ?= sphinx-build
99
SPHINXINTL ?= sphinx-intl
@@ -38,7 +38,11 @@ else
3838
@$(TX) pull -l "$(LOC)"
3939
endif
4040

41-
.PHONY: help serve update push pull Makefile
41+
clean:
42+
rm -r _build
43+
rm -r reference/api
44+
45+
.PHONY: help serve update push pull clean Makefile
4246

4347
# Catch-all target: route all unknown targets to Sphinx using the new
4448
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).

0 commit comments

Comments
 (0)