8000 Fix unescaping take 2 by immerrr · Pull Request #291 · prometheus/client_python · GitHub
[go: up one dir, main page]

Skip to content

Fix unescaping take 2 #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 24, 2018
Merged

Conversation

immerrr
Copy link
Contributor
@immerrr immerrr commented Jul 21, 2018

This PR introduces a fix for escape sequence handling bugs introduced in #282.

It uses far less regexes than #289. In theory, one could stop using regexes completely, but that would come with a performance hit.

@@ -200,6 +218,50 @@ def test_empty_label(self):
metric_family.add_metric([""], 2)
self.assertEqual([metric_family], list(families))

def test_label_escaping(self):
for escaped_val, etalon_val in [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's etalon?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, turns out it's a false cognate in English, it doesn't mean the same as in Russian and French, where it means "standard" as in "measurement standard stored in the bureau of weights and measures". Will fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

immerrr added 2 commits July 24, 2018 16:04
Signed-off-by: immerrr <immerrr@gmail.com>
Signed-off-by: immerrr <immerrr@gmail.com>
@immerrr immerrr force-pushed the fix-unescaping-2 branch from 03ebbec to cd15937 Compare July 24, 2018 14:05
@brian-brazil brian-brazil merged commit f2436ca into prometheus:master Jul 24, 2018
@brian-brazil
Copy link
Contributor

Thanks!

@immerrr immerrr deleted the fix-unescaping-2 branch July 24, 2018 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0