tis-vscode-pylance

2024.2.1-29
Pylance VSCode Extension
16422 downloads
Download
See build result See VirusTotal scan
tis-vscode-pylance icon
  • package : tis-vscode-pylance
  • name : Pylance
  • version : 2024.2.1-29
  • categories : Extension
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Clément BAZIRET
  • editor : Microsoft
  • licence : proprietary_free,wapt_public
  • locale : all
  • target_os : all
  • impacted_process :
  • architecture : all
  • signature_date : 2024-09-14 23:00
  • size : 18.04 Mo
  • installed_size : 62.22 Mo
  • homepage : https://github.com/microsoft/pylance-release#readme
  • depends :
package           : tis-vscode-pylance
version           : 2024.2.1-29
architecture      : all
section           : base
priority          : optional
name              : Pylance
categories        : Extension
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ,Clément BAZIRET
description       : Pylance VSCode Extension
depends           : tis-vscode-python
conflicts         : 
maturity          : PROD
locale            : all
target_os         : all
min_wapt_version  : 2.3
sources           : https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance
installed_size    : 62224853
impacted_process  : 
description_fr    : Pylance VSCode Extension
description_pl    : Rozszerzenie Pylance VSCode
description_de    : Pylance VSCode Erweiterung
description_es    : Extensión VSCode de Pylance
description_pt    : Extensão Pylance VSCode
description_it    : Estensione del codice VSC di Pylance
description_nl    : Pylance VSCode Uitbreiding
description_ru    : Расширение Pylance VSCode
audit_schedule    : 
editor            : Microsoft
keywords          : vscode,extension,python,pylance
licence           : proprietary_free,wapt_public
homepage          : https://github.com/microsoft/pylance-release#readme
package_uuid      : 7fb7a21e-5f9c-4f26-8a79-10c7ee0a97b5
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/changelog
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 2a548f2dd75093de32da7aff8e0553f1903ecf02f22664d95eb01d4aaa28a878
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-09-14T23:00:56.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : yucbVTyih6lMkZc5aZpg6tZJqbkbhStjsn8EEo0uxMKf6Rw2r7Cq6o+vwDI0tCexPeNdxzFxAtpLf9vSesDbg8kTp6dUMqlIt7CxACB9Reu22AmfjQ78DEied+wXmFCHXAwmr7O64Quwinoit/K/ZQoA43TREHlRhs9sQYCbOAYGomVQuC0dCTFkGwySNKzTECJRfDUMvIc0KG/hF3ABX0cCJ7yFMmuIFjqXhStKaOaIt3hFr9+spKtW2oluhpk5zKb6eN8dYqtlH3YhVQsfd31UkdHaRduEWIQhHTZ7dx9DiL81N0NE11Oun+Ky4HpxF4IEYtXvhm/mq7FArJuLng==
# -*- coding: utf-8 -*-
from setuphelpers import *
import platform


ext_uid_name = "ms-python.vscode-pylance"
vscode_audit_file_sub = f'%s_{ext_uid_name.replace(".", "-")}_vscode_audit.txt'
vscodium_audit_file_sub = f'%s_{ext_uid_name.replace(".", "-")}_vscodium_audit.txt'


def install():
    # Initializing variables
    ext_file_name = glob.glob("*%s*.vsix" % ext_uid_name)[0]
    vscode_dir, vscode_bin_path = get_vscode_path()
    vscodium_dir, vscodium_bin_path = get_vscodium_path()

    # VSCode extension install
    if isfile(vscode_bin_path):
        # Removing old extensions from app_dir
        for ext in glob.glob(makepath(vscode_dir, "%s*.vsix" % ext_uid_name)):
            print("Removing: %s" % ext)
            remove_file(ext)

        print("Copying: %s to: %s" % (ext_file_name, vscode_dir))
        filecopyto(ext_file_name, vscode_dir)

    # VSCodium extension install
    if isfile(vscodium_bin_path):
        # Removing old extensions from app_dir
        for ext in glob.glob(makepath(vscodium_dir, "%s*.vsix" % ext_uid_name)):
            print("Removing: %s" % ext)
            remove_file(ext)

        print("Copying: %s to: %s" % (ext_file_name, vscodium_dir))
        filecopyto(ext_file_name, vscodium_dir)


def session_setup():

    if platform.system() == 'Windows':
        if windows_version() < WindowsVersions.Windows10:
            return

    # Initializing variables
    vscode_dir, vscode_bin_path = get_vscode_path()
    vscodium_dir, vscodium_bin_path = get_vscodium_path()

    # VSCode extension install
    user_name = user_home_directory().rstrip(os.path.sep).split(os.path.sep)[-1]
    if isfile(vscode_bin_path):
        install_vscod_ext_if_needed(
            vscode_dir,
            vscode_bin_path,
            ext_uid_name,
            control.get_software_version(),
            makepath(get_temp_dir(), vscode_audit_file_sub % user_name),
            force_install=force,
        )

    # VSCodium extension install
    if isfile(vscodium_bin_path):
        install_vscod_ext_if_needed(
            vscodium_dir,
            vscodium_bin_path,
            ext_uid_name,
            control.get_software_version(),
            makepath(get_temp_dir(), vscodium_audit_file_sub % user_name),
            force_install=force,
        )


def audit():
    # Initializing variables
    vscode_dir, vscode_bin_path = get_vscode_path()
    vscodium_dir, vscodium_bin_path = get_vscodium_path()
    audit_status = "OK"

    # VSCode extension audit
    if isfile(vscode_bin_path):
        try:
            ext_path = glob.glob(makepath(vscode_dir, "%s*.vsix" % ext_uid_name))[0]
            print("OK: %s extension file present in %s" % (ext_uid_name, vscode_dir))
        except:
            print("ERROR: %s extension file absent of %s" % (ext_uid_name, vscode_dir))
            audit_status = "ERROR"

    # VSCodium extension audit
    if isfile(vscodium_bin_path):
        try:
            ext_path = glob.glob(makepath(vscodium_dir, "%s*.vsix" % ext_uid_name))[0]
            print("OK: %s extension file present in %s\n" % (ext_uid_name, vscodium_dir))
        except:
            print("ERROR: %s extension file absent of %s\n" % (ext_uid_name, vscodium_dir))
            audit_status = "ERROR"

    # Checking if extension is installed in all users
    vscod_ext_dict = users_installed_vscod_ext_to_dict(ext_uid_name, vscode_audit_file_sub, vscodium_audit_file_sub, ignored_users=[])
    for key in vscod_ext_dict.keys():
        if type(vscod_ext_dict[key]) != dict:
            continue
        if vscod_ext_dict[key]["VSCode"] or vscod_ext_dict[key]["VSCodium"]:
            print(f'"{ext_uid_name}" extension for user "{key}" installed version(s): {vscod_ext_dict[key]}')
        else:
            print(f'"{ext_uid_name}" extension for user "{key}" is not installed')
    WAPT.write_audit_data_if_changed(
        control.package.split("-", 1)[-1], control.package.split("-", 1)[-1], vscod_ext_dict, max_count=10, keep_days=100
    )

    return audit_status


def uninstall():
    # Initializing variables
    vscode_dir, vscode_bin_path = get_vscode_path()
    vscodium_dir, vscodium_bin_path = get_vscodium_path()

    # Removing extensions from vscode_dir
    for ext in glob.glob(makepath(vscode_dir, "*%s*.vsix" % ext_uid_name)):
        print("Removing: %s" % ext)
        remove_file(ext)

    # Removing extensions from vscodium_dir
    for ext in glob.glob(makepath(vscodium_dir, "*%s*.vsix" % ext_uid_name)):
        print("Removing: %s" % ext)
        remove_file(ext)

    # Removing extension from user profiles
    killalltasks(["Code", "code"])
    print(remove_tree_for_all_users(makepath(".vscode", "extensions", "%s*" % ext_uid_name)))
    killalltasks(["VSCodium", "codium"])
    print(remove_tree_for_all_users(makepath(".vscode-oss", "extensions", "%s*" % ext_uid_name)))


def users_installed_vscod_ext_to_dict(ext_uid_name, vscode_audit_file_sub, vscodium_audit_file_sub, ignored_users=None, ignore_system_users=True):
    """Return a dict of dict of the installed extensions version for all users

    Args:
        ext_uid_name (str): VSCode and VSCodium extension identifier
        vscode_audit_file_sub (str): name of file in Temp user folder containing VSCode extension version
        vscodium_audit_file_sub (str): name of file in Temp user folder containing VSCodium extension version

    Returns:
        users_ext_version_dict: Dict of user and the corresponding version in this format:
            {
                "user1": {'VSCode': '0.81.8', 'VSCodium': '0.81.8'},
                "user2": {'VSCode': '', 'VSCodium': '0.81.8'},
                "user3": {'VSCode': '', 'VSCodium': ''},
            }
    """
    skipped_users = get_skipped_users_list(ignored_users, ignore_system_users)

    if get_os_name() == "Windows":
        users_dir = makepath(systemdrive, "Users")
    elif get_os_name() == "Linux":
        users_dir = "/home"
    elif get_os_name() == "Darwin":
        users_dir = "/Users"

    # Getting a dict of all users installed extension version
    users_ext_version_dict = {}
    higher_version = "0.0"
    for user_profile in glob.glob("%s/*/" % users_dir):
        skip = False
        user_name = user_profile.rstrip(os.path.sep).split(os.path.sep)[-1]
        for skipped_user in skipped_users:
            if user_name == skipped_user:
                skip = True
                break

        if not skip:
            # Declaring user based variable
            vscode_audit_file_path = makepath(get_temp_dir(), vscode_audit_file_sub % user_name)
            vscodium_audit_file_path = makepath(get_temp_dir(), vscodium_audit_file_sub % user_name)
            user_profile_ext_version_dict = {
                "VSCode": None,
                "VSCodium": None,
            }

            # Getting the version from the files in user Temp directory
            if isfile(vscode_audit_file_path):
                with open(vscode_audit_file_path, "r") as f:
                    user_profile_ext_version_dict["VSCode"] = f.readline()
                    if Version(higher_version) < Version(user_profile_ext_version_dict["VSCode"]):
                        higher_version = user_profile_ext_version_dict["VSCode"]
            if isfile(vscodium_audit_file_path):
                with open(vscodium_audit_file_path, "r") as f:
                    user_profile_ext_version_dict["VSCodium"] = f.readline()
                    if Version(higher_version) < Version(user_profile_ext_version_dict["VSCodium"]):
                        higher_version = user_profile_ext_version_dict["VSCodium"]

            # Attributing user's version dict to global dict
            if not user_profile_ext_version_dict:
                user_profile_ext_version_dict = None
            users_ext_version_dict[user_name] = user_profile_ext_version_dict
    users_ext_version_dict["higher_version"] = higher_version
    users_ext_version_dict["version"] = control.get_software_version()

    return users_ext_version_dict


def get_installed_vscod_ext_version(app_bin_path, ext_uid_name):
    installed_exts = run(f'"{app_bin_path}" --list-extensions --show-versions').splitlines()
    installed_ext_version = None

    for ext in installed_exts:
        if ext_uid_name in ext:
            installed_ext_version = ext.split("@")[-1]
    return installed_ext_version


def install_vscod_ext_if_needed(app_dir, app_bin_path, ext_uid_name, min_version, audit_file, force_install=False):
    """Will check installed version and install if needed

    Args:
        app_dir (str): path to VSCode or VSCodium directory
        app_bin_path (str): path to VSCode or VSCodium binary
        ext_uid_name (str): VSCode and VSCodium extension identifier
        min_version (str): min_version needed to be installed
        audit_file (str): name of file in Temp user folder containing VSCodium extension version
        force_install (str): option to force extension installation

    """
    installed_ext_version = get_installed_vscod_ext_version(app_bin_path, ext_uid_name)

    # Checking if a potential installed extension is up-to-date
    print(f"Installing {ext_uid_name} for {app_dir.split(os.path.sep)[-1]}")
    if installed_ext_version is not None:
        if Version(installed_ext_version, 4) >= Version(min_version, 4):
            print(f"INFO: Installed extension {ext_uid_name}({installed_ext_version}) is up-to-date")
            # Creating file for audit
            with open(audit_file, "w") as f:
                f.write(installed_ext_version)
            return
        else:
            force_install = True

    ext_path = glob.glob(makepath(app_dir, "%s*.vsix" % ext_uid_name))[0]

    # Installing extension in user env
    print("Installing: %s extension in user env" % (ext_path))
    vsix_cmd = f'"{app_bin_path}" --install-extension "{ext_path}"'
    if force_install:
        vsix_cmd += " --force"
    result = run(vsix_cmd)
    print(result)

    # Checking if vscode version is too old
    if "as it is not compatible with VS Code" in result:  # Error message with "VS Code" same for VSCode and VSCodium
        vscode_version = result.split("as it is not compatible with VS Code")[1].split("'")[1]
        error(f"ERROR: Try updating your current VSCode ({vscode_version})")
    # Checking if extension installation failed
    if "Failed Installing Extensions" in result:
        error("ERROR: Unable to install extension with: %s" % ext_path)

    # Creating file for audit
    with open(audit_file, "w") as f:
        f.write(get_installed_vscod_ext_version(app_bin_path, ext_uid_name))


def get_temp_dir():
    if get_os_name() == "Windows":
        temp_dir_path = makepath("C:", "Windows", "Temp")
    else:
        temp_dir_path = "/var/tmp"

    return temp_dir_path


def get_vscode_path():
    if get_os_name() == "Windows":
        app_dir = makepath(programfiles, "Microsoft VS Code")
        app_bin_path = makepath(app_dir, "bin", "code")
    elif get_os_name() == "Linux":
        app_dir = makepath("/", "usr", "share", "code")
        app_bin_path = makepath(app_dir, "bin", "code")
    elif get_os_name() == "Darwin":
        app_dir = makepath("/", "Applications", "Visual Studio Code.app")
        app_bin_path = makepath(app_dir, "Contents", "Resources", "app", "bin", "code")

    return app_dir, app_bin_path


def get_vscodium_path():
    if get_os_name() == "Windows":
        app_dir = makepath(programfiles, "VSCodium")
        app_bin_path = makepath(app_dir, "bin", "codium")
    elif get_os_name() == "Linux":
        app_dir = makepath("/", "usr", "share", "codium")
        app_bin_path = makepath(app_dir, "bin", "codium")
    elif get_os_name() == "Darwin":
        app_dir = makepath("/", "Applications", "VSCodium.app")
        app_bin_path = makepath(app_dir, "Contents", "Resources", "app", "bin", "codium")

    return app_dir, app_bin_path


def remove_tree_for_all_users(user_folder_relative_path, ignored_users=None, ignore_system_users=True):
    r"""Remove a specific folder or folders for all user's profiles

    Args:
        user_folder_relative_path (str): relative path to user folder, glob patterns can be used
        ignored_users (str or list of str): ignore specified users
        ignore_system_users (bool): ignore default, public, all users, etc. True by default

    Returns:
        list: list of deleted folders

    >>> print(remove_tree_for_all_users(makepath(".vscode", "extensions", "ms-toolsai.jupyter-*")))
    ['C:\\Users\\username\\.vscode\\extensions\\ms-toolsai.jupyter-2022.2.1001817079', 'C:\\Users\\username\\.vscode\\extensions\\ms-toolsai.jupyter-keymap-1.0.0', 'C:\\Users\\username\\.vscode\\extensions\\ms-toolsai.jupyter-renderers-1.0.6']

    >>> print(remove_tree_for_all_users(makepath(".vscode", "extensions", "ms-toolsai.jupyter-")))
    []

    >>> print(remove_tree_for_all_users(makepath(".vscode", "extensions", "ms-toolsai.jupyter-[a-z]*")))
    ['C:\\Users\\username\\.vscode\\extensions\\ms-toolsai.jupyter-keymap-1.0.0', 'C:\\Users\\username\\.vscode\\extensions\\ms-toolsai.jupyter-renderers-1.0.6']

    >>> print(remove_tree_for_all_users(makepath(".vscode", "extensions", "ms-toolsai.jupyter-1.0.0")))
    ['/home/username/.vscode/extensions/ms-toolsai.jupyter-keymap-1.0.0']

    .. versionadded:: 2.3

    """
    skipped_users = get_skipped_users_list(ignored_users, ignore_system_users)
    deleted_folders = []

    if get_os_name() == "Windows":
        users_dir = makepath(systemdrive, "Users")
    elif get_os_name() == "Linux":
        users_dir = "/home"
    elif get_os_name() == "Darwin":
        users_dir = "/Users"

    for user_profile in glob.glob("%s/*/" % users_dir):
        skip = False
        for skipped_user in skipped_users:
            if user_profile.rstrip(os.path.sep).split(os.path.sep)[-1] == skipped_user:
                skip = True

        if not skip:
            for user_folder_to_delete in glob.glob(makepath(user_profile, user_folder_relative_path)):
                deleted_folders.append(user_folder_to_delete)
                remove_tree(user_folder_to_delete)
    return deleted_folders


def get_skipped_users_list(ignored_users=None, ignore_system_users=True):
    system_users_list = ["All Users", "Default", "Default User", "Public", "Shared"]
    if ignored_users is None:
        ignored_users = []
    if type(ignored_users) != list:
        ignored_users = [ignored_users]

    skipped_users = []
    if ignored_users:
        skipped_users.extend(ignored_users)
    if ignore_system_users:
        skipped_users.extend(system_users_list)

    return skipped_users
# -*- coding: utf-8 -*-
from setuphelpers import *
import json
import time
import sys

sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
from setupdevhelpers import *


default_allow_prerelease = False


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()

    ext_uid_name = ""
    with open("setup.py", "r", encoding="utf8") as f:
        for line in f.readlines():
            if line.startswith("ext_uid_name"):
                ext_uid_name = line.split("=")[1].split('"')[1]
                break
    old_ext_uid_name = ext_uid_name

    # Getting the extension's webpage url
    url = control.sources
    if not url:
        ext_uid_name = ask_input(
            control.package,
            "Enter the extension UID name (Ex: ms-vscode-remote.remote-wsl) or the link from the Visual Studio Marketplace (Ex: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)",
            url,
            raise_error=True,
        ).split("itemName=")[-1]
        url = "https://marketplace.visualstudio.com/items?itemName=" + ext_uid_name
    else:
        ext_uid_name = url.split("itemName=")[-1]
    ext_publisher = ext_uid_name.split(".")[0]
    control.sources = url
    control.save_control_to_wapt()

    # Getting latest data from official sources
    print("URL used is %s" % url)
    for bs_search in bs_find_all(url, "script", "type", "application/json", proxies=proxies):
        if bs_search.string.startswith("{"):
            json_data = json.loads(bs_search.string)
            break

    # version = json_data["Resources"]["Version"]

    # # Asking the user if a prerelease version bother him
    # skip_prerelease = False
    # prerelease_detected = True
    # if Version(version) > Version(control.get_software_version()) and not params.get("running_as_luti"):
    #     if json_data["ExtensionProperties"].get("Microsoft.VisualStudio.Code.PreRelease", "") == "true":
    #         if (
    #             ask_message(
    #                 ext_uid_name,
    #                 "The latest version of the extension is in prerelease, do you want to use it? Otherwise it will use the latest version detected by Luti.",
    #                 # "The latest version of the extension is in prerelease, do you want to use it? (not recommended)",
    #                 flags=(4 + 32),
    #                 raise_error=True,
    #             )
    #             == 7
    #         ):
    #             skip_prerelease = True
    #     else:
    #         prerelease_detected = False
    # if not default_allow_prerelease:
    #     if skip_prerelease or params.get("running_as_luti"):
    #         # You can manually check release version here by replacing the following code (by default it check on Luti)
    #         try:
    #             luti_package_name = "tis-vscode-%s" % (ext_uid_name.split(".", 1)[-1])
    #             if params.get("running_as_luti"):
    #                 version = wgets("https://srvluti.ad.tranquil.it/check_update_result_update.json", proxies=proxies, as_json=True)[
    #                     luti_package_name
    #                 ]
    #             else:
    #                 version = wgets("https://luti.tranquil.it/check_update_result_update.json", proxies=proxies, as_json=True)[luti_package_name]
    #         except:
    #             error(
    #                 f"{luti_package_name} is not monitored on: https://luti.tranquil.it - You can manually check the release version by editing this package or using the prerelease version."
    #             )
    #     elif not prerelease_detected:
    #         print("INFO: Latest version of this extension in prerelease.")
    #         # error("ERROR: The latest version of this extension is in prerelease. Please wait for it to be fully released.")
    #     else:
    #         print("INFO: Latest version of this extension is a release.")

    # Creating download_url
    version = "2024.2.1"  # temp fix
    download_url = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/%s/vsextensions/%s/%s/vspackage" % (
        ext_publisher,
        json_data["Resources"]["ExtensionName"],
        version,
    )
    latest_bin = ext_uid_name + "-%s.vsix" % version

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        content = requests.get(download_url, stream=True)
        nb_wait = 0
        max_wait = 3600
        while str(content.status_code) == "429":
            timewait = int(content.headers["Retry-After"])
            print("Wait %s" % timewait)
            nb_wait = nb_wait + timewait
            if nb_wait > max_wait:
                error("Max wait ...")
            time.sleep(timewait)
            content = requests.get(download_url, stream=True)

        with open(latest_bin, "wb") as f:
            for chunk in content.iter_content(chunk_size=1024 * 1024):
                f.write(chunk)
    else:
        print("Binary is present: %s" % latest_bin)

    # Deleting outdated binaries
    remove_outdated_binaries(latest_bin, list_extensions=["vsix"])

    # Completing control file
    if not old_ext_uid_name or old_ext_uid_name != ext_uid_name:
        # control.name
        control_name = bs_find(url, "title", proxies=proxies).text
        control_name = control_name.split(" - Visual Studio Marketplace")[0].strip()
        control_name = complete_control_name(control, control_name, silent=params.get("running_as_luti"))

        # control.package
        package_prefix = control.package.split("-")[0]
        control_package = package_prefix + "-vscode-" + ext_uid_name.split(".", 1)[-1]
        complete_control_package(control, control_package, silent=params.get("running_as_luti"))

        # control.description
        complete_control_description(control, blank_str="update_package", silent=params.get("running_as_luti"))

        # control.categories
        control.categories = "Extension"

        # icon.png
        unzip(latest_bin)
        unzipped_dir = latest_bin.rsplit(".", 1)[0]
        new_icon_png = makepath(unzipped_dir, "extension", "icon.png")
        if isfile(new_icon_png):
            filecopyto(makepath(unzipped_dir, "extension", "icon.png"), "WAPT")

        # control.installed_size
        control.installed_size = get_size(unzipped_dir)
        control.save_control_to_wapt()

        remove_tree(unzipped_dir)

    # Updating setup.py ext_uid_name variable
    new_lines = []
    with open("setup.py", "r", encoding="utf8") as f:
        for line in f.readlines():
            if line.startswith("ext_uid_name"):
                line = 'ext_uid_name = "%s"\n' % ext_uid_name
            new_lines.append(line)
    with open("setup.py", "w", encoding="utf8", newline="\n") as f:
        f.writelines(new_lines)

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating or not update-package-sources
    return package_updated
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
6d7e67fe5b72f81d255f220a721105adabd11503d838b061db5598c4cc75425d : WAPT/changelog.txt
1b438ce20243122dff8876d8851e94b90cb0ede5a2dfed8ba0242a145d49ff18 : WAPT/control
2a548f2dd75093de32da7aff8e0553f1903ecf02f22664d95eb01d4aaa28a878 : WAPT/icon.png
c8044337127c2cfb95557dcf99ad56b4df1350e0bb6704d451a8390e85906533 : luti.json
2257f137a51f8b960a219aec8730920797b68add0108646eaa63adadda33ada8 : ms-python.vscode-pylance-2024.2.1.vsix
85c770d4fb7d0d331eb98488e8397b6af382264f62645e6c3f2460f1e2dffa2c : setup.py
f31bb903630e71ceeff68ce1e3058f3b120008d9beb2d9fda7491cfe67b49662 : setupdevhelpers.py
7b16091452d2605d655377bc91b0db4a1691b40f77d38cd2b17a413390302246 : update_package.py
2023.7.31-23
===
Testing ms-python.vscode-pylance@2023.4.40 until https://github.com/microsoft/pylance-release/issues/4121 is fixed
info: https://github.com/microsoft/pylance-release/issues/4121#issuecomment-1642342974