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

Use .select() for entrypoints under importlib_metadata>=5.0.0 #62854

Merged
merged 5 commits into from
Oct 11, 2022

Conversation

MKLeb
Copy link
Contributor

@MKLeb MKLeb commented Oct 10, 2022

What does this PR do?

importlib_metadata>=5.0.0 deprecates the dict structure of the entrypoints object, so we use .select() instead for iterating over them if needed.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@MKLeb MKLeb requested a review from a team as a code owner October 10, 2022 21:30
@MKLeb MKLeb requested review from whytewolf and removed request for a team October 10, 2022 21:30
whytewolf
whytewolf previously approved these changes Oct 10, 2022
@lkubb lkubb mentioned this pull request Oct 11, 2022
3 tasks
Copy link
Collaborator

@s0undt3ch s0undt3ch left a comment

Choose a reason for hiding this comment

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

We should probably also do a followup PR where we update the version of importlib_metadata we vendor in salt/ext/.

salt/utils/entrypoints.py Outdated Show resolved Hide resolved
@Ch3LL Ch3LL merged commit 45b924b into saltstack:master Oct 11, 2022
@akshaypurohit
Copy link

@MKLeb @s0undt3ch Are there plans to merge this change to previous versions as well?

@MKLeb
Copy link
Contributor Author

MKLeb commented Oct 31, 2022

@akshaypurohit I would say it is unlikley, as the previous major versions are all past Phase 2 support and have entered the CVE only phase. (https://docs.saltproject.io/salt/install-guide/en/latest/topics/salt-version-support-lifecycle.html)

gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Jan 30, 2023
…1 hosts

The Python 3.11 issue upstream:
- saltstack/salt#62676
- saltstack/salt#62677

The importlib-metadata issue:
- saltstack/salt#62851
- saltstack/salt#62854

Patches have been extracted from pull requests as following:
- git clone https://github.com/saltstack/salt
- cd salt
- git diff b676e6338a7c094cb3335d11f851ac0e12222017^ 45b924bad865a00116d2e045fe71229f2dc3376e -- salt/utils/entrypoints.py > salt-3005.1-importlib-metadata-5-r1.patch
- git diff 00352ae6e0ed0b80a75ec65cb925dd31a625010d^ 91efaea4975f37de97a88687d40e54e774151a8b -- salt/modules/file.py | head -n 123 > salt-3005.1-modules-file-python-3.11-host.patch

Be sure to call salt-ssh with "--regen-thin" the first time
after updating, to not end up running unpatched 3005.1(-r0) code.

Closes: https://bugs.gentoo.org/875389
Closes: https://bugs.gentoo.org/883671
Signed-off-by: Sebastian Pipping <[email protected]>
freijon pushed a commit to freijon/gentoo that referenced this pull request Jan 31, 2023
…1 hosts

The Python 3.11 issue upstream:
- saltstack/salt#62676
- saltstack/salt#62677

The importlib-metadata issue:
- saltstack/salt#62851
- saltstack/salt#62854

Patches have been extracted from pull requests as following:
- git clone https://github.com/saltstack/salt
- cd salt
- git diff b676e6338a7c094cb3335d11f851ac0e12222017^ 45b924bad865a00116d2e045fe71229f2dc3376e -- salt/utils/entrypoints.py > salt-3005.1-importlib-metadata-5-r1.patch
- git diff 00352ae6e0ed0b80a75ec65cb925dd31a625010d^ 91efaea4975f37de97a88687d40e54e774151a8b -- salt/modules/file.py | head -n 123 > salt-3005.1-modules-file-python-3.11-host.patch

Be sure to call salt-ssh with "--regen-thin" the first time
after updating, to not end up running unpatched 3005.1(-r0) code.

Closes: https://bugs.gentoo.org/875389
Closes: https://bugs.gentoo.org/883671
Signed-off-by: Sebastian Pipping <[email protected]>
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.

5 participants