Re: shutil.rmtree() fails when used in Fedora (rpm) "mock" environment

Liste des GroupesRevenir à cl python 
Sujet : Re: shutil.rmtree() fails when used in Fedora (rpm) "mock" environment
De : olegsivokon (at) *nospam* gmail.com (Left Right)
Groupes : comp.lang.python
Date : 24. Oct 2024, 17:30:21
Autres entêtes
Message-ID : <mailman.38.1729790012.4695.python-list@python.org>
References : 1 2 3 4
The stack is created on line 760 with os.lstat and entries are appended
on lines 677 (os.rmdir), 679 (os.close) and 689 (os.lstat).
>
'func' is popped off the stack on line 651 and check in the following lines.
>
I can't see anywhere else where something else is put onto the stack or
an entry is replaced.

But how do you know this code isn't executed from different threads?
What I anticipate to be the problem is that the "os" module is
imported twice, and there are two references to "os.lstat".  Normally,
this wouldn't cause a problem, because they are the same function that
doesn't have any state, but once you are trying to compare them, the
identity test will fail, because those functions were loaded multiple
times into different memory locations.

I don't know of any specific mechanism for forcing the interpreter to
import the same module multiple times, but if that was possible (which
in principle it is), then it would explain the behavior.

Date Sujet#  Auteur
24 Oct 24 o Re: shutil.rmtree() fails when used in Fedora (rpm) "mock" environment1Left Right

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal