Title: GitHub · Where software is built
Open Graph Title: python-semver/python-semver
X Title: python-semver/python-semver
Description: Python package to work with Semantic Versioning (https://semver.org/) - python-semver/python-semver
Open Graph Description: Python package to work with Semantic Versioning (https://semver.org/) - python-semver/python-semver
X Description: Python package to work with Semantic Versioning (https://semver.org/) - python-semver/python-semver
Opengraph URL: https://github.com/python-semver/python-semver
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"increasing next_version 'prerelease' with different prerelease_token","articleBody":"# Situation\r\nI am not shure if this should be seen as a bug or an enhancement. I have observed this behaviour in version 2.13 of semver.\r\n\r\nIf I have a version 1.2.3 \r\n\r\n`ver = semver.VersionInfo.parse('1.2.3')`\r\n\r\nand would like to get the next dev Version, \r\nI will get the version 1.2.4-dev.1 by calling\r\n\r\n`ver_dev1 = ver.next_version('prerelease', prerelease_token='dev')`\r\n\r\nIf I would like to get the next release candidate, I would call\r\n\r\n`ver_rc1 = ver_dev1.next_version('prerelease', prerelease_token='rc')`\r\n\r\nwhich should be 1.2.4-rc.1\r\n\r\nbut the result is 1.2.4-dev.2\r\n\r\n\r\n# To Reproduce\r\n```\r\nimport semver\r\nver = semver.VersionInfo.parse('1.2.3')\r\nver_dev1 = ver.next_version('prerelease', prerelease_token='dev')\r\nver_rc1 = ver_dev1.next_version('prerelease', prerelease_token='rc')\r\nprint(ver_rc1)\r\n```\r\nThe result is\r\n\r\n`1.2.4-dev.2`\r\n\r\n# Expected Behavior\r\n\r\nI would assume, that according to semantic versioning the result should be\r\n\r\n`1.2.4-rc.1`\r\n\r\n\r\n# Environment\r\n- OS: Linux\r\n- Python version 3.6.13\r\n- Version of semver library 2.13\r\n\r\n","author":{"url":"https://github.com/hokreb","@type":"Person","name":"hokreb"},"datePublished":"2021-05-17T10:48:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/339/python-semver/issues/339"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:58e9530c-50ee-2666-49d1-1cd489369b40 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA98:272EFE:12172985:127D5882:696E9FD0 |
| html-safe-nonce | 17c881927e9b960cf978862a865eaa679fff331afe3309684c8bd26eae34face |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTk4OjI3MkVGRToxMjE3Mjk4NToxMjdENTg4Mjo2OTZFOUZEMCIsInZpc2l0b3JfaWQiOiI3MTMzMDg2Mjk5NzYwNTMzNDU2IiwicmVnaW9uX2VkZ2UiOiJzZWEiLCJyZWdpb25fcmVuZGVyIjoic2VhIn0= |
| visitor-hmac | 92f8216c336fbd8066323ddffb9d7bd2cadc987e3a5a4be9e47daca473a7acf1 |
| hovercard-subject-tag | repository:3375726 |
| 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/python-semver/python-semver/issues/339 |
| twitter:image | https://repository-images.githubusercontent.com/3375726/a3426b1e-ebff-4e85-b3fd-3d5510f3e79d |
| twitter:card | summary_large_image |
| og:image | https://repository-images.githubusercontent.com/3375726/a3426b1e-ebff-4e85-b3fd-3d5510f3e79d |
| og:image:alt | Python package to work with Semantic Versioning (https://semver.org/) - python-semver/python-semver |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdad15fd2ad43212aa8b8be5f2c2725550f8374ceeeb154a999ad9145b43f3f7 |
| turbo-cache-control | no-cache |
| go-import | github.com/python-semver/python-semver git https://github.com/python-semver/python-semver.git |
| octolytics-dimension-user_id | 57228994 |
| octolytics-dimension-user_login | python-semver |
| octolytics-dimension-repository_id | 3375726 |
| octolytics-dimension-repository_nwo | python-semver/python-semver |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3375726 |
| octolytics-dimension-repository_network_root_nwo | python-semver/python-semver |
| 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 | 27b23bc056eb973d350fc95afc848757edb9e7a9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width