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 Mariusz Felisiak, 5 years ago

Component: Database layer (models, ORM)Core (Management commands)
Easy pickings: set
Summary: makemigrations error message is incompleteImprove makemigrations warning message when calling without an active database connection.
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

However, the error message that is generated is a bit odd, it has a full stop on a new line ...

Newline is from OperationalError so there is not much we can do, but I agree that we should remove a period.

... and shows warnings.warn(

It's a line where warning is raised, I don't think there is much we can do.

comment:2 by David Chorpash, 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?

in reply to:  2 ; comment:3 by David Smith, 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 David Chorpash, 5 years ago

Owner: changed from nobody to David Chorpash
Status: newassigned

in reply to:  3 comment:5 by David Chorpash, 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.

comment:6 by David Chorpash, 5 years ago

Has patch: set

Added PR

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 07506a61:

Fixed #31661 -- Removed period in makemigrations history check warning.

Note: See TracTickets for help on using tickets.
Back to Top