Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why transaction support implemented only for SAConnection? #197

Closed
laz2 opened this issue Nov 3, 2016 · 7 comments
Closed

Why transaction support implemented only for SAConnection? #197

laz2 opened this issue Nov 3, 2016 · 7 comments

Comments

@laz2
Copy link

laz2 commented Nov 3, 2016

I see only dependency from SA in xid generation. Other code uses basic aiopg and plain sql for work with transactions.

@asvetlov
Copy link
Member

asvetlov commented Nov 3, 2016

You can run raw SQL transactions by executing BEGIN/COMMIT/ROLLBACK statements

@laz2
Copy link
Author

laz2 commented Nov 3, 2016

Yes. But without context manager and nested transaction it is not so comfortable. Do aiopg members have any reasons about this place of transactions code? May someone provide pull request with more generic transaction support?

@asvetlov
Copy link
Member

asvetlov commented Nov 3, 2016

If you want to make a PR -- you a welcome

@vir-mir
Copy link
Member

vir-mir commented Nov 25, 2016

Hi!
I'm doing a transaction.
but my class tied to https://docs.python.org/3.5/library/typing.html
which appeared only in 3.4
Maybe add compatibility https://docs.python.org/3.5/library/typing.html
Or better to rewrite?

@asvetlov @jettify

@jettify
Copy link
Member

jettify commented Nov 25, 2016

What features do you need? It is possible to write async context managers in backward compatible way: https://github.com/aio-libs/aiopg/blob/master/aiopg/cursor.py#L380-L403 For what purpose do you need typing?

@vir-mir
Copy link
Member

vir-mir commented Nov 25, 2016

The fact that I have written it long time ago,only not cover the tests and docs
But it is written in python3.5 with PEP484

But I looked at your code, very little corrections that-be to bring it to the PEP3170

I will cook PR

vir-mir pushed a commit to vir-mir/aiopg that referenced this issue Nov 29, 2017
vir-mir pushed a commit to vir-mir/aiopg that referenced this issue Dec 4, 2017
vir-mir added a commit that referenced this issue Dec 4, 2017
* #197 Add transaction model aiopg

* add docs
@Pliner
Copy link
Member

Pliner commented Dec 14, 2020

It looks like the issue was resolved by #219

@Pliner Pliner closed this as completed Dec 14, 2020
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

No branches or pull requests

5 participants