Frank Dana
Frank Dana
(The other possibility is, we could simply `copy.deepcopy` and reset the global `top_graphs` before returning it from each `parse_dot_data()` call, so that the results of previous parsing runs won't be...
We might not even need a deepcopy, a shallow copy might be sufficient come to think of it. Never mind, we're already effectively doing a shallow copy by returning `list(tokens)`,...
Aaand, **#TIL** that if you `copy.deepcopy` a `pydot.Dot` object, it loses all of its instance variables! Not sure _why_, yet, but clearly a bug. Possibly in our pickling code. But...
Turns out `top_graphs` doesn't need to be global at all. #404 eliminates it, with no ill effects. (However, this WON'T overcome pyparsing's lack of thread safety and magically make `dot_parser`...
(The `deepcopy` digression was a dead end — you can't deepcopy `frozendict`s, by design. So that went nowhere. But it wasn't necessary anyway, and I'm glad I tried it because...
Reopening, as I'm hopeful that #497 can result in a thread-safe Pydot after all.
I think I should add Windows and macOS runs of the `python3.13t` environment as well, since it could matter even _more_ on those platforms.
So weird... on my local machine, the non-threadsafe `dot_parser` fails on `push_dbl_quoted()` nearly every time. In the CI, ubuntu and macos show it consistently failing in `push_ID()` instead, while windows'...
> Edit: I read it again. You meant that pyparsing is done already, because we don't use its non-thread-safe features at all. In that case, we just have to get...
So... apparently I need to add some additional checks to the benchmarking code I just wrote, because one test involves walking the contents of `test/graphs/` and running every file through...