Ok. Thanks Mike Bayer.
On Sunday, May 6, 2018 at 6:39:24 PM UTC+5:30, Mike Bayer wrote:
>
> On Sun, May 6, 2018 at 3:28 AM, wrote:
> > Hi,
> >
> > I am new in the python (sql alchemy). I want to retrieve all database
> > objects at my code level. I am able to read
Its really superb. Its works like charm. Thanks a lot Mike Bayer.
On Sunday, May 6, 2018 at 6:46:11 PM UTC+5:30, Mike Bayer wrote:
>
> On Sun, May 6, 2018 at 4:15 AM, wrote:
> > Hi,
> > I am using sqlalchemy core. I want to generate select query with
> > table_name.*
We added coroutine_id in psycopg2, and found that two coroutine use the
same connection before the pthread_mutex_lock released.
Maybe something in the connection pool goes wrong?
[pid] [coroutine_id] msg
[49174] [0xa5db730]before PyObject_CallFunctionObjArgs conn 0x94122f0, cb
0x23ad320
On Mon, May 7, 2018, 7:01 AM wrote:
> We added coroutine_id in psycopg2, and found that two coroutine use the
> same connection before the pthread_mutex_lock released.
>
> Maybe something in the connection pool goes wrong?
> [pid] [coroutine_id] msg
>
This seems
The module, models.py, has five classes. Each has table constraints: three
have a single table constraint, one has two table constraints, and one has
seven table constraints. SA seems to reject more than four table
constraints.
With the last three commented out, there's no error:
On Sun, 6 May 2018, Mike Bayer wrote:
the second approach is probably more common, as it's more compact.
Thanks, Mike. It works well here.
Best regards,
Rich
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please
SQLAlchemy-1.2.7 installed here.
Model column definition is:
quant = Column(Float, nullable=False)
yet Python3 tells me that Float is not defined:
quant = Column(Float, nullable=False)
NameError: name 'Float' is not defined
If Float was a variable I created it would need to
On Mon, 7 May 2018, Rich Shepard wrote:
What have I missed?
Forgot to import that data type to the module.
Mea culpa!
Rich
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete,
can you please just post a simple failing test? there's nothing
unusual about any of these stack traces. I don't know what you're
trying to do.
On Mon, May 7, 2018 at 10:52 PM, Colton Allen wrote:
> Sorry to spam you. The logs didn't paste in full.
>
>
> api_1 |
On Monday, May 7, 2018 at 10:27:03 PM UTC-4, Mike Bayer wrote:
>
> can you perhaps place a "pdb.set_trace()" inside of session._flush()?
> using the debugger you can see the source of every flush() call.
> Generally, it occurs each time a query is about to emit SQL.
>
>
Building off what Mike
What exactly causes the session to flush? I'm trying to track down a nasty
bug in my versioning system.
Sorry for the long code dump. I retooled
examples/versioned_history/history_meta.py so it should look familiar. The
function that's breaking is "column_has_changed". I've added some logs
I think I did it right. The logs just didn't scroll up. This might be
causing the issue (account is a orm.relationship).
api_1 | File "/app/models/post/__init__.py", line 160, in
manage_review_status
api_1 | if not target.account.settings.compliance_enable_post:
Full logs:
New to pdb. Does this look correct?
class DebugSession(Session):
def _flush(self, objects=None):
pdb.set_trace()
super()._flush(objects)
factory = sqlalchemy.orm.sessionmaker(bind=engine, class_=DebugSession)
Program terminates when trying to call _flush().
api_1 | >
Sorry to spam you. The logs didn't paste in full.
api_1 | Traceback (most recent call last):
api_1 | File
"/usr/local/lib/python3.5/site-packages/werkzeug/wsgi.py", line 660, in
__call__
api_1 | return app(environ, start_response)
api_1 | File
just to note, there's definitely a bug somewhere, and if the bug is
found there's a 90% chance it involves code that I wrote at some point
:) (though likely some assumption that the PG /async stuff does not
meet) but this is part of oslo / openstack. I work on oslo /
openstack, but that's my
Well this a weird question to be asking at this point.
I have been working on a legacy web service and it's written in Python
2.6(maybe legacy is an underrated word here :D) and have been using SQL
Alchemy 1.0.0 with PyMySQL 0.8.0.
Every time I try to query, I get the following error:
On Mon, May 7, 2018 at 11:31 AM, Rich Shepard wrote:
> The module, models.py, has five classes. Each has table constraints: three
> have a single table constraint, one has two table constraints, and one has
> seven table constraints. SA seems to reject more than four
On Mon, 7 May 2018, Mike Bayer wrote:
the CHECK constraint only accepts a single SQL expression. Above, it
looks like you re looking to add a CHECK constraint for each
expression:
__table_args__ = (
CheckConstraint(wtemp_unit.in_(['C', 'F'])),
CheckConstraint(atemp_unit.in_(['C', 'F'])),
On Mon, May 7, 2018 at 1:45 PM, Anvith Shivakumara wrote:
> Well this a weird question to be asking at this point.
>
> I have been working on a legacy web service and it's written in Python
> 2.6(maybe legacy is an underrated word here :D) and have been using SQL
> Alchemy
19 matches
Mail list logo