Opened 5 years ago
Closed 5 years ago
#31661 closed Cleanup/optimization (fixed)
Improve makemigrations warning message when calling without an active database connection.
Reported by: | David Smith | Owned by: | David Chorpash |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
I was looking at the gis install instructions and I came across an error when running makemigrations. (Error is I had not entered password correctly).
However, the error message that is generated is a bit odd, it has a full stop on a new line and shows warnings.warn(
I was also able to get the same error message on a clean project, with a postgres database (not gis) and an incorrect password.
I'm not sure if this is a 'bug' but it doesn't look quite right?
(gis) PS C:\Users\smith\gis\geodjango> python .\manage.py makemigrations c:\users\smith\pycharmprojects\django2\django\core\management\commands\makemigrations.py:105: RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': fe_sendauth: no password supplied . warnings.warn( No changes detected (gis) PS C:\Users\smith\gis\geodjango>
Change History (7)
comment:1 by , 5 years ago
Component: | Database layer (models, ORM) → Core (Management commands) |
---|---|
Easy pickings: | set |
Summary: | makemigrations error message is incomplete → Improve makemigrations warning message when calling without an active database connection. |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
follow-up: 3 comment:2 by , 5 years ago
Hello, I'm new to contributing to open source and I feel this would be a good ticket for me to try. May I claim it?
follow-up: 5 comment:3 by , 5 years ago
Replying to David Chorpash:
Hello, I'm new to contributing to open source and I feel this would be a good ticket for me to try. May I claim it?
Absolutely, go for it :-)
comment:4 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 5 years ago
Replying to David Smith:
Replying to David Chorpash:
Hello, I'm new to contributing to open source and I feel this would be a good ticket for me to try. May I claim it?
Absolutely, go for it :-)
Thank you! I will provide a patch removing the period as soon as I can. Judging by the comments, that's the only part of this ticket I should expect to make adjustments to.
Newline is from
OperationalError
so there is not much we can do, but I agree that we should remove a period.It's a line where warning is raised, I don't think there is much we can do.