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

Fixed ResourceWarning from unclosed SQLite connection on Python 3.13+. #17178

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

felixxm
Copy link
Member

@felixxm felixxm commented Aug 21, 2023

  • backends.sqlite.tests.ThreadSharing.test_database_sharing_in_threads
  • backends.tests.ThreadTests.test_default_connection_thread_local: on SQLite, close() doesn't explicitly close in-memory connections.
  • servers.tests.LiveServerInMemoryDatabaseLockTest
  • test_runner.tests.SQLiteInMemoryTestDbs.test_transaction_support

Check out python/cpython#108015.

- backends.sqlite.tests.ThreadSharing.test_database_sharing_in_threads
- backends.tests.ThreadTests.test_default_connection_thread_local:
    on SQLite, close() doesn't explicitly close in-memory connections.
- servers.tests.LiveServerInMemoryDatabaseLockTest
- test_runner.tests.SQLiteInMemoryTestDbs.test_transaction_support

Check out python/cpython#108015.
@felixxm felixxm force-pushed the sqlite-connection-close-explicitly branch from 510dd4d to 7224e39 Compare August 23, 2023 06:09
@felixxm felixxm marked this pull request as ready for review August 23, 2023 06:45
@felixxm felixxm changed the title [WIP] Fixed ResourceWarning from unclosed SQLite connection. Fixed ResourceWarning from unclosed SQLite connection. Aug 23, 2023
@felixxm felixxm changed the title Fixed ResourceWarning from unclosed SQLite connection. Fixed ResourceWarning from unclosed SQLite connection on Python 3.13+. Aug 23, 2023
@felixxm felixxm requested a review from a team August 23, 2023 06:48
Copy link
Member

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

Nice 🥇

@felixxm
Copy link
Member Author

felixxm commented Aug 23, 2023

@carltongibson Thanks for checking 👍 🤗

@felixxm felixxm merged commit dd45d52 into django:main Aug 23, 2023
26 checks passed
@felixxm felixxm deleted the sqlite-connection-close-explicitly branch August 23, 2023 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants