Closed funkyfuture closed 2 years ago
since @JKatzwinkel is quiet busy, it'd be great if maybe @03b8 or @zed-g could have a look at the plausability of the tests here, especially the newly added test modules. if you have time available.
a'ight thanks. i'm taking a bath and you could comment objections in that time, but i don't expect any. otherwise i'll merge this piece.
i'll also look into that Python 3.8 issue after :bath:.
jut, daß wa drüber jeredet haben. ick wechsel erstmal wieder in erholung.
it's all green and the solution was to not only consider whether a node is attached to a document, but also whether this document is referenced by user code. if not, it's safe to drop the node instance from the wrapper cache.
there might be issues with sibling nodes of a root, but i really don't care until a Rust-based nullifies the whole efforts.
thanks for the explanation, that's consistent with what I think I observed yesterday, and the solution seems sound.
likely b/c usually mypy runs on 3.9+.
i looked into incorrectly behaving user code due to multiple wrapper instances for one node and quickly nailed down a problem that could be detected in
_get_or_create_element_wrapper
: a wrapper that was retrieved from a cache didn't always own that same cache, which would have been expected given the overall idea how wrappers shall be preserved for a meaningful lifetime. so i created some meaningful lifetime for myself, emotionally comparable to the story they tell about the Lebowski, and i don't remember how that story ends, but i'm erquickt with this one. this state was also tested within a web applicationit is surely not easy to review, and to make things more challenging, i included minor unrelated changes, sorry. it's likely best to start studying the new test module and with
_delb.nodes._WrapperCache
. playing around with it and the changes should explainall, well, most other changes. of course i can give hints on mysteries that appear.as this pr sits on top of #31, that one should be merged first and then i rebase here. the essential commit here deserves its own focus.