Skip to content

Conversation

@dk8877
Copy link

@dk8877 dk8877 commented Jan 3, 2026

Removes the deprecated Gdk.threads_enter() and Gdk.threads_leave() calls.
Modern Gdk handles thread locking automatically, so these manual locks are no longer needed and cause DeprecationWarnings.

Tested locally on Fedora; the application launches correctly and the specific DeprecationWarning is gone.

Closes #126

@zdohnal
Copy link
Member

zdohnal commented Jan 5, 2026

Hi @dk8877 ,

thank you for the PR! I see you commented out the threads methods - can you remove them if they are not needed?

@dk8877
Copy link
Author

dk8877 commented Jan 5, 2026

ohk i will do it soon

@dk8877 dk8877 force-pushed the fix-deprecation-warning branch 2 times, most recently from 5ecccf5 to 3bbeaaa Compare January 5, 2026 17:50
@dk8877
Copy link
Author

dk8877 commented Jan 5, 2026

Done! I have removed the ines @zdohnal

Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were some issues with indentation and some lines are not needed anymore, would you mind looking into it?

@dk8877 dk8877 force-pushed the fix-deprecation-warning branch from 3bbeaaa to 6ecd735 Compare January 7, 2026 14:35
@dk8877 dk8877 requested a review from zdohnal January 7, 2026 14:36
@dk8877
Copy link
Author

dk8877 commented Jan 7, 2026

@zdohnal Thanks for the review! I have addressed all the points:
newprinter.py: Removed the finally: block and fixed the indentation of opreq_id_search_error.
authconn.py: Removed the if self._lock: checks and fixed the indentation for the try/except block.
asyncpk1.py: Removed the unnecessary pass statements and moved the debug lines inside the if scope.

Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some unnecessary changes in indentation and one try: block was removed incorrectly (we catch exception there, try: will stay) - please look into it.

Thank you in advance!

@dk8877 dk8877 force-pushed the fix-deprecation-warning branch from 6ecd735 to c70217c Compare January 10, 2026 17:30
@dk8877
Copy link
Author

dk8877 commented Jan 10, 2026

@zdohnal Thanks for the review! I have fixed the issues. You can review it now.

@dk8877 dk8877 requested a review from zdohnal January 10, 2026 17:33
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.

system-config-printer.py: DeprecationWarning: Gdk.threads_enter is deprecated

2 participants