Azure / azure-functions-python-worker

Python worker for Azure Functions.
http://aka.ms/azurefunctions
MIT License
335 stars 103 forks source link

Fixing format_traceback's change of signature #1123

Closed vrdmr closed 1 year ago

vrdmr commented 1 year ago

Description

The signature for format_traceback for Python 3.10 has changed and is a breaking change. This PR addresses that breakage and also adds a test to validate it.

For Python 3.`0 - https://docs.python.org/3/library/traceback.html#traceback.print_exception

Changed in version 3.10: The etype parameter has been renamed to exc and is now positional-only.

image

Fixes #


PR information

Quality of Code and Contribution Guidelines

codecov[bot] commented 1 year ago

Codecov Report

Merging #1123 (699330a) into dev (9289105) will decrease coverage by 0.02%. The diff coverage is 50.00%.

@@            Coverage Diff             @@
##              dev    #1123      +/-   ##
==========================================
- Coverage   85.09%   85.07%   -0.03%     
==========================================
  Files          33       33              
  Lines        1845     1849       +4     
  Branches      273      275       +2     
==========================================
+ Hits         1570     1573       +3     
- Misses        205      206       +1     
  Partials       70       70              
Flag Coverage Δ
unittests 85.07% <50.00%> (-0.03%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
azure_functions_worker/logging.py 43.39% <33.33%> (+2.57%) :arrow_up:
azure_functions_worker/utils/common.py 100.00% <100.00%> (ø)
azure_functions_worker/dispatcher.py 88.94% <0.00%> (-0.27%) :arrow_down:
azure_functions_worker/extension.py 99.08% <0.00%> (+0.91%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.