Your message dated Wed, 23 Apr 2025 21:38:28 +0000
with message-id <e1u7hny-00eo0q...@respighi.debian.org>
and subject line unblock debputy
has caused the Debian Bug report #1103758,
regarding unblock: debputy/0.1.67.1 (pre-approval)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
1103758: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103758
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: ni...@thykier.net
User: release.debian....@packages.debian.org
Usertags: unblock
Please pre-approve the following bug fix to the package debputy.
Since `debputy` is a package helper/build system, I am asking for a
pre-approval per freeze policy. However, please note that the affected
code is *not* used by the `debputy` packaging helper/build system code.
[ Reason ]
During development for post-trixie, I noted a crash when debugging
`debputy lint --auto-fix`. The crash was present the mainline version
(sid/testing). The underlying problem was two missing `await` in an
`async` function which would match with the regression being introduced
in 0.1.66.
On top of this, Colin Watson had reported a typo in text from a
diagnostic aimed at the human user (that is, it is not machine readable
output being changed). The change seemed too small for warranting an
upload on its own, so I am including it with the crash fix.
[ Impact ]
If this upload is not approved, then users will be affected by:
1. The `debputy lint --auto-fix` feature will immediately crash for
all users. Note since the LSP module is unaffected this change only
affects CLI users that use `--auto-fix`.
2. There will be a typo in a diagnostic message shown to the user
(via `debputy lint` or the LSP module).
On the flip side, if approved `debputy lint --auto-fix` will work again
and there will be one less typo in the package.
[ Tests ]
I updated the CI to also run `debputy lint --auto-fix` (included in the
diff). If I had that originally, the bug would have been caught before
upload. Additionally, I did manual testing to confirm that `debputy lint
--auto-fix` now works (no crashes and no code warnings). Ideally,
`debputy lint --auto-fix` would have a test battery, but that is beyond
a minimal fix to create the infrastructure for that.
For the typo fix, there is an automatic test being updated in response
(the typo was also present in the test) and manual testing was done.
[ Risks ]
I see no considerable risks.
1. The code affected is isolated to a function only run with
`debputy lint --auto-fix` (note the
`async def _auto_fix_run` context of the diff). Since 0.1.67
immediately crashes with that command and this delta makes
it not crash, then the outcome can only be an improvement.
2. I see a typo fix of human readable message as a no risk
change.
[ Checklist ]
[X] all changes are documented in the d/changelog
[X] I reviewed all changes and I approve them
[X] attach debdiff against the package in testing
Note: I attached a git diff. Since I use `dgit`,
it matches what will be uploaded in the end. The
command used was:
git diff archive/debian/0.1.67..HEAD
On top of the diff, I will do a `dch -r` before
upload to replace UNRELEASED and update the
timestamp in the changelog.
[ Other info ]
None that I can think of.
unblock debputy/0.1.67
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dd54d29..6362e97 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -282,8 +282,9 @@ debputy-lint:
script:
- apt-get update -qq && apt-get -qq build-dep --no-install-recommends
--yes . && apt-get -qq install --yes python3-lsprotocol python3-levenshtein
python3-junit.xml
- PERL5LIB=lib ./debputy.sh lint --lint-report-format=junit4-xml
--report-output debputy-lint-report.xml
- # Mostly just for the validation that --spellcheck does not crash
+ # Mostly just for the validation that --spellcheck / --auto-fix do not
crash
- PERL5LIB=lib ./debputy.sh lint --spellcheck
+ - PERL5LIB=lib ./debputy.sh lint --auto-fix
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~
/^(1|yes|true)$/
diff --git a/debian/changelog b/debian/changelog
index 3bd5445..6012ea6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+debputy (0.1.67.1) UNRELEASED; urgency=medium
+
+ [ Colin Watson ]
+ * Fix spelling of Maintainer field error in diagnostic
+ message.
+
+ [ Niels Thykier ]
+ * debputy: Fix crash with `debputy lint --auto-fix`
+
+ -- Niels Thykier <ni...@thykier.net> Mon, 21 Apr 2025 09:11:25 +0000
+
debputy (0.1.67) unstable; urgency=medium
* debputy: Flush command output. When printing what build system
diff --git a/src/debputy/linting/lint_impl.py b/src/debputy/linting/lint_impl.py
index f377bb1..9b618f3 100644
--- a/src/debputy/linting/lint_impl.py
+++ b/src/debputy/linting/lint_impl.py
@@ -585,7 +585,7 @@ async def _auto_fix_run(
lint_state.content = text
lint_state.lines = lines
lint_state.clear_cache()
- current_issues = lint_state.gather_diagnostics()
+ current_issues = await lint_state.gather_diagnostics()
if fixed_count:
output_filename = f"{filename}.tmp"
@@ -597,7 +597,7 @@ async def _auto_fix_run(
lines = text.splitlines(keepends=True)
lint_state.content = text
lint_state.lines = lines
- remaining_issues = lint_state.gather_diagnostics() or []
+ remaining_issues = await lint_state.gather_diagnostics() or []
else:
remaining_issues = current_issues or []
diff --git a/src/debputy/lsp/lsp_debian_control_reference_data.py
b/src/debputy/lsp/lsp_debian_control_reference_data.py
index 6e382a7..a1cfa64 100644
--- a/src/debputy/lsp/lsp_debian_control_reference_data.py
+++ b/src/debputy/lsp/lsp_debian_control_reference_data.py
@@ -801,7 +801,7 @@ def _maintainer_field_validator(
# to remove the dead separator OR move the trailing data into
`Uploaders`
lint_state.emit_diagnostic(
value_range_te,
- 'The "Maintainer" field has a trailing seperator, but it is a
single value field.',
+ 'The "Maintainer" field has a trailing separator, but it is a
single value field.',
severity,
known_field.unknown_value_authority,
)
diff --git a/tests/lint_tests/test_lint_dctrl.py
b/tests/lint_tests/test_lint_dctrl.py
index 887799b..f51678e 100644
--- a/tests/lint_tests/test_lint_dctrl.py
+++ b/tests/lint_tests/test_lint_dctrl.py
@@ -1882,7 +1882,7 @@ def
test_maintainer_trailing_comma_bug_1089649(line_linter: LintWrapper) -> None
assert diagnostics and len(diagnostics) == 1
issue = diagnostics[0]
- msg = 'The "Maintainer" field has a trailing seperator, but it is a single
value field.'
+ msg = 'The "Maintainer" field has a trailing separator, but it is a single
value field.'
assert issue.message == msg
assert f"{issue.range}" == f"4:45-4:46"
assert issue.severity == DiagnosticSeverity.Error
OpenPGP_signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
Unblocked.
--- End Message ---