[issue45012] DirEntry.stat method should release GIL

2021-09-08 Thread uosiu
uosiu added the comment: Bardzo proszę :) This fix is quite important for us. We would like to start using this fix in our product. Is there something I could do to backport it to 3.9? -- ___ Python tracker <https://bugs.python.org/issue45

[issue45012] DirEntry.stat method should release GIL

2021-08-31 Thread uosiu
Change by uosiu : -- keywords: +patch pull_requests: +26528 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28085 ___ Python tracker <https://bugs.python.org/issu

[issue45012] DirEntry.stat method should release GIL

2021-08-26 Thread Uosiu
New submission from Stanisław Skonieczny (Uosiu) : We have an application that crawls filesystem using `os.scandir`. It uses multiple threads for various things. Application is used on variety of filesystems, some of them might be slow or occasionally unresponsive. We have found out

[issue26600] MagickMock __str__ sometimes returns MagickMock instead of str

2021-02-22 Thread Uosiu
Stanisław Skonieczny (Uosiu) added the comment: When you just create a magick mock and then call `__str__` on it, it never throws an exception and always return a string. But... when you create a magick mock and then call `__str__` from two threads concurrently, one of them will raise

[issue26600] MagickMock __str__ sometimes returns MagickMock instead of str

2021-02-22 Thread Uosiu
Stanisław Skonieczny (Uosiu) added the comment: However there is still nothing in the docs that you have to mock `__str__` by yourself when using mock object with multiple threads. Otherwise calling `__str__` may result with raising exception if you are unlucky. Stanisław Skonieczny On Wed

[issue34486] "RuntimeError: release unlocked lock" when starting a thread

2018-08-24 Thread Uosiu
Stanisław Skonieczny (Uosiu) added the comment: This scripts runs start_threads.py and send a signal to it. After some number of loops problem can be reproduced. -- Added file: https://bugs.python.org/file47762/test.sh ___ Python tracker <ht

[issue34486] "RuntimeError: release unlocked lock" when starting a thread

2018-08-24 Thread Uosiu
New submission from Stanisław Skonieczny (Uosiu) : Sometimes when thread is starting it raises "RuntimeError: release unlocked lock". That is when signal handler is invoked in the same time. Traceback (most recent call last): File "/usr/lib/python3.6/threading.py"

[issue26600] MagickMock __str__ sometimes returns MagickMock instead of str

2016-03-21 Thread Uosiu
New submission from Stanisław Skonieczny (Uosiu): This bug results in raising TypeError: __str__ returned non-string (type MagicMock) Following program can reproduce it: ``` from threading import Thread from mock.mock import MagicMock def main(): mocks = [MagicMock() for _ in range(1000

[issue25731] Assigning and deleting __new__ attr on the class does not allow to create instances of this class

2015-11-25 Thread Uosiu
New submission from Stanisław Skonieczny (Uosiu): When moving from python 2.7 to 3.5 I have found a problem with patching __new__ method on the class. It was done this way: ''' patch('foo.bar.MyClass.__new__', return_value=mocked_instance) ''' In works with python 2.7, but in 3.5 it fails