abrt / satyr

Automatic problem management with anonymous reports
GNU General Public License v2.0
19 stars 23 forks source link

Add support for fine-grained error location lines in Python tracebacks #334

Closed msrb closed 1 year ago

msrb commented 1 year ago

See: PEP 657

Python 3.11 makes it easier to identify where on the line a problem occurred. This is achieved with the error location lines. We need to skip such lines when parsing the traceback, otherwise we won't identify the exception name correctly (See: rhbz#2137473).

Example:

Traceback (most recent call last): File "test.py", line 2, in x['a']['b']['c']['d'] = 1


TypeError: 'NoneType' object is not subscriptable

Signed-off-by: Michal Srb <michal@redhat.com>
codecov-commenter commented 1 year ago

Codecov Report

Merging #334 (52a861d) into master (7e20e30) will decrease coverage by 0.00%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #334      +/-   ##
==========================================
- Coverage   63.13%   63.13%   -0.01%     
==========================================
  Files          40       40              
  Lines        7352     7351       -1     
  Branches     1232     1232              
==========================================
- Hits         4642     4641       -1     
  Misses       2180     2180              
  Partials      530      530              
Impacted Files Coverage Δ
lib/python_stacktrace.c 41.93% <ø> (-5.13%) :arrow_down:
lib/python_frame.c 58.48% <100.00%> (+2.14%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more