UTF-8: Implement support in Python client library
As in https://github.com/prometheus/client_golang/issues/1369 and https://github.com/prometheus/client_java/issues/916, the Python library needs to be updated to support UTF-8.
Tasks:
- [x] Update exposition format parsers for the new syntax
- [x] Update PromQL parsers (if any) for the new syntax
- [ ] Update content negotiation logic
- [ ] Add flag to enable change in validation logic to check that metric and label names are UTF-8 valid instead of the old letters/numbers/underscores/colons set
For background and references see https://github.com/prometheus/prometheus/issues/13095
I will take this
A lot of the existing python parser does not at all take into account quoted characters and makes many calls to .index, .find, and regex matches that ignore quoted characters. This will break today if label values contain things like {, }, and =. So, this change will require a lot of rewriting to protect the existing code against such issues before it can even be updated to support quoted names
still need to do content negotiation!