MagicStack / MagicStack/asyncpg

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

Ouverte
#20 15 commentaires 4 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

enhancement
Langage dominant
Python
Étoiles
8.1k
Forks
468
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

L’issue ne nomme aucun fichier d’implémentation ni aucun test. Commencez par examiner l’API asyncio existante d’asyncpg et comparer l’interface synchrone DB-API 2.0 proposée avec la PEP 249 et la compatibilité avec Python 2.7. Comme il s’agit d’une proposition architecturale exploratoire, les maintainers devraient d’abord définir la faisabilité, la portée et un état d’achèvement mesurable.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
postgresql, python
Domaine
databases
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
15/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.