Skip to content
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

Conversation

prculley
Copy link
Contributor

@prculley prculley commented Aug 22, 2019

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.

Copy link
Member

@Nick-Hall Nick-Hall left a 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())
Copy link
Member

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)
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

@lordemannd
Copy link
Contributor

I incorporated these changes, then removed the gramps51 directory and restarted Gramps.
The Unstable Release window wasn't shown.
I think problem is solved.

@wroldwiedbwe
Copy link

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 = ""
Copy link
Member

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.

@johnbickmore
Copy link
Contributor

Instead of creating an enhancement, why not just use the old method for the current release?

@Nick-Hall
Copy link
Member

Yes. We will probably use the existing method for the current release.

@prculley
Copy link
Contributor Author

Closed in favor of #890

@prculley prculley closed this Aug 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants