If that doesn’t fix the issue, please post the full error output you get, including the stack trace. Otherwise it’s very hard to tell what’s wrong and therefore very hard to help you.
Use PyDict(matplotlib."rcParams"), as the deprecation message suggests.
Also, I think you want rcParams["text.latex.preamble"] = raw"\usepackage{amsmath}" … the {{...}} double braces are an escaping technique from Python, where {...} has a special meaning in a string (unlike Julia).
Yes, I think that is what is intended here. The Matplotlib rcparams keys are strings with their own dot-structured hierarchy, and rcParams["text.usetex"] is indeed a correct key.
Ah, OK, PyDict is the wrapper that does the right thing with get/setindex already. Personally I’ve been using the update method instead before the default setindex! does the right thing…
Yes, and that was the point. The python side currently has a more stable API. And as I said, I didn’t realize PyDict does this in the “final API” form. It should be fine. (Though I do feel like it will also subject to deprecation since I don’t really see why it’ll still be needed after the PyObject get the same API…)