Skip to content

Commit 11e199f

Browse files
committed
Merge branch 'master' into ivana/tox-script-9
2 parents 30a6fbd + 85879b4 commit 11e199f

24 files changed

+815
-495
lines changed

.github/workflows/test-integrations-dbs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
strategy:
125125
fail-fast: false
126126
matrix:
127-
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
127+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
128128
# python3.6 reached EOL and is no longer being supported on
129129
# new versions of hosted runners on Github Actions
130130
# ubuntu-20.04 is the last version that supported python3.6

.github/workflows/test-integrations-flags.yml

Lines changed: 5 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -22,78 +22,14 @@ env:
2222
CACHED_BUILD_PATHS: |
2323
${{ github.workspace }}/dist-serverless
2424
jobs:
25-
test-flags-latest:
26-
name: Flags (latest)
27-
timeout-minutes: 30
28-
runs-on: ${{ matrix.os }}
29-
strategy:
30-
fail-fast: false
31-
matrix:
32-
python-version: ["3.8","3.12","3.13"]
33-
# python3.6 reached EOL and is no longer being supported on
34-
# new versions of hosted runners on Github Actions
35-
# ubuntu-20.04 is the last version that supported python3.6
36-
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
37-
os: [ubuntu-20.04]
38-
steps:
39-
- uses: actions/[email protected]
40-
- uses: actions/setup-python@v5
41-
with:
42-
python-version: ${{ matrix.python-version }}
43-
allow-prereleases: true
44-
- name: Setup Test Env
45-
run: |
46-
pip install "coverage[toml]" tox
47-
- name: Erase coverage
48-
run: |
49-
coverage erase
50-
- name: Test launchdarkly latest
51-
run: |
52-
set -x # print commands that are executed
53-
./scripts/runtox.sh "py${{ matrix.python-version }}-launchdarkly-latest"
54-
- name: Test openfeature latest
55-
run: |
56-
set -x # print commands that are executed
57-
./scripts/runtox.sh "py${{ matrix.python-version }}-openfeature-latest"
58-
- name: Test unleash latest
59-
run: |
60-
set -x # print commands that are executed
61-
./scripts/runtox.sh "py${{ matrix.python-version }}-unleash-latest"
62-
- name: Generate coverage XML (Python 3.6)
63-
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
64-
run: |
65-
export COVERAGE_RCFILE=.coveragerc36
66-
coverage combine .coverage-sentry-*
67-
coverage xml --ignore-errors
68-
- name: Generate coverage XML
69-
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
70-
run: |
71-
coverage combine .coverage-sentry-*
72-
coverage xml
73-
- name: Upload coverage to Codecov
74-
if: ${{ !cancelled() }}
75-
uses: codecov/[email protected]
76-
with:
77-
token: ${{ secrets.CODECOV_TOKEN }}
78-
files: coverage.xml
79-
# make sure no plugins alter our coverage reports
80-
plugin: noop
81-
verbose: true
82-
- name: Upload test results to Codecov
83-
if: ${{ !cancelled() }}
84-
uses: codecov/test-results-action@v1
85-
with:
86-
token: ${{ secrets.CODECOV_TOKEN }}
87-
files: .junitxml
88-
verbose: true
8925
test-flags-pinned:
9026
name: Flags (pinned)
9127
timeout-minutes: 30
9228
runs-on: ${{ matrix.os }}
9329
strategy:
9430
fail-fast: false
9531
matrix:
96-
python-version: ["3.8","3.12","3.13"]
32+
python-version: ["3.7","3.8","3.9","3.12","3.13"]
9733
# python3.6 reached EOL and is no longer being supported on
9834
# new versions of hosted runners on Github Actions
9935
# ubuntu-20.04 is the last version that supported python3.6
@@ -119,6 +55,10 @@ jobs:
11955
run: |
12056
set -x # print commands that are executed
12157
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openfeature"
58+
- name: Test statsig pinned
59+
run: |
60+
set -x # print commands that are executed
61+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-statsig"
12262
- name: Test unleash pinned
12363
run: |
12464
set -x # print commands that are executed

.github/workflows/test-integrations-misc.yml

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -22,82 +22,6 @@ env:
2222
CACHED_BUILD_PATHS: |
2323
${{ github.workspace }}/dist-serverless
2424
jobs:
25-
test-misc-latest:
26-
name: Misc (latest)
27-
timeout-minutes: 30
28-
runs-on: ${{ matrix.os }}
29-
strategy:
30-
fail-fast: false
31-
matrix:
32-
python-version: ["3.6","3.7","3.8","3.12","3.13"]
33-
# python3.6 reached EOL and is no longer being supported on
34-
# new versions of hosted runners on Github Actions
35-
# ubuntu-20.04 is the last version that supported python3.6
36-
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
37-
os: [ubuntu-20.04]
38-
steps:
39-
- uses: actions/[email protected]
40-
- uses: actions/setup-python@v5
41-
with:
42-
python-version: ${{ matrix.python-version }}
43-
allow-prereleases: true
44-
- name: Setup Test Env
45-
run: |
46-
pip install "coverage[toml]" tox
47-
- name: Erase coverage
48-
run: |
49-
coverage erase
50-
- name: Test loguru latest
51-
run: |
52-
set -x # print commands that are executed
53-
./scripts/runtox.sh "py${{ matrix.python-version }}-loguru-latest"
54-
- name: Test opentelemetry latest
55-
run: |
56-
set -x # print commands that are executed
57-
./scripts/runtox.sh "py${{ matrix.python-version }}-opentelemetry-latest"
58-
- name: Test potel latest
59-
run: |
60-
set -x # print commands that are executed
61-
./scripts/runtox.sh "py${{ matrix.python-version }}-potel-latest"
62-
- name: Test pure_eval latest
63-
run: |
64-
set -x # print commands that are executed
65-
./scripts/runtox.sh "py${{ matrix.python-version }}-pure_eval-latest"
66-
- name: Test trytond latest
67-
run: |
68-
set -x # print commands that are executed
69-
./scripts/runtox.sh "py${{ matrix.python-version }}-trytond-latest"
70-
- name: Test typer latest
71-
run: |
72-
set -x # print commands that are executed
73-
./scripts/runtox.sh "py${{ matrix.python-version }}-typer-latest"
74-
- name: Generate coverage XML (Python 3.6)
75-
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
76-
run: |
77-
export COVERAGE_RCFILE=.coveragerc36
78-
coverage combine .coverage-sentry-*
79-
coverage xml --ignore-errors
80-
- name: Generate coverage XML
81-
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
82-
run: |
83-
coverage combine .coverage-sentry-*
84-
coverage xml
85-
- name: Upload coverage to Codecov
86-
if: ${{ !cancelled() }}
87-
uses: codecov/[email protected]
88-
with:
89-
token: ${{ secrets.CODECOV_TOKEN }}
90-
files: coverage.xml
91-
# make sure no plugins alter our coverage reports
92-
plugin: noop
93-
verbose: true
94-
- name: Upload test results to Codecov
95-
if: ${{ !cancelled() }}
96-
uses: codecov/test-results-action@v1
97-
with:
98-
token: ${{ secrets.CODECOV_TOKEN }}
99-
files: .junitxml
100-
verbose: true
10125
test-misc-pinned:
10226
name: Misc (pinned)
10327
timeout-minutes: 30

.github/workflows/test-integrations-web-1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
strategy:
116116
fail-fast: false
117117
matrix:
118-
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
118+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
119119
# python3.6 reached EOL and is no longer being supported on
120120
# new versions of hosted runners on Github Actions
121121
# ubuntu-20.04 is the last version that supported python3.6

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
- Set level based on status code for HTTP client breadcrumbs (#4004) by @sentrivana
1818
- Don't set transaction status to error on `sys.exit(0)` (#4025) by @sentrivana
1919
- Continuous profiling sample rate (#4002) by @Zylphrex
20+
21+
Set `profile_session_sample_rate=1.0` in your `init()` to collect continuous profiles for 100% of profile sessions. See https://docs.sentry.io/platforms/python/profiling/#enable-continuous-profiling for more information.
2022
- Track and report spans that were dropped (#4005) by @constantinius
2123
- Change continuous profile buffer size (#3987) by @Zylphrex
2224
- Handle `MultiPartParserError` to avoid internal sentry crash (#4001) by @orhanhenrik
@@ -40,7 +42,7 @@
4042
## 2.20.0
4143

4244
- **New integration:** Add [Typer](https://typer.tiangolo.com/) integration (#3869) by @patrick91
43-
45+
4446
For more information, see the documentation for the [TyperIntegration](https://docs.sentry.io/platforms/python/integrations/typer/).
4547

4648
- **New integration:** Add [Unleash](https://www.getunleash.io/) feature flagging integration (#3888) by @aliu39
@@ -122,7 +124,7 @@
122124
### Various fixes & improvements
123125

124126
- **New integration:** Add [LaunchDarkly](https://launchdarkly.com/) integration (#3648) by @cmanallen
125-
127+
126128
For more information, see the documentation for the [LaunchDarklyIntegration](https://docs.sentry.io/platforms/python/integrations/launchdarkly/).
127129

128130
- **New integration:** Add [OpenFeature](https://openfeature.dev/) feature flagging integration (#3648) by @cmanallen

requirements-linting.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ flake8-bugbear
1515
pep8-naming
1616
pre-commit # local linting
1717
httpcore
18-
openfeature-sdk
1918
launchdarkly-server-sdk
19+
openfeature-sdk
20+
statsig
2021
UnleashClient
2122
typer
2223
strawberry-graphql

scripts/populate_tox/config.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@
1313
},
1414
"python": ">=3.8",
1515
},
16+
"clickhouse_driver": {
17+
"package": "clickhouse-driver",
18+
},
19+
"flask": {
20+
"package": "flask",
21+
"deps": {
22+
"*": ["flask-login", "werkzeug"],
23+
"<2.0": ["werkzeug<2.1.0", "markupsafe<2.1.0"],
24+
},
25+
},
1626
"gql": {
1727
"package": "gql[all]",
1828
},
@@ -30,13 +40,69 @@
3040
},
3141
"python": ">=3.7",
3242
},
43+
"launchdarkly": {
44+
"package": "launchdarkly-server-sdk",
45+
},
46+
"loguru": {
47+
"package": "loguru",
48+
},
49+
"openfeature": {
50+
"package": "openfeature-sdk",
51+
},
52+
"pymongo": {
53+
"package": "pymongo",
54+
"deps": {
55+
"*": ["mockupdb"],
56+
},
57+
},
58+
"redis_py_cluster_legacy": {
59+
"package": "redis-py-cluster",
60+
},
3361
"requests": {
3462
"package": "requests",
3563
},
64+
"sqlalchemy": {
65+
"package": "sqlalchemy",
66+
},
67+
"starlette": {
68+
"package": "starlette",
69+
"deps": {
70+
"*": [
71+
"pytest-asyncio",
72+
"python-multipart",
73+
"requests",
74+
"anyio<4.0.0",
75+
"jinja2",
76+
"httpx",
77+
],
78+
"<0.37": ["httpx<0.28.0"],
79+
"<0.15": ["jinja2<3.1"],
80+
"py3.6": ["aiocontextvars"],
81+
},
82+
},
83+
"statsig": {
84+
"package": "statsig",
85+
"deps": {
86+
"*": ["typing_extensions"],
87+
},
88+
},
3689
"strawberry": {
3790
"package": "strawberry-graphql[fastapi,flask]",
3891
"deps": {
3992
"*": ["httpx"],
4093
},
4194
},
95+
"trytond": {
96+
"package": "trytond",
97+
"deps": {
98+
"*": ["werkzeug"],
99+
"<=5.0": ["werkzeug<1.0"],
100+
},
101+
},
102+
"typer": {
103+
"package": "typer",
104+
},
105+
"unleash": {
106+
"package": "UnleashClient",
107+
},
42108
}

scripts/populate_tox/populate_tox.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
This script populates tox.ini automatically using release data from PYPI.
2+
This script populates tox.ini automatically using release data from PyPI.
33
"""
44

55
import functools
@@ -8,7 +8,6 @@
88
import time
99
from bisect import bisect_left
1010
from collections import defaultdict
11-
from datetime import datetime, timedelta
1211
from importlib.metadata import metadata
1312
from packaging.specifiers import SpecifierSet
1413
from packaging.version import Version
@@ -27,9 +26,6 @@
2726
from split_tox_gh_actions.split_tox_gh_actions import GROUPS
2827

2928

30-
# Only consider package versions going back this far
31-
CUTOFF = datetime.now() - timedelta(days=365 * 5)
32-
3329
TOX_FILE = Path(__file__).resolve().parent.parent.parent / "tox.ini"
3430
ENV = Environment(
3531
loader=FileSystemLoader(Path(__file__).resolve().parent),
@@ -65,44 +61,32 @@
6561
"bottle",
6662
"celery",
6763
"chalice",
68-
"clickhouse_driver",
6964
"cohere",
7065
"cloud_resource_context",
7166
"cohere",
7267
"django",
7368
"dramatiq",
7469
"falcon",
7570
"fastapi",
76-
"flask",
7771
"gcp",
7872
"httpx",
7973
"huey",
8074
"huggingface_hub",
8175
"langchain",
8276
"langchain_notiktoken",
83-
"launchdarkly",
8477
"litestar",
85-
"loguru",
8678
"openai",
8779
"openai_notiktoken",
88-
"openfeature",
8980
"pure_eval",
90-
"pymongo",
9181
"pyramid",
9282
"quart",
9383
"ray",
9484
"redis",
95-
"redis_py_cluster_legacy",
9685
"rq",
9786
"sanic",
9887
"spark",
99-
"starlette",
10088
"starlite",
101-
"sqlalchemy",
10289
"tornado",
103-
"trytond",
104-
"typer",
105-
"unleash",
10690
}
10791

10892

@@ -154,8 +138,6 @@ def _prefilter_releases(integration: str, releases: dict[str, dict]) -> list[Ver
154138
continue
155139

156140
meta = data[0]
157-
if datetime.fromisoformat(meta["upload_time"]) < CUTOFF:
158-
continue
159141

160142
if meta["yanked"]:
161143
continue

0 commit comments

Comments
 (0)