New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Unstable Release message code for 5.1.0 and easier future use #872
Fix Unstable Release message code for 5.1.0 and easier future use #872
Conversation
16c4fea
to
f059d72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will also have to update the release procedure if we change this.
@@ -133,7 +133,7 @@ def emit(key): | |||
register('behavior.addmedia-relative-path', False) | |||
register('behavior.autoload', False) | |||
register('behavior.avg-generation-gap', 20) | |||
register('behavior.betawarn', False) | |||
register('behavior.betawarn', tuple()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a simple flag to indicate that the warning has been read. Does it need to be a tuple? Is there some problem caused by upgrading?
@@ -490,7 +491,7 @@ def _display_welcome_message(parent=None): | |||
Display a welcome message to the user. | |||
(This docstring seems very legacy/historical, not accurate.) | |||
""" | |||
_display_generic_message("master", 'behavior.betawarn', parent=parent) | |||
_display_generic_message(VERSION, 'behavior.betawarn', parent=parent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably better to put an if DEV_VERSION:
here, rather than modifying the _display_generic_message
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect to update the release procedure anyway, because it never mentioned these files, thus the issue.
I considered the original simple flag, but if it ever got set, the user would never see a warning again for any other development version. With the tuple, he will get a new warning every time he runs a different development version.
I actually considered simplifying one of the _display_generic_message or _display_welcome_message methods out of existence, since only one bit of code ever calls the latter, and only it calls the former. And it is not very 'generic'. Original change to create the generic method courtesy of Paul Franklin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer an if
statement around the lines that we previously commented out.
I incorporated these changes, then removed the gramps51 directory and restarted Gramps. |
Came to point this out, glad to see a fix 👍 works for me. |
@@ -19,6 +19,7 @@ | |||
# | |||
|
|||
VERSION_TUPLE = (5, 1, 1) | |||
DEV_VERSION = False # True for development, False for a maintenance release | |||
VERSION_QUALIFIER = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really issue the warning if VERSION_QUALIFIER is not empty.
Instead of creating an enhancement, why not just use the old method for the current release? |
Yes. We will probably use the existing method for the current release. |
Closed in favor of #890 |
Fixes #11274
Foobar in creating a release meant that we have an unstable release message on a real release. Decided to make this a bit easier for future maintainers. Should only be necessary to edit version.py in main gramps code now. Still need to update other parts of the source.