+- Update to 1.12.1 (resolve rhbz#2153838)

- Add fastapi, pymongo, and opentelemetry extras
- Remove falcon extra
- Check imports
This commit is contained in:
Roman Inflianskas 2023-01-12 15:04:33 +02:00
parent e8af2b8a2c
commit f77ea15b7e
No known key found for this signature in database
GPG key ID: F51FF2F4F5E4AFC8
3 changed files with 103 additions and 25 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@
/sentry-python-1.10.1.tar.gz
/sentry-python-1.11.0.tar.gz
/sentry-python-1.11.1.tar.gz
/sentry-python-1.12.1.tar.gz

View file

@ -1,5 +1,5 @@
Name: python-sentry-sdk
Version: 1.11.1
Version: 1.12.1
Release: 1%{?dist}
Summary: The new Python SDK for Sentry.io
@ -12,17 +12,41 @@ BuildRequires: python3-devel
BuildRequires: python3dist(certifi)
BuildRequires: python3dist(wheel)
# Use Fedora versions of testing dependencies + pytest instead of pinned versions in upstream + tox
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-asyncio)
BuildRequires: python3dist(pytest-forked)
BuildRequires: python3dist(werkzeug)
BuildRequires: python3dist(pytest-localserver)
BuildRequires: python3dist(pytest-cov)
BuildRequires: python3dist(jsonschema)
BuildRequires: python3dist(pyrsistent)
BuildRequires: python3dist(gevent)
BuildRequires: python3dist(executing)
BuildRequires: python3dist(aiohttp)
BuildRequires: python3dist(asttokens)
BuildRequires: python3dist(blinker)
BuildRequires: python3dist(botocore)
BuildRequires: python3dist(bottle)
BuildRequires: python3dist(celery)
BuildRequires: python3dist(django)
BuildRequires: python3dist(djangorestframework)
BuildRequires: python3dist(executing)
BuildRequires: python3dist(fastapi)
BuildRequires: python3dist(flask)
BuildRequires: python3dist(flask-login)
BuildRequires: python3dist(gevent)
BuildRequires: python3dist(httpx)
BuildRequires: python3dist(jsonschema)
BuildRequires: python3dist(mock)
BuildRequires: python3dist(python-multipart)
BuildRequires: python3dist(opentelemetry-distro)
BuildRequires: python3dist(psycopg2)
BuildRequires: python3dist(pure-eval)
BuildRequires: python3dist(pymongo)
BuildRequires: python3dist(pyramid)
BuildRequires: python3dist(pyrsistent)
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-aiohttp)
BuildRequires: python3dist(pytest-asyncio)
BuildRequires: python3dist(pytest-cov)
BuildRequires: python3dist(pytest-forked)
BuildRequires: python3dist(pytest-localserver)
BuildRequires: python3dist(requests)
BuildRequires: python3dist(rq)
BuildRequires: python3dist(sqlalchemy)
BuildRequires: python3dist(starlette)
BuildRequires: python3dist(tornado)
BuildRequires: python3dist(werkzeug)
%global _description %{expand:
@ -39,14 +63,33 @@ Summary: %{summary}
%description -n python3-sentry-sdk %_description
# Dependencies for quart, sanic, beam, pyspark, chalice, and pymongo extras are not yet in Fedora
# Dependencies for fastapi are not built for Fedora >= 37
%pyproject_extras_subpkg -n python3-sentry-sdk flask bottle falcon django celery rq aiohttp tornado sqlalchemy pure_eval httpx starlette
# Dependencies for quart, sanic, beam, pyspark, and chalice extras are not yet in Fedora
# falcon version >= 3.0 is not yet supported => skipping this extra as well
%global _extras %{expand:
flask
bottle
django
celery
rq
aiohttp
tornado
sqlalchemy
pure_eval
httpx
starlette
fastapi
pymongo
opentelemetry
}
%pyproject_extras_subpkg -n python3-sentry-sdk %_extras
%prep
%autosetup -p1 -n sentry-python-%{version}
# Typo, see https://github.com/getsentry/sentry-python/pull/1796
sed -i 's/opentelemetry-distro>=0.350b0/opentelemetry-distro>=0.35b0/' setup.py
%generate_buildrequires
%pyproject_buildrequires -r
@ -62,26 +105,54 @@ Summary: %{summary}
%check
# Deselect network-dependent tests and tests which cannot be run during Fedora build because of the version of pytest
# https://github.com/pytest-dev/pytest/issues/9621
# https://github.com/pytest-dev/pytest-forked/issues/67
%pytest \
%global _check_import_options %{expand:
-e sentry_sdk.integrations.chalice
-e sentry_sdk.integrations.falcon
-e sentry_sdk.integrations.quart
-e sentry_sdk.integrations.sanic
-e sentry_sdk.integrations.trytond
}
%pyproject_check_import %_check_import_options
# Testing suite relies on the test to be executed on clean env.
# By some reason, skipping the test breaks other tests, marking it as expected to fail.
sed -i '/def test_auto_enabling_integrations_catches_import_error/i@pytest.mark.xfail' tests/test_basics.py
# Deselect/ignore:
# 1. Network-dependent tests
# 2. Tests which cannot be run during Fedora build because of the version of pytest:
# https://github.com/pytest-dev/pytest/issues/9621
# https://github.com/pytest-dev/pytest-forked/issues/67
# 3. django integration tests (django-rest-framework is not available for Fedora 38)
# 4. pymongo integration tests (mockupdb is unpackaged because it appears unmaintained)
# 5. redis and rq integration tests (fakeredis is unpackaged yet)
# 6. bottle, django, and flask integration tests (werkzeug in Fedora 38 is too new, see: https://github.com/getsentry/sentry-python/issues/1398)
%pytest --durations=5 \
--deselect tests/integrations/celery/test_celery.py::test_newrelic_interference \
--deselect tests/integrations/celery/test_celery.py::test_retry \
--deselect tests/integrations/gcp/test_gcp.py::test_handled_exception \
--deselect tests/integrations/gcp/test_gcp.py::test_unhandled_exception \
--deselect tests/integrations/gcp/test_gcp.py::test_timeout_error \
--deselect tests/integrations/gcp/test_gcp.py::test_performance_no_error \
--deselect tests/integrations/gcp/test_gcp.py::test_performance_error \
--deselect tests/integrations/gcp/test_gcp.py::test_performance_no_error \
--deselect tests/integrations/gcp/test_gcp.py::test_timeout_error \
--deselect tests/integrations/gcp/test_gcp.py::test_traces_sampler_gets_correct_values_in_sampling_context \
--deselect tests/integrations/gcp/test_gcp.py::test_unhandled_exception \
--deselect tests/integrations/httpx \
--deselect tests/integrations/requests/test_requests.py::test_crumb_capture \
--deselect tests/integrations/stdlib/test_httplib.py::test_crumb_capture \
--deselect tests/integrations/stdlib/test_httplib.py::test_crumb_capture_hint \
--deselect tests/integrations/stdlib/test_httplib.py::test_httplib_misuse \
--deselect tests/integrations/threading/test_threading.py \
--deselect tests/integrations/wsgi/test_wsgi.py \
--deselect tests/test_profiler.py::test_thread_scheduler_takes_first_samples \
--deselect tests/test_profiler.py::test_thread_scheduler_takes_more_samples \
--deselect tests/test_transport.py::test_transport_works \
--deselect tests/tracing/test_deprecated.py \
--deselect tests/utils/test_contextvars.py \
--deselect tests/test_profiler.py::test_thread_scheduler_takes_first_samples \
--deselect tests/test_profiler.py::test_thread_scheduler_takes_more_samples
--ignore tests/integrations/bottle \
--ignore tests/integrations/flask \
--ignore tests/integrations/django \
--ignore tests/integrations/pymongo \
--ignore tests/integrations/pyramid \
--ignore tests/integrations/redis \
--ignore tests/integrations/rq
%files -n python3-sentry-sdk -f %{pyproject_files}
@ -89,6 +160,12 @@ Summary: %{summary}
%changelog
* Thu Jan 12 2023 Roman Inflianskas <rominf@aiven.io> - 1.12.1-1
- Update to 1.12.1 (resolve rhbz#2153838)
- Add fastapi, pymongo, and opentelemetry extras
- Remove falcon extra
- Check imports
* Wed Nov 23 2022 Roman Inflianskas <rominf@aiven.io> - 1.11.1-1
- Update to 1.11.1 (resolve rhbz#2144826)

View file

@ -1 +1 @@
SHA512 (sentry-python-1.11.1.tar.gz) = 9fd3e1aa9a7287ae21d1a7274f12b9d309d95615e5611ee098c8e2d0577f7c3928a6d5c7256b18d4f0de0ac48d44eb9e38f94709e8982a0c09a5b1cfb5dba114
SHA512 (sentry-python-1.12.1.tar.gz) = c4fb0d13c1e40e0220ef56c29c2c5235aba0c7be598a545e08af783da0732266455d6b9aa73f2aaa068bf63105369517a12e8abbc7a31410ef3c4bea1a0b3018