FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Attempt to be compatible with synchronous event callbacks by wwwjfy · Pull Request #703 · python-gino/gino · GitHub

Attempt to be compatible with synchronous event callbacks - #703

Draft
wwwjfy wants to merge 1 commit into
python-gino:masterfrom
wwwjfy:async-event
Draft

Attempt to be compatible with synchronous event callbacks#703
wwwjfy wants to merge 1 commit into
python-gino:masterfrom
wwwjfy:async-event

Conversation

wwwjfy commented Jun 20, 2020
edited
Loading

Copy link
Copy Markdown
Member

based on #702, refs #691, a hacky fix

Honestly, Gino doesn't have to support table creation/deletion, as this can go farther, like requests of async version of Alembic, though it can be done in another package.

wwwjfy marked this pull request as draft June 21, 2020 15:21

fantix commented Sep 6, 2020

Copy link
Copy Markdown
Member

Right - the schema.py will be completely removed in GINO 1.4, replaced by a very simple bridge:

gino/src/gino/api.py

Lines 213 to 227 in 8c888bd

class GinoSchemaVisitor:
__slots__ = ("_item",)
def __init__(self, item):
self._item = item
def __getattr__(self, item):
sync_func = getattr(self._item, item)
async def _wrapper(bind=None, *args, **kwargs):
if bind is None:
bind = _bind_or_error(self._item)
return await bind.run_sync(sync_func, *args, **kwargs)
return _wrapper

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL