fix: exempt a SQLite file: URI with an empty path from the one-database check
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
The pair check is databases_problems in neolith/_databases.py, which compares paths through sqlite_path and _identity; start by reading how sqlite_path returns an empty string for file:?mode=memory and file:?cache=private. Exempt an empty path from the pair check the same way the literal :memory: is already exempt. Done when the reproduction in the issue returns no problem for the pair, and each alias is still refused individually with neolith.E018.
Written by the indexing model from the issue text.
Description
Reproduction
On release/0.1.0a4 (07b71c6):
from neolith._databases import databases_problems
lite = "django.db.backends.sqlite3"
databases_problems(
{
"ledger": {"ENGINE": lite, "NAME": "file:?mode=memory"},
"billing": {"ENGINE": lite, "NAME": "file:?cache=private"},
},
["ledger", "billing"],
)
gives ['databases ledger and billing: both name django.db.backends.sqlite3 '] (after #171: both name one SQLite file). sqlite_path returns '' for both, which its docstring calls a private temporary database that names no file, and _identity compares that empty path.
Expected
An empty path names no file, so it is exempt from the pair check, as the literal :memory: is. Boot then refuses each alias on its own (neolith.E018).
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 6h 34m
- Merged PRs (30d)
- 108
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stack314/django-neolith
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
stack314/django-neolith#178 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
stack314/django-neolith#177 ·
Maintainers usually reply within 1 day
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
stack314/django-neolith#151 · 1 comment ·
Maintainers usually reply within 1 day
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
stack314/django-neolith#141 ·
Maintainers usually reply within 1 day
-
fix: refuse an unhashable HOST or PORT instead of raising TypeErrorPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
stack314/django-neolith#140 · 1 comment ·
Maintainers usually reply within 1 day
All issues in stack314/django-neolith
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
bug (unverified)
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
scikit-hep/awkward#4581 · 1 comment ·
Maintainers usually reply within 1 day
-
ci-cd priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
LearningCircuit/local-deep-research#9163 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
supersonic-lumina/ENM156#50 ·
Maintainers usually reply within 2 days