Comparing v0.22.1...v0.23.0 · prometheus/client_python

Commits on Jun 12, 2025

  1. Configuration menu

    Browse the repository at this point in the history

  2. Configuration menu

    Browse the repository at this point in the history

  3. Fix including test data (#1113)

    Readd parts of `MANIFEST.in` responsible for including the test data
    in the source distribution.  Without that, setuptools includes only
    `.py` files from the test tree, leading to test failures.
    
    Fixes #1112
    
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    Configuration menu

    Browse the repository at this point in the history

Commits on Jul 3, 2025

  1. Configuration menu

    Browse the repository at this point in the history

  2. Configuration menu

    Browse the repository at this point in the history

  3. Enumerate over text when finding unquoted char

    Enumerating rather than using a while loop saves significant CPU when
    looking for an unquoted character. This ends up improving the benchmark
    ~20% on its own.
    
    Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
    Configuration menu

    Browse the repository at this point in the history

  4. Avoid unnecessary iterating across the same term

    Split the term into the label name and label value portions in one swoop
    rather than starting from the beginning to find an = character after
    already going through the full term. This saves ~5% on the benchmark.
    
    Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
    Configuration menu

    Browse the repository at this point in the history

Commits on Jul 8, 2025

  1. Configuration menu

    Browse the repository at this point in the history

  2. Configuration menu

    Browse the repository at this point in the history

Commits on Jul 11, 2025

  1. Add support to write_to_textfile for custom tmpdir (#1115)

    * Add support to write_to_textfile for custom tmpdir
    
    While the try/except block does prevent most of the temp files from
    persisting, if there is a non catchable exception, those temp files
    continue to pollute the directory. Optionally set the temp
    directory would let us write to something like /tmp, so the target
    directory isn't polluted
    
    Signed-off-by: Aaditya Dhruv <aadityadhruv@mailbox.org>
    
    * Modify write_to_textfile to ensure tmpdir is on same filesystem
    
    The tmpdir must be on the same filesystem to ensure an atomic operation
    takes place. If this is not enforced, there could be partial writes
    which can lead to partial/incorrect metrics being exported
    
    Signed-off-by: Aaditya Dhruv <aadityadhruv@mailbox.org>
    
    ---------
    
    Signed-off-by: Aaditya Dhruv <aadityadhruv@mailbox.org>
    Configuration menu

    Browse the repository at this point in the history

Commits on Aug 20, 2025

  1. OM text exposition for NH (#1087)

    * Start implement OM text exposition for nh, add first no obs test
    * Correct template for nh sample spans, add test
    * Correct templating and appending for deltas, add longer spans test
    * Add tests for nh with labels, remove labels sorting
    * Break down logic classic vs nh samples, add tests for classic-native histograms cohabitation
    * Move classic sample logic back to where it belongs
    * Assign nh to value, correct nil values in tests, clean up white spaces
    * Add logic for exposing nh exemplars
    * Please linters
    * Assign nh_exemplars to exemplarstr
    * Add Any type to metric_family in OM exposition test
    * Change printing order of  nh spans and deltas according to OM 2.0 proposal
    * Shorten name of spans and deltas as per OM 2.0 proposal
    * Adapt nh with UTF-8 tests to new testing framework
    * Update prometheus_client/openmetrics/exposition.py
    * Update prometheus_client/openmetrics/exposition.py
    * Eliminate erroneous abbreviation for spans and deltas
    
    ---------
    
    Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
    Signed-off-by: Arianna Vespri <36129782+vesari@users.noreply.github.com>
    Co-authored-by: Chris Marchbanks <csmarchbanks@gmail.com>
    Configuration menu

    Browse the repository at this point in the history

Commits on Sep 3, 2025

  1. Bump flake8 libraries (#1127)

    ... to the latest version available now. Also, do not pin bugfix
    version because any bugfix update is supposed to bring no breaking
    fix.
    
    Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
    Configuration menu

    Browse the repository at this point in the history

  2. Fix bug which caused metric publishing to not accept query string par…

    …ameters in ASGI app (#1125)
    
    * fix query string encoding in asgi app
    
    Signed-off-by: hack <hacksparr0w@protonmail.com>
    
    * isolate the asgi qs encoding bug into a test case
    
    Signed-off-by: hacksparr0w <hacksparr0w@protonmail.com>
    
    ---------
    
    Signed-off-by: hack <hacksparr0w@protonmail.com>
    Signed-off-by: hacksparr0w <hacksparr0w@protonmail.com>
    Configuration menu

    Browse the repository at this point in the history

Commits on Sep 4, 2025

  1. Emit native histograms only when OM 2.0.0 is requested (#1128)

    * Emit NH only if OM 2.0.0 is requested
    
    Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
    
    * Adjust logic, add version comparison tests for NH
    
    Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
    
    * Skip nh sample earlier in the logic
    
    Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
    
    ---------
    
    Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
    Configuration menu

    Browse the repository at this point in the history

Commits on Sep 8, 2025

  1. Configuration menu

    Browse the repository at this point in the history

  2. Configuration menu

    Browse the repository at this point in the history

Commits on Sep 11, 2025

  1. Fix issue parsing double spaces after # HELP/# TYPE (#1134)

    A regression was reported for 0.22.x where if there are two spaces after
    HELP or TEXT we would raise a value error. This was caused by having an
    extra entry in our array of splits due to how we preocess the splits.
    
    Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
    Configuration menu

    Browse the repository at this point in the history

  2. Release 0.23.0

    Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
    Configuration menu

    Browse the repository at this point in the history