-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: Forward route class when it's different from APIRoute #53
base: main
Are you sure you want to change the base?
feat: Forward route class when it's different from APIRoute #53
Conversation
…erride feat: Forward route class when it's different from APIRoute
Looks like tests are failing |
Hey @alexschimpf ! The tests are failing on main in python versions: It's only working on Did I miss something from the setup steps? I don't think so... the single command required is |
I haven't looked into the errors that deeply, but... |
@alexschimpf, could you double-check on your machine if the main branch is passing on tests with a Python version greater than 3.7? Or rerun the last release actions?
If you think a newer FastAPI version broke the lib, I can try to solve it, but I tested the lib with my project using Python 3.11, and it worked. |
@yuripiratello I get the same error as the github workflows show. But I'm running the tests against the After some light testing, I see that the tests fail starting with I don't really have time at the moment to look into this any more deeply. We could simply just pin the |
@alexschimpf, I found the issue: It is the |
@yuripiratello Can you merge in the latest main branch? That should fix the issue with the tests. |
Done @alexschimpf |
@@ -324,6 +324,8 @@ def _add_route_to_router( | |||
version: Tuple[int, int] | |||
) -> None: | |||
kwargs = dict(route.__dict__) | |||
if route.__class__ != APIRoute: | |||
kwargs['route_class_override'] = route.__class__ |
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.
Couldn't you accomplish the same thing with this:
kwargs['route_class_override'] = type(route)
?
Pull Request Checklist
Description
This PR enables the
route_class
to be forwarded to the versionizer API.Resolve #52 .