Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __eq__ to Requirement and Marker #453

Closed
FFY00 opened this issue Sep 9, 2021 · 0 comments · Fixed by #499
Closed

Add __eq__ to Requirement and Marker #453

FFY00 opened this issue Sep 9, 2021 · 0 comments · Fixed by #499

Comments

@FFY00
Copy link
Member

FFY00 commented Sep 9, 2021

It would be useful to declare __eq__ in packaging.requirements.Requirement and packaging.markers.Marker so that we can compare them.

Currently:

>>> from packaging.requirements import Requirement
>>> Requirement('package') == Requirement('package')
False
>>> from packaging.markers import Marker
>>> Marker('os_name == "nt"') == Marker('os_name == "nt"')
False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants