Skip to content

Gauge typing improvement#935

Merged
csmarchbanks merged 3 commits into
prometheus:masterfrom
rafsaf:gauge_typing_improve
Jul 18, 2023
Merged

Gauge typing improvement#935
csmarchbanks merged 3 commits into
prometheus:masterfrom
rafsaf:gauge_typing_improve

Conversation

@rafsaf

@rafsaf rafsaf commented Jul 11, 2023

Copy link
Copy Markdown
Contributor

For python +3.8, use Literal for multiprocess_mode param in Gauge

@rafsaf rafsaf force-pushed the gauge_typing_improve branch from bb99445 to af20d77 Compare July 11, 2023 23:32
Comment thread prometheus_client/metrics.py Outdated
from .samples import Exemplar, Sample
from .utils import floatToGoString, INF

if sys.version_info >= (3, 8, 0):

@csmarchbanks csmarchbanks Jul 12, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Python 3.7 was just marked EOL a couple weeks ago, which reminded me to open #936. What would you think of merging that first so we do not need this check?

I do want to have that PR available for a couple of days for any comments/objections.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure! I noticed python 3.6 and 3.7 around the repository and decided not to break it.

Let's then wait for the other PR and I will happily rebase

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Support for 3.7 has been removed, so feel free to rebase this PR. Thank you!

@rafsaf rafsaf force-pushed the gauge_typing_improve branch from af20d77 to e136d82 Compare July 16, 2023 17:49
rafsaf added 2 commits July 16, 2023 19:50
Signed-off-by: rafsaf <rafal.safin12@gmail.com>
…codebase

Signed-off-by: rafsaf <rafal.safin12@gmail.com>
@rafsaf rafsaf force-pushed the gauge_typing_improve branch from e136d82 to acad5e2 Compare July 16, 2023 17:50
@rafsaf

rafsaf commented Jul 16, 2023

Copy link
Copy Markdown
Contributor Author

Rebased after #936

Included removal of old sys.version_info code around project as a bit of refactoring

@csmarchbanks csmarchbanks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One small thing, otherwise 👍 and thank you!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This file is actually copied from https://github.com/micheles/decorator to avoid any dependencies and we do not want to modify it locally. At some point i need to update the version, but for now can we just keep it the same?

Signed-off-by: rafsaf <rafal.safin12@gmail.com>
@rafsaf

rafsaf commented Jul 18, 2023

Copy link
Copy Markdown
Contributor Author

@csmarchbanks thanks, done: decorator.py left untouched

@csmarchbanks csmarchbanks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great, thank you!

@csmarchbanks csmarchbanks merged commit 3724a8a into prometheus:master Jul 18, 2023
@rafsaf rafsaf deleted the gauge_typing_improve branch December 7, 2023 21:37
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