faust-streaming / mode

Python AsyncIO Services
https://faust-streaming.github.io/mode/
Other
43 stars 16 forks source link

Make Python tests pass for 3.7+3.8 #26

Closed wbarnha closed 1 year ago

wbarnha commented 1 year ago

If we can't get things working for 3.7+3.8, let's just end support for those versions. mode-streaming doesn't get many changes made anyways, so it'd be harmless.

wbarnha commented 1 year ago

Works for 3.8 now, just need to figure out what to do with 3.7.

lqhuang commented 1 year ago

Works for 3.8 now, just need to figure out what to do with 3.7.

Adding a std lib compatible AsyncMock implementation or back-port library in test stage should be fine.

wbarnha commented 1 year ago

I included asyncmock to run for 3.7 as a substitute for AsyncMock. It passes some tests, but for whatever reason it stalls.

wbarnha commented 1 year ago

Looks like the last thing to fix is test_logging.py, lots of errors like this where the stack trace level isn't included:

>           raise AssertionError(_error_message()) from cause
E           AssertionError: Expected call: log(40, 'msg', 'arg1', exc_info=1, kw1=3, kw2=5, stacklevel=3)
E           Actual call: log(40, 'msg', 'arg1', exc_info=1, kw1=3, kw2=5)
wbarnha commented 1 year ago

In order to get tests passing for 3.7, I had to reintroduce the HAS_STACKLEVEL logic into test_logging.py that was removed in #24.