[Solved] `cl-update` is broken

Hi folks,
for many months I cannot use cl-update (I use regular Gentoo emerge to maintain my system).
The issue seems to be missing package:

# cl-update
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/calculate/core/core_main.py", line 46, in core_main
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.13/site-packages/calculate/core/server/func.py", line 1972, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3.13/site-packages/calculate/core/server/cl_server.py", line 232, in main
    outer_wsdl_classes = initialization(cl_wsdl)
  File "/usr/lib/python3.13/site-packages/calculate/core/server/func.py", line 1700, in initialization
    cl_wsdl_core = importlib.import_module(module_name)
  File "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/lib/python3.13/site-packages/calculate/install/wsdl_install.py", line 22, in <module>
    from . import install
  File "/usr/lib/python3.13/site-packages/calculate/install/install.py", line 59, in <module>
    from .migrate_users import migrate
  File "/usr/lib/python3.13/site-packages/calculate/install/migrate_users.py", line 18, in <module>
    from calculate.lib.encrypt import encrypt
  File "/usr/lib/python3.13/site-packages/calculate/lib/encrypt.py", line 21, in <module>
    import crypt
ModuleNotFoundError: No module named 'crypt'
No module named 'crypt'

However, when I install it:

$ pip install crypto
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: crypto in ./.local/lib/python3.13/site-packages (1.4.1)
Requirement already satisfied: Naked in ./.local/lib/python3.13/site-packages (from crypto) (0.1.32)
Requirement already satisfied: shellescape in ./.local/lib/python3.13/site-packages (from crypto) (3.8.1)
Requirement already satisfied: requests in /usr/lib/python3.13/site-packages (from Naked->crypto) (2.32.4)
Requirement already satisfied: pyyaml in /usr/lib/python3.13/site-packages (from Naked->crypto) (6.0.2)
Requirement already satisfied: charset_normalizer<4,>=2 in /usr/lib/python3.13/site-packages (from requests->Naked->crypto) (3.4.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.13/site-packages (from requests->Naked->crypto) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3.13/site-packages (from requests->Naked->crypto) (2.5.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3.13/site-packages (from requests->Naked->crypto) (3024.7.22)

And run the cl-update again, it will “spin the text wheel” and hang forever:

$ cl-update
/No module named 'crypt'
|

Any ideas?

Спасибо, NickM

$ equery list -op calculate-utils
 * Searching for calculate-utils ...
[--O] [  ] sys-apps/calculate-utils-3.7.7.11:0
[--O] [ ~] sys-apps/calculate-utils-3.7.7.12:0
[--O] [ ~] sys-apps/calculate-utils-3.7.7.13:0
[--O] [  ] sys-apps/calculate-utils-3.7.7.14:0
[--O] [ ~] sys-apps/calculate-utils-3.7.8:0
[--O] [  ] sys-apps/calculate-utils-3.7.8.1:0
[--O] [  ] sys-apps/calculate-utils-3.7.8.2:0
[I-O] [  ] sys-apps/calculate-utils-3.7.8.3:0
[--O] [ -] sys-apps/calculate-utils-9999:0
$ equery belongs /usr/lib/python3.13/site-packages/calculate/lib/encrypt.py
 * Searching for /usr/lib/python3.13/site-packages/calculate/lib/encrypt.py ... 
sys-apps/calculate-utils-3.7.8.3 (/usr/lib/python3.13/site-packages/calculate/lib/encrypt.py)

I already reinstalled this package and everything, and cl-update still fail.
But, I’ve noticed emerge complains about non-existing set autodeps. Once I removed it the dependencies has been re-calculated and now some 250 packages are being emerge. Hope that helps! Will post a result here soon.

I did not set any direct dependencies to python-3.13, I only extended the PYTHON_TARGETS in the /etc/portage/make.conf/custom

I am using the same version string as you (=sys-apps/calculate-utils-3.7.8.3)

$ eix calculate-utils
[I] sys-apps/calculate-utils [1]
     Available versions:  3.7.7.11 ~3.7.7.12 ~3.7.7.13 3.7.7.14 ~3.7.8 3.7.8.1 3.7.8.2 3.7.8.3 **9999*l {backup client console dbus debug desktop +gpg +install minimal pxe qt6 PYTHON_TARGETS="python3_11 python3_12 python3_13"}
     Installed versions:  3.7.8.3(11:15:21 PM 07/18/2025)(backup client console dbus desktop gpg install qt6 -debug -minimal -pxe PYTHON_TARGETS="python3_11 python3_12 python3_13")
     Homepage:            https://www.calculate-linux.org/main/en/calculate_utilities
     Description:         A set of Calculate utilities for system installation, build and upgrade

[1] "calculate" /var/db/repos/calculate

This is what calculate-utils uses:

[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for sys-apps/calculate-utils-3.7.8.3:
 U I
 + + backup                    : Include backup module
 + + client                    : Include module for setting and storing the user accounts in the domain
 + + console                   : Include console module
 + + dbus                      : Enable ability to run core server by DBus
 - - debug                     : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
                                 https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + desktop                   : Include module for desktop configuration
 + + gpg                       : Enable the signature checking
 + + install                   : Enable support for disk installation
 - - minimal                   : Use minimal depends for Calculate install
 - - pxe                       : Enable support for PXE installation
 + + python_targets_python3_11 : Build with Python 3.11
 + + python_targets_python3_12 : Build with Python 3.12
 + + python_targets_python3_13 : Build with Python 3.13
 + + qt6                       : Include Qt 6 GUI console

As you can see all python3 version flags are there.

Shouldn’t the required packages be fetched for every python version used in the system?

Ok, now it makes sense why it is not working in python3.13.
Will remove 3.13 from make.conf and re-emerge the world.

FYI. Amongst the issues I’m solving, the cl-update is just the first in a row. I’ll post a separate thread for them.

@NickM yes, removing python3_13 from the make.conf/ and emerging the word set did bring cl-update back to life. Thanks for your help!