poetry-core icon indicating copy to clipboard operation
poetry-core copied to clipboard

Fix an additional case for python-poetry/poetry#4402

Open morne opened this issue 4 years ago • 1 comments

Resolves: python-poetry#4402

morne avatar Aug 22 '21 13:08 morne

Can you give more detail on why this fix is required, a concrete use-case for example?

The linked issue has been closed by another pull request that introduced an allows method for EmptyConstraint. However, this method returns False instead of True as proposed in your fix. In theory, returning False seems to be correct when comparing to AnyConstraint. (AnyConstraint allows everything and EmptyConstraint allows nothing.) But my theory may be wrong...

radoering avatar Jan 25 '22 16:01 radoering

@morne any update on this?

Secrus avatar Aug 22 '22 08:08 Secrus

Apologies for the very late reply, i missed the notifications.

The linked issue has been closed by another pull request that introduced an allows method for EmptyConstraint. However, this method returns False instead of True as proposed in your fix. In theory, returning False seems to be correct when comparing to AnyConstraint. (AnyConstraint allows everything and EmptyConstraint allows nothing.) But my theory may be wrong...

I think this is the correct fix, and my pull request can be ignored. I seems that I had not properly updated some files at the time.

morne avatar Sep 07 '22 12:09 morne