PyCharm debugger chrashes when there is a class named Queue in the project
I have implemented an abstract class called Queue in my project. The PyCharm debugger then no longer works. It obviously tries to load this class for its own purposes. If I rename my class, for example to MyQueue, the debugger works again. I'm using PyCharm 2023.2.3.
Please sign in to leave a comment.
This is possibly quite a serious issue, but I wasn't able to reproduce it with a minimal example.
Could you please share a code snippet for reproducing the problem?
Here is a code snippet. The PyCharm-Debugger tries ti instatiate this abstract class in its package named adt.
# -*- encoding: utf-8 -*-from abc import ABC, abstractmethodfrom typing import TypeVarT = TypeVar('T')class QueueError(Exception):"""Allgemeiner Schlangen-Fehler - sollte eigentlich nicht verwendet werden."""def __str__(self):return "Unbekannter Schlangen-Fehler."class QueueErrorIsFull(QueueError):"""Schlange ist voll."""def __str__(self):return "Schlange ist voll."class QueueErrorIsEmpty(QueueError):"""Schlange ist leer."""def __str__(self):return "Schlange ist leer."class Queue(ABC): # Bei Queue spinnt der Debugger von PyCharm → umbenennen@abstractmethoddef is_empty(self) -> bool:"""Prüfung, ob Schlange leer.:return: True, wenn Schlange leer, ansonsten False"""pass@abstractmethoddef enqueue(self, obj: T):"""Einreihen eines Datenelements vom Typ T in die Schlange.:param obj: Datenelement vom Typ T"""pass@abstractmethoddef dequeue(self):"""Entfernen des Kopfelements der Schlange."""pass@abstractmethoddef front(self) -> T:"""Datenelement vom Typ T aus dem Kopf der Schlange liefern.:return: Datenelement vom Typ T"""passThe issue is still unreproducible for me. Please create a bug report on YouTrack so we can properly investigate the problem.