[issue46417] Clear static types in Py_Finalize() for embedded Python
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue46417> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45544] Close 2to3 issues and list them here
Change by Paulo Henrique Silva : -- nosy: +phsilva nosy_count: 5.0 -> 6.0 pull_requests: +27387 pull_request: https://github.com/python/cpython/pull/18654 ___ Python tracker <https://bugs.python.org/issue45544> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1635741] Py_Finalize() doesn't clear all Python objects at exit
Paulo Henrique Silva added the comment: Repeated msg355187 testing on master[056c08211b]. --- #include void func() { Py_Initialize(); Py_Finalize(); Py_ssize_t cnt = _Py_GetRefTotal(); printf("sys.gettotalrefcount(): %zd\n", cnt); } int main(int argc, char *argv[]) { Py_SetProgramName(L"./_testembed"); for (int i=0; i < 10; i++) { func(); } } --- No refs leaking anymore!? --- sys.gettotalrefcount(): 10241 sys.gettotalrefcount(): 10241 sys.gettotalrefcount(): 10241 sys.gettotalrefcount(): 10241 sys.gettotalrefcount(): 10241 sys.gettotalrefcount(): 10241 sys.gettotalrefcount(): 10241 sys.gettotalrefcount(): 10241 sys.gettotalrefcount(): 10241 sys.gettotalrefcount(): 10241 --- -- ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10399] AST Optimization: inlining of function calls
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue10399> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue40137> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()
Paulo Henrique Silva added the comment: As discussed on PR19172, this module uses a global state in functions that do not receive a PyModule* and right now converting such cases to per-module state is not trivial. I will wait for PEP-573 implementation that will hopefully make this easier. Pushed PR19273 to avoid the potential crash induced by the original change. -- ___ Python tracker <https://bugs.python.org/issue40071> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()
Change by Paulo Henrique Silva : -- pull_requests: +18628 pull_request: https://github.com/python/cpython/pull/19273 ___ Python tracker <https://bugs.python.org/issue40071> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40077] Convert static types to PyType_FromSpec()
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue40077> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue33608> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()
Paulo Henrique Silva added the comment: The module still uses static state. Fixed the leak and will convert it to use per-module state in a separate issue. -- ___ Python tracker <https://bugs.python.org/issue40071> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()
Change by Paulo Henrique Silva : -- pull_requests: +18532 pull_request: https://github.com/python/cpython/pull/19172 ___ Python tracker <https://bugs.python.org/issue40071> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()
Paulo Henrique Silva added the comment: I've got it, will investigate asap. -- ___ Python tracker <https://bugs.python.org/issue40071> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()
Change by Paulo Henrique Silva : -- keywords: +patch nosy: +phsilva nosy_count: 1.0 -> 2.0 pull_requests: +18529 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19151 ___ Python tracker <https://bugs.python.org/issue40071> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1635741] Py_Finalize() doesn't clear all Python objects at exit
Paulo Henrique Silva added the comment: Thanks for the clarifications. I will keep looking for simple modules, no state and easy to migrate but also dedicate more time to work on the more complex like datetime. I'm working on PR19122 corrections. -- ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1635741] Py_Finalize() doesn't clear all Python objects at exit
Paulo Henrique Silva added the comment: Updating on my findings on msg364833. It looks like encodings module is not being destoyed at all and keeping all the encoding refs alive. Looks like some cycle but I am not sure yet how to solve it. To validate this, I: - removed codec_search_cach of PyInterpreterState. - Py_DECREFd(encodings) after loading it on codecs.c. Before: 4376 refs left (37fcbb65d4) After : 352 refs left (-92%) I've updated the changes at https://github.com/python/cpython/compare/master...phsilva:remove-codec-caches (not a proposed patch, just to validate the idea) -- ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1635741] Py_Finalize() doesn't clear all Python objects at exit
Change by Paulo Henrique Silva : -- pull_requests: +18512 pull_request: https://github.com/python/cpython/pull/19151 ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1635741] Py_Finalize() doesn't clear all Python objects at exit
Change by Paulo Henrique Silva : -- pull_requests: +18511 pull_request: https://github.com/python/cpython/pull/19150 ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1635741] Py_Finalize() doesn't clear all Python objects at exit
Change by Paulo Henrique Silva : -- pull_requests: +18483 pull_request: https://github.com/python/cpython/pull/19122 ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1635741] Py_Finalize() doesn't clear all Python objects at exit
Paulo Henrique Silva added the comment: About half of the remaining refs are related to encodings. I noticed that caches on Lib/encodings/__init__.py and codec_search_cach of PyInterpreterState are the places holding the refs. I removed those caches and number went do to: Before: 4382 refs left After : 2344 refs left (-46%) The way to destroy codec_search_cache was recently changed on #36854 and $38962. (Not proposing to merge this, but my changes are at https://github.com/python/cpython/compare/master...phsilva:remove-codec-caches). -- ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue37207> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1635741] Py_Finalize() doesn't clear all Python objects at exit
Change by Paulo Henrique Silva : -- pull_requests: +18468 pull_request: https://github.com/python/cpython/pull/19107 ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue39984> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1635741] Py_Finalize() doesn't clear all Python objects at exit
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39683] 2to3 fix_exitfunc suggests duplicated import of atexit module
Change by Paulo Henrique Silva : -- keywords: +patch nosy: +phsilva nosy_count: 1.0 -> 2.0 pull_requests: +18015 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18654 ___ Python tracker <https://bugs.python.org/issue39683> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue39511> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15751] Support subinterpreters in the GIL state API
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue15751> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10915] Make the PyGILState API compatible with multiple interpreters
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue10915> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue38500> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38116] Make select module PEP-384 compatible
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue38116> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37955] mock.patch incorrect reference to Mock
Change by Paulo Henrique Silva : -- keywords: +patch pull_requests: +15204 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15521 ___ Python tracker <https://bugs.python.org/issue37955> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37955] mock.patch incorrect reference to Mock
New submission from Paulo Henrique Silva : When explaining the usage of keyword arguments on mock.patch: ``` patch() takes arbitrary keyword arguments. These will be passed to the Mock (or new_callable) on construction. ``` default new_callable is MagicMock and it should be mentioned here instead of Mock (even tough MagickMock inherits from it). -- assignee: docs@python components: Documentation messages: 350537 nosy: docs@python, phsilva priority: normal severity: normal status: open title: mock.patch incorrect reference to Mock versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue37955> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34690] Store startup modules as C structures for 20%+ startup speed improvement
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue34690> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue36710> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36877] [meta] Move fields from _PyRuntimeState to PyInterpreterState.
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue36877> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24554] GC should happen when a subinterpreter is destroyed
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue24554> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36854] GC operates out of global runtime state.
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue36854> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36876] Global C variables are a problem.
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue36876> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com