Skip to content

Make VERSION tuple numeric. #1708

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

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

Carreau
Copy link
Contributor

@Carreau Carreau commented Jan 17, 2023

Note that by being numeric we drop the rc/a/b/dev suffix. I'm also adding the pep440 regular expression to make sure the version number match the spec.

The pep 440 spec is a bit annoying with the fact that a/b/rc don't have dots, but .dev do.

There are some issues if you don't follow the spec and publish both whl/tgz, as pip will mix-up the values, and think the tgz are actually a more recent version than the whl. It may be fixed in setuptools/pip, but better be safe.

Ii did not go the route of setting VERSION and having version be a '.'.join() as setup.py use regex to extract version number.

Maye docs/conf.py could also use the same trick as setup.py to avoid having to update the version number in multiple places ?

Closes #1707

@jonathanslenders
Copy link
Member

Hi @Carreau , I see that you're assigning to the pep440 variable, but I don't see it used anywhere. Is there anything that I'm missing?

BTW: about the failing tests, I just fixed that: #1711

Note that by being numeric we drop the rc/a/b/dev suffix.
I'm also adding the pep440 regular expression to make sure the version
number match the spec.

The pep 440 spec is a bit annoying with the fact that a/b/rc don't have
dots, but .dev do.

There are some issues if you don't follow the spec and publish both whl/tgz, as
pip will mix-up the values, and think the tgz are actually a more recent
version than the whl. It may be fixed in setuptools/pip, but better be
safe.

Ii did not go the route of setting VERSION and having __version__ be a
'.'.join() as setup.py use regex to extract version number.

Maye docs/conf.py could also use the same trick as setup.py to avoid
having to update the version number in multiple places ?

Closes prompt-toolkit#1707
@Carreau
Copy link
Contributor Author

Carreau commented Jan 19, 2023

Yeah, it's better to add before committing....

Rebased/squashed and force pushed.
I've relaxed also the regex a bit compared to the official one that is meant to work only for releases.

@jonathanslenders jonathanslenders merged commit 14863ae into prompt-toolkit:master Jan 19, 2023
@jonathanslenders
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any reason why VERSION is a tuple of str and not int ?
2 participants