Title: Fix #241: Implement tilde and caret matching by tomschr · Pull Request #367 · python-semver/python-semver · GitHub
Open Graph Title: Fix #241: Implement tilde and caret matching by tomschr · Pull Request #367 · python-semver/python-semver
X Title: Fix #241: Implement tilde and caret matching by tomschr · Pull Request #367 · python-semver/python-semver
Description: Introduce Spec class to deal with such comparisons Improve documentation Simplify code in Version.match (delegates to Spec.match) Implementation Questions Is the Spec class the right approach here? Any other options? Should we use different names for Spec.match? What about Version.match? Is the VersionRegex class a good idea? It shares some constant regexes between Version and Spec. Or should we better use just variables and share those? The Spec class supports operators like Spec("1.*") == Version(1, 2, 3). I'm wondering if this is useful as we can't use the same for ~ and ^. If we remove operators, the code gets a bit smaller, but then we have to call Spec.match. Good, bad? In the (hopefully near) future, I would like to create a SpecSet class to support extended ranges like <=1.2.3 || >=2.3.4. Any design decisions that should be implemented in regards to this? Where and how could we improve the code?
Open Graph Description: Introduce Spec class to deal with such comparisons Improve documentation Simplify code in Version.match (delegates to Spec.match) Implementation Questions Is the Spec class the right approach her...
X Description: Introduce Spec class to deal with such comparisons Improve documentation Simplify code in Version.match (delegates to Spec.match) Implementation Questions Is the Spec class the right approach her...
Opengraph URL: https://github.com/python-semver/python-semver/pull/367
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:ef5725fd-30d4-178d-a6bb-006678827e9f |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | B3FA:3287BB:C26742:FE461F:6976E62F |
| html-safe-nonce | 2d200ca257e088d175b1895e3ff4beea95462ae080352113951b58b05b39d7b5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0ZBOjMyODdCQjpDMjY3NDI6RkU0NjFGOjY5NzZFNjJGIiwidmlzaXRvcl9pZCI6IjcxOTI5NTU2Njk5NjYxNTMyNjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4992fa0e66fef43d5cee3b099a8f4f3568fca6d9896d098591f92ff1711c1120 |
| hovercard-subject-tag | pull_request:1123136860 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/pull/367/checks |
| twitter:image | https://avatars.githubusercontent.com/u/1312925?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1312925?s=400&v=4 |
| og:image:alt | Introduce Spec class to deal with such comparisons Improve documentation Simplify code in Version.match (delegates to Spec.match) Implementation Questions Is the Spec class the right approach her... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 01d198479908d09a841b2febe8eb105a81af2af7d81830960fe0971e1f4adc09 |
| turbo-cache-control | no-preview |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f752335dbbea672610081196a1998e39aec5e14b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width