fluent / fluent-bit

Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
https://fluentbit.io
Apache License 2.0
5.78k stars 1.57k forks source link

Improve Python mutltiline support for PEP657/Python3.11 #7478

Open peschmae opened 1 year ago

peschmae commented 1 year ago

Is your feature request related to a problem? Please describe. Starting with Python 3.11 tracebacks are more fine grained and give a hint where an error occurred.

An example of a new traceback looks like this

Traceback (most recent call last):
  File "distance.py", line 11, in <module>
    print(manhattan_distance(p1, p2))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "distance.py", line 6, in manhattan_distance
    return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y)
                           ^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'x'

These additional lines (with ^ or ~) aren't matching the python multiline regex and end up as single line messages.

Describe the solution you'd like Add a regex matching the new lines to the python multiline handler, to also catch these lines into the multiline message.

Additional context In-depth explanation for the Python changes: https://docs.python.org/3/whatsnew/3.11.html#pep-657-fine-grained-error-locations-in-tracebacks

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

peschmae commented 9 months ago

Still relevant, as the persists in the latest version

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

peschmae commented 5 months ago

Still an issue in 3.0

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

flo-ri-an commented 2 months ago

still needs a resolution