Closed mkhorton closed 8 months ago
@janosh would it be possible to make the Percy dashboard public? I don't think I can review otherwise.
@mkhorton I had nothing to do with setting up Percy on this repo. I thought that was you.
Re typing, IIUC crystal_toolkit/settings.py
is the only file in which we can't use the pipe operator for type unions unless using 3.10. All other features can be used in all files with from __future__ import annotations
.
Ah, interesting. I did set it up a long time ago, it seems like they were acquired by another company since I last set it up, maybe that’s why my credentials weren’t working. I’ll try and regenerate the API key.
Why was it only the settings.py
that can’t use the pipe operator?
Why was it only the
settings.py
that can’t use the pipe operator?
That's the only one that defines a pydantic
model. I don't know the details but pydantic
hooks into the forward ref evaluation of type hints in a way that somehow messes with the way this was back-ported to older python versions via from __future__ import annotations
.
That said I have no issues with 3.10+. Modern Python is more fun. 😄
Makes sense. I was confused why the futures annotation wasn't working, I think I concluded that I had misunderstood something. I also had an issue with TypeAlias
(which I think needs typing_extensions
?). In either case, let's switch to 3.10 for CI, but I think if I change the settings.py
we can keep 3.9 for the project requirements.
Ok Percy integration should now be active again and public. All new PRs should now have screenshots attached(!)
Unless there are any objections from the community, I'd like to switch to Python 3.10+ to simplify development and allow usage of Python 3.10+ typing features.