pg.ddx.io  psycopg/psycopg GitHub issues and pull requests  
help / color / mirror / Atom feed
[psycopg/psycopg] PR #1493: Fix missing f-string in update_error_prefixes.py error message
5+ messages / 3 participants
[nested] [flat]

* [psycopg/psycopg] PR #1493: Fix missing f-string in update_error_prefixes.py error message
@ 2026-11-11 13:37  "Hisernberg (@Hisernberg)" <noreply+Hisernberg@github.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Hisernberg (@Hisernberg) @ 2026-11-11 13:37 UTC (permalink / raw)
  To: psycopg/psycopg <noreply+psycopg-psycopg@github.com>

#### Description
One-line fix in `tools/update_error_prefixes.py`: the `parser.error(...)` message printed the literal text `not a valid directory: {opt.pgroot}` instead of the actual path, because the string was missing the `f` prefix.

Before/after (verified locally):

```
before: not a valid directory: {opt.pgroot}
after : not a valid directory: /nonexistent/path
```

#### AI Generation Disclosure
Developed with AI assistance (agent workflow): found by an AST scan for plain strings containing `{name}` where `name` is a live local variable; verified with the before/after evaluation above and `py_compile`.

inline patch 1: tools/update_error_prefixes.py (+1/-1 lines) download inline-1.patchdiff --git a/tools/update_error_prefixes.py b/tools/update_error_prefixes.py index fe86eb7c2..c079a867e 100755 --- a/tools/update_error_prefixes.py +++ b/tools/update_error_prefixes.py @@ -91,7 +91,7 @@ def parse_cmdline() -> Namespace: ) if not (opt := parser.parse_args()).pgroot.is_dir(): - parser.error("not a valid directory: {opt.pgroot}") + parser.error(f"not a valid directory: {opt.pgroot}") return opt
^ permalink raw [nested|flat] 5+ messages in thread

* Re: [psycopg/psycopg] PR #1493 (approved): Fix missing f-string in update_error_prefixes.py error message
@ 2026-11-11 14:13  "pauloxnet (@pauloxnet)" <noreply+pauloxnet@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: pauloxnet (@pauloxnet) @ 2026-11-11 14:13 UTC (permalink / raw)
  To: psycopg/psycopg <noreply+psycopg-psycopg@github.com>



^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [psycopg/psycopg] PR #1493: Fix missing f-string in update_error_prefixes.py error message
@ 2026-11-11 16:42  "dvarrazzo (@dvarrazzo)" <noreply+dvarrazzo@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: dvarrazzo (@dvarrazzo) @ 2026-11-11 16:42 UTC (permalink / raw)
  To: psycopg/psycopg <noreply+psycopg-psycopg@github.com>

Thank you! Not part of the core package, but thank you very much for fixing it :purple_heart: 

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [psycopg/psycopg] PR #1493: Fix missing f-string in update_error_prefixes.py error message
@ 2026-11-11 16:42  "dvarrazzo (@dvarrazzo)" <noreply+dvarrazzo@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: dvarrazzo (@dvarrazzo) @ 2026-11-11 16:42 UTC (permalink / raw)
  To: psycopg/psycopg <noreply+psycopg-psycopg@github.com>

@dvarrazzo merged this (commit 3c4a852fc35a).

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [psycopg/psycopg] PR #1493: Fix missing f-string in update_error_prefixes.py error message
@ 2026-11-11 16:42  "dvarrazzo (@dvarrazzo)" <noreply+dvarrazzo@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: dvarrazzo (@dvarrazzo) @ 2026-11-11 16:42 UTC (permalink / raw)
  To: psycopg/psycopg <noreply+psycopg-psycopg@github.com>

@dvarrazzo closed this.

^ permalink  raw  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2026-11-11 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 13:37 [psycopg/psycopg] PR #1493: Fix missing f-string in update_error_prefixes.py error message "Hisernberg (@Hisernberg)" <noreply+Hisernberg@github.com>
2026-11-11 14:13 ` Re: [psycopg/psycopg] PR #1493 (approved): Fix missing f-string in update_error_prefixes.py error message "pauloxnet (@pauloxnet)" <noreply+pauloxnet@github.com>
2026-11-11 16:42 ` "dvarrazzo (@dvarrazzo)" <noreply+dvarrazzo@github.com>
2026-11-11 16:42 ` "dvarrazzo (@dvarrazzo)" <noreply+dvarrazzo@github.com>
2026-11-11 16:42 ` "dvarrazzo (@dvarrazzo)" <noreply+dvarrazzo@github.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox