Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

[WIP] Runtime version checking #654

Merged
merged 4 commits into from
Sep 9, 2017

Conversation

abonie
Copy link
Contributor

@abonie abonie commented Sep 6, 2017

This is a follow-up on #643 that provides runtime version checks that are easier to use and maintain

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Version module provides utilites to compare Python's version identifiers
@abonie abonie force-pushed the runtime_version_checking branch 5 times, most recently from e1a15c2 to 1ae9217 Compare September 7, 2017 20:29
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you've got here is a big improvement on the previous iteration - but I'm pretty sure it can be simpler still.

Python provides sys.hexversion as a way to encode this as a simple integer -
https://docs.python.org/3/c-api/apiabiversion.html#apiabiversion

AFAICT, we could just have a hexversion for the magic number, and then compare numerically.

@freakboy3742 freakboy3742 merged commit 4994737 into beeware:master Sep 9, 2017
@abonie
Copy link
Contributor Author

abonie commented Sep 9, 2017

Oh, that was still WIP. I'll finish it in another PR ;)

@abonie abonie mentioned this pull request Sep 9, 2017
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants