Projet

Général

Profil

Bug #62014

erreur "circular import"

Ajouté par Serghei Mihai (congés, retour 15/05) il y a environ 2 ans. Mis à jour il y a environ 2 ans.

Statut:
Fermé
Priorité:
Normal
Catégorie:
-
Version cible:
-
Début:
21 février 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Suite à #61735 mon authentic local ne démarre plus avec le message:

 File "/home/serghei/src/authentic/src/authentic2/custom_user/models.py", line 38, in <module>
    from authentic2.a2_rbac.models import RoleParenting
  File "/home/serghei/src/authentic/src/authentic2/a2_rbac/models.py", line 29, in <module>
    from authentic2.decorators import errorcollector
  File "/home/serghei/src/authentic/src/authentic2/decorators.py", line 27, in <module>
    from .utils.cache import (  # pylint: disable=unused-import
  File "/home/serghei/src/authentic/src/authentic2/utils/cache.py", line 22, in <module>
    from authentic2 import app_settings, middleware
  File "/home/serghei/src/authentic/src/authentic2/middleware.py", line 34, in <module>
    from .utils import misc as utils_misc
  File "/home/serghei/src/authentic/src/authentic2/utils/misc.py", line 52, in <module>
    from .cache import GlobalCache
ImportError: cannot import name 'GlobalCache' from partially initialized module 'authentic2.utils.cache' (most likely due to a circular import) (/home/serghei/src/authentic/src/authentic2/utils/cache.py)

Fichiers

Révisions associées

Révision cae2e1cd (diff)
Ajouté par Serghei Mihai (congés, retour 15/05) il y a environ 2 ans

misc: remove cache decorators declaration to avoir circular import (#62014)

Historique

#1

Mis à jour par Frédéric Péters il y a environ 2 ans

(ça a également pété le job jenkins hobo)

#2

Mis à jour par Serghei Mihai (congés, retour 15/05) il y a environ 2 ans

#3

Mis à jour par Benjamin Dauvergne il y a environ 2 ans

  • Statut changé de Solution proposée à Solution validée

Ok, à pousser si vert.

#4

Mis à jour par Serghei Mihai (congés, retour 15/05) il y a environ 2 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit cae2e1cd332faeb532b5f3ff1c659d70ed166d76 (HEAD -> main, origin/wip/62014-misc-remove-circular-import, origin/main, wip/62014-misc-remove-circular-import)
Author: Serghei Mihai <smihai@entrouvert.com>
Date:   Mon Feb 21 12:12:50 2022 +0100

    misc: remove cache decorators declaration to avoir circular import (#62014)
#5

Mis à jour par Transition automatique il y a environ 2 ans

  • Statut changé de Résolu (à déployer) à Solution déployée
#6

Mis à jour par Transition automatique il y a environ 2 ans

Automatic expiration

Formats disponibles : Atom PDF