Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: python-poetry/poetry-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d9d6cd93db91c6439fd9558ba4a5cdcb57e1e6f0
Choose a base ref
..
head repository: python-poetry/poetry-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b003df9a576f4ff461177ce028e367461a813543
Choose a head ref
Showing with 2 additions and 8 deletions.
  1. +2 −8 src/poetry/core/semver/version.py
10 changes: 2 additions & 8 deletions src/poetry/core/semver/version.py
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ def precision(self) -> int:
return self.release.precision

def next_breaking(self) -> Version:
if self.major > 0:
if self.major > 0 or self.precision == 1:
return self.stable.next_major()

return self._next_breaking_when_major_is_0()
return self.stable.next_minor()

@property
def min(self) -> Version:
@@ -169,9 +169,3 @@ def from_parts(
local=local,
epoch=epoch,
)

def _next_breaking_when_major_is_0(self) -> Version:
if self.precision == 1:
return self.stable.next_major()

return self.stable.next_minor()