Closed pelmini closed 3 years ago
Okay so I did some more research, and it seems for Python 3.10 they might have taken out a feature that was used in 3.9 backwards which is causing Fast API to fail the tests. Should we take out 3.10 for now? Also where do you look in trace back message to find the error that its throwing. Like is the first line or last line of an error more relevant compared to the rest.
I see 😞 . Python 3.10 should be allowed to fail, since it is not yet release; we should use it as just a heads up for potential issues for supporting py3.10. Can you post a link to the documentation, bug report, etc, where u found what is being removed? From the stacktrace it looks like the way enums are implemented is being changed.
Where in the stacktrace the error is... "it depends". In async it can pop up in different place. Also exceptions can be thrown when handling exceptions. In the simpler cases, as this one, it is typically found at the bottom of the stacktrace output.
/opt/hostedtoolcache/Python/3.10.0-alpha.5/x64/lib/python3.10/enum.py:146: in __get__
raise AttributeError(
E AttributeError: Extra: no attribute 'allow'
If you follow the stacktrack it shows that it goes up to:
fizzbuzzx_api.py:6: in <module>
from fastapi import FastAPI
So since this is where we are importing FastAPI, the issue is outside our code and with a dependency. We can investigate workarounds, check the FastAPI roadmap/issues. If this has not been reported to FastAPI, this would be a great opportunity to contribute to an upstream project.
Do you understand what the stack is? I recommend doing a quick refresher on it.
I just took a look at the documentation for 3.9. They made a mention of how "Python 3.9 is the last version providing those Python 2 backward compatibility layers, to give more time to Python projects maintainers to organize the removal of the Python 2 support and add support for Python 3.9." Then in 3.10 they made note of what was deprecated.
This was all in the python documentation for 3.9 and 3.10
Also, know I dont really understand what a stack is but will take a look at it.
@pelmini if we ignore failing tests, we are not doing TDD. Either the tests or the code need to be updated.
Also, do we need to go over reading stacktraces and what a stack is?
@xsc27 I thought the issue wasn't necessarily with us but with a dependency we're using? I think since python 3.10 is still in dev mode it would be better if we updated the tests.
I would say yes, just to ensure that I know what it is and how it can help with the debugging process. Is this article good enough to cover it? https://stackoverflow.com/questions/3988788/what-is-a-stack-trace-and-how-can-i-use-it-to-debug-my-application-errors