[BUG]: `json.dumps` failed on object with new `_pybind11_conduit_v1` method
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- backend-api-design
Direzione di ricerca
Inizia riproducendo il problema con Python's json.dumps(..., default=vars) su un oggetto associato a pybind11 che contiene pybind11_conduit_v1, quindi confronta il comportamento tra pybind11 2.13.5 e 2.13.6. Il lavoro è completato quando il comportamento di serializzazione previsto e il fatto che la modifica della versione 2.13.6 costituisca o meno una regressione sono stati stabiliti chiaramente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
What version (or hash if on master) of pybind11 are you using?
2.13.6
Problem description
A new self._pybind11_conduit_v1_() method that is added to all classes by default breaks the serialization of this object through json.dumps([object with _pybind11_conduit_v1], default=vars). I would like to clarify whether this is by mistake or intentional, considering also that this is a patch release. Thanks!
The error:
File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/triton/compiler/compiler.py", line 315, in compile
metadata_group[metadata_filename] = fn_cache_manager.put(json.dumps(metadata, default=vars), metadata_filename,
File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/json/__init__.py", line 234, in dumps
return cls(
File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
TypeError: vars() argument must have __dict__ attribute
Reproducible example code
Since this should be a problem with any object, and I have no experience with `pybind`, I will leave it without a reproducer for now, but if it is not so easy to reproduce, I may try to make one.
Is this a regression? Put the last known working version here if it is.
2.13.5
- Lingua principale
- C++
- Stelle
- 18k
- Fork
- 2.3k
- Merge medio
- 5g 7h
- PR unite (30g)
- 53
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pybind/pybind11
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 4 giorni
-
triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
pybind/pybind11#5604 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 4 giorni
-
docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
pybind/pybind11#747 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
array_t::at() returns a misaligned reference when the stride is not a multiple of alignof(T)Forse già presa @henryiii l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di pybind/pybind11
Issue simili
-
[Bug] Windows Ghidra provider rejects a PATH-only JDK: bare `java.exe` probe fails with Win32 87Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
tenstorrent/tt-umd#4084 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ToffelsKater/X4_VR#34 ·
-
difficulty:easy prio:low refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NatronGitHub/openfx-supportext#220 ·
I maintainer di solito rispondono entro 1 giorno