Skip to content

Commit

Permalink
Merge pull request #173 from amoralej/master
Browse files Browse the repository at this point in the history
Add support for python 3.13
  • Loading branch information
sumerc committed Jul 9, 2024
2 parents 942160f + 76427a3 commit b69ae6c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
exclude:
- os: macos-latest
python-version: 3.7

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def assert_almost_equal(
):
# time sensitive tests fail on MacOS CI, increase threshold
if sys.platform == 'darwin':
positive_err = 1.5
positive_err = 1.8
negative_err = 0.6

pos_epsilon = (x * positive_err)
Expand Down
8 changes: 6 additions & 2 deletions yappi/_yappi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,9 @@ _resume_greenlet_ctx(_ctx *ctx)
static void
_eval_setprofile(PyThreadState *ts)
{
#if PY_VERSION_HEX > 0x030b0000
#if PY_VERSION_HEX > 0x030c0000
PyEval_SetProfileAllThreads(_yapp_callback, NULL);
#elif PY_VERSION_HEX > 0x030b0000
_PyEval_SetProfile(ts, _yapp_callback, NULL);
#elif PY_VERSION_HEX < 0x030a00b1
ts->use_tracing = 1;
Expand All @@ -1298,7 +1300,9 @@ _eval_setprofile(PyThreadState *ts)
static void
_eval_unsetprofile(PyThreadState *ts)
{
#if PY_VERSION_HEX > 0x030b0000
#if PY_VERSION_HEX > 0x030c0000
PyEval_SetProfileAllThreads(NULL, NULL);
#elif PY_VERSION_HEX > 0x030b0000
_PyEval_SetProfile(ts, NULL, NULL);
#elif PY_VERSION_HEX < 0x030a00b1
ts->use_tracing = 0;
Expand Down

0 comments on commit b69ae6c

Please sign in to comment.