MagicStack / MagicStack/asyncpg

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

Offen
#20 15 Kommentare 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

enhancement
Vorherrschende Sprache
Python
Sterne
8.1k
Forks
468
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Das Issue nennt keine Implementierungsdateien oder Tests. Beginnen Sie mit der Überprüfung der bestehenden asyncio-API von asyncpg und vergleichen Sie die vorgeschlagene synchrone DB-API-2.0-Schnittstelle mit PEP 249 und der Kompatibilität mit Python 2.7. Da es sich um einen explorativen Architekturvorschlag handelt, müssten die Maintainer zunächst Machbarkeit, Umfang und einen messbaren Abschlusszustand definieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
postgresql, python
Bereich
databases
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
15/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.