Bug 7943 - Convert loading of scripts in test files to Python 3
Summary: Convert loading of scripts in test files to Python 3
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-09 11:08 CEST by Linn
Modified: 2022-06-14 12:37 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Linn cendio 2022-06-09 11:08:12 CEST
Some of the test files for our script still load the script they test by using module 'imp'. This module is deprecated in Python 3, see the warning below:

> DeprecationWarning: the imp module is deprecated in favour of importlib and
> slated for removal in Python 3.12; see the module's documentation for
> alternative uses
Most of the tests have already been converted to the Python 3 way of doing things, the leftover ones can be found by grepping e.g. "imp.load_source":

* test_tlinstaller.py
* test_tl-memberof-group.py
* test_install.py

Note that test_yumhelper.py also will show up in the grep. This file should keep using module 'imp', since yum targets older dists that still use Python 2.

Note You need to log in before you can comment on or make changes to this bug.