Skip to content

Commit 57c4778

Browse files
committed
SQLAlchemy 1.4 support news
1 parent 8131fb0 commit 57c4778

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/how-to/faq.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
11
Frequently Asked Questions
22
==========================
33

4+
SQLAlchemy 1.4 supports asyncio, what will GINO be?
5+
---------------------------------------------------
6+
7+
Starting from 1.4, SQLAlchemy will `support asyncio
8+
<https://docs.sqlalchemy.org/en/14/changelog/migration_14.html#asynchronous-io-support-for-core-and-orm>`__.
9+
This is a great news to the SQLAlchemy-based ORMs including GINO, because the users will
10+
have one more option, and many GINO hacks can be eventually cleaned up. SQLAlchemy
11+
achieved both sync and async API with the same code base by encapsulating the use of
12+
`greenlet <https://greenlet.readthedocs.io/en/latest/>`__. As an "async" user, you don't
13+
need to worry about its internals in most cases, it's fine to just use its async APIs.
14+
Both SQLAlchemy Core and ORM will be async-compatible, but some ORM features that
15+
involve implicit database accesses are disallowed.
16+
17+
Given such news, GINO no longer has to maintain its own asyncpg dialect for SQLAlchemy
18+
in future versions (yay!). Still, GINO will focus on the differences and keep a
19+
compatible API. To list some of the different/future features:
20+
21+
* Contextual Connections (see :doc:`../explanation/engine`)
22+
* SQLAlchemy Core-based CRUD models
23+
* The GINO Loader system
24+
* Async MySQL support
25+
* Typing support :sup:`NEW`
26+
* `Trio <https://trio.readthedocs.io/en/stable/>`__ support :sup:`NEW`
27+
* Execution performance :sup:`NEW`
28+
29+
As SQLAlchemy async support is considered in Alpha level, GINO will include SQLAlchemy
30+
1.4 support in GINO 2.0.0-alpha.x releases, while the current GINO 1.0.x and 1.1.x will
31+
remain on SQLAlchemy 1.3. GINO 1.x will receive bug fixes and security updates until
32+
both SQLAlchemy async support and GINO 2.x are stabilized.
33+
34+
435
ORM or not ORM?
536
---------------
637

0 commit comments

Comments
 (0)