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

2024-10-24 Thread MRAB via Python-list
On 2024-10-24 20:21, Left Right wrote: > > > 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

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

2024-10-24 Thread Left Right via Python-list
> What is the probability of replacing os.lstat, os.close or os.rmdir from > another thread at just the right time? If the thead does "import os", and its start is logically connected to calling _rmtree_safe_fd(), I'd say it's a very good chance! That is, again, granted that the reference to os.ls

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

2024-10-24 Thread Left Right via Python-list
> > > 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

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

2024-10-24 Thread Barry via Python-list
> On 24 Oct 2024, at 15:07, Christian Buhtz via Python-list > wrote: > > On one hand Fedora seems to use a tool called "mock" to build packages in a > chroot environment. > On the other hand the test suite of "Back In Time" does read and write to the > real file system. I am a Fedora packa

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

2024-10-24 Thread Dan Sommers via Python-list
On 2024-10-24 at 20:54:53 +0100, MRAB via Python-list wrote: > On 2024-10-24 20:21, Left Right wrote: > > > > > 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 po

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

2024-10-24 Thread Left Right via Python-list
> 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 e

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

2024-10-24 Thread MRAB via Python-list
On 2024-10-24 17:30, Left Right wrote: > 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 somet

Re: Chardet oddity

2024-10-24 Thread Roland Mueller via Python-list
ke 23. lokak. 2024 klo 20.11 Albert-Jan Roskam via Python-list ( python-list@python.org) kirjoitti: >Today I used chardet.detect in the repl and it returned windows-1252 >(incorrect, because it later resulted in a UnicodeDecodeError). When I > ran >chardet as a script (which uses Unive

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

2024-10-24 Thread MRAB via Python-list
On 2024-10-24 16:17, Left Right via Python-list wrote: From reading the code where the exception is coming from, this is how I interpret the intention of the author: they build a list (not sure why they used list, when there's a stack datastructure in Python) which they use as a stack, where the

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

2024-10-24 Thread Left Right via Python-list
From reading the code where the exception is coming from, this is how I interpret the intention of the author: they build a list (not sure why they used list, when there's a stack datastructure in Python) which they use as a stack, where the elements of the stack are 4-tuples, the important part ab

Re: Chardet oddity

2024-10-24 Thread Mark Bourne via Python-list
Albert-Jan Roskam wrote: Today I used chardet.detect in the repl and it returned windows-1252 (incorrect, because it later resulted in a UnicodeDecodeError). When I ran chardet as a script (which uses UniversalLineDetector) this returned MacRoman. Isn't charset.detect the correct

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

2024-10-24 Thread Christian Buhtz via Python-list
Hello, I am upstream maintainer of "Back In Time" [1] investigating an issue a distro maintainer from Fedora reported [2] to me. On one hand Fedora seems to use a tool called "mock" to build packages in a chroot environment. On the other hand the test suite of "Back In Time" does read and writ