sqlalchemy-tickets Mailing List for SQLAlchemy (Page 82)
Brought to you by:
zzzeek
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(174) |
Apr
(50) |
May
(71) |
Jun
(129) |
Jul
(113) |
Aug
(141) |
Sep
(82) |
Oct
(142) |
Nov
(97) |
Dec
(72) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(159) |
Feb
(213) |
Mar
(156) |
Apr
(151) |
May
(58) |
Jun
(166) |
Jul
(296) |
Aug
(198) |
Sep
(89) |
Oct
(133) |
Nov
(150) |
Dec
(122) |
| 2008 |
Jan
(144) |
Feb
(65) |
Mar
(71) |
Apr
(69) |
May
(143) |
Jun
(111) |
Jul
(113) |
Aug
(159) |
Sep
(81) |
Oct
(135) |
Nov
(107) |
Dec
(200) |
| 2009 |
Jan
(168) |
Feb
(109) |
Mar
(141) |
Apr
(128) |
May
(119) |
Jun
(132) |
Jul
(136) |
Aug
(154) |
Sep
(151) |
Oct
(181) |
Nov
(223) |
Dec
(169) |
| 2010 |
Jan
(103) |
Feb
(209) |
Mar
(201) |
Apr
(183) |
May
(134) |
Jun
(113) |
Jul
(110) |
Aug
(159) |
Sep
(138) |
Oct
(96) |
Nov
(116) |
Dec
(94) |
| 2011 |
Jan
(97) |
Feb
(188) |
Mar
(157) |
Apr
(158) |
May
(118) |
Jun
(102) |
Jul
(137) |
Aug
(113) |
Sep
(104) |
Oct
(108) |
Nov
(91) |
Dec
(162) |
| 2012 |
Jan
(189) |
Feb
(136) |
Mar
(153) |
Apr
(142) |
May
(90) |
Jun
(141) |
Jul
(67) |
Aug
(77) |
Sep
(113) |
Oct
(68) |
Nov
(101) |
Dec
(122) |
| 2013 |
Jan
(60) |
Feb
(77) |
Mar
(77) |
Apr
(129) |
May
(189) |
Jun
(155) |
Jul
(106) |
Aug
(123) |
Sep
(53) |
Oct
(142) |
Nov
(78) |
Dec
(102) |
| 2014 |
Jan
(143) |
Feb
(93) |
Mar
(35) |
Apr
(26) |
May
(27) |
Jun
(41) |
Jul
(45) |
Aug
(27) |
Sep
(37) |
Oct
(24) |
Nov
(22) |
Dec
(20) |
| 2015 |
Jan
(17) |
Feb
(15) |
Mar
(34) |
Apr
(55) |
May
(33) |
Jun
(31) |
Jul
(27) |
Aug
(17) |
Sep
(22) |
Oct
(26) |
Nov
(27) |
Dec
(22) |
| 2016 |
Jan
(20) |
Feb
(24) |
Mar
(23) |
Apr
(13) |
May
(17) |
Jun
(14) |
Jul
(31) |
Aug
(23) |
Sep
(24) |
Oct
(31) |
Nov
(23) |
Dec
(16) |
| 2017 |
Jan
(24) |
Feb
(20) |
Mar
(27) |
Apr
(24) |
May
(28) |
Jun
(18) |
Jul
(18) |
Aug
(23) |
Sep
(30) |
Oct
(17) |
Nov
(12) |
Dec
(12) |
| 2018 |
Jan
(27) |
Feb
(23) |
Mar
(13) |
Apr
(19) |
May
(21) |
Jun
(29) |
Jul
(11) |
Aug
(22) |
Sep
(14) |
Oct
(9) |
Nov
(24) |
Dec
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-19 16:26:58
|
#2806: setup.py misbehaves with respect to the location of shared objects
-----------------------------------+------------------------------------
Reporter: assarbad | Owner: zzzeek
Type: defect | Status: closed
Priority: medium | Milestone:
Component: cextensions | Severity: no triage selected yet
Resolution: wontfix | Keywords:
Progress State: completed/closed |
-----------------------------------+------------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => wontfix
* status_field: awaiting triage => completed/closed
Comment:
SQLAlchemy's setup.py uses a system called "setuptools" to build its
software, which itself builds upon Python's standard build system
"distutils". "setuptools" itself is a de-facto standard in Python as well
and is used by a large portion of Python projects.
All of the behaviors you're observing here are not specific to SQLAlchemy
and are instead part of the behaviors of distutils and setuptools, there's
nothing in SQLAlchemy itself that impacts the behavior of where .so files
go or anything like that. SQLAlchemy does have some C extensions, which
might not be the case for other packages you are comparing to, but for
comparison, try installing a package like psycopg2 or lxml which also
generates .so files and compare the behavior there.
This is a pretty fundamental Python install issue so I'd suggest asking on
a general group such as comp.lang.python, or if you want to talk to
distutils developers you can ask on
http://www.python.org/community/sigs/current/distutils-sig/, they might be
able to shed light on the mechanics of your issue here.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2806#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-19 15:58:24
|
#2806: setup.py misbehaves with respect to the location of shared objects
-------------------------+-----------------------------------------
Reporter: assarbad | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone:
Component: cextensions | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
-------------------------+-----------------------------------------
Using SQLalchemy 0.8.2 I was trying to build and install it into a custom
Python build (i.e. not the system one) on Scientific Linux 6.1.
I'm setting `$PYTHONHOME` before invoking `setup.py install` using the
Python into which I want to install the SQLAlchemy module.
Since I am trying to build an RPM and the idea is to have a self-contained
Python environment, everything should go into a particular folder
(`/opt/app`) in this case.
I am using `fakechroot` to mimic the target environment on the build
machine and it works for Python as well as the extensions I am trying to
install. With the sole exception of SQLAlchemy and the `.so` files built
for it. These end up inside:
{{{
/home/oliver/.python-eggs/SQLAlchemy-0.8.2-py2.7-linux-x86_64.egg-
tmp/sqlalchemy/cutils.so
/home/oliver/.python-eggs/SQLAlchemy-0.8.2-py2.7-linux-x86_64.egg-
tmp/sqlalchemy/cprocessors.so
/home/oliver/.python-eggs/SQLAlchemy-0.8.2-py2.7-linux-x86_64.egg-
tmp/sqlalchemy/cresultproxy.so
}}}
within the faked `chroot` environment which is not the intended behavior.
Instead they should all go into the `site-package` directory of the Python
installation.
Am I doing something wrong or is this a defect?
Also note that from the output of `setup.py install` when run inside the
faked `chroot` environment, I see:
{{{
creating stub loader for sqlalchemy/cprocessors.so
creating stub loader for sqlalchemy/cresultproxy.so
creating stub loader for sqlalchemy/cutils.so
byte-compiling build/bdist.linux-x86_64/egg/sqlalchemy/cprocessors.py to
cprocessors.pyc
byte-compiling build/bdist.linux-x86_64/egg/sqlalchemy/cresultproxy.py to
cresultproxy.pyc
byte-compiling build/bdist.linux-x86_64/egg/sqlalchemy/cutils.py to
cutils.pyc
}}}
Thanks and best regards
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2806>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-19 15:17:38
|
#1418: Flexible deferred interface
------------------------------+-------------------------------
Reporter: guest | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.0
Component: orm | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
------------------------------+-------------------------------
Comment (by zzzeek):
Replying to [comment:12 kentbower]:
>
> `options(load(...` strikes me as verbose and maybe confusing?
>
>
> So, if you head that route, maybe you consider making `load()` a query
method that is really a synonym for `options(load())`?
the problem with this is that load() is itself method-chained and leads to
a context that is specific to load(). putting it up on Query means that
all of load()'s methods are now on Query, which makes it superfluous.
this would be very confusing:
{{{
query(Entity1).join(Entity2,
Entity1.somerel).load(Entity1).joined(someotherrel).filter_by(q=5).defer("x",
"y")...
}}}
that is, mixing up load() methods and query() methods, like above where
filter_by() is stuck in between joined() and defer() is a mess, which
entity does filter_by() operate upon ? Entity1.somerel or
Entity1.someotherrel, which context does it take place within?
If query has a join() *and* a joinedload() method at the same level, that
will be a constant source of confusion. Loader options are special.
They are not specifically directives to compose a certain kind of SQL,
they're behavioral directives consumed by the mechanics that link result
sets to mapped objects.
The remarkable thing about query.options() is that the proposal for load()
actually justified it, as load() can have it's own method-chaining that is
cleanly separated from that of the Query itself. It's like
query.options() was made for a sub-chained object like load() all this
time.
>
> I really think whatever the design is, it should be made syntactically
equivalent for relationships for consistency. For example:
> If:
> `sess.query(Entity).options(defer(Entity).undefer("foo", "bar"))`
> Then also:
> `sess.query(Entity).options(lazyloadall(Entity).joinedload("foo",
"bar"))`
> (I think you were agreeing, unless I didn't understand.)
the idea is that you always start with load(), load(Entity). I guess your
"star" thing would work out like "load(Entity).lazyload('*')". Which in
itself is an argument to keep relationships and columns separate at least
in most cases. Otherwise how do i specify lazy loading for all the
relationships and not the columns? I can see that the only() method
might want to work across both, if you said only("x", "y"), by default
that would cancel out joined/subquery/immediate loads as well.
>
> When I was a new sqlalchemy user I didn't understand why we'd need two
sets of language in the first place: couldn't `defer()` and `load()`
operate polymorphically equally on a relationship property ''or'' a column
property? (I understand there are different loading strategies for
relationships, etc. so maybe it isn't feasible, but I thought I'd bring it
up because it was something I had thought of as a new user.)
this is kind of true for lazyload() and defer(). But for every other kind
of loading it's not. if you're thinking in SQL-centric terms (which I
recommend) I think they seem very different.
> One other consideration: what about join points? If I have this:
>
>
`options(load(Entity).joined(Entity.subentity).joined(SubEntity.subsubentity))`
>
> and if `Entity.subentity` and `Entity.subentity.subsubentity` refer to
the same table, will you be able to add a filter and specify which
joinpoint?
that kind of thing should already work now, joinedload() always makes an
alias for things so if SubEntity.subsubentity were self-referential to
SubEntity, the above would join twice to the table and populate results
accordingly. I don't understand what we'd be filtering here, perhaps
you're referring to the usage of query.join() to set up specific joins in
conjunction with contains_eager() ?
> As long as we are brainstorming, should filtering alternatively allow
the full path?
> `.filter(Entity.subentity.x==2)` vs.
`.filter(Entity.subentity.subsubentity.x==2)`
> or is that just too ugly to implement?
I talked about this in my email (ack you saw the email right?
https://groups.google.com/forum/#!topic/sqlalchemy-devel/_Jgc5xC7tQY )
>
>
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1418#comment:13>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-19 14:03:52
|
#1418: Flexible deferred interface
------------------------------+-------------------------------
Reporter: guest | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.0
Component: orm | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
------------------------------+-------------------------------
Comment (by kentbower):
At one point we had hoped to keep this syntax consistent with
relationships:
ticket:2351#comment:26
`options(load(...` strikes me as verbose and maybe confusing?
I've often wondered if the .options() bit could be engineered out (as you
hinted to, as well). For example:
`sess.query(Entity).options(lazyload('*')).all()`
I've often wondered if options couldn't be query methods:
`sess.query(Entity).lazyload('*').all()`
So, if you head that route, maybe you consider making `load()` a query
method that is really a synonym for `options(load())`?
I really think whatever the design is, it should be made syntactically
equivalent for relationships for consistency. For example:
If:
`sess.query(Entity).options(defer(Entity).undefer("foo", "bar"))`
Then also:
`sess.query(Entity).options(lazyloadall(Entity).joinedload("foo", "bar"))`
(I think you were agreeing, unless I didn't understand.)
When I was a new sqlalchemy user I didn't understand why we'd need two
sets of language in the first place: couldn't `defer()` and `load()`
operate polymorphically equally on a relationship property ''or'' a column
property? (I understand there are different loading strategies for
relationships, etc. so maybe it isn't feasible, but I thought I'd bring it
up because it was something I had thought of as a new user.)
Sorry, I know that isn't much help for pathing problems; I haven't given
that too much thought for how to better that (never really thought it was
too broken).
One other consideration: what about join points? If I have this:
`options(load(Entity).joined(Entity.subentity).joined(SubEntity.subsubentity))`
and if `Entity.subentity` and `Entity.subentity.subsubentity` refer to the
same table, will you be able to add a filter and specify which joinpoint?
As long as we are brainstorming, should filtering alternatively allow the
full path?
`.filter(Entity.subentity.x==2)` vs.
`.filter(Entity.subentity.subsubentity.x==2)`
or is that just too ugly to implement?
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1418#comment:12>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 20:17:26
|
#2798: query.update() and query.delete() need documentation/notes regarding joined
table inheritance / multi table updates
-----------------------------------+----------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: closed
Priority: highest | Milestone: 0.8.xx
Component: documentation | Severity: minor - half an hour
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+----------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => fixed
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2798#comment:2>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 20:12:21
|
#2779: Join order determinism in polymorphic loads
-----------------------------------+----------------------------------
Reporter: aelaguiz | Owner: zzzeek
Type: defect | Status: closed
Priority: high | Milestone: 0.8.xx
Component: orm | Severity: minor - half an hour
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+----------------------------------
Comment (by zzzeek):
I've gone to using WeakSequence in ra622305c0ba02c66e598f60fc (master)
r01aeeb96f9230637d49440cc (0.8)
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2779#comment:5>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 20:07:05
|
#2794: CircularDependencyError with jython because WeakSequence doesn't preserve
order
-----------------------------------+-----------------------------------
Reporter: sayap | Owner: zzzeek
Type: defect | Status: closed
Priority: highest | Milestone: 0.8.xx
Component: utils | Severity: trivial - <10 minutes
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+-----------------------------------
Changes (by zzzeek):
* status: reopened => closed
* resolution: => fixed
Comment:
ref73845ba773cbf4247355cde37aff8ca3b9f5f8
r9769628ac1c080dc69b3812bc546ff
also added an append() which I'm going to use for #2779
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2794#comment:9>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 20:00:40
|
#2794: CircularDependencyError with jython because WeakSequence doesn't preserve
order
-----------------------------------+-----------------------------------
Reporter: sayap | Owner: zzzeek
Type: defect | Status: reopened
Priority: highest | Milestone: 0.8.xx
Component: utils | Severity: trivial - <10 minutes
Resolution: | Keywords:
Progress State: completed/closed |
-----------------------------------+-----------------------------------
Changes (by zzzeek):
* status: closed => reopened
* resolution: fixed =>
Comment:
crap, I forgot to handle the reference being lost.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2794#comment:8>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 19:58:11
|
#2779: Join order determinism in polymorphic loads
-----------------------------------+----------------------------------
Reporter: aelaguiz | Owner: zzzeek
Type: defect | Status: closed
Priority: high | Milestone: 0.8.xx
Component: orm | Severity: minor - half an hour
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+----------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => fixed
* status_field: needs tests => completed/closed
Comment:
0.9 already had this as it was beginning to show up in unit tests that
compare SQL. backported to 0.8 in r6028f8234549ad7bd4377a3408.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2779#comment:4>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 19:39:00
|
#2794: CircularDependencyError with jython because WeakSequence doesn't preserve
order
-----------------------------------+-----------------------------------
Reporter: sayap | Owner: zzzeek
Type: defect | Status: closed
Priority: highest | Milestone: 0.8.xx
Component: utils | Severity: trivial - <10 minutes
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+-----------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => fixed
* status_field: in queue => completed/closed
Comment:
0.8
r17274222f1bd3b844faea4d848756ae3ee3545dd
r4b1ca23027493d8d1b7ea48d4585699b0d126d16
master
r676876f4668520af267d7db883d9486a8924b320
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2794#comment:7>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 19:17:21
|
#2798: query.update() and query.delete() need documentation/notes regarding joined
table inheritance / multi table updates
-----------------------------------+----------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: new
Priority: highest | Milestone: 0.8.xx
Component: documentation | Severity: minor - half an hour
Resolution: | Keywords:
Progress State: completed/closed |
-----------------------------------+----------------------------------
Changes (by zzzeek):
* status_field: in queue => completed/closed
Comment:
0.8:
re71c84729dec144935804500ae7dca5a96c4422a
rea787dceca65997f391ae0c6ff5759dcd2bc49ea
master:
rc5792c277bb658974baff9ddb5c00e589de10c99
r902e013ec127bbef29c3f609e8b8de835791b1d1
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2798#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 18:49:05
|
#2801: regression from uniticketed CTE changeset
-----------------------------------+----------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: closed
Priority: high | Milestone: 0.7.xx
Component: sql | Severity: minor - half an hour
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+----------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => fixed
* severity: major - 1-3 hours => minor - half an hour
* status_field: in queue => completed/closed
Comment:
rcc031065806c630f337271a26fc722fbc9f2a79a 0.7
r4f0bda7c455a642b505d6133002c4a5fb1e88876 0.8
r236db85f96e84fe099e63182bc4e67ceb65bd0d0 master
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2801#comment:2>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 17:05:15
|
#2805: pypy 2.0's test fails, sqlalchemy-0.8.2
-----------------------------------+------------------------------------
Reporter: idella4 | Owner: zzzeek
Type: defect | Status: closed
Priority: medium | Milestone: 0.8.xx
Component: tests | Severity: no triage selected yet
Resolution: wontfix | Keywords: tests
Progress State: completed/closed |
-----------------------------------+------------------------------------
Comment (by idella4):
ok, when I get it working. First attempt has fallen in a heap
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2805#comment:5>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 16:57:28
|
#2805: pypy 2.0's test fails, sqlalchemy-0.8.2
-----------------------------------+------------------------------------
Reporter: idella4 | Owner: zzzeek
Type: defect | Status: closed
Priority: medium | Milestone: 0.8.xx
Component: tests | Severity: no triage selected yet
Resolution: wontfix | Keywords: tests
Progress State: completed/closed |
-----------------------------------+------------------------------------
Comment (by zzzeek):
oh come on, pull requests are how we do open source now. Here, use
github, there's a cute cat there too: https://github.com/zzzeek/sqlalchemy
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2805#comment:4>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 15:11:02
|
#2805: pypy 2.0's test fails, sqlalchemy-0.8.2
-----------------------------------+------------------------------------
Reporter: idella4 | Owner: zzzeek
Type: defect | Status: closed
Priority: medium | Milestone: 0.8.xx
Component: tests | Severity: no triage selected yet
Resolution: wontfix | Keywords: tests
Progress State: completed/closed |
-----------------------------------+------------------------------------
Comment (by idella4):
zzzeek that's fine. Personally I find pull requests pretty cumbersome,
and seeing you say they're good in the future 0.9 I'm all the more
disinclined. However, how about a paste of the patch I'll make in here?
I'll be about a half hour or more
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2805#comment:3>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 14:13:55
|
#2805: pypy 2.0's test fails, sqlalchemy-0.8.2
-----------------------------------+------------------------------------
Reporter: idella4 | Owner: zzzeek
Type: defect | Status: closed
Priority: medium | Milestone: 0.8.xx
Component: tests | Severity: no triage selected yet
Resolution: wontfix | Keywords: tests
Progress State: completed/closed |
-----------------------------------+------------------------------------
Comment (by zzzeek):
I'll accept a pullrequest that marks all these tests as unsupported for
pypy in the 0.8 branch. have the unsupported note report "fixed in 0.9".
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2805#comment:2>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 14:12:27
|
#2805: pypy 2.0's test fails, sqlalchemy-0.8.2
-----------------------------------+------------------------------------
Reporter: idella4 | Owner: zzzeek
Type: defect | Status: closed
Priority: medium | Milestone: 0.8.xx
Component: tests | Severity: no triage selected yet
Resolution: wontfix | Keywords: tests
Progress State: completed/closed |
-----------------------------------+------------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => wontfix
* status_field: awaiting triage => completed/closed
Comment:
the unicode issue is technically on their end, it's
https://bugs.pypy.org/issue1573. We worked around this in
rd2a6238372bf8050b847f575581 which is where the rest of these tests were
made to work in 0.9. I'm not prepared to port
"check_unicode_description" to 0.8. Current tip passes all tests marked
enabled for pypy.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2805#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-18 12:43:03
|
#2805: pypy 2.0's test fails, sqlalchemy-0.8.2
---------------------+-----------------------------------------
Reporter: idella4 | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone: 0.8.xx
Component: tests | Severity: no triage selected yet
Keywords: tests | Progress State: awaiting triage
---------------------+-----------------------------------------
work/SQLAlchemy-0.8.2 $ PYTHONPATH=. pypy-c2.0 sqla_nose.py -I
test_postgresql
``python
======================================================================
ERROR: test.orm.test_unitofwork.UnicodeSchemaTest.test_inheritance_mapping
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/pypy2.0/site-packages/nose/case.py", line 197, in
runTest
self.test(*self.arg)
File "<string>", line 1, in <lambda>
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/testing/exclusions.py",
line 70, in decorate
return fn(*args, **kw)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/test/orm/test_unitofwork.py",
line 222, in test_inheritance_mapping
eq_([A(b=5), B(e=7)], session.query(A).all())
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/orm/query.py",
line 2237, in all
return list(self)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/orm/query.py",
line 2349, in __iter__
return self._execute_and_instances(context)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/orm/query.py",
line 2364, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 662, in execute
params)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 761, in _execute_clauseelement
compiled_sql, distilled_params
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 891, in _execute_context
result = context.get_result_proxy()
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/default.py",
line 655, in get_result_proxy
return result.ResultProxy(self)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 386, in __init__
self._init_metadata()
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 391, in _init_metadata
self._metadata = ResultMetaData(self, metadata)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 193, in __init__
colname = dialect._description_decoder(colname)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/processors.py",
line 66, in process
return decoder(value, errors)[0]
File "/usr/lib64/pypy2.0/lib-python/2.7/encodings/utf_8.py", line 16, in
decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
position 11: ordinal not in range(128)
======================================================================
ERROR: test.orm.test_unitofwork.UnicodeSchemaTest.test_mapping
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/pypy2.0/site-packages/nose/case.py", line 197, in
runTest
self.test(*self.arg)
File "<string>", line 1, in <lambda>
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/testing/exclusions.py",
line 70, in decorate
return fn(*args, **kw)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/test/orm/test_unitofwork.py",
line 182, in test_mapping
new_a1 = session.query(A).filter(t1.c.a == a1.a).one()
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/orm/query.py",
line 2306, in one
ret = list(self)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/orm/query.py",
line 2349, in __iter__
return self._execute_and_instances(context)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/orm/query.py",
line 2364, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 662, in execute
params)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 761, in _execute_clauseelement
compiled_sql, distilled_params
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 891, in _execute_context
result = context.get_result_proxy()
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/default.py",
line 655, in get_result_proxy
return result.ResultProxy(self)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 386, in __init__
self._init_metadata()
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 391, in _init_metadata
self._metadata = ResultMetaData(self, metadata)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 193, in __init__
colname = dialect._description_decoder(colname)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/processors.py",
line 66, in process
return decoder(value, errors)[0]
File "/usr/lib64/pypy2.0/lib-python/2.7/encodings/utf_8.py", line 16, in
decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
position 11: ordinal not in range(128)
======================================================================
ERROR: test.sql.test_unicode.UnicodeSchemaTest.test_insert
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/pypy2.0/site-packages/nose/case.py", line 197, in
runTest
self.test(*self.arg)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/test/sql/test_unicode.py",
line 82, in test_insert
assert t1.select().execute().fetchall() == [(1, 5)]
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/sql/expression.py",
line 3133, in execute
return e._execute_clauseelement(self, multiparams, params)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 1621, in _execute_clauseelement
return connection._execute_clauseelement(elem, multiparams, params)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 761, in _execute_clauseelement
compiled_sql, distilled_params
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 891, in _execute_context
result = context.get_result_proxy()
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/default.py",
line 655, in get_result_proxy
return result.ResultProxy(self)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 386, in __init__
self._init_metadata()
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 391, in _init_metadata
self._metadata = ResultMetaData(self, metadata)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 193, in __init__
colname = dialect._description_decoder(colname)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/processors.py",
line 66, in process
return decoder(value, errors)[0]
File "/usr/lib64/pypy2.0/lib-python/2.7/encodings/utf_8.py", line 16, in
decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
position 1: ordinal not in range(128)
======================================================================
ERROR: test.sql.test_unicode.UnicodeSchemaTest.test_reflect
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/pypy2.0/site-packages/nose/case.py", line 197, in
runTest
self.test(*self.arg)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/test/sql/test_unicode.py",
line 106, in test_reflect
self.assert_(tt1.select(order_by=desc(u'méil')).execute().fetchall()
==
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/sql/expression.py",
line 3133, in execute
return e._execute_clauseelement(self, multiparams, params)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 1621, in _execute_clauseelement
return connection._execute_clauseelement(elem, multiparams, params)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 761, in _execute_clauseelement
compiled_sql, distilled_params
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/base.py",
line 891, in _execute_context
result = context.get_result_proxy()
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/default.py",
line 655, in get_result_proxy
return result.ResultProxy(self)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 386, in __init__
self._init_metadata()
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 391, in _init_metadata
self._metadata = ResultMetaData(self, metadata)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/engine/result.py",
line 193, in __init__
colname = dialect._description_decoder(colname)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/processors.py",
line 66, in process
return decoder(value, errors)[0]
File "/usr/lib64/pypy2.0/lib-python/2.7/encodings/utf_8.py", line 16, in
decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
position 1: ordinal not in range(128)
======================================================================
FAIL: test.dialect.test_suite.LastrowidTest.test_native_lastrowid_autoinc
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/pypy2.0/site-packages/nose/case.py", line 197, in
runTest
self.test(*self.arg)
File "<string>", line 1, in <lambda>
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/testing/exclusions.py",
line 70, in decorate
return fn(*args, **kw)
File "/usr/lib64/pypy2.0/lib-python/2.7/contextlib.py", line 24, in
__exit__
self.gen.next()
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/testing/exclusions.py",
line 36, in fail_if
(name, self.predicate))
AssertionError: Unexpected success for 'test_native_lastrowid_autoinc'
(custom function)
======================================================================
FAIL: test.ext.test_serializer.SerializeTest.test_query_three
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/pypy2.0/site-packages/nose/case.py", line 197, in
runTest
self.test(*self.arg)
File "<string>", line 1, in <lambda>
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/testing/exclusions.py",
line 57, in decorate
return fn(*args, **kw)
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/test/ext/test_serializer.py",
line 133, in test_query_three
q2 = serializer.loads(serializer.dumps(q, -1), users.metadata,
File "/mnt/gen2/TmpDir/portage/dev-
python/sqlalchemy-0.8.2/work/SQLAlchemy-0.8.2-pypy2_0/./lib/sqlalchemy/ext/serializer.py",
line 164, in dumps
pickler.dump(obj)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 224, in dump
self.save(obj)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 419, in
save_reduce
save(state)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 653, in
save_dict
self._batch_setitems(obj.iteritems())
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 685, in
_batch_setitems
save(v)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 548, in
save_tuple
save(element)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 419, in
save_reduce
save(state)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 653, in
save_dict
self._batch_setitems(obj.iteritems())
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 685, in
_batch_setitems
save(v)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 419, in
save_reduce
save(state)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 653, in
save_dict
self._batch_setitems(obj.iteritems())
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 685, in
_batch_setitems
save(v)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 405, in
save_reduce
self.memoize(obj)
File "/usr/lib64/pypy2.0/lib_pypy/cPickle.py", line 112, in memoize
return PythonPickler.memoize(self, obj)
File "/usr/lib64/pypy2.0/lib-python/2.7/pickle.py", line 244, in memoize
assert id(obj) not in self.memo
AssertionError
----------------------------------------------------------------------
Ran 5071 tests in 896.234s
FAILED (SKIP=214, errors=4, failures=2)
``
/dev-python/pypy $ pypy-c2.0 -V
Python 2.7.3 (5acfe049a5b0cd0de158f62553a98f5ef364fd29, Jul 16 2013,
06:02:38)
[PyPy 2.0.2]
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2805>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-17 20:35:01
|
#1418: Flexible deferred interface
------------------------------+-------------------------------
Reporter: guest | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.0
Component: orm | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
------------------------------+-------------------------------
Comment (by zzzeek):
by allowing a `load()` object to be used as an entity, we can push for
this pattern:
{{{
class MyEntity(Base):
# ...
@classproperty
def index_cols(cls):
return load(cls).only("fast_col_one", "fast_col_two")
my_fast_query = sess.query(MyEntity.index_cols)
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1418#comment:11>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-17 20:33:20
|
#1418: Flexible deferred interface
------------------------------+-------------------------------
Reporter: guest | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.0
Component: orm | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
------------------------------+-------------------------------
Comment (by zzzeek):
the challenge here is that when we create this load thing, there's some
kind of object that the internals can query against, which is fast:
{{{
q = query(Entity).options(load(Entity).only("x", "y"))
# then internally, somehow this works:
current_path = PathContext(Entity, "z")
# is "deferred", without us needing to iterate through Entity four times.
# maybe if only() and other methods could load up the full loader strategy
# internally - then we'd do away with the dictionary crap in
StrategizedProperty.
query.context.strategy(current_path)
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1418#comment:10>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-17 20:26:45
|
#1418: Flexible deferred interface
------------------------------+-------------------------------
Reporter: guest | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.0
Component: orm | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
------------------------------+-------------------------------
Comment (by zzzeek):
this idea, replace the entire option functions entirely with a new kind of
registry that's more explicit and stateful. the old system would express
itself internally in terms of the new one. somehow get the Strategized
system to be faster with this.
{{{
options(load(Entity).defer("x", "y").joined("q", "p"))
options(load(Entity).joined("q").of_type(SubQ)) #
options(joinedload(Entity.q.of_type(SubQ))
# but we still need property.of_type() for any(), has(), join(), so can we
# still use it here? ok
options(load(Entity).joined(Entity.q.of_type(SubQ))
options(load(Entity).joined("subentity").joined("subsubentity"))
# now attribute pathing is like this:
options(load(Entity).joined(Entity.subentity).joined(SubEntity.subsubentity))
options(load(Entity).joined("subentity").joined("subsubentity"))
options(load(Entity).select("subentity").select("subsubentity").defer("x",
"y"))
options(load(Entity).only("x", "y"))
options(load(Entity).from_query()) # contains eager
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1418#comment:9>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-17 20:08:33
|
#1418: Flexible deferred interface
------------------------------+-------------------------------
Reporter: guest | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.0
Component: orm | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
------------------------------+-------------------------------
Changes (by zzzeek):
* milestone: 0.x.xx => 0.9.0
Comment:
maybe if we enhance the path system a bit, we can work up compositions, so
a "defer all but" would do this:
{{{
sess.query(Entity).options(defer(Entity), undefer(Entity.foo),
undefer(Entity.bar))
}}}
that is we enhance the option system to somehow expand out given an entity
class instead of an attribute. more syntax ideas:
{{{
sess.query(Entity).options(defer(Entity).undefer("foo", "bar"))
# can we figure out the damn *keys thing with defer()/undefer()?
separate strings
# should really mean multiple keys...
sess.query(Entity).options(undefer("foo", "bar"))
# .. but then this doesn't work, sigh. the problem is pathing.
# we've never worked out a coherent pathing system. sucks
sess.query(Entity).options(undefer(Entity.widget, Widget.bars))
sess.query(as_entity(Entity.foo, Entity.bar))
sess.query(defer(Entity).undefer("foo", "bar")) # less typing, basically
need to add some interface to Query
# that accepts an option
and turns it into an entity + option
# pathing has to keep working too
sess.query(Entity).options(defer("widgets.bats").undefer("foo", "bar"))
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1418#comment:8>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-16 13:59:16
|
Batch modification to #2802, #2803 by zzzeek: priority to high milestone to 0.8.xx -- Tickets URL: <http://www.sqlalchemy.org/trac/query?id=2802%2C2803> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
|
From: sqlalchemy <mi...@zz...> - 2013-08-16 13:58:13
|
#2804: coerce_to_bool for where(), having(), etc.
-------------------------+------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.0
Component: sql | Severity: major - 1-3 hours
Keywords: | Progress State: in queue
-------------------------+------------------------------------
so that expressions like select().where(table.c.booleancol) have a hook to
evaluate into "booleancol == 1" (also what does a negation do at the
moment, "NOT 1" ?). see how bad this would be for 0.9.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2804>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-08-15 21:02:34
|
#2581: PostgreSQL-9.2 JSON datatype
------------------------------+-------------------------------
Reporter: plaes | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.8.xx
Component: postgres | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
------------------------------+-------------------------------
Comment (by aadis):
Any news :)
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2581#comment:12>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|