Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Unclear Memory Ownership and Lifetimes

Aperta
#351 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
pandas, python

Direzione di ricerca

Leggi la sezione sull’ambito “Memory Ownership and Lifetimes” del documento dell’API dataframe e confrontala con la specifica di gestione della memoria di Arrow C Data Interface collegata. Usa il problema di durata dei dati stringa di pandas descritto qui per individuare le indicazioni mancanti; il lavoro è completato quando il documento dell’API definisce chiaramente le aspettative relative alla proprietà e alla durata per questo caso.

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

Descrizione

I see the scope of the dataframe api mentions "Memory Ownership and Lifetimes" as In Scope, but I couldn't find anything in else in the document that actually enforces this.

While trying to use the dataframe api with pandas, I ran into an issue where the current pandas implementation to write string data makes a temporary buffer whose lifetime has nothing to do with the dataframe itself. I found this because I wrote an extension that assumed the lifetime of a buffer in the dataframe API was the same as the producing dataframe. That held while I was using primitive types but once I tried to use strings I started seeing segfaults.

My first thought was that pandas was doing something wrong, but without any guidance from the document it is hard to make that judgment.

By contrast, the Arrow C Data specification (which I ultimately ended up using) has well defined semantics for memory management:

https://arrow.apache.org/docs/format/CDataInterface.html#memory-management

Lingua principale
Python
Stelle
106
Fork
22
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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.

Altre issue di data-apis/dataframe-api

Tutte le issue di data-apis/dataframe-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.