README.md file example need to updated gives `attributeError: module 'semver' has no attribute 'Version'`
See original GitHub issueSituation
README.md file needs to be updated as now we have semver.VersionInfo.parse('1.2.3-pre.2+build.4')
class(VersionInfo) name instead of the older one(Version) that is mentioned in the README
To Reproduce
When running the command mentioned in the README ver = semver.Version.parse('1.2.3-pre.2+build.4')
it gives below error
AttributeError: module 'semver' has no attribute 'Version'
Expected Behavior
If we use correct class name it works fine
Environment
- OS: [e.g. Linux, MacOS, Windows, …]
- Python version [e.g. 3.6, 3.7, …]
- Version of semver library [e.g. 3.0.0]
Additional context
Issue Analytics
- State:
- Created 9 months ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
module 'semver' has no attribute 'VersionInfo' · Issue #11846 ...
I'm using python package semver in my conanfile.py: https://pypi.org/project/semver/ But I got some error like: [cmake] File ...
Read more >module 'semver' has no attribute 'compare' [Python-Gitlab]
I'm getting this error in vscode. AttributeError: module 'semver' has no attribute 'compare ...
Read more >python-semver Documentation
If you want to install this specific version (for example, 2.10.0), use the command pip with an URL and its version:.
Read more >python-semver Documentation - Read the Docs
A Python module for semantic versioning. Simplifies comparing versions. Note: This project works for Python 3.7 and greater only. If you are ...
Read more >History - setuptools 65.6.3.post20221220 documentation
#3419: Updated the example version numbers to be compliant with PEP-440 on the “Specifying Your Project's Version” page of the user guide.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks Ben/@spoorcc! Oh, that’s really nice, thank you!
Ahh yes, naming things can be really tricky. I’m sorry for your issues. I thought about renaming the package, but wasn’t sure if that wouldn’t cause more problems than it solved.
Thanks for opening the new issue. 👍 Hope they can migrate it to this project. 😉
All the best and if you have further ideas, comments, bug fixes etc. let us know.
Thanks for the reply @tomschr!
I’m already a big fan of your package 😉! I use it in https://github.com/dfetch-org/dfetch.
In my case a sub-sub dev-dependency started using
poetry-semver
unfortunately 😢. This caused pylint to start complaining which brought me to this issue. prospector --> requirements-detector -->poetry-semver
I’ve opened an issue in the requirements-detector repository to replace
poetry-semver
withsemver
(https://github.com/landscapeio/requirements-detector/issues/40) maybe I can create a new fan 😉.