How to use a sequence as dict key?

With regards to using “unsafe” parts of numba: the drop_elements function defined above (which relies on numba.cpython.unsafe.tuple.tuple_setitem) ended up becoming an essential part of my solution to the problem mentioned in the related topic https://numba.discourse.group/t/dynamic-heterogeneous-dictionaries-with-tuple-keys-and-non-constant-tuple-slicing. There, I also ended up being able to solve the bottleneck caused by populating a TypedDict in a pure Python context by using another “unsafe” component, namely to_fixed_tuple from numba.np.unsafe.ndarray. The way I did this other one might be of independent interest and I will likely create a new topic about it.

To remain on-topic here, I wonder generically: what exactly is “unsafe” about these components? Is there something to worry about beyond the lack of stability guarantees as these components might change or disappear in new numba versions? At the moment, I would potentially be happy to fix the numba dependency in my project to a specific version so that my users can benefit from the added performance, and keep an eye open for how things change in future versions.