beets/test
Sebastian Mohr b4a634a443
Allow to pickle db models by removing the current connection. (#5641)
## Description

This might be a quick one, depending on how you feel about it... It
allows you to pickle DB model objects. I don't think this is used
directly in Beets, but it might be useful in general. For instance, we
encountered an issue where we wanted to quickly pickle an Item or Album.
This sometimes worked and other times failed, which seemed quite
inconsistent.

Some DB model methods and properties have the side effect of attaching
an SQLite connection to self (._db), which prevents serialization. The
fix is quite straightforward, so I thought we might want to integrate
this into beets directly.

## To Do

- [x] Changelog
- [x] Tests
2025-04-15 11:43:36 +02:00
..
plugins mbsync: support other data sources 2025-04-14 02:28:43 +01:00
rsrc Remove redundant lyrics test files 2025-01-19 01:32:17 +00:00
__init__.py Remove unused imports 2021-08-26 20:59:48 +10:00
conftest.py Configure integrated lyrics tests to only run on lyrics code changes 2025-01-19 01:48:03 +00:00
test_art_resize.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_autotag.py item assignment: set track distance configuration in tests explicitly 2024-12-31 08:13:13 +00:00
test_config_command.py Update CI config, minimum ruff version, docs and add changelog note 2024-12-10 06:10:03 +00:00
test_datequery.py Remove some lint exclusions and fix the issues 2024-09-21 11:59:19 +01:00
test_dbcore.py Allow to pickle db models by removing the current connection. (#5641) 2025-04-15 11:43:36 +02:00
test_files.py Clarify test_unsuccessful_reflink error message 2024-09-05 04:32:13 +01:00
test_hidden.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_importer.py use actual value of matcher, not typo'd one 2025-02-03 19:32:27 -08:00
test_library.py Remove _common.album and use Album instead 2024-10-16 12:37:22 +01:00
test_logging.py Fix lint issues 2024-09-21 11:59:18 +01:00
test_m3ufile.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_mb.py Make this test ignore my local beets config 2024-08-12 08:49:30 +01:00
test_metasync.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_pipeline.py Fix lint issues 2024-09-21 11:59:18 +01:00
test_plugins.py Fix lint issues 2024-09-21 11:59:18 +01:00
test_query.py Use table-qualified names in any field query 2025-01-19 01:09:11 +00:00
test_release.py Fix release formatting for new versions of pandoc 2025-01-13 05:21:01 +00:00
test_sort.py lint 2024-12-31 15:14:32 -08:00
test_template.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_ui.py Ignore this test 2025-01-13 22:48:14 +00:00
test_ui_commands.py Fix lint issues 2024-09-21 11:59:18 +01:00
test_ui_importer.py Fix lint issues 2024-09-21 11:59:18 +01:00
test_ui_init.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_util.py Reformat the codebase 2024-09-21 11:57:48 +01:00
test_vfs.py Reformat the codebase 2024-09-21 11:57:48 +01:00
testall.py Remove def suite TestLoader definitions 2024-07-28 18:58:51 +01:00