Skip to content

Liberally accept literal DSN arguments to --dsn#1589

Open
rolandwalker wants to merge 1 commit intomainfrom
RW/accept-literal-dsns-along-with-aliases
Open

Liberally accept literal DSN arguments to --dsn#1589
rolandwalker wants to merge 1 commit intomainfrom
RW/accept-literal-dsns-along-with-aliases

Conversation

@rolandwalker
Copy link
Contributor

Description

Forgive the user for thinking that --dsn can accept a literal DSN in addition to an alias.

Internally, recast the confusing variable name dsn to dsn_alias.

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

@rolandwalker rolandwalker self-assigned this Feb 20, 2026
@github-actions
Copy link

Findings

  1. Missing test coverage for new --dsn literal behavior
    The PR adds support for passing a literal DSN via --dsn, but test/test_main.py only covers --dsn with aliases. Add a test that invokes --dsn mysql://... and asserts the parsed connection args (and that CLI flags override DSN fields, mirroring existing DSN-via-positional tests). This guards the new behavior from regressions.
    File: test/test_main.py

No security issues or correctness regressions jumped out in the code paths touched.

Suggested next steps

  1. Add a test in test/test_main.py for --dsn with a literal DSN, including a variant where --user/--password/--host/--port/--database override fields from the DSN.

@rolandwalker rolandwalker force-pushed the RW/accept-literal-dsns-along-with-aliases branch from 769fcea to 9505a68 Compare February 20, 2026 12:38
Forgive the user for thinking that --dsn can accept a literal DSN in
addition to an alias.

Internally, recast the confusing variable name "dsn" to "dsn_alias".
@rolandwalker rolandwalker force-pushed the RW/accept-literal-dsns-along-with-aliases branch from 9505a68 to 1774657 Compare February 20, 2026 12:39
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

Comments