[issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code

2020-05-22 Thread Recursing
Recursing added the comment: > Without asyncio memory consumption stays low and stable for me Same for me > RSS jumps from 20 MB to about 1,600 MB. That is the memory consumption I observe as well, the issue is that it doesn't get freed on Linux > There is almost no increase w

[issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code

2020-05-22 Thread Recursing
Recursing added the comment: Removing the `await asyncio.sleep(1)` removes the leak, while changing it to `await asyncio.sleep(0)` seems to keep it -- ___ Python tracker <https://bugs.python.org/issue40

[issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code

2020-05-22 Thread Recursing
New submission from Recursing : Minimal code to reproduce: ``` import ssl import certifi import gc import asyncio ca_path = certifi.where() async def make_async_context() -> None: context = ssl.SSLContext(ssl.PROTOCOL_TLS) context.load_verify_locations(ca_path) await asyncio.sl

[issue39195] re._compile should check if the argument is a compiled pattern before checking cache and flags

2020-01-02 Thread Recursing
Recursing added the comment: Rereading the documentation it's actually well documented, and I fully agree. Thanks for your time -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue39195] re._compile should check if the argument is a compiled pattern before checking cache and flags

2020-01-02 Thread Recursing
Recursing added the comment: I now know that the correct and fastest way to do this is to use pattern.search, but I still think this change would be an improvement -- ___ Python tracker <https://bugs.python.org/issue39

[issue39195] re._compile should check if the argument is a compiled pattern before checking cache and flags

2020-01-02 Thread Recursing
Change by Recursing : -- keywords: +patch pull_requests: +17234 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17799 ___ Python tracker <https://bugs.python.org/issu

[issue39195] re._compile should check if the argument is a compiled pattern before checking cache and flags

2020-01-02 Thread Recursing
New submission from Recursing : In the re module, re._compile gets called when using most re methods. In my use case (which I think is not rare) I have a small number of compiled patterns that I have to match against a large number of short strings profiling showed that half of the total