Project

General

Profile

Tâche #33958

Scénario #33781: Traitement express MEN (06-12)

EOLE 2.9 : enregistrement_zephir en erreur avec l'option "Utiliser la configuration définie sur le serveur Zéphir"

Added by Joël Cuissinat about 2 years ago. Updated about 2 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
03/23/2022
Due date:
% Done:

100%

Remaining (hours):
0.0

Description

Tous les tests d'enregistrement sont en rouge dans jenkins, exemple : https://dev-eole.ac-dijon.fr/jenkins/job/2.9.0/job/test-zephir-enregistrement-aca-281-2.9.0-amd64/

J'ai pu récupérer le traceback côté serveur :

022-03-23T10:35:25.622383+01:00 zephir.ac-test.fr zephir_backend[1545]: #011Traceback (most recent call last):
2022-03-23T10:35:25.622460+01:00 zephir.ac-test.fr zephir_backend[1545]: #011  File "/usr/lib/python3/dist-packages/twisted/web/server.py", line 227, in process
2022-03-23T10:35:25.622518+01:00 zephir.ac-test.fr zephir_backend[1545]: #011    self.render(resrc)
2022-03-23T10:35:25.622573+01:00 zephir.ac-test.fr zephir_backend[1545]: #011  File "/usr/lib/python3/dist-packages/twisted/web/server.py", line 292, in render
2022-03-23T10:35:25.622635+01:00 zephir.ac-test.fr zephir_backend[1545]: #011    body = resrc.render(self)
2022-03-23T10:35:25.622692+01:00 zephir.ac-test.fr zephir_backend[1545]: #011  File "/usr/lib/python3/dist-packages/twisted/web/resource.py", line 262, in render
2022-03-23T10:35:25.622744+01:00 zephir.ac-test.fr zephir_backend[1545]: #011    return m(request)
2022-03-23T10:35:25.622795+01:00 zephir.ac-test.fr zephir_backend[1545]: #011  File "/usr/lib/python3/dist-packages/zephir/backend/xmlrpceole.py", line 203, in render_POST
2022-03-23T10:35:25.622858+01:00 zephir.ac-test.fr zephir_backend[1545]: #011    d = defer.maybeDeferred(function, cred_user, *args)
2022-03-23T10:35:25.622913+01:00 zephir.ac-test.fr zephir_backend[1545]: #011--- <exception caught here> ---
2022-03-23T10:35:25.622972+01:00 zephir.ac-test.fr zephir_backend[1545]: #011  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 190, in maybeDeferred
2022-03-23T10:35:25.623024+01:00 zephir.ac-test.fr zephir_backend[1545]: #011    result = f(*args, **kwargs)
2022-03-23T10:35:25.623082+01:00 zephir.ac-test.fr zephir_backend[1545]: #011  File "/usr/lib/python3/dist-packages/zephir/backend/uucp_rpc.py", line 678, in xmlrpc_get_checksum
2022-03-23T10:35:25.623134+01:00 zephir.ac-test.fr zephir_backend[1545]: #011    return 1, base64.encodestring(md5sum[0].encode()).decode()
2022-03-23T10:35:25.623185+01:00 zephir.ac-test.fr zephir_backend[1545]: #011builtins.AttributeError: module 'base64' has no attribute 'encodestring'


Related issues

Related to Distribution EOLE - Tâche #30398: DeprecationWarning: decodestring() is a deprecated alias since Python 3.1, use decodebytes() Fermé 06/29/2020
Related to Distribution EOLE - Tâche #33959: Revoir le packaging de zephir-client pour EOLE 2.9 Fermé 03/24/2022
Related to zephir-parc - Tâche #34015: En 2.9.0, réparer la génération de paquets du projet zephir-client Fermé 03/28/2022

Associated revisions

Revision 54c9c492 (diff)
Added by Joël Cuissinat about 2 years ago

base64.encodestring → base64.encodebytes (ref #33958)

Revision 65f99a9c (diff)
Added by Joël Cuissinat about 2 years ago

arv : python3 updates (ref #33958)

Revision 98235985 (diff)
Added by Joël Cuissinat about 2 years ago

base64.encodestring → base64.encodebytes (ref #33958)

Revision 05c3ba11 (diff)
Added by Joël Cuissinat about 2 years ago

lib_zephir.py : python3 + pylint updates (ref #33958)

Revision 70509797 (diff)
Added by Joël Cuissinat about 2 years ago

change_ip.zephir : python3 updates (ref #33958)

Revision 76ade7b7 (diff)
Added by Joël Cuissinat about 2 years ago

zephir-parc : upgrade packaging (ref #33958)

Revision 9a891b9d (diff)
Added by Joël Cuissinat about 2 years ago

zephir-parc : python3 updates (ref #33958)

Revision 17b05b53 (diff)
Added by Joël Cuissinat about 2 years ago

base64.encodestring → base64.encodebytes (ref #33958)

Revision d377f33a (diff)
Added by Joël Cuissinat about 2 years ago

zephir-client : upgrade packaging (ref #33958)

Revision 42dcedd8 (diff)
Added by Joël Cuissinat about 2 years ago

zephir-client : upgrade packaging bis (ref #33958)

Revision 2e69c615 (diff)
Added by Joël Cuissinat about 2 years ago

zephir-parc : restore --no-start option (ref #33958)

Revision e9ce684a (diff)
Added by Gilles Grandgérard about 2 years ago

encodestring -> encodebytes

Revision 47d90a01 (diff)
Added by Joël Cuissinat about 2 years ago

set_userkey.py : base64.encodestring → base64.encodebytes + pylint (ref #33958)

Revision 8de92336 (diff)
Added by Joël Cuissinat almost 2 years ago

set_userkey.py : base64.encodestring → base64.encodebytes + pylint (ref #33958)

History

#1 Updated by Joël Cuissinat about 2 years ago

Dépréciés en python 3.1 et supprimés en 3.9 !
  • encodestring() → encodebytes()
  • decodestring() → decodebytes()

Et on a fait qu'une partie du boulot dans #30398 et #33688 !

#2 Updated by Joël Cuissinat about 2 years ago

  • Related to Tâche #30398: DeprecationWarning: decodestring() is a deprecated alias since Python 3.1, use decodebytes() added

#3 Updated by Joël Cuissinat about 2 years ago

zephir-parc$ rgrep --color -E "encodestring|decodestring"  python/
python/zephir/backend/lib_backend.py:            old_data = base64.encodestring(old_data[old_data.index('ssh-rsa'):].encode()).decode()
python/zephir/backend/lib_backend.py:                new_data = base64.encodestring(new_data[new_data.index('ssh-rsa'):].encode()).decode()
python/zephir/backend/lib_backend.py:                new_data_priv = base64.encodestring(open(new_key_priv_path, 'r').read().strip().encode()).decode()
python/zephir/backend/prelude_rpc.py:            res = manager_rpc.register_server(xmlrpclib.base64.encodestring(key),passwd)
python/zephir/backend/prelude_rpc.py:        #result['ca_data'] = xmlrpclib.base64.encodestring(ca_file.read())
python/zephir/backend/prelude_rpc.py:        #result['cert_data'] = xmlrpclib.base64.encodestring(cert_file.read())
python/zephir/backend/prelude_rpc.py:        #result['rsyslog_data'] = xmlrpclib.base64.encodestring('\n'.join(rsyslog_data))
python/zephir/backend/prelude_rpc.py:        return 1, xmlrpclib.base64.encodestring('\n'.join(rsyslog_data))
python/zephir/backend/serveurs_rpc.py:        #measures = base64.encodestring(measures)
python/zephir/backend/uucp_rpc.py:            content=base64.encodestring(file_conf.read())
python/zephir/backend/uucp_rpc.py:        return  1, base64.encodestring(data_etab)
python/zephir/backend/uucp_rpc.py:            return 1, base64.encodestring(md5sum[0].encode()).decode()
python/zephir/backend/dictpool.py:        return base64.encodestring(open(dict_path).read())
python/zephir/backend/modules_rpc.py:                    content = base64.encodestring(content)
python/zephir/backend/modules_rpc.py:                        return 1,u([archive,base64.encodestring(data1),base64.encodestring(data2)])
python/zephir/utils/creolewrap.py:            data.append(base64.encodestring(content.encode()).decode())
python/zephir/web/genconfig.py:        auth_value = 'Basic ' + base64.encodestring(get_user(request).encode() + b':' + get_password(request).encode()).decode()
python/zephir/web/genconfig.py:        auth_value = 'Basic ' + base64.encodestring('{0}:{1}'.format(get_user(request), get_password(request)))
python/zephir/web/genconfig1.py:        auth_value = 'Basic ' + base64.encodestring('{0}:{1}'.format(get_user(request), get_password(request)))
python/zephir/web/genconfig1.py:        auth_value = 'Basic ' + base64.encodestring('{0}:{1}'.format(get_user(request), get_password(request)))
python/zephir/web/html/serveurs.py:                    dico = base64.encodestring(dico)
python/zephir/web/html/serveurs.py:                        dic_files['dicos'].append([escape(request.args[b'dico_name'][0]),base64.encodestring(request.args[b'dico'][0])])
python/zephir/web/html/serveurs.py:                        dic_files['persos'].append([escape(request.args[b'template_name'][0]),base64.encodestring(request.args[b'template'][0])])
python/zephir/web/html/serveurs.py:                        dic_files['patchs'].append([escape(request.args[b'patch_name'][0]),base64.encodestring(request.args[b'patch'][0])])
python/zephir/web/html/serveurs.py:                        dic_files['fichiers_zeph'].append([escape(request.args[b'fichier_name'][0].decode() + container),base64.encodestring(request.args[b'fichier'][0])])
python/zephir/web/html/utilisateurs.py:                        clef_ssh = base64.encodestring(request.args[b'clef_ssh'][0].decode().rstrip().encode()).decode()
python/zephir/web/html/utilisateurs.py:                contenu = base64.encodestring(contenu)
python/zephir/web/html/modules.py:                        dic_files['dicos_var'].append([escape(request.args[b'dico_name'][0]),base64.encodestring(request.args[b'dico'][0])])
python/zephir/web/html/modules.py:                        dic_files['persos_var'].append([escape(request.args[b'template_name'][0]),base64.encodestring(request.args[b'template'][0])])
python/zephir/web/html/modules.py:                        dic_files['patchs_var'].append([escape(request.args[b'patch_name'][0]),base64.encodestring(request.args[b'patch'][0])])
python/zephir/web/html/modules.py:                        dic_files['fichiers_var'].append([escape(request.args[b'fichier_name'][0].decode() + container),base64.encodestring(request.args[b'fichier'][0])])

#4 Updated by Joël Cuissinat about 2 years ago

Plusieurs autres projets sont à vérifier :
  • arv : corrections appliquées sur EOLE ≥ 2.8.0
  • ERA : le fichier ihm/matrix.py concerne l'interface, il est toujours en python2
  • creole : 1 occurrence corrigée dans master
  • zephir-client : mise à niveau de lib_zephir.py + rétro-portage file→open dans change_ip.zephir !
  • zephir-scripts : correction set_userkey.py
  • zephir-parc il en resterait dans "data" + galère packaging 2.9 !
  • eole-ci-tests
  • EoleSSO (sic)

#5 Updated by Joël Cuissinat about 2 years ago

Idem pour ceux qui utilisent xmlrpc.client.base64.encodestring.
Il s'agit d'ailleurs à un appel indirect à la fonction !!!

#6 Updated by Joël Cuissinat about 2 years ago

  • Tracker changed from Demande to Tâche
  • Status changed from Nouveau to En cours
  • Assigned To set to Joël Cuissinat
  • Parent task set to #33781

#7 Updated by Joël Cuissinat about 2 years ago

  • Related to Tâche #33959: Revoir le packaging de zephir-client pour EOLE 2.9 added

#8 Updated by Joël Cuissinat about 2 years ago

  • Status changed from En cours to Résolu
  • % Done changed from 0 to 100

#9 Updated by Joël Cuissinat about 2 years ago

  • Related to Tâche #34015: En 2.9.0, réparer la génération de paquets du projet zephir-client added

#10 Updated by Joël Cuissinat about 2 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) set to 0.0

Also available in: Atom PDF