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

Warning message while using update.qubes-vm salt (Setuptools is replacing distutils) #8079

Open
Minimalist73 opened this issue Mar 7, 2023 · 9 comments
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. C: mgmt diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. waiting for upstream This issue is waiting for something from an upstream project to arrive in Qubes. Remove when closed.

Comments

@Minimalist73
Copy link

Minimalist73 commented Mar 7, 2023

Qubes OS release

4.1

Brief summary

A warning (Setuptools is replacing distutils) is appearing while using the qubes-vm update salt.

Steps to reproduce

  • Set default-mgmt-dvm to Fedora-37
  • Open a dom0 terminal
  • Use the update.qubes-vm salt:
    • qubesctl --show-output --skip-dom0 --targets VM state.apply update.qubes-vm
  • Following warning appear between results:
    /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
    warnings.warn("Setuptools is replacing distutils.")
    

Expected behavior

Warning should not appear.

Actual behavior

Warning message is appearing about replacing distutils with Setuptools.

@Minimalist73 Minimalist73 added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug labels Mar 7, 2023
@andrewdavidwong andrewdavidwong added needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. C: updates labels Mar 7, 2023
@andrewdavidwong andrewdavidwong added this to the Release 4.1 updates milestone Mar 7, 2023
@Solomon1732
Copy link

Solomon1732 commented Mar 22, 2023

I got it too. Here is the reason:

distutils is deprecated with removal planned for Python 3.12. See the What’s New entry for more information.

https://docs.python.org/3/library/distutils.html
This page recommends setuptools as the alternative. What's more, it states that pip runs all of its setup.py with it.

More information on the deprecation (from the "What's New" link:):

The entire distutils package is deprecated, to be removed in Python 3.12. Its functionality for specifying package builds has already been completely replaced by third-party packages setuptools and packaging, and most other commonly used APIs are available elsewhere in the standard library (such as platform, shutil, subprocess or sysconfig). There are no plans to migrate any other functionality from distutils, and applications that are using other functions should plan to make private copies of the code. Refer to PEP 632 for discussion.

The bdist_wininst command deprecated in Python 3.8 has been removed. The bdist_wheel command is now recommended to distribute binary packages on Windows. (Contributed by Victor Stinner in bpo-42802.)

https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated

@Solomon1732
Copy link

Is there any progress on this issue? A used unit being removed in 3.12 looks non-trivial.

@marmarek
Copy link
Member

marmarek commented May 2, 2023

This is tracked in salt here: saltstack/salt#60476
In short: newer salt (supposedly) have it fixed, whatever template will ship with python 3.12, it should have such newer salt included. There is not really any need to do here in existing template (other than a bit annoying warning message).

@andrewdavidwong andrewdavidwong added C: mgmt diagnosed Technical diagnosis has been performed (see issue comments). waiting for upstream This issue is waiting for something from an upstream project to arrive in Qubes. Remove when closed. and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. C: updates labels May 2, 2023
@catalyst1987
Copy link

This is tracked in salt here: saltstack/salt#60476 In short: newer salt (supposedly) have it fixed, whatever template will ship with python 3.12, it should have such newer salt included. There is not really any need to do here in existing template (other than a bit annoying warning message).

So do new templates need a fix then for this? I ask because I created a debian 12 template and get this error when trying to update it.

@marmarek
Copy link
Member

marmarek commented May 4, 2023

It's mostly relevant what versions you have in the template for default-mgmt-dvm, not the target qube you are updating. Note debian-12 doesn't have salt at all

@DemiMarie
Copy link

@marmarek can we somehow prevent users from using debian-12 as a management qube? IMO we should really ship a stateless management qube.

@marmarek
Copy link
Member

marmarek commented May 4, 2023

@marmarek can we somehow prevent users from using debian-12 as a management qube?

I don't think that's the case above, it's about debian-12 as update target, not management qube.

@Nurmagoz
Copy link

Nurmagoz commented Jul 7, 2023

in 4.2 as well:

warning

@Solomon1732
Copy link

@TNTBOMBOM its cause is upstream technical debt. Check out the following issues: saltstack/salt#64267, saltstack/salt#64266, saltstack/salt#64265, saltstack/salt#64264, saltstack/salt#64263

@andrewdavidwong andrewdavidwong added affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. labels Aug 8, 2023
@andrewdavidwong andrewdavidwong removed this from the Release 4.1 updates milestone Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. C: mgmt diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. waiting for upstream This issue is waiting for something from an upstream project to arrive in Qubes. Remove when closed.
Projects
None yet
Development

No branches or pull requests

7 participants