-
Notifications
You must be signed in to change notification settings - Fork 107
SettingsApi ModuleNotFoundError fix when extensions enabled #1305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6e21519
to
2bf3688
Compare
Codecov Report
@@ Coverage Diff @@
## dev #1305 +/- ##
===========================================
- Coverage 85.00% 32.15% -52.86%
===========================================
Files 34 34
Lines 1914 1922 +8
Branches 363 366 +3
===========================================
- Hits 1627 618 -1009
- Misses 221 1303 +1082
+ Partials 66 1 -65
Flags with carried forward coverage won't be shown. Click here to find out more.
|
}) | ||
req = Request('GET', f'{ctrl.url}/api/HttpTrigger1') | ||
resp = ctrl.send_request(req) | ||
|
||
self.assertEqual(resp.status_code, 200) | ||
self.assertIn("Func Version: 1.11.1", resp.text) | ||
|
||
@skipIf(sys.version_info.minor != 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the same for 3.9? and see what the experience is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed. It should have the same behavior since extensions is enabled in this test.
Description
Updated the try_get_sdk method to avoid popping azure.functions from sys.modules.
This was causing ImportError: cannot import name 'SettingsApi'
Instead now we add python_packages to sys path and then import azure.functions so that we always get the sdk from the customers library.
Other changes:
Refactored dispatcher.py to improve logging.
Fixes #1304
PR information
Quality of Code and Contribution Guidelines