Skip to content

Commit ccf04b0

Browse files
authored
Merge pull request #176 from sumerc/fix-attribute-error-on-312
fix: Silently ignore exceptions for `PyObject_GetAttrString` calls
2 parents d6354e6 + 7422104 commit ccf04b0

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

.github/workflows/github-deploy.yml

+7
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,19 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-20.04, windows-2019, macos-11]
19+
architecture: [x86_64, arm64]
20+
platform: [manylinux2014, musllinux_1_1]
1921

2022
steps:
2123
- uses: actions/checkout@v4
2224

2325
- name: Build wheels
2426
uses: pypa/[email protected]
27+
env:
28+
CIBW_ARCHS_MACOS: ${{ matrix.architecture }}
29+
CIBW_PLATFORM: ${{ matrix.platform }} # Set platform based on matrix
30+
CIBW_BUILD_VERBOSITY: 1
31+
2532
- uses: actions/upload-artifact@v4
2633
with:
2734
path: ./wheelhouse/*.whl

CHANGELOG

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
CHANGELOG
22
=========
33

4+
1.6.1 (2024-10-31)
5+
6+
- Fix error not cleared from an internal PyObject_GetAttrString call
7+
48
1.6.0 (2023-12-07)
59

610
- Drop support 2.7-3.5 and clean backward compatible code (pull/152)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
HOMEPAGE = "https://github.com/sumerc/yappi"
1414
NAME = "yappi"
15-
VERSION = "1.6.0"
15+
VERSION = "1.6.1"
1616
_DEBUG = False # compile/link code for debugging
1717
_PROFILE = False # profile yappi itself
1818

yappi/_yappi.c

+4
Original file line numberDiff line numberDiff line change
@@ -688,8 +688,12 @@ _code2pit(PyFrameObject *fobj, uintptr_t current_tag)
688688
if (class_name) {
689689
pit->name = PyStr_FromFormat("%s.%s", PyStr_AS_CSTRING(class_name), PyStr_AS_CSTRING(cobj->co_name));
690690
Py_DECREF(class_name);
691+
} else {
692+
PyErr_Clear();
691693
}
692694
Py_DECREF(class_obj);
695+
} else {
696+
PyErr_Clear();
693697
}
694698
}
695699
}

0 commit comments

Comments
 (0)