avocado icon indicating copy to clipboard operation
avocado copied to clipboard

lintian: uses-deprecated-python-stdlib

Open arif-ali opened this issue 11 months ago • 5 comments

As part of Debian packaging, lintian reports that we are distutils, uu and crypt library usage which is deprecated in Debian. The latest version of Debian that the package will go into has python 3.13, and this part of the packaging will fail

Below is the warning we get from the lintian program in Debian

I: avocado source: uses-deprecated-python-stdlib crypt (deprecated in Python 3.11, removed in Python 3.13) [avocado/utils/genio.py:27]
N: 
N:   
N:   In Python $deprecated, $library has been formally marked as deprecated. Code that imports $library will no longer work from Python $removed.
N:   
N:   Please prepare for this deprecation and migrate away from this Python library.
N:   
N:   See-Also: https://peps.python.org/pep-0594/#deprecated-modules
N: 
N:   Visibility: info
N:   Show-Always: no
N:   Check: languages/python/stdlib-deprecation
N: 
N:
I: avocado source: uses-deprecated-python-stdlib distutils (deprecated in Python 3.10, removed in Python 3.12) [setup.py:21]
N:
I: avocado source: uses-deprecated-python-stdlib uu (deprecated in Python 3.11, removed in Python 3.13) [avocado/core/nrunner/task.py:7]
N:
I: avocado source: uses-deprecated-python-stdlib uu (deprecated in Python 3.11, removed in Python 3.13) [avocado/core/suite.py:18]
N:
I: avocado source: uses-deprecated-python-stdlib uu (deprecated in Python 3.11, removed in Python 3.13) [avocado/plugins/spawners/podman.py:8]
N:
I: avocado source: uses-deprecated-python-stdlib uu (deprecated in Python 3.11, removed in Python 3.13) [avocado/utils/asset.py:30]
N:
I: avocado source: uses-deprecated-python-stdlib uu (deprecated in Python 3.11, removed in Python 3.13) [avocado/utils/vmimage.py:23]

arif-ali avatar Jan 22 '25 06:01 arif-ali

This is a high priority for packaging in debian then we can move it forward

arif-ali avatar Jan 25 '25 20:01 arif-ali

Hi @arif-ali, thanks for listing those here.

About the distutils we have opened #5159 and even #5754 about converting Avocado's packaging from setup.py to a project.toml. Since it is also related to Debian packaging, I will add them to the current milestone to give them higher importance.

About uu and crypt. Avocado doesn't use them. In the files listed in this issue is usage of uuid which is still supported and that should be fine. Then there is usage of avocado own utility avocado.utils.crypto which doesn't use any deprecated libraries. Is it possible that those warnings are caused by some parsing error?

richtja avatar Jan 27 '25 10:01 richtja

ack, ok, thanks for that.

I will add a lintian override for those 2 then, I think that was a mismatch rather than a deprecation issue.

I'll await the distutil update to hep with Debian packaging work to move forward

arif-ali avatar Jan 27 '25 15:01 arif-ali

I believe the way to go is to really implement a best-effort clean substitute for the one given by distutils.

clebergnu avatar Jan 27 '25 15:01 clebergnu

@arif-ali we're trying to allow for all of the Debian packaging issues to be solved before the 110.0 release. Do you need help in this (or other issues) related to that?

clebergnu avatar Feb 24 '25 16:02 clebergnu