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

allow packaging >=22.0,<23.0 #592

Merged

Conversation

ellisvalentiner
Copy link
Contributor

Description

Loosen dependency on packaging from 22.0 to <23.0

Related Issue

Motivation and Context

This change will allow prospector to be installed alongside other common tools (e.g. black) use packaging >22.0.

How Has This Been Tested?

This change was tested by running the pre-commit hooks and CI workflow.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • My change requires a change to the dependencies
  • I have updated the dependencies accordingly
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@ellisvalentiner ellisvalentiner changed the title allow packaging <23.0 allow packaging >=22.0,<23.0 Feb 14, 2023
Copy link
Collaborator

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imo the dependency should be >= something to be compatible with the max number of over repositories. We seems to support everything from 0 to 22.x...

@ellisvalentiner
Copy link
Contributor Author

Because of the dependency on requirements-detector, which requires packaging >=21.3, I set the lower bound to the same.

@Pierre-Sassoulas
Copy link
Collaborator

Shouldn't we let requirements-detector set it's own constraint and keep our constraint large or apply constraint on requirements-detector ? Do prospector actually needs "packaging" or is this just a transitive dependency brought by requirements-detector ?

@Pierre-Sassoulas Pierre-Sassoulas added the dependencies Pull requests that update a dependency file label Feb 14, 2023
@Pierre-Sassoulas Pierre-Sassoulas added this to the 1.9.0 milestone Feb 14, 2023
@ellisvalentiner
Copy link
Contributor Author

Per this comment on a previous PR, it seems that the version for requirements-detector should be set explicitly.

@Pierre-Sassoulas
Copy link
Collaborator

Huhuhu, right, let's listen to this guy he seems to knows what he's talking about.

pyproject.toml Outdated
@@ -60,7 +60,7 @@ mypy = {version = ">=0.600", optional = true}
pyroma = {version = ">=2.4", optional = true}
setoptconf-tmp = "^0.3.1"
GitPython = "^3.1.27"
packaging = "<22.0"
packaging = ">=21.0,<23.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
packaging = ">=21.0,<23.0"
packaging = "*"

Because prospector itself does not have the constraint of its transitive dependencies. And let's not force us to open a MR each time a new packaging is out. Let's open one if packaging break something instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm looking into fixing the requirements-detector package from which this transitive dependency comes. However I have run into downstream issues with poetry-semver and python-semver so it'll take me a little while to get a decent release of requirements-detector out.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 6614d19 into prospector-dev:master Feb 15, 2023
@carlio
Copy link
Member

carlio commented Feb 16, 2023

I have just released requirements-detector version 1.1.0 which has a much more lax constraint. I'm not sure why it was set to the range it was, I forget exactly. Anyway, now it won't be an issue for prospector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants