Ensure equal versions have equal hashes#283
Ensure equal versions have equal hashes#283tomschr merged 3 commits intopython-semver:masterfrom sbrudenell:master
Conversation
|
@sbrudenell Thanks for this contribution! Much appreciated! 👍 I like it. 👍 My only concern is that this change breaks compatibility with previous releases, right? Maybe this change should go into semver 3? Futhermore, we should document this behavior somewhere in Does that make sense to you? |
|
IMO it's a stretch to say this change breaks compatibility. Technically true, but any code relying on the current behavior is relying on the python data model being broken, which is pathological enough that I wouldn't bother supporting it. Up to you though. Is there a separate branch for changes going into 3.x? I'll update the docs. |
Yes, maybe my question was not entirely correct. It was more of a "thinking out loud" approach and to get your opinion. Probably I'm too concerned about that, maybe it's not a big issue. 😉 But it's something that I consider first before accepting any PR. So let me think about that.
At the moment this is not the case, unfortunately. I hope we can leave semver2 behind soon and start working on semver 3. For you, nothing changes at the moment.
That would be great! 👍 |
tomschr
left a comment
There was a problem hiding this comment.
Thanks @sbrudenell for your additions. Much appreciated.
I have some minor comments, maybe we can work together to solve them. :-)
|
I'm currently thinking if this change could be safely integrated into the current semver2 code stream or better added to semver3 only. @tlaferriere @python-semver/reviewers Thoughts? |
|
This does feel like a bugfix that could be integrated in the 2.12.x line. All we have to do is implement it 😉. So much for freezing 2.10.x 😂. |
Add suggestions to docs/usage.rst
|
I've tried to read the semver spec to find a dedicated section regarding to compare two versions. The closed I could find was §10: Although the spec talks about version precedence, I think, this can be interpreted as our use case. That makes this a bugfix that should be integrated into semver2 and 3. Thanks @sbrudenell and @tlaferriere for your contributions and help! Much appreciated! 👍 |
* python-semver#283: Ensure equal versions have equal hashes
* python-semver#283: Ensure equal versions have equal hashes
* python-semver#283: Ensure equal versions have equal hashes
* python-semver#283: Ensure equal versions have equal hashes
* python-semver#283: Ensure equal versions have equal hashes * Update list of contributors
Per the python datamodel,
a == bimplieshash(a) == hash(b). The current implementation ofVersionInfo.__hash__includes the build, which isn't used for equality.