Skip to content

Commit 6560a44

Browse files
committed
Merge branch 'master' into ivana/tox-script-8
2 parents 1db4e69 + c6b5994 commit 6560a44

File tree

22 files changed

+703
-321
lines changed

22 files changed

+703
-321
lines changed

.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

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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@
2626
"py3.6": ["aiocontextvars"],
2727
},
2828
},
29+
"launchdarkly": {
30+
"package": "launchdarkly-server-sdk",
31+
},
32+
"loguru": {
33+
"package": "loguru",
34+
},
35+
"openfeature": {
36+
"package": "openfeature-sdk",
37+
},
2938
"pymongo": {
3039
"package": "pymongo",
3140
"deps": {
@@ -38,10 +47,29 @@
3847
"sqlalchemy": {
3948
"package": "sqlalchemy",
4049
},
50+
"statsig": {
51+
"package": "statsig",
52+
"deps": {
53+
"*": ["typing_extensions"],
54+
},
55+
},
4156
"strawberry": {
4257
"package": "strawberry-graphql[fastapi,flask]",
4358
"deps": {
4459
"*": ["httpx"],
4560
},
4661
},
62+
"trytond": {
63+
"package": "trytond",
64+
"deps": {
65+
"*": ["werkzeug"],
66+
"<=5.0": ["werkzeug<1.0"],
67+
},
68+
},
69+
"typer": {
70+
"package": "typer",
71+
},
72+
"unleash": {
73+
"package": "UnleashClient",
74+
},
4775
}

scripts/populate_tox/populate_tox.py

Lines changed: 1 addition & 13 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),
@@ -80,12 +76,9 @@
8076
"huggingface_hub",
8177
"langchain",
8278
"langchain_notiktoken",
83-
"launchdarkly",
8479
"litestar",
85-
"loguru",
8680
"openai",
8781
"openai_notiktoken",
88-
"openfeature",
8982
"pure_eval",
9083
"pyramid",
9184
"quart",
@@ -98,9 +91,6 @@
9891
"starlette",
9992
"starlite",
10093
"tornado",
101-
"trytond",
102-
"typer",
103-
"unleash",
10494
}
10595

10696

@@ -152,8 +142,6 @@ def _prefilter_releases(integration: str, releases: dict[str, dict]) -> list[Ver
152142
continue
153143

154144
meta = data[0]
155-
if datetime.fromisoformat(meta["upload_time"]) < CUTOFF:
156-
continue
157145

158146
if meta["yanked"]:
159147
continue

0 commit comments

Comments
 (0)