On Thu, Mar 5, 2020, at 1:59 PM, Daniel Cardin wrote:
> 1. I always expected that, with any reasonably non-trivial app, I would
> inevitably need to fall back to using their env.py. My hope was that for
> simpler cases, since this is a testing tool, there would be a way to not
> require any
1. I always expected that, with any reasonably non-trivial app, I would
inevitably need to fall back to using their env.py. My hope was that for
simpler cases, since this is a testing tool, there would be a way to not
require any changes to their env.py by default. Ultimately I can document
On Thu, Mar 5, 2020, at 12:02 PM, Daniel Cardin wrote:
> So, yes I mean "commands" as in `alembic.command.upgrade()`.
>
> The idea would be that the library defines an env.py (e.g. the important
> portion of which would look something like:)
> ...
>
> connectable =
So, yes I mean "commands" as in `alembic.command.upgrade()`.
The idea would be that the library defines an env.py (e.g. the important
portion of which would look something like:)
...
connectable = context.config.attributes.get("connection", None)
with self.connection.connect() as connection:
On Thu, Mar 5, 2020, at 10:17 AM, Adrien Blin wrote:
> I tried strong referencing the objects stored in the session using :
>
> *def *strong_reference_session(session):
> @event.listens_for(session, "pending_to_persistent")
> @event.listens_for(session, "deleted_to_persistent")
>
I tried strong referencing the objects stored in the session using :
def strong_reference_session(session):
@event.listens_for(session, "pending_to_persistent")
@event.listens_for(session, "deleted_to_persistent")
@event.listens_for(session, "detached_to_persistent")
On Thu, Mar 5, 2020, at 8:08 AM, Daniel Cardin wrote:
> I am attempting to write a library which invokes alembic commands, while
> referencing the migrations of a separate package which has installed said
> library.
>
> The intent here, is for the library to invoke the alembic commands with
On Thu, Mar 5, 2020, at 5:17 AM, Adrien Blin wrote:
>
>
> I'll try to recreate the issue for you to test it, but my question really is
> : Is there something I didn't get about memory usage in sqlalchemy, meaning,
> is it normal for it to retain objects in memory, and if so, how can we get
Hello Mike,
sorry for not having provided the table definition initially. You are
absolutely right, I used to define the tables and columns in a declarative
way and had the uniqueness-constraints defined on the columns.
As you proposed, setting the unique=False and index=False before invoking
I am attempting to write a library which invokes alembic commands, while
referencing the migrations of a separate package which has installed said
library.
The intent here, is for the library to invoke the alembic commands with an
env.py defined in that package. This seems to work through
I am using memory_profiler (https://pypi.org/project/memory-profiler/) to
measure the memory usage.
I reduced the code to just the request to see ifthe issue only comes from
here :
import gc
import sqlalchemy.orm.session as s
from MyDatabase.model.Table import Table
from memory_profiler
11 matches
Mail list logo