MagicStack / MagicStack/asyncpg
cant pickle asyncpg.record
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 8.1k
- Forks
- 468
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi, I would like to know what make a record not picklable and if you have a solution to do what I want to do.
Basically I am doing a program that use persistent sessions: in case of crash, the programs save its state on the disk. Next lunch wont redo what it did before with success
I implement that with a global try except. I put my python "Session class" on disk, and retrieve it with pickle. One of Session class attribute is a list of record I gather at the start and I need for the rest of the session. However, I got a "cant pickle asyncpg.record" error which prevent me to do that.
The problem is that I also cant make a record object from python, accordingly to the doc. So I cant see any workaround like casting to dict before serialization and casting to record after
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den gemeldeten pickle-Fehler mit den in der Klasse Session gespeicherten asyncpg-Record-Objekten zu reproduzieren, und prüfe anschließend die im Bericht referenzierte asyncpg-Record-Dokumentation. Als erledigt gilt die Aufgabe, wenn eine bestätigte Erklärung der Einschränkung sowie ein dokumentierter, unterstützter Workaround oder Serialisierungspfad vorliegen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- postgresql, python
- Bereich
- databases
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100