Shane Harvey

Results 48 comments of Shane Harvey

To accomplish this right now, one has to: 1. Install [go-torch](https://github.com/uber/go-torch): `go get github.com/uber/go-torch` 1. Install [brendangregg/FlameGraph](https://github.com/brendangregg/FlameGraph) 1. Finally, generate the svg: `go-torch -b ./profile.pprof --binaryname ./binary`. (make sure FlameGraph...

Hi @luisobo, the `self.commit()` is necessary to ensure that we read the most up to date version of the document and apply the changes to that. You may want to...

My vote would be for 3) as well but instead of a global session, consider using a [ContextVar](https://docs.python.org/3/library/contextvars.html#context-variables) so that multiple threads can execute transactions concurrently: ```python from contextvars import...

MongoClient only raises this error once it has been closed by an explicit call to client.close(). From a quick search it looks like the one and only place mongoengine calls...

> Any options how it can work with several calls of context manager? I don't follow. Can you show a short example of what you want to do?

Aha! I discovered the real problem here while working on another issue. Here's a short repro: ```python from mongoengine import * from pymongo.errors import InvalidOperation client1 = connect(alias='default') client2 =...

@LuisBlanche, @blochs, @bm13kk I believe I've fixed this issue here https://github.com/MongoEngine/mongoengine/pull/2703. Would you be able to test this change in your environment to confirm that it fixes the `pymongo.errors.InvalidOperation: Cannot...

If this approach seems reasonable, I'll work on fixing the ` "Any" is not defined` errors (caused by Any not being imported in some files).

I made the blanket change because users will inevitably run into the same bug on other APIs leading to more confusion, PRs, and overall more wasted time. Ideally mypy would...