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

Briefcase v0.3.12.dev0+xxx is not Treated as a Dev Version #926

Closed
rmartin16 opened this issue Oct 16, 2022 · 1 comment · Fixed by #927
Closed

Briefcase v0.3.12.dev0+xxx is not Treated as a Dev Version #926

rmartin16 opened this issue Oct 16, 2022 · 1 comment · Fixed by #927
Labels
bug A crash or error in behavior.

Comments

@rmartin16
Copy link
Member

rmartin16 commented Oct 16, 2022

Describe the bug
The dev attribute of a packaging.version.Version object is the number from dev# in the version. When the number is 0, the version is not treated as a dev version.

create.py

            # If we're on a development branch, and the template branch was *not*
            # provided explicity, we can use a fallback development template.
            # Otherwise, re-raise the exception about the unsupported template version.
            if version.dev and app.template_branch is None:

new.py

            # If we're *not* on a development branch, raise an error about
            # the missing template branch.
            if not version.dev:
                raise
python
Python 3.10.7 (main, Sep 28 2022, 17:55:46) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from packaging.version import Version
>>> Version('0.3.12.dev1+gf0e822f.d20221016').dev
1
>>> Version('0.3.12.dev0+gf0e822f.d20221016').dev
0

To Reproduce
Steps to reproduce the behavior:
Run briefcase create or briefcase new with a dev0 version.

Expected behavior
dev0 versions are dev versions.

Environment:

  • Operating System: Ubuntu 22
  • Python version: 3.10
  • Software versions:
    • Briefcase: 0.3.12.dev0+gf0e822f.d20221016
@rmartin16 rmartin16 added the bug A crash or error in behavior. label Oct 16, 2022
rmartin16 added a commit to rmartin16/briefcase that referenced this issue Oct 16, 2022
@freakboy3742
Copy link
Member

Ah - I saw this, and 🤦 . The irony is that by applying this patch, the problem goes away... because you're no longer on dev0+ :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants