-
-
Notifications
You must be signed in to change notification settings - Fork 402
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(core)!: drop Python 3.8 support #4010
base: v3.0
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v3.0 #4010 +/- ##
=======================================
Coverage 98.26% 98.26%
=======================================
Files 342 342
Lines 15390 15414 +24
Branches 1667 1666 -1
=======================================
+ Hits 15123 15147 +24
+ Misses 133 132 -1
- Partials 134 135 +1 ☔ View full report in Codecov by Sentry. |
|
058efba
to
4d36e24
Compare
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.
Great to see old code removed! 🎉
4d36e24
to
ff400a3
Compare
@@ -8,7 +8,7 @@ | |||
from litestar.plugins.sqlalchemy import SQLAlchemyDTO | |||
|
|||
if TYPE_CHECKING: | |||
from typing import List | |||
pass |
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.
I think we can just remove the entire block
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.
Yeah, no idea why ruff doesn't do these automatically?
@@ -8,7 +8,7 @@ | |||
from litestar.plugins.sqlalchemy import SQLAlchemySerializationPlugin | |||
|
|||
if TYPE_CHECKING: | |||
from typing import List | |||
pass | |||
|
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.
I think we can remove the TYPE_CHECKING import
@@ -9,7 +9,7 @@ | |||
from litestar.plugins.sqlalchemy import SQLAlchemySerializationPlugin | |||
|
|||
if TYPE_CHECKING: | |||
from typing import List | |||
pass |
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.
Same
@@ -8,7 +8,7 @@ | |||
from litestar.plugins.sqlalchemy import SQLAlchemySerializationPlugin | |||
|
|||
if TYPE_CHECKING: | |||
from typing import List | |||
pass |
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.
Same
@@ -9,7 +9,7 @@ | |||
from litestar.plugins.sqlalchemy import SQLAlchemySerializationPlugin | |||
|
|||
if TYPE_CHECKING: | |||
from typing import List | |||
pass |
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.
And another
@@ -281,8 +277,8 @@ def _validate_handler_function(self) -> None: | |||
async def default_connection_lifespan( | |||
self, | |||
socket: WebSocket, | |||
on_accept_dependencies: Optional[Dict[str, Any]] = None, # noqa: UP006, UP007 | |||
on_disconnect_dependencies: Optional[Dict[str, Any]] = None, # noqa: UP006, UP007 | |||
on_accept_dependencies: Optional[dict[str, Any]] = None, # noqa: UP007 |
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.
Should we remove UP007
and the Optional
as well?
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.
Sure because Python 3.8 also have support of |
operator as Union
, we can use SomeType | None
.
Drop support for Python 3.8.
How to review this?
This is a rather big PR, however, almost all changes have been made automatically by ruff. I've put those into separate commits, so I suggest reviewing the commits not consisting of ruff changes individually.