python-restx / flask-restx

Fork of Flask-RESTPlus: Fully featured framework for fast, easy and documented API development with Flask
https://flask-restx.readthedocs.io/en/latest/
Other
2.14k stars 333 forks source link

fix: BaseResponse import - replace wekzeug import __version__ by importlib (#573) #575

Closed Ryu-CZ closed 9 months ago

Ryu-CZ commented 11 months ago

Fix for removed wekzeug.__version__ #573 and Logical follow up to replacement of pkg_resources replacement #562 .

Design decision: I decided to create separate import function import_werkzeug_response to do not mess up with global import space with import werkzeug in case of future version conflicts. BaseResponse is now imported once within flask_restx.utils module internally with method import_werkzeug_response and accessible as flask_restx.utils.BaseResponse .

codecov[bot] commented 10 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (b7d1ded) 96.15% compared to head (b5d7b70) 96.15%.

Files Patch % Lines
flask_restx/utils.py 77.77% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #575 +/- ## ======================================= Coverage 96.15% 96.15% ======================================= Files 20 20 Lines 2755 2756 +1 ======================================= + Hits 2649 2650 +1 Misses 106 106 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.