-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add prometheus-client
and sentry-sdk
as extras
#501
Conversation
I haven't used a specific version, because these were installed on matrix.org and vector.im using `pip install --upgrade`.
At least, enough annotations for the functions we use. We only use prometheus_client for one function, but it's not annotated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
typechecker pain not fixed GRR |
8b1e728
to
3735867
Compare
not sure why this didn't crop up before.
3735867
to
7fff8da
Compare
version = "1.5.5" | ||
description = "Python client for Sentry (https://sentry.io)" | ||
category = "main" | ||
optional = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one alarmed me. The intent is to make sentry-sdk
optional at runtime but required at dev-time.
But I think this is actually fine as it is. A fresh --no-dev
installation created as follows didn't include sentry.
poetry shell
# nuke poetry's venv
pip freeze | cut -d " " -f 1 | xargs pip uninstall -y
poetry install --no-dev
pip list | grep 'sentry' # no results
A fresh install with dev dependencies did include sentry:
pip freeze | cut -d " " -f 1 | xargs pip uninstall -y
poetry install
...
• Installing sentry-sdk (1.5.5)
...
And for completeness I checked what happened when installing from a wheel. That didn't install sentry.
```shell
poetry build
cd /tmp
python -m venv env
source env/bin/activate
pip install ~/workspace/sydent/dist/matrix_sydent-2.5.1-py3-none-any.whl
pip list | grep sentry # no output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent is to make sentry-sdk optional at runtime but required at dev-time.
What's the rationale for requiring it at dev-time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type checking.
pyproject.toml
Outdated
# sentry_sdk is required for typechecking. | ||
sentry_sdk = "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above you write sentry-sdk
with a hyphenminus; here an underscore. Should this be a hyphenminus too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you. (The distribution name is sentry-sdk
; the package it provides is sentry_sdk
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's some normalisation going on behind the scenes here, but let's be consistent.
I haven't used a specific version, because these were installed on
matrix.org and vector.im using
pip install --upgrade
.