Closed yuyupopo closed 1 month ago
Thank you a lot for the PR! I'll take a look, what we can do with old versions this evening
Also, it will be really glad, if you add a test for your case, that fails for current impl and passes with your changes
Also, it will be really glad, if you add a test for your case, that fails for current impl and passes with your changes
could you briefly share where i should implement the test? can i make a tests/import_test folder and write the test there?
Also, it will be really glad, if you add a test for your case, that fails for current impl and passes with your changes
I'll add the test somewhere and fix the code so it runs in 3.8 and 3.9 also.
could you briefly share where i should implement the test? can i make a tests/import_test folder and write the test there?
You can just add a test to "tests/test_locals.py" case
could you briefly share where i should implement the test? can i make a tests/import_test folder and write the test there?
You can just add a test to "tests/test_locals.py" case
I've added the test in tests/test_prebuild.py
. Also added another tests/wrapper.py
because the require a wrapper function that exists in different module.
I've addressed your comment, and this time hopefully it will pass all the tests
Yeah, thank you a lot for the fix!
Would it be possible to release another version by the weekend?
Would it be possible to release another version by the weekend?
I tried to release it yesterday already, but there are some troubles with dirty-equals
and python3.8 tests. I have to fixed it before we can make a release
@yuyupopo the job is done - you can update FastDepends to 2.4.4 - all should works fine
@yuyupopo the job is done - you can update FastDepends to 2.4.4 - all should works fine
Thanks a lot!
@yuyupopo the job is done - you can update FastDepends to 2.4.4 - all should works fine
Thanks a lot!
Thank your for the PR!
Fixes: https://github.com/airtai/faststream/issues/1492
The original issue happens because the function is wrapped with a decorator, and type annotation resolution is done in the the decorator's globals. The fix uses
func.__module__
instead offunc.__globals__
This is because
wraps
copies the__module__
of the wrapped function, but not the__globals__