René's URL Explorer Experiment


Title: Implement Extended Version Comparisons (Ranges, Hyphens, Tilde...) · Issue #241 · python-semver/python-semver · GitHub

Open Graph Title: Implement Extended Version Comparisons (Ranges, Hyphens, Tilde...) · Issue #241 · python-semver/python-semver

X Title: Implement Extended Version Comparisons (Ranges, Hyphens, Tilde...) · Issue #241 · python-semver/python-semver

Description: Situation Currently, semver.VersionInfo semver.Version contains a match method. However, it does support only a limited number of comparisons. For example, ~ or ^ as known in NPM is unknown. Proposal Add an additional class which provide...

Open Graph Description: Situation Currently, semver.VersionInfo semver.Version contains a match method. However, it does support only a limited number of comparisons. For example, ~ or ^ as known in NPM is unknown. Propos...

X Description: Situation Currently, semver.VersionInfo semver.Version contains a match method. However, it does support only a limited number of comparisons. For example, ~ or ^ as known in NPM is unknown. Propos...

Opengraph URL: https://github.com/python-semver/python-semver/issues/241

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Implement Extended Version Comparisons (Ranges, Hyphens, Tilde...)","articleBody":"# Situation\r\n\r\nCurrently, ~`semver.VersionInfo`~ `semver.Version` contains a `match` method. However, it does support only a limited number of comparisons. For example, `~` or `^` as known in NPM is unknown.\r\n\r\n# Proposal\r\n\r\nAdd an additional class which provides all the necessary functionality. How this is implemented is a matter of design. :wink: \r\n\r\nI'd suggest to add this after major 3 is released.\r\n\r\nThis could be the use cases (I use a class `Spec` here, but the naming is subject to change):\r\n\r\n```python\r\n\u003e\u003e\u003e import semver\r\n\u003e\u003e\u003e spec = semver.Spec(\"\u003e=1.0 \u003c= 1.7\")\r\n\u003e\u003e\u003e ver = semver.Version.parse(\"1.2.0\")\r\n\r\n\u003e\u003e\u003e spec in ver\r\nTrue\r\n\u003e\u003e\u003e spec.match(ver)\r\nTrue\r\n```\r\n\r\nDepending on how we want to design it, it could also influence, for example, `semver.Version.match`. Maybe we should (re)move that and move this functionality into a future `Spec` class? Wouldn't it a bit more appropriate there?\r\n\r\n@python-semver/reviewers What do you think about this idea? Any preferences?\r\n\r\n# Grammar\r\n\r\n\r\n```\r\nrange-set  ::= range ( logical-or range ) *\r\nlogical-or ::= ( ' ' ) * '||' ( ' ' ) *\r\nrange      ::= hyphen | simple ( ' ' simple ) * | ''\r\nhyphen     ::= partial ' - ' partial\r\nsimple     ::= primitive | partial | tilde | caret\r\nprimitive  ::= ( '\u003c' | '\u003e' | '\u003e=' | '\u003c=' | '=' ) partial\r\npartial    ::= xr ( '.' xr ( '.' xr qualifier ? )? )?\r\nxr         ::= 'x' | 'X' | '*' | nr\r\nnr         ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *\r\ntilde      ::= '~' partial\r\ncaret      ::= '^' partial\r\nqualifier  ::= ( '-' pre )? ( '+' build )?\r\npre        ::= parts\r\nbuild      ::= parts\r\nparts      ::= part ( '.' part ) *\r\npart       ::= nr | [-0-9A-Za-z]+\r\n```\r\n\r\n# See Also\r\n\r\n* https://docs.npmjs.com/cli/v6/using-npm/semver\r\n* https://github.com/rbarrois/python-semanticversion/blob/master/semantic_version/base.py#L586\r\n* http://instaparse.mojombo.com/\r\n* [Parsing a \"simple\" grammar](https://stackoverflow.com/a/43364275)\r\n* [Building Recursive Descent Parsers: The Definitive Guide](https://www.booleanworld.com/building-recursive-descent-parsers-definitive-guide/)\r\n* [Parsing Expressions](https://craftinginterpreters.com/parsing-expressions.html)","author":{"url":"https://github.com/tomschr","@type":"Person","name":"tomschr"},"datePublished":"2020-04-22T11:20:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/241/python-semver/issues/241"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:139dbd1f-ae6f-87eb-0283-a6b594e737b2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB3C8:3F9D41:1FBDDE:2C2E3D:696F318A
html-safe-nonce95fd12d7309bcb8465bd9a4c3d6fd39f6c33927073986f69f07cc63439e115f6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0M4OjNGOUQ0MToxRkJEREU6MkMyRTNEOjY5NkYzMThBIiwidmlzaXRvcl9pZCI6IjI4MjAyMjU3ODM0NTgzNzgxMjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac797d89207d1fc87f9d5a2a32accde66cfc8674b8c78fa2452de59352a857f573
hovercard-subject-tagissue:604675574
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-semver/python-semver/241/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e8a9b79b2f44d0281be0fc7ced2eecfe63a22c0271185af9b08933d9f4bf9ace/python-semver/python-semver/issues/241
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e8a9b79b2f44d0281be0fc7ced2eecfe63a22c0271185af9b08933d9f4bf9ace/python-semver/python-semver/issues/241
og:image:altSituation Currently, semver.VersionInfo semver.Version contains a match method. However, it does support only a limited number of comparisons. For example, ~ or ^ as known in NPM is unknown. Propos...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametomschr
hostnamegithub.com
expected-hostnamegithub.com
Noneb278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee
turbo-cache-controlno-preview
go-importgithub.com/python-semver/python-semver git https://github.com/python-semver/python-semver.git
octolytics-dimension-user_id57228994
octolytics-dimension-user_loginpython-semver
octolytics-dimension-repository_id3375726
octolytics-dimension-repository_nwopython-semver/python-semver
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3375726
octolytics-dimension-repository_network_root_nwopython-semver/python-semver
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release39aed5006635ab6f45e6b77d23e73b08a00272a3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/python-semver/python-semver/issues/241#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-semver%2Fpython-semver%2Fissues%2F241
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-semver%2Fpython-semver%2Fissues%2F241
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-semver%2Fpython-semver
Reloadhttps://patch-diff.githubusercontent.com/python-semver/python-semver/issues/241
Reloadhttps://patch-diff.githubusercontent.com/python-semver/python-semver/issues/241
Reloadhttps://patch-diff.githubusercontent.com/python-semver/python-semver/issues/241
python-semver https://patch-diff.githubusercontent.com/python-semver
python-semverhttps://patch-diff.githubusercontent.com/python-semver/python-semver
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-semver%2Fpython-semver
Fork 96 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-semver%2Fpython-semver
Star 514 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-semver%2Fpython-semver
Code https://patch-diff.githubusercontent.com/python-semver/python-semver
Issues 12 https://patch-diff.githubusercontent.com/python-semver/python-semver/issues
Pull requests 3 https://patch-diff.githubusercontent.com/python-semver/python-semver/pulls
Discussions https://patch-diff.githubusercontent.com/python-semver/python-semver/discussions
Actions https://patch-diff.githubusercontent.com/python-semver/python-semver/actions
Projects 0 https://patch-diff.githubusercontent.com/python-semver/python-semver/projects
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/python-semver/python-semver/security
Please reload this pagehttps://patch-diff.githubusercontent.com/python-semver/python-semver/issues/241
Insights https://patch-diff.githubusercontent.com/python-semver/python-semver/pulse
Code https://patch-diff.githubusercontent.com/python-semver/python-semver
Issues https://patch-diff.githubusercontent.com/python-semver/python-semver/issues
Pull requests https://patch-diff.githubusercontent.com/python-semver/python-semver/pulls
Discussions https://patch-diff.githubusercontent.com/python-semver/python-semver/discussions
Actions https://patch-diff.githubusercontent.com/python-semver/python-semver/actions
Projects https://patch-diff.githubusercontent.com/python-semver/python-semver/projects
Security https://patch-diff.githubusercontent.com/python-semver/python-semver/security
Insights https://patch-diff.githubusercontent.com/python-semver/python-semver/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-semver/python-semver/issues/241
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-semver/python-semver/issues/241
#367https://github.com/python-semver/python-semver/pull/367
Implement Extended Version Comparisons (Ranges, Hyphens, Tilde...)https://patch-diff.githubusercontent.com/python-semver/python-semver/issues/241#top
#367https://github.com/python-semver/python-semver/pull/367
EnhancementNot a bug, but increases or improves in value, quality, desirability, or attractivenesshttps://github.com/python-semver/python-semver/issues?q=state%3Aopen%20label%3A%22Enhancement%22
QuestionUnclear or open issue subject for debatehttps://github.com/python-semver/python-semver/issues?q=state%3Aopen%20label%3A%22Question%22
Release_3.x.yOnly for the major release 3https://github.com/python-semver/python-semver/issues?q=state%3Aopen%20label%3A%22Release_3.x.y%22
https://github.com/tomschr
https://github.com/tomschr
tomschrhttps://github.com/tomschr
on Apr 22, 2020https://github.com/python-semver/python-semver/issues/241#issue-604675574
https://docs.npmjs.com/cli/v6/using-npm/semverhttps://docs.npmjs.com/cli/v6/using-npm/semver
https://github.com/rbarrois/python-semanticversion/blob/master/semantic_version/base.py#L586https://github.com/rbarrois/python-semanticversion/blob/master/semantic_version/base.py#L586
http://instaparse.mojombo.com/http://instaparse.mojombo.com/
Parsing a "simple" grammarhttps://stackoverflow.com/a/43364275
Building Recursive Descent Parsers: The Definitive Guidehttps://www.booleanworld.com/building-recursive-descent-parsers-definitive-guide/
Parsing Expressionshttps://craftinginterpreters.com/parsing-expressions.html
EnhancementNot a bug, but increases or improves in value, quality, desirability, or attractivenesshttps://github.com/python-semver/python-semver/issues?q=state%3Aopen%20label%3A%22Enhancement%22
QuestionUnclear or open issue subject for debatehttps://github.com/python-semver/python-semver/issues?q=state%3Aopen%20label%3A%22Question%22
Release_3.x.yOnly for the major release 3https://github.com/python-semver/python-semver/issues?q=state%3Aopen%20label%3A%22Release_3.x.y%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.