Skip to content

Commit

Permalink
Fix error in 3.12 during Pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
Thrameos committed Mar 31, 2024
1 parent 904fc43 commit 8f5590c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This changelog *only* contains changes from the *first* pypi release (0.5.4.3) o
Latest Changes:

- **1.5.1_dev0 - 2023-12-15**
- Fixed uncaught exception while setting traceback causing issues in Python 3.11/3.12.
- Use PEP-518 and PEP-660 configuration for the package, allowing editable and
configurable builds using modern Python packaging tooling.
Where before ``python setup.py --enable-tracing develop``, now can be done with
Expand Down
3 changes: 2 additions & 1 deletion native/python/pyjp_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ void PyJPException_normalize(JPJavaFrame frame, JPPyObject exc, jthrowable th, j
{
// Attach the frame to first
JPPyObject trace = PyTrace_FromJavaException(frame, th, enclosing);
PyException_SetTraceback(exc.get(), trace.get());
if (trace.get()!=nullptr)
PyException_SetTraceback(exc.get(), trace.get());

// Check for the next in the cause list
enclosing = th;
Expand Down

0 comments on commit 8f5590c

Please sign in to comment.