[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-18 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue46417> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45544] Close 2to3 issues and list them here

2021-10-20 Thread Paulo Henrique Silva
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/issu

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-29 Thread Paulo Henrique Silva
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,

[issue10399] AST Optimization: inlining of function calls

2020-11-18 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue10399> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2020-04-01 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue40137> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()

2020-03-31 Thread Paulo Henrique Silva
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

[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()

2020-03-31 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- pull_requests: +18628 pull_request: https://github.com/python/cpython/pull/19273 ___ Python tracker <https://bugs.python.org/issue40

[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue40077> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2020-03-26 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue33608> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()

2020-03-26 Thread Paulo Henrique Silva
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/issue40

[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()

2020-03-26 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- pull_requests: +18532 pull_request: https://github.com/python/cpython/pull/19172 ___ Python tracker <https://bugs.python.org/issue40

[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()

2020-03-26 Thread Paulo Henrique Silva
Paulo Henrique Silva added the comment: I've got it, will investigate asap. -- ___ Python tracker <https://bugs.python.org/issue40071> ___ ___ Python-bugs-list m

[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()

2020-03-25 Thread Paulo Henrique Silva
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.p

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-24 Thread Paulo Henrique Silva
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

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-24 Thread Paulo Henrique Silva
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

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-24 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- pull_requests: +18512 pull_request: https://github.com/python/cpython/pull/19151 ___ Python tracker <https://bugs.python.org/issue1635

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-24 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- pull_requests: +18511 pull_request: https://github.com/python/cpython/pull/19150 ___ Python tracker <https://bugs.python.org/issue1635

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-23 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- pull_requests: +18483 pull_request: https://github.com/python/cpython/pull/19122 ___ Python tracker <https://bugs.python.org/issue1635

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-22 Thread Paulo Henrique Silva
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

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-21 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue37207> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-21 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- pull_requests: +18468 pull_request: https://github.com/python/cpython/pull/19107 ___ Python tracker <https://bugs.python.org/issue1635

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-16 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue39984> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-02-25 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39683] 2to3 fix_exitfunc suggests duplicated import of atexit module

2020-02-25 Thread Paulo Henrique Silva
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.p

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-02-24 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue39511> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15751] Support subinterpreters in the GIL state API

2019-12-09 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue15751> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10915] Make the PyGILState API compatible with multiple interpreters

2019-12-09 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue10915> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-28 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue38500> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38116] Make select module PEP-384 compatible

2019-09-18 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue38116> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37955] mock.patch incorrect reference to Mock

2019-08-26 Thread Paulo Henrique Silva
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/issu

[issue37955] mock.patch incorrect reference to Mock

2019-08-26 Thread Paulo Henrique Silva
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

[issue34690] Store startup modules as C structures for 20%+ startup speed improvement

2019-08-21 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue34690> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-08-21 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue36710> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36877] [meta] Move fields from _PyRuntimeState to PyInterpreterState.

2019-08-21 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue36877> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24554] GC should happen when a subinterpreter is destroyed

2019-08-21 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue24554> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36854] GC operates out of global runtime state.

2019-08-21 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue36854> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36876] Global C variables are a problem.

2019-08-21 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker <https://bugs.python.org/issue36876> ___ ___ Python-bugs-list mailing list Unsubscribe: