-
Notifications
You must be signed in to change notification settings - Fork 12
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
Split the unconditional runtime dependencies into extras #52
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
@jessicamack to fix the CI, change |
@jessicamack have you seen #52 (comment)? |
UPD: this is failing because of a bug in tox (tox-dev/tox#3433) which is blocking the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jessicamack so I learned that PEP 685 will make the format of extras stricter in the internal core packaging metadata version 2.3. The user-facing extra names might still be allowed to be non-normalized. But in general, it's best to just follow that format to avoid confusion. Evidently, some tools are going to get confused and hit corner cases if we don't do this.
Action items:
- Change extra names in
pyproject.toml
to have-
instead of_
- Change extra names in
tox.ini
to have-
instead of_
The extra names in the core packaging metadata are allowed to contain dashes but not underscores [[1]]. Packaging tooling is supposed to normalize them if met in the non-metadata configuration but apparently tox has a bug connected to this, which prevents is from discovering dependencies provided by extras that contain underscores [[2]]. So as a workaround, this patch uses hyphens in the names of extras, avoiding any underscores. Making the direct dependencies optional, means that they are not going to be picked up by default. To enable pip-tools to include them into the lock files, this change also updates its configuration file to instruct it to include dependencies from all the extras present by always using `--all-extras`. Likewise, to enable tox to install those dependencies, they are all listed in its configuration file too. Co-Authored-By: Sviatoslav Sydorenko <[email protected]> [1]: https://packaging.python.org/en/latest/specifications/core-metadata/#provides-extra-multiple-use [2]: tox-dev/tox#3433 (comment)
e235db4
to
3cd6520
Compare
@chrismeyersfsu could you confirm that the extra names look fine? Not that they can't be changed, but it's a chance to update them if there's anything obvious that stands out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting from Chris' take on the name, and then we can merge.
So I understand, after this merges, awx will NOT get these extra modules from awx-plugins.interfaces unless awx adds the optional directive I.e. awx-plugins[x,y,z] |
Yes. Although, it could just start depending on the version you released on Monday until things settle and they those extras that remain post split activities would need to be listed along with the version bump. |
Now a companion dep update is needed in awx. |
All the runtime dependencies of
awx-plugins-core
are unconditional now. To take into account being able to depend only on certain plugins, I've split them into optional ones.