Project

General

Profile

Tâche #30591

Scénario #30519: Nombreux "DeprecationWarning" dans pyeole.log signalés sur EOLE 2.8

Répertorier le code obsolète

Added by Benjamin Bohard about 1 year ago. Updated 12 months ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
08/21/2020
Due date:
% Done:

100%

Remaining (hours):
0.0

Related issues

Related to EoleSSO - Tâche #30651: Une correction non compatible python2 dans creole empêche eole-sso de se charger Fermé 09/16/2020

Associated revisions

Revision 14ba373d (diff)
Added by Benjamin Bohard about 1 year ago

Use init_logging instead of deprecated make_logger.

Ref #30591

Revision 90e72ba7 (diff)
Added by Benjamin Bohard about 1 year ago

Remove deprecated code and tests.

Ref #30591

Revision cb618721 (diff)
Added by Benjamin Bohard about 1 year ago

Replace deprecated imp library with importlib.

Ref #30591

Revision 7c9db9e4 (diff)
Added by Joël Cuissinat about 1 year ago

creole/eosfunc.py : restore python2 compatibility

Ref #30651
Ref #30591

Revision 61501548 (diff)
Added by Benjamin Bohard about 1 year ago

Replace deprecated methods.

Ref #30591

Revision 18cf4bdf (diff)
Added by Benjamin Bohard about 1 year ago

Undeprecate logging class and functions.

Ref #30591

History

#1 Updated by Benjamin Bohard about 1 year ago

  • Status changed from Nouveau to En cours

#2 Updated by Benjamin Bohard about 1 year ago

Code externe :

/usr/lib/python3/dist-packages/tiramisu/option/baseoption.py:172: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
/usr/lib/python3/dist-packages/tiramisu/i18n.py:47: DeprecationWarning: bind_textdomain_codeset() is deprecated
/usr/lib/python3/dist-packages/pyudev/device/_device.py:37: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
/usr/lib/python3/dist-packages/_pytest/mark/structures.py:331: PytestUnknownMarkWarning: Unknown pytest.mark.unitary - is this a typo?  You can register custom marks to avoid this warning
/usr/lib/python3/dist-packages/Cryptodome/Util/_raw_api.py:41: DeprecationWarning: the imp module is deprecated in favour of importlib

Code interne:

/usr/share/pyeole/test_log.py:34: DeprecationWarning: Deprecated function call 'make_logger' by 'test_log.setup_module': use pyeole.log.init_logging
/usr/lib/python3/dist-packages/pyeole/log.py:637: DeprecationWarning: Deprecated function call 'InfoFilter' by 'pyeole.log.make_logger': use pyeole.log.init_logging
/usr/lib/python3/dist-packages/pyeole/log.py:633: DeprecationWarning: Deprecated function call 'DebugFilter' by 'pyeole.log.make_logger': use pyeole.log.init_logging
/usr/lib/python3/dist-packages/pyeole/log.py:629: DeprecationWarning: Deprecated function call 'ErrorFilter' by 'pyeole.log.make_logger': use pyeole.log.init_logging
/usr/share/pyeole/test_log.py:33: DeprecationWarning: Deprecated function call 'make_logger' by 'test_log.setup_module': use pyeole.log.init_logging
/usr/lib/python3/dist-packages/pyeole/log.py:644: DeprecationWarning: Deprecated function call 'get_log_level' by 'pyeole.log.make_file_handler': use pyeole.log.init_logging
/usr/lib/python3/dist-packages/pyeole/log.py:638: DeprecationWarning: Deprecated function call 'make_file_handler' by 'pyeole.log.make_logger': use pyeole.log.init_logging
/usr/lib/python3/dist-packages/pyeole/log.py:635: DeprecationWarning: Deprecated function call 'make_file_handler' by 'pyeole.log.make_logger': use pyeole.log.init_logging
/usr/lib/python3/dist-packages/pyeole/log.py:599: DeprecationWarning: Deprecated function call 'get_log_level' by 'pyeole.log.make_file_handler': use pyeole.log.init_logging
/usr/lib/python3/dist-packages/pyeole/log.py:598: DeprecationWarning: Deprecated function call 'get_formatter' by 'pyeole.log.make_file_handler': use pyeole.log.init_logging
/usr/lib/python3/dist-packages/pyeole/log.py:630: DeprecationWarning: Deprecated function call 'make_file_handler' by 'pyeole.log.make_logger': use pyeole.log.init_logging
/usr/share/pyeole/test_log.py:32: DeprecationWarning: Deprecated function call 'make_logger' by 'test_log.setup_module': use pyeole.log.init_logging
/usr/lib/python3/dist-packages/creole/eosfunc.py:21: DeprecationWarning: the imp module is deprecated in favour of importlib

#3 Updated by Benjamin Bohard about 1 year ago

Les avertissements les plus nombreux sont issus des tests de journalisation.
Est-ce qu’on considère qu’on ne teste plus la façon obsolète de configurer la journalisation (seule façon de ne plus avoir ces avertissements dans le job jenkins) ou est-ce qu’on conserve ces tests ?

Tant que le code n’est pas totalement retiré, ça semble normal de conserver ces tests. Par contre, il manque des tests utilisant l’autre façon de configurer la journalisation (avec init_logging).

#4 Updated by Benjamin Bohard about 1 year ago

La fonction make_logger est encore utilisée dans :
  • scribe-backend/scribe/importation/log.py
  • creole/creole/upgrade.py

#5 Updated by Joël Cuissinat about 1 year ago

  • Related to Tâche #30651: Une correction non compatible python2 dans creole empêche eole-sso de se charger added

#6 Updated by Benjamin Bohard 12 months ago

  • Status changed from En cours to Résolu

#7 Updated by Joël Cuissinat 12 months ago

  • Status changed from Résolu to Fermé
  • Assigned To set to Benjamin Bohard
  • % Done changed from 0 to 100
  • Remaining (hours) set to 0.0

OK

Also available in: Atom PDF