Title: Slightly revamp versioning · Issue #5 · python/tzdata · GitHub
Open Graph Title: Slightly revamp versioning · Issue #5 · python/tzdata
X Title: Slightly revamp versioning · Issue #5 · python/tzdata
Description: Currently, the package's version is just the version of the IANA database, but presumably there will be things like rcs, post-releases and dev versions. We should modify __init__.py such that the IANA zone is the building block of the ve...
Open Graph Description: Currently, the package's version is just the version of the IANA database, but presumably there will be things like rcs, post-releases and dev versions. We should modify __init__.py such that the I...
X Description: Currently, the package's version is just the version of the IANA database, but presumably there will be things like rcs, post-releases and dev versions. We should modify __init__.py such that t...
Opengraph URL: https://github.com/python/tzdata/issues/5
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Slightly revamp versioning","articleBody":"Currently, the package's version is just the version of the IANA database, but presumably there will be things like rcs, post-releases and dev versions.\r\n\r\nWe should modify `__init__.py` such that the IANA zone is the building block of the version, and other components are added as desired. One way to do it would be like so:\r\n\r\n```python\r\nIANA_VERSION = \"2019c\"\r\n\r\ndef __version__():\r\n\r\n pre = {\r\n # \"a\": None, # alpha\r\n # \"b\": None, # beta\r\n # \"rc\": None, # release candidate\r\n }\r\n\r\n assert len(pre) \u003c 2, \"Must specify at most one pre component\r\n\r\n post = None\r\n dev = None\r\n\r\n version = IANA_VERSION\r\n if pre:\r\n comp, num = pre.items()\r\n assert isinstance(num, int) and num >= 0, \\\r\n \"Pre component must be a non-negative integer\"\r\n\r\n version += \"%s%d\" % (comp, num)\r\n\r\n if post is not None:\r\n assert isinstance(post, int) and post >= 0, \\\r\n \"Post version must be a non negative integer\"\r\n\r\n version += \".post%d\" % post\r\n\r\n if dev is not None:\r\n assert isinstance(dev, int) and dev >= 0, \\\r\n \"Dev version must be a non-negative integer\"\r\n\r\n version += \".dev%d\" % dev\r\n\r\n return version\r\n\r\n__version__ == __version__()\r\n```\r\n\r\nThough I'm thinking this might be quite a bit of logic in the `__init__.py` that I don't love. Another possible mechanism would be to move the version declaration into a fixed file at the repo root, `VERSION`, then create a \"bump_version\" script (possibly using [parver](https://pypi.org/project/parver/)) that updates `VERSION` and re-generates the `__init__.py`.","author":{"url":"https://github.com/pganssle","@type":"Person","name":"pganssle"},"datePublished":"2020-02-21T15:03:18Z","url":"https://github.com/python/tzdata/issues/5"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0bac242e-3fa5-b1bb-f644-65562507f819 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C950:B0403:DF43B8:122B7B0:6AFFEE7C |
| html-safe-nonce | 8f4499cb6f43e414a58e7dad63f84309a24f2f4b620140b406d9e273c76695bb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTUwOkIwNDAzOkRGNDNCODoxMjJCN0IwOjZBRkZFRTdDIiwidmlzaXRvcl9pZCI6IjEzNDg5Njk3ODU0NTg2ODM1MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2b8db3078c9f4455db05fc72b9606b4a8b972bb909f782f2019ef6712d87111b |
| hovercard-subject-tag | issue:569008106 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/tzdata/5/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5ba19b6939bfb3c74ad8da09638cf08e101273f1a50af26297541953ac80e97f/python/tzdata/issues/5 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5ba19b6939bfb3c74ad8da09638cf08e101273f1a50af26297541953ac80e97f/python/tzdata/issues/5 |
| og:image:alt | Currently, the package's version is just the version of the IANA database, but presumably there will be things like rcs, post-releases and dev versions. We should modify __init__.py such that the I... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pganssle |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/tzdata git https://github.com/python/tzdata.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 242158882 |
| octolytics-dimension-repository_nwo | python/tzdata |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 242158882 |
| octolytics-dimension-repository_network_root_nwo | python/tzdata |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width