MagicStack / MagicStack/asyncpg

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

Aperta
#20 15 commenti 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement
Lingua principale
Python
Stelle
8.1k
Fork
468
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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](https://www.python.org/dev/peps/pep-0249/)) 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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

La issue non indica alcun file di implementazione né test. Inizia esaminando l'API asyncio esistente di asyncpg e confrontando l'interfaccia sincrona DB-API 2.0 proposta con PEP 249 e la compatibilità con Python 2.7. Poiché si tratta di una proposta architetturale esplorativa, i maintainer dovrebbero prima definire la fattibilità, l'ambito e uno stato di completamento misurabile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
postgresql, python
Ambito
databases
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
15/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.