Skip to content

Commit

Permalink
Merge pull request #176 from sumerc/fix-attribute-error-on-312
Browse files Browse the repository at this point in the history
fix: Silently ignore exceptions for `PyObject_GetAttrString` calls
  • Loading branch information
sumerc authored Oct 31, 2024
2 parents d6354e6 + 7422104 commit ccf04b0
Showing 4 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/github-deploy.yml
Original file line number Diff line number Diff line change
@@ -16,12 +16,19 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
architecture: [x86_64, arm64]
platform: [manylinux2014, musllinux_1_1]

steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_ARCHS_MACOS: ${{ matrix.architecture }}
CIBW_PLATFORM: ${{ matrix.platform }} # Set platform based on matrix
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CHANGELOG
=========

1.6.1 (2024-10-31)

- Fix error not cleared from an internal PyObject_GetAttrString call

1.6.0 (2023-12-07)

- Drop support 2.7-3.5 and clean backward compatible code (pull/152)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@

HOMEPAGE = "https://github.com/sumerc/yappi"
NAME = "yappi"
VERSION = "1.6.0"
VERSION = "1.6.1"
_DEBUG = False # compile/link code for debugging
_PROFILE = False # profile yappi itself

4 changes: 4 additions & 0 deletions yappi/_yappi.c
Original file line number Diff line number Diff line change
@@ -688,8 +688,12 @@ _code2pit(PyFrameObject *fobj, uintptr_t current_tag)
if (class_name) {
pit->name = PyStr_FromFormat("%s.%s", PyStr_AS_CSTRING(class_name), PyStr_AS_CSTRING(cobj->co_name));
Py_DECREF(class_name);
} else {
PyErr_Clear();
}
Py_DECREF(class_obj);
} else {
PyErr_Clear();
}
}
}

0 comments on commit ccf04b0

Please sign in to comment.