[issue39382] abstract_issubclass() doesn't take bases tuple item ref

2020-02-16 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- pull_requests: +17906 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18530 ___ Python tracker <https://bugs.python.org/issu

[issue39382] abstract_issubclass() doesn't take bases tuple item ref

2020-01-18 Thread Yonatan Goldschmidt
New submission from Yonatan Goldschmidt : I encountered a crash using rpyc. Since rpyc is pure-Python, I guessed the problem is with Python itself. Originally tested on v3.7, the rest of this issue is based on v3.9.0a2 (compiling on an Ubuntu 18.04 docker). I narrowed down the rpyc-based

[issue4264] Patch: optimize code to use LIST_APPEND instead of calling list.append

2020-05-17 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- nosy: +Yonatan Goldschmidt ___ Python tracker <https://bugs.python.org/issue4264> ___ ___ Python-bugs-list mailing list Unsub

[issue41545] gc API requiring matching number of gc.disable - gc.enable calls

2020-08-17 Thread Yonatan Goldschmidt
Yonatan Goldschmidt added the comment: Hmm... I didn't think of overlapping lock periods. You are right, Dennis, a counter must be managed. -- ___ Python tracker <https://bugs.python.org/issue41

[issue41545] gc API requiring matching number of gc.disable - gc.enable calls

2020-08-17 Thread Yonatan Goldschmidt
Yonatan Goldschmidt added the comment: > This is exactly the motivation for context managers, no? I attached no_gc.py, > which works when nested and should additionally be thread-safe. My solution was roughly the same (also a context manager, but a bit simplified because I didn'

[issue40222] "Zero cost" exception handling

2020-06-02 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- nosy: +Yonatan Goldschmidt ___ Python tracker <https://bugs.python.org/issue40222> ___ ___ Python-bugs-list mailing list Unsub

[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-23 Thread Yonatan Goldschmidt
New submission from Yonatan Goldschmidt : Key-sharing dictionaries, defined by https://www.python.org/dev/peps/pep-0412/, require that any resizing of the shared dictionary keys will happen before a second instance of the class is created. cached_property inserts its resolved result

[issue42143] Corruptions in func_dealloc() with partially-created function object

2020-10-24 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- keywords: +patch pull_requests: +21871 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22953 ___ Python tracker <https://bugs.python.org/issu

[issue42143] Corruptions in func_dealloc() with partially-created function object

2020-10-24 Thread Yonatan Goldschmidt
New submission from Yonatan Goldschmidt : While reading funcobject.c, I noticed that PyFunction_NewWithQualName() may exit early if it fails retrieving __name__ from the globals dict. It will destroy the partially-created PyFunction object. However, this is done before ever initializing

[issue10399] AST Optimization: inlining of function calls

2020-08-11 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- nosy: +Yonatan Goldschmidt ___ Python tracker <https://bugs.python.org/issue10399> ___ ___ Python-bugs-list mailing list Unsub

[issue41545] gc API requiring matching number of gc.disable - gc.enable calls

2020-08-13 Thread Yonatan Goldschmidt
New submission from Yonatan Goldschmidt : I have a construct in my code where I wrap a function's logic with `gc.disable()` to prevent GC from triggering some race condition. Today this construct got a bit more complicated, and another function had to use this "trick". Now there a

[issue35823] Use vfork() in subprocess on Linux

2020-06-24 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- nosy: +Yonatan Goldschmidt ___ Python tracker <https://bugs.python.org/issue35823> ___ ___ Python-bugs-list mailing list Unsub

[issue35823] Use vfork() in subprocess on Linux

2020-06-26 Thread Yonatan Goldschmidt
Yonatan Goldschmidt added the comment: With issue35537 merged, do we have any intention to get on with this? From what I can tell, it provides roughly the same performance benefit - but works also with close_fds=True, which is the default of Popen, so IMO it's a worthy addition. I tested

[issue41427] howto/descriptor.rst unnecessarily mentions method.__class__

2020-07-28 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- keywords: +patch pull_requests: +20810 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21665 ___ Python tracker <https://bugs.python.org/issu

[issue41427] howto/descriptor.rst unnecessarily mentions method.__class__

2020-07-28 Thread Yonatan Goldschmidt
New submission from Yonatan Goldschmidt : In Doc/howto/descriptor.rst: # Internally, the bound method stores the underlying function, # the bound instance, and the class of the bound instance. >>> d.f.__func__ >>> d.f.__self__ <__main__.D

[issue41545] gc API requiring matching number of gc.disable - gc.enable calls

2020-08-14 Thread Yonatan Goldschmidt
Yonatan Goldschmidt added the comment: > If this race condition is a bug in gc, then we should fix that. > If it is a bug in your code, surely you should fix that rather than disable > gc. It's neither: it is something related to the combination of some 3rd party libraries

[issue42287] Use Py_NewRef & Py_XNewRef where applicable

2020-11-07 Thread Yonatan Goldschmidt
New submission from Yonatan Goldschmidt : Following https://bugs.python.org/issue42262, I think it'd be nice to convert existing C code to use the more concise Py_NewRef() and Py_XNewRef() where possible. Increases readability and less bug prone. Opening this new issue to track

[issue42287] Use Py_NewRef & Py_XNewRef where applicable

2020-11-16 Thread Yonatan Goldschmidt
Yonatan Goldschmidt added the comment: > I don't see how Py_NewRef() or Py_XNewRef() is less error prone. In my > experience, any change is more likely to introduce new bugs than leaving the > code unchanged. Agree that inserting changes opens a door to introducing bugs. However,

[issue42173] Drop Solaris support

2020-10-28 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- nosy: +Yonatan Goldschmidt ___ Python tracker <https://bugs.python.org/issue42173> ___ ___ Python-bugs-list mailing list Unsub

[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-04 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- nosy: +Yonatan Goldschmidt ___ Python tracker <https://bugs.python.org/issue42266> ___ ___ Python-bugs-list mailing list Unsub

[issue41545] gc API requiring matching number of gc.disable - gc.enable calls

2021-01-21 Thread Yonatan Goldschmidt
Yonatan Goldschmidt added the comment: Dennis, you're right. I guess I missed it when I previously searched for matching issues. https://bugs.python.org/issue31356 indeed solves my problem. Closing this as a duplicate. -- resolution: -> duplicate stage: -> resolved status

[issue44222] Improving _removeHandlerRef for a very long _handlerList

2021-05-24 Thread Yonatan Goldschmidt
Yonatan Goldschmidt added the comment: That system has many (>10k) objects of a certain type. Each of them has a separate Logger object + Handlers. That was done, among other reasons, to allow for easy consuming of the logs relating to a particular object in a file-based manner. I ag

[issue44222] Improving _removeHandlerRef for a very long _handlerList

2021-05-23 Thread Yonatan Goldschmidt
New submission from Yonatan Goldschmidt : We have an application which creates 10,000s of logging.Logger & logging.Handler objects. I encountered a major slowdown during GCs which happen to collect dead Handler objects, calling logging._removeHandlerRef() along the way. That function l

[issue44222] Improving _removeHandlerRef for a very long _handlerList

2021-05-23 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- keywords: +patch pull_requests: +24918 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26325 ___ Python tracker <https://bugs.python.org/issu

[issue44222] Improving _removeHandlerRef for a very long _handlerList

2021-05-25 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue29657] os.symlink: FileExistsError shows wrong message

2021-05-01 Thread Yonatan Goldschmidt
Yonatan Goldschmidt added the comment: Just reached this issue independently (spent a few minutes debugging an error message like "FileExistsError: [Errno 17] File exists: 'a' -> 'b'", where 'a' didn't exist...) I agree with Rich on this - for me, the source of confusion was

[issue36656] Add race-free os.link and os.symlink wrapper / helper

2021-05-01 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- nosy: +Yonatan Goldschmidt ___ Python tracker <https://bugs.python.org/issue36656> ___ ___ Python-bugs-list mailing list Unsub

[issue31356] Add context manager to temporarily disable GC

2021-05-01 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- nosy: +Yonatan Goldschmidt ___ Python tracker <https://bugs.python.org/issue31356> ___ ___ Python-bugs-list mailing list Unsub