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

Refactor constraints structure #482

Merged

Conversation

radoering
Copy link
Member

@radoering radoering commented Sep 23, 2022

No functional changes, just moved two packages:

  • poetry.core.packages.constraints -> poetry.core.constraints.generic
  • poetry.core.semver -> poetry.core.constraints.version

I've always found it very confusing that the two types of constraints are distributed between poetry.core.packages.constraints and poetry.core.semver. It's not even clear anymore why the first one is below packages and why the second one is called semver. Of course, there is some semver related stuff in between the version constraints but the constraints are far from being limited to semver.

In my opinion moving these packages results in a clearer structure that makes it easier to navigate the code for new contributors.

In order to avoid breakage, I only deprecated and forwarded the old packages.

The commits should probably NOT be squashed so that the rename can be recognized in git history.

@radoering radoering marked this pull request as draft September 23, 2022 13:05
@radoering radoering marked this pull request as ready for review September 24, 2022 09:39
…_ into parser module and rename module for constraint parsing of version constraints from helpers to parser
@sonarcloud
Copy link

sonarcloud bot commented Sep 24, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 27 Code Smells

No Coverage information No Coverage information
0.8% 0.8% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants