Skip to content
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

Proton-CachyOS: Remove deprecated Type Hinting #499

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sonic2kk
Copy link
Contributor

@sonic2kk sonic2kk commented Mar 6, 2025

This PR removes the deprecated type hints from the typing module. They exist sprinkled throughout the codebase, and should be removed, so I don't mean to single out this ctmod. I spotted this as I'm eyeing some changes to help it further inherit from the GE-Proton ctmod in the future, so I was in and around here and noticed it. I have also removed a couple of unused imports from this Ctmod.

I also added the @override annotation to methods we override from GE-Proton, which we currently don't do elsewhere in the codebase, although it is something I also did in #498. Like with removing the old deprecated type hints, I hope to go through and add these around the codebase where relevant (I think only the Ctmods, maybe there's a Qt component we subclass for the Shortcut Editor but I'm not 100% sure).

@sonic2kk
Copy link
Contributor Author

sonic2kk commented Mar 6, 2025

Actually, this annotation may only be available in Python 3.10. Looking at the PEP (PEP 698), I believe it's only in 3.12, but we currently build against Python 3.10 for the AppImage. Python 3.10 is still getting security updates until October 31st 2026, so it is not really worth bumping just to get this extra feature.

I should really have my ProtonUp-Qt virtualenv based on at Python 3.10, not 3.12... Would need to test this against 3.12 to make sure this works, although looking at the docs, the Python 3.10 docs don't mention @override, but the Python 3.12 docs do.

Will need to confirm if this decorator is actually available to us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant