question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

README.md file example need to updated gives `attributeError: module 'semver' has no attribute 'Version'`

See original GitHub issue

Situation

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:closed
  • Created 9 months ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tomschrcommented, Dec 23, 2022

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.

1reaction
spoorcccommented, Dec 23, 2022

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 with semver (https://github.com/landscapeio/requirements-detector/issues/40) maybe I can create a new fan 😉.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found