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

Split library into two parts: DB-API 2.0 compatible and Asyncio style #20

Open
runfalk opened this issue Aug 6, 2016 · 15 comments
Open

Comments

@runfalk
Copy link

runfalk commented Aug 6, 2016

I am very interested in using this library since type support in psycopg2 is awful to work with. However, some projects still use Python 2.7, and will for another 4 years. Would it be possible to split asyncpg into two parts, one with an asynchronous API, usable with Python 3.5 and above, and one synchronous API that can be compatible across both 2.7 and 3.5 and above?

My proposal is a DB-API 2.0 (PEP 249) compatible API that can be utilized by the asyncio part of the library. The benefits is that applications that do not need asynchronous calls can use the same underlying library as those who do. With this code that doesn't rely on co-routines can use the type support provided by asyncpg.

I haven't used this project yet, or dived into its internals, and don't know whether it is feasible at all to do this. I am just venting my ideas.

@1st1
Copy link
Member

1st1 commented Aug 6, 2016

We're considering to do this. I can't promise that it will happen very soon, but maybe in a month or couple.

@necaris
Copy link

necaris commented Aug 7, 2016

@1st1 count me in as another volunteer to try and make this happen! From reading your comments on HN it sounds like it's feasible if non-trivial, and I'd like to help!

@auvipy
Copy link

auvipy commented Oct 12, 2016

I have planned to work on django orm part based on asyncpg https://github.com/auvipy/django-asyncpg

@mumbleskates
Copy link

Looking forward to / hoping for progress on this!

@Skyross
Copy link

Skyross commented Mar 23, 2017

@1st1. Thanks for an awesome and performant library. Have any information about progress on this ticket?

@1st1
Copy link
Member

1st1 commented Mar 23, 2017

We are going to do it soon, but have no concrete ETA.

@gwerbin
Copy link

gwerbin commented May 11, 2017

I'd like to contribute here as well. Is there some kind of roadmap or list of tasks to be done? NB I am not a professional developer, so I don't want to commit to something I won't be able to handle.

@piero10
Copy link

piero10 commented Jun 1, 2017

thank for your work, I hope I could use this lib in my python 2.7 soon....

@auvipy
Copy link

auvipy commented Jun 1, 2017

@piero10 2.7 is legacy... py3k is present and future.

@runfalk
Copy link
Author

runfalk commented Jun 1, 2017

@auvipy: Even if Python 3 is the current Python version there is still a ton of code out there that is not trivial to refactor. Maybe @piero10 is heavily invested in a particular library which hasn't been ported yet? Statements like that doesn't benefit anyone.

Python 2 is still officially supported until 2020. Dropbox, who currently employs Guido van Rossum, is still partially on Python 2 for crying out loud.

Also, please keep the discussion related to the feature request.

@1st1
Copy link
Member

1st1 commented Jun 1, 2017

thank for your work, I hope I could use this lib in my python 2.7 soon....

Sorry, Python 2.7 isn't going to happen for asyncpg; I can tell this with almost 100% certainty. It's too much work for us for a relatively small group of potential users (psycopg2 still exists and works just fine for many).

Speaking on the subject: splitting asyncpg in two parts will happen eventually, when we need it for edgedb (sooner than later).

@piero10
Copy link

piero10 commented Jun 2, 2017

((( I'm so sorry....

@ipfans
Copy link

ipfans commented Aug 2, 2017

It's almost one year passed, so can we talking about how to reach the goal?

@Skorpyon
Copy link

Any news?

@1st1
Copy link
Member

1st1 commented Oct 24, 2017

Guys, there's no point asking us about the news. At some point we'll do it, we'll need it for EdgeDB anyways. But there's no concrete estimate. FWIW, psycopg2 is feature complete, and is a good alternative to use in the meanwhile.

@MagicStack MagicStack locked and limited conversation to collaborators Oct 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants