sqlalchemy-tickets Mailing List for SQLAlchemy (Page 87)
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-07-12 14:43:34
|
#2776: OracleDialect.initialize() KeyError with Oracle 8i
-----------------------------------+-------------------------------
Reporter: kentbower | Owner: zzzeek
Type: defect | Status: closed
Priority: high | Milestone: 0.8.xx
Component: oracle | Severity: major - 1-3 hours
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+-------------------------------
Comment (by zzzeek):
yup, r269a166b73a84914b8601b3a714d682ef7eb87f5 r1e332e03d3943b59e, thanks
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2776#comment:9>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-12 14:36:05
|
#2780: str() call in make_proxy can get in the way w/ dialect specific operators
---------------------+------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: new
Priority: highest | Milestone: 0.8.xx
Component: sql | Severity: major - 1-3 hours
Keywords: | Progress State: in progress
---------------------+------------------------------------
{{{
when I use .order_by(SmtObject.array_field[3]) without .limit(50) or
limit(any_num) without order(array_field[index]) dialect is
sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at....
sometimes.
But using .order_by(SmtObject.array_field[3]).limit(50) both direct to
exception:
File "/Users/aterentev/lamoda/apilib/develop.py", line 37, in
for p in session.query(Product).filter(Product.id >
100000).order_by(Product.sortings[3]).limit(60):
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/orm/query.py", line 2212, in iter
context = self._compile_context()
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/orm/query.py", line 2561, in compile_context
context.statement = self._compound_eager_statement(context)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/orm/query.py", line 2618, in _compound_eager_statement
eager_join, eager_join.stop_on)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/util.py", line 608, in splice_joins
right.onclause = adapter.traverse(right.onclause)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/visitors.py", line 197, in traverse
return replacement_traverse(obj, self._traverse_options__, replace)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/visitors.py", line 305, in replacement_traverse
obj = clone(obj, **opts)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/visitors.py", line 294, in clone
newelem = replace(elem)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/visitors.py", line 194, in replace
e = v.replace(elem)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/util.py", line 843, in replace
return self._corresponding_column(col, True)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/util.py", line 820, in corresponding_column
require_embedded=require_embedded)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/expression.py", line 2730, in corresponding_column
if self.c.contains_column(column):
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/util/langhelpers.py", line 614, in __get_
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/expression.py", line 2804, in columns
self._populate_column_collection()
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/expression.py", line 4079, in
populate_column_collection
for col in self.element.columns:
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/util/langhelpers.py", line 614, in __get_
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/expression.py", line 2804, in columns
self._populate_column_collection()
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/expression.py", line 5846, in
populate_column_collection
name_is_truncatable=True)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/expression.py", line 2350, in _make_proxy
key = str(self)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/expression.py", line 1920, in __str_
return unicode(self.compile()).encode('ascii', 'backslashreplace')
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/expression.py", line 1908, in compile
return self._compiler(dialect, bind=bind, **kw)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/expression.py", line 1914, in compiler
return dialect.statement_compiler(dialect, self, **kw)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/compiler.py", line 289, in __init_
engine.Compiled.__init__(self, dialect, statement, **kwargs)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/engine/interfaces.py", line 787, in init
self.string = self.process(self.statement, **compile_kwargs)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/engine/interfaces.py", line 806, in process
return obj._compiler_dispatch(self, **kwargs)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/visitors.py", line 74, in _compiler_dispatch
return getter(visitor)(self, **kw)
File "/Users/aterentev/lamoda/apipy/lib/python2.7/site-
packages/sqlalchemy/sql/compiler.py", line 660, in visit_binary
OPERATORS[operator], **kw)
KeyError: <built-in function getitem>
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2780>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-12 13:14:13
|
#2776: OracleDialect.initialize() KeyError with Oracle 8i
-----------------------------------+-------------------------------
Reporter: kentbower | Owner: zzzeek
Type: defect | Status: closed
Priority: high | Milestone: 0.8.xx
Component: oracle | Severity: major - 1-3 hours
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+-------------------------------
Comment (by kentbower):
Certainly stops Dialect.initialize() from being invoked again, thanks!
P.S. Not functionally important, but in
`lib/sqlalchemy/util/langhelpers.py` you stuck the `def only_once()`
decorator in between the `chop_traceback()` definition and its constants:
{{{
#!python
_SQLA_RE = re.compile(r'sqlalchemy/([a-z_]+/){0,2}[a-z_]+\.py')
_UNITTEST_RE = re.compile(r'unit(?:2|test2?/)')
def chop_traceback(tb, exclude_prefix=_UNITTEST_RE,
exclude_suffix=_SQLA_RE):
...
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2776#comment:8>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-11 19:40:51
|
#2779: Join order determinism in polymorphic loads
----------------------------------+------------------------------------
Reporter: aelaguiz | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone:
Component: cextensions | Severity: no triage selected yet
Resolution: | Keywords:
Progress State: awaiting triage |
----------------------------------+------------------------------------
Comment (by zzzeek):
the current spot where ordering isn't deterministic on this one appears to
be:
{{{
#!diff
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -1798,7 +1798,7 @@ class Mapper(_InspectionAttr):
while stack:
item = stack.popleft()
descendants.append(item)
- stack.extend(item._inheriting_mappers)
+ stack.extend(sorted(item._inheriting_mappers, key=lambda m:
m.class_.__name__))
return util.WeakSequence(descendants)
def polymorphic_iterator(self):
}}}
but I'd want to look into the best way for this list to be sorted, perhaps
even using WeakSequence for item._inheriting_mappers in the first place.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2779#comment:2>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-11 19:17:59
|
#2776: OracleDialect.initialize() KeyError with Oracle 8i
-----------------------------------+-------------------------------
Reporter: kentbower | Owner: zzzeek
Type: defect | Status: closed
Priority: high | Milestone: 0.8.xx
Component: oracle | Severity: major - 1-3 hours
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+-------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => fixed
* status_field: in queue => completed/closed
Comment:
OK...well should be resolved:
r9a95a39b49a2fadb3e1674d083d7c3da2fd886a8 0.8.3
rfd55be01ddc0ab41dd9469c master
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2776#comment:7>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-11 19:07:25
|
#2779: Join order determinism in polymorphic loads
----------------------------------+------------------------------------
Reporter: aelaguiz | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone:
Component: cextensions | Severity: no triage selected yet
Resolution: | Keywords:
Progress State: awaiting triage |
----------------------------------+------------------------------------
Comment (by aelaguiz):
I noticed that between runs my cache hit rate using dogpile query caching
could change without any of the underlying data structures changing, after
digging in what I found was the join order on my polymorphic classes is
not deterministic.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2779#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-11 19:06:55
|
#2779: Join order determinism in polymorphic loads
-------------------------+-----------------------------------------
Reporter: aelaguiz | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone:
Component: cextensions | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
-------------------------+-----------------------------------------
Run 1:
SELECT entities.id AS entities_id, entities.parent_id AS
entities_parent_id, entities.type_id AS entities_type_id, entities.name AS
entities_name, entities.created_at AS entities_created_at,
entities.hotness AS entities_hotness, entities.hotness_dirty AS
entities_hotness_dirty, entities.modified_at AS entities_modified_at,
entities.up_votes AS entities_up_votes, entities.down_votes AS
entities_down_votes, categories.id AS categories_id, videos.id AS
videos_id, videos.video_type_id AS videos_video_type_id, videos.poster_id
AS videos_poster_id, videos.key AS videos_key, clubs.id AS clubs_id,
brands.id AS brands_id, pcp_points.id AS pcp_points_id,
pcp_points.poster_id AS pcp_points_poster_id, pcp_points.subject_id AS
pcp_points_subject_id, pcp_points.is_point AS pcp_points_is_point,
pcp_points.body AS pcp_points_body, pcp_points.origin_url AS
pcp_points_origin_url, tags.id AS tags_id, pcp_vote_targets.id AS
pcp_vote_targets_id, stufff_images.id AS stufff_images_id,
stufff_images.image_id AS stufff_images_image_id, stufff_images.poster_id
AS stufff_images_poster_id, stufff_images.source AS stufff_images_source,
link_posts.id AS link_posts_id, link_posts.url AS link_posts_url,
link_posts.edited_at AS link_posts_edited_at, link_posts.poster_id AS
link_posts_poster_id, users.id AS users_id, users.email AS users_email,
users.username AS users_username, users.first_name AS users_first_name,
users.last_name AS users_last_name, users.picture AS users_picture,
users.origin_url AS users_origin_url, users.city AS users_city,
users.state AS users_state, users.country AS users_country, users.gender
AS users_gender, users.password AS users_password, users.bio AS users_bio,
users.email_verified AS users_email_verified, users.email_validation AS
users_email_validation, users.temp_password AS users_temp_password,
users.temp_password_expiry AS users_temp_password_expiry, users.active AS
users_active, users.admin AS users_admin, users.reputation AS
users_reputation, text_posts.id AS text_posts_id, text_posts.body AS
text_posts_body, text_posts.edited_at AS text_posts_edited_at,
text_posts.poster_id AS text_posts_poster_id, products.id AS products_id,
pcp_posts.id AS pcp_posts_id, pcp_posts.poster_id AS pcp_posts_poster_id,
pcp_posts.subject_id_1 AS pcp_posts_subject_id_1, pcp_posts.subject_id_2
AS pcp_posts_subject_id_2, pcp_posts.vote_id_1 AS pcp_posts_vote_id_1,
pcp_posts.vote_id_2 AS pcp_posts_vote_id_2, pcp_posts.top_point_id AS
pcp_posts_top_point_id, comments.id AS comments_id, comments.body AS
comments_body, comments.poster_id AS comments_poster_id, anon_1.users_id
AS anon_1_users_id, anon_1.entities_id AS anon_1_entities_id,
anon_1.entities_parent_id AS anon_1_entities_parent_id,
anon_1.entities_type_id AS anon_1_entities_type_id, anon_1.entities_name
AS anon_1_entities_name, anon_1.entities_created_at AS
anon_1_entities_created_at, anon_1.entities_hotness AS
anon_1_entities_hotness, anon_1.entities_hotness_dirty AS
anon_1_entities_hotness_dirty, anon_1.entities_modified_at AS
anon_1_entities_modified_at, anon_1.entities_up_votes AS
anon_1_entities_up_votes, anon_1.entities_down_votes AS
anon_1_entities_down_votes, anon_1.users_email AS anon_1_users_email,
anon_1.users_username AS anon_1_users_username, anon_1.users_first_name AS
anon_1_users_first_name, anon_1.users_last_name AS anon_1_users_last_name,
anon_1.users_picture AS anon_1_users_picture, anon_1.users_origin_url AS
anon_1_users_origin_url, anon_1.users_city AS anon_1_users_city,
anon_1.users_state AS anon_1_users_state, anon_1.users_country AS
anon_1_users_country, anon_1.users_gender AS anon_1_users_gender,
anon_1.users_password AS anon_1_users_password, anon_1.users_bio AS
anon_1_users_bio, anon_1.users_email_verified AS
anon_1_users_email_verified, anon_1.users_email_validation AS
anon_1_users_email_validation, anon_1.users_temp_password AS
anon_1_users_temp_password, anon_1.users_temp_password_expiry AS
anon_1_users_temp_password_expiry, anon_1.users_active AS
anon_1_users_active, anon_1.users_admin AS anon_1_users_admin,
anon_1.users_reputation AS anon_1_users_reputation, anon_2.users_id AS
anon_2_users_id, anon_2.entities_id AS anon_2_entities_id,
anon_2.entities_parent_id AS anon_2_entities_parent_id,
anon_2.entities_type_id AS anon_2_entities_type_id, anon_2.entities_name
AS anon_2_entities_name, anon_2.entities_created_at AS
anon_2_entities_created_at, anon_2.entities_hotness AS
anon_2_entities_hotness, anon_2.entities_hotness_dirty AS
anon_2_entities_hotness_dirty, anon_2.entities_modified_at AS
anon_2_entities_modified_at, anon_2.entities_up_votes AS
anon_2_entities_up_votes, anon_2.entities_down_votes AS
anon_2_entities_down_votes, anon_2.users_email AS anon_2_users_email,
anon_2.users_username AS anon_2_users_username, anon_2.users_first_name AS
anon_2_users_first_name, anon_2.users_last_name AS anon_2_users_last_name,
anon_2.users_picture AS anon_2_users_picture, anon_2.users_origin_url AS
anon_2_users_origin_url, anon_2.users_city AS anon_2_users_city,
anon_2.users_state AS anon_2_users_state, anon_2.users_country AS
anon_2_users_country, anon_2.users_gender AS anon_2_users_gender,
anon_2.users_password AS anon_2_users_password, anon_2.users_bio AS
anon_2_users_bio, anon_2.users_email_verified AS
anon_2_users_email_verified, anon_2.users_email_validation AS
anon_2_users_email_validation, anon_2.users_temp_password AS
anon_2_users_temp_password, anon_2.users_temp_password_expiry AS
anon_2_users_temp_password_expiry, anon_2.users_active AS
anon_2_users_active, anon_2.users_admin AS anon_2_users_admin,
anon_2.users_reputation AS anon_2_users_reputation
FROM associated_view, entities LEFT OUTER JOIN categories ON entities.id =
categories.id LEFT OUTER JOIN videos ON entities.id = videos.id LEFT OUTER
JOIN clubs ON entities.id = clubs.id LEFT OUTER JOIN brands ON entities.id
= brands.id LEFT OUTER JOIN pcp_points ON pcp_points.id = entities.id LEFT
OUTER JOIN tags ON entities.id = tags.id LEFT OUTER JOIN pcp_vote_targets
ON entities.id = pcp_vote_targets.id LEFT OUTER JOIN stufff_images ON
entities.id = stufff_images.id LEFT OUTER JOIN link_posts ON entities.id =
link_posts.id LEFT OUTER JOIN users ON entities.id = users.id LEFT OUTER
JOIN text_posts ON entities.id = text_posts.id LEFT OUTER JOIN products ON
entities.id = products.id LEFT OUTER JOIN pcp_posts ON pcp_posts.id =
entities.id LEFT OUTER JOIN comments ON entities.id = comments.id LEFT
OUTER JOIN (SELECT entities.id AS entities_id, entities.parent_id AS
entities_parent_id, entities.type_id AS entities_type_id, entities.name AS
entities_name, entities.created_at AS entities_created_at,
entities.hotness AS entities_hotness, entities.hotness_dirty AS
entities_hotness_dirty, entities.modified_at AS entities_modified_at,
entities.up_votes AS entities_up_votes, entities.down_votes AS
entities_down_votes, users.id AS users_id, users.email AS users_email,
users.username AS users_username, users.first_name AS users_first_name,
users.last_name AS users_last_name, users.picture AS users_picture,
users.origin_url AS users_origin_url, users.city AS users_city,
users.state AS users_state, users.country AS users_country, users.gender
AS users_gender, users.password AS users_password, users.bio AS users_bio,
users.email_verified AS users_email_verified, users.email_validation AS
users_email_validation, users.temp_password AS users_temp_password,
users.temp_password_expiry AS users_temp_password_expiry, users.active AS
users_active, users.admin AS users_admin, users.reputation AS
users_reputation
FROM entities JOIN users ON entities.id = users.id) AS anon_1 ON
anon_1.users_id = pcp_points.poster_id LEFT OUTER JOIN (SELECT entities.id
AS entities_id, entities.parent_id AS entities_parent_id, entities.type_id
AS entities_type_id, entities.name AS entities_name, entities.created_at
AS entities_created_at, entities.hotness AS entities_hotness,
entities.hotness_dirty AS entities_hotness_dirty, entities.modified_at AS
entities_modified_at, entities.up_votes AS entities_up_votes,
entities.down_votes AS entities_down_votes, users.id AS users_id,
users.email AS users_email, users.username AS users_username,
users.first_name AS users_first_name, users.last_name AS users_last_name,
users.picture AS users_picture, users.origin_url AS users_origin_url,
users.city AS users_city, users.state AS users_state, users.country AS
users_country, users.gender AS users_gender, users.password AS
users_password, users.bio AS users_bio, users.email_verified AS
users_email_verified, users.email_validation AS users_email_validation,
users.temp_password AS users_temp_password, users.temp_password_expiry AS
users_temp_password_expiry, users.active AS users_active, users.admin AS
users_admin, users.reputation AS users_reputation
FROM entities JOIN users ON entities.id = users.id) AS anon_2 ON
anon_2.users_id = pcp_posts.poster_id
WHERE :param_1 = associated_view.left_id AND pcp_posts.id =
associated_view.right_id 375
Run 2:
SELECT entities.id AS entities_id, entities.parent_id AS
entities_parent_id, entities.type_id AS entities_type_id, entities.name AS
entities_name, entities.created_at AS entities_created_at,
entities.hotness AS entities_hotness, entities.hotness_dirty AS
entities_hotness_dirty, entities.modified_at AS entities_modified_at,
entities.up_votes AS entities_up_votes, entities.down_votes AS
entities_down_votes, videos.id AS videos_id, videos.video_type_id AS
videos_video_type_id, videos.poster_id AS videos_poster_id, videos.key AS
videos_key, clubs.id AS clubs_id, brands.id AS brands_id, categories.id AS
categories_id, comments.id AS comments_id, comments.body AS comments_body,
comments.poster_id AS comments_poster_id, tags.id AS tags_id,
pcp_vote_targets.id AS pcp_vote_targets_id, pcp_posts.id AS pcp_posts_id,
pcp_posts.poster_id AS pcp_posts_poster_id, pcp_posts.subject_id_1 AS
pcp_posts_subject_id_1, pcp_posts.subject_id_2 AS pcp_posts_subject_id_2,
pcp_posts.vote_id_1 AS pcp_posts_vote_id_1, pcp_posts.vote_id_2 AS
pcp_posts_vote_id_2, pcp_posts.top_point_id AS pcp_posts_top_point_id,
link_posts.id AS link_posts_id, link_posts.url AS link_posts_url,
link_posts.edited_at AS link_posts_edited_at, link_posts.poster_id AS
link_posts_poster_id, users.id AS users_id, users.email AS users_email,
users.username AS users_username, users.first_name AS users_first_name,
users.last_name AS users_last_name, users.picture AS users_picture,
users.origin_url AS users_origin_url, users.city AS users_city,
users.state AS users_state, users.country AS users_country, users.gender
AS users_gender, users.password AS users_password, users.bio AS users_bio,
users.email_verified AS users_email_verified, users.email_validation AS
users_email_validation, users.temp_password AS users_temp_password,
users.temp_password_expiry AS users_temp_password_expiry, users.active AS
users_active, users.admin AS users_admin, users.reputation AS
users_reputation, text_posts.id AS text_posts_id, text_posts.body AS
text_posts_body, text_posts.edited_at AS text_posts_edited_at,
text_posts.poster_id AS text_posts_poster_id, products.id AS products_id,
stufff_images.id AS stufff_images_id, stufff_images.image_id AS
stufff_images_image_id, stufff_images.poster_id AS
stufff_images_poster_id, stufff_images.source AS stufff_images_source,
pcp_points.id AS pcp_points_id, pcp_points.poster_id AS
pcp_points_poster_id, pcp_points.subject_id AS pcp_points_subject_id,
pcp_points.is_point AS pcp_points_is_point, pcp_points.body AS
pcp_points_body, pcp_points.origin_url AS pcp_points_origin_url,
anon_1.users_id AS anon_1_users_id, anon_1.entities_id AS
anon_1_entities_id, anon_1.entities_parent_id AS
anon_1_entities_parent_id, anon_1.entities_type_id AS
anon_1_entities_type_id, anon_1.entities_name AS anon_1_entities_name,
anon_1.entities_created_at AS anon_1_entities_created_at,
anon_1.entities_hotness AS anon_1_entities_hotness,
anon_1.entities_hotness_dirty AS anon_1_entities_hotness_dirty,
anon_1.entities_modified_at AS anon_1_entities_modified_at,
anon_1.entities_up_votes AS anon_1_entities_up_votes,
anon_1.entities_down_votes AS anon_1_entities_down_votes,
anon_1.users_email AS anon_1_users_email, anon_1.users_username AS
anon_1_users_username, anon_1.users_first_name AS anon_1_users_first_name,
anon_1.users_last_name AS anon_1_users_last_name, anon_1.users_picture AS
anon_1_users_picture, anon_1.users_origin_url AS anon_1_users_origin_url,
anon_1.users_city AS anon_1_users_city, anon_1.users_state AS
anon_1_users_state, anon_1.users_country AS anon_1_users_country,
anon_1.users_gender AS anon_1_users_gender, anon_1.users_password AS
anon_1_users_password, anon_1.users_bio AS anon_1_users_bio,
anon_1.users_email_verified AS anon_1_users_email_verified,
anon_1.users_email_validation AS anon_1_users_email_validation,
anon_1.users_temp_password AS anon_1_users_temp_password,
anon_1.users_temp_password_expiry AS anon_1_users_temp_password_expiry,
anon_1.users_active AS anon_1_users_active, anon_1.users_admin AS
anon_1_users_admin, anon_1.users_reputation AS anon_1_users_reputation,
anon_2.users_id AS anon_2_users_id, anon_2.entities_id AS
anon_2_entities_id, anon_2.entities_parent_id AS
anon_2_entities_parent_id, anon_2.entities_type_id AS
anon_2_entities_type_id, anon_2.entities_name AS anon_2_entities_name,
anon_2.entities_created_at AS anon_2_entities_created_at,
anon_2.entities_hotness AS anon_2_entities_hotness,
anon_2.entities_hotness_dirty AS anon_2_entities_hotness_dirty,
anon_2.entities_modified_at AS anon_2_entities_modified_at,
anon_2.entities_up_votes AS anon_2_entities_up_votes,
anon_2.entities_down_votes AS anon_2_entities_down_votes,
anon_2.users_email AS anon_2_users_email, anon_2.users_username AS
anon_2_users_username, anon_2.users_first_name AS anon_2_users_first_name,
anon_2.users_last_name AS anon_2_users_last_name, anon_2.users_picture AS
anon_2_users_picture, anon_2.users_origin_url AS anon_2_users_origin_url,
anon_2.users_city AS anon_2_users_city, anon_2.users_state AS
anon_2_users_state, anon_2.users_country AS anon_2_users_country,
anon_2.users_gender AS anon_2_users_gender, anon_2.users_password AS
anon_2_users_password, anon_2.users_bio AS anon_2_users_bio,
anon_2.users_email_verified AS anon_2_users_email_verified,
anon_2.users_email_validation AS anon_2_users_email_validation,
anon_2.users_temp_password AS anon_2_users_temp_password,
anon_2.users_temp_password_expiry AS anon_2_users_temp_password_expiry,
anon_2.users_active AS anon_2_users_active, anon_2.users_admin AS
anon_2_users_admin, anon_2.users_reputation AS anon_2_users_reputation
FROM associated_view, entities LEFT OUTER JOIN videos ON entities.id =
videos.id LEFT OUTER JOIN clubs ON entities.id = clubs.id LEFT OUTER JOIN
brands ON entities.id = brands.id LEFT OUTER JOIN categories ON
entities.id = categories.id LEFT OUTER JOIN comments ON entities.id =
comments.id LEFT OUTER JOIN tags ON entities.id = tags.id LEFT OUTER JOIN
pcp_vote_targets ON entities.id = pcp_vote_targets.id LEFT OUTER JOIN
pcp_posts ON pcp_posts.id = entities.id LEFT OUTER JOIN link_posts ON
entities.id = link_posts.id LEFT OUTER JOIN users ON entities.id =
users.id LEFT OUTER JOIN text_posts ON entities.id = text_posts.id LEFT
OUTER JOIN products ON entities.id = products.id LEFT OUTER JOIN
stufff_images ON entities.id = stufff_images.id LEFT OUTER JOIN pcp_points
ON pcp_points.id = entities.id LEFT OUTER JOIN (SELECT entities.id AS
entities_id, entities.parent_id AS entities_parent_id, entities.type_id AS
entities_type_id, entities.name AS entities_name, entities.created_at AS
entities_created_at, entities.hotness AS entities_hotness,
entities.hotness_dirty AS entities_hotness_dirty, entities.modified_at AS
entities_modified_at, entities.up_votes AS entities_up_votes,
entities.down_votes AS entities_down_votes, users.id AS users_id,
users.email AS users_email, users.username AS users_username,
users.first_name AS users_first_name, users.last_name AS users_last_name,
users.picture AS users_picture, users.origin_url AS users_origin_url,
users.city AS users_city, users.state AS users_state, users.country AS
users_country, users.gender AS users_gender, users.password AS
users_password, users.bio AS users_bio, users.email_verified AS
users_email_verified, users.email_validation AS users_email_validation,
users.temp_password AS users_temp_password, users.temp_password_expiry AS
users_temp_password_expiry, users.active AS users_active, users.admin AS
users_admin, users.reputation AS users_reputation
FROM entities JOIN users ON entities.id = users.id) AS anon_1 ON
anon_1.users_id = pcp_posts.poster_id LEFT OUTER JOIN (SELECT entities.id
AS entities_id, entities.parent_id AS entities_parent_id, entities.type_id
AS entities_type_id, entities.name AS entities_name, entities.created_at
AS entities_created_at, entities.hotness AS entities_hotness,
entities.hotness_dirty AS entities_hotness_dirty, entities.modified_at AS
entities_modified_at, entities.up_votes AS entities_up_votes,
entities.down_votes AS entities_down_votes, users.id AS users_id,
users.email AS users_email, users.username AS users_username,
users.first_name AS users_first_name, users.last_name AS users_last_name,
users.picture AS users_picture, users.origin_url AS users_origin_url,
users.city AS users_city, users.state AS users_state, users.country AS
users_country, users.gender AS users_gender, users.password AS
users_password, users.bio AS users_bio, users.email_verified AS
users_email_verified, users.email_validation AS users_email_validation,
users.temp_password AS users_temp_password, users.temp_password_expiry AS
users_temp_password_expiry, users.active AS users_active, users.admin AS
users_admin, users.reputation AS users_reputation
FROM entities JOIN users ON entities.id = users.id) AS anon_2 ON
anon_2.users_id = pcp_points.poster_id
WHERE :param_1 = associated_view.left_id AND pcp_posts.id =
associated_view.right_id 375
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2779>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-11 13:45:42
|
#2778: per-attribute callables due to options, possible reorg to remove
performance overhead
--------------------+--------------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone: 0.9.0
Component: orm | Severity: very major - up to 2 days
Keywords: | Progress State: in queue
--------------------+--------------------------------------------
e.g.
{{{
827855 15.668 0.000 27.068 0.000 …/SQLAlchemy-0.8.1-py2.6
-linux-
x86_64.egg/sqlalchemy/orm/strategies.py:184(set_deferred_for_local_state)
827855 10.524 0.000 10.524 0.000 …/SQLAlchemy-0.8.1-py2.6
-linux-x86_64.egg/sqlalchemy/orm/strategies.py:259(__init__)
}}}
so here we'd want to see how to have an unloaded attribute's default lazy
callable routine access what was set up for the query that loaded this. I
think the mapper's loading of the state would have to assemble some aspect
of the QueryContext into each state, which is then consulted by the
instancestate before we do deferred_scalar_loader. for LazyLoader the
issue might be a little different.
something to look into for 0.9 though not critical
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2778>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-11 13:37:05
|
#2776: OracleDialect.initialize() KeyError with Oracle 8i
----------------------------+-------------------------------
Reporter: kentbower | Owner: zzzeek
Type: defect | Status: new
Priority: high | Milestone: 0.8.xx
Component: oracle | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
----------------------------+-------------------------------
Comment (by kentbower):
let me know if i could/should help on this ticket.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2776#comment:6>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-11 00:55:37
|
#2777: update class-level mapper event docs
---------------------------+---------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: new
Priority: high | Milestone: 0.8.xx
Component: documentation | Severity: minor - half an hour
Keywords: | Progress State: in queue
---------------------------+---------------------------------------
"This listener can generally only be applied to the Mapper class overall."
- incorrect, you can apply instrument_class to an abstract base as well.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2777>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-09 23:26:57
|
#2776: OracleDialect.initialize() KeyError with Oracle 8i
----------------------------+-------------------------------
Reporter: kentbower | Owner: zzzeek
Type: defect | Status: new
Priority: high | Milestone: 0.8.xx
Component: oracle | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
----------------------------+-------------------------------
Comment (by zzzeek):
i've attached a unit test for this.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2776#comment:5>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-09 20:43:18
|
#2776: OracleDialect.initialize() KeyError with Oracle 8i
----------------------------+-------------------------------
Reporter: kentbower | Owner: zzzeek
Type: defect | Status: new
Priority: high | Milestone: 0.8.xx
Component: oracle | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
----------------------------+-------------------------------
Comment (by kentbower):
Note that I ran this test on an Oracle 10 database and bounced the
database. The same dialect object's initialize() ''was'' invoked a
subsequent time and it continued working fine thereafter. So apparently,
this works this way "normally" but the oracle 8 clause is messing it up:
{{{
[Mon Jul 08 22:52:39 2013] [error] ##### initialize for
<sqlalchemy.dialects.oracle.cx_oracle.OracleDialect_cx_oracle object at
0x2aefaf22d590> (47208923846032)
[Mon Jul 08 22:54:02 2013] [error] ##### initialize for
<sqlalchemy.dialects.oracle.cx_oracle.OracleDialect_cx_oracle object at
0x2aefaf22d590> (47208923846032)
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2776#comment:4>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-09 20:37:18
|
#2776: OracleDialect.initialize() KeyError with Oracle 8i
----------------------------+-------------------------------
Reporter: kentbower | Owner: zzzeek
Type: defect | Status: new
Priority: high | Milestone: 0.8.xx
Component: oracle | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
----------------------------+-------------------------------
Changes (by zzzeek):
* priority: medium => high
* milestone: => 0.8.xx
* severity: no triage selected yet => major - 1-3 hours
* status_field: awaiting triage => in queue
Comment:
intiialize() on a dialect shouldn't be called more than once, so if this
is a side effect of engine.dispose(), I'd want to look into that at a more
fundamental level.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2776#comment:3>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-09 18:13:27
|
#2776: OracleDialect.initialize() KeyError with Oracle 8i
----------------------------------+------------------------------------
Reporter: kentbower | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone:
Component: oracle | Severity: no triage selected yet
Resolution: | Keywords:
Progress State: awaiting triage |
----------------------------------+------------------------------------
Comment (by kentbower):
Note that this was preceded by `OperationalError: (OperationalError)
ORA-03113: end-of-file on communication channel`, but the question is:
does SQLAlchemy usually have no problem reconnecting and this is an Oracle
8i problem because of the pop code above?
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2776#comment:2>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-09 18:07:53
|
#2776: OracleDialect.initialize() KeyError with Oracle 8i
----------------------------------+------------------------------------
Reporter: kentbower | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone:
Component: oracle | Severity: no triage selected yet
Resolution: | Keywords:
Progress State: awaiting triage |
----------------------------------+------------------------------------
Changes (by kentbower):
* cc: dev@… (added)
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2776#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-09 18:07:16
|
#2776: OracleDialect.initialize() KeyError with Oracle 8i
-----------------------+-----------------------------------------
Reporter: kentbower | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone:
Component: oracle | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
-----------------------+-----------------------------------------
Occasionally we've hit this `KeyError` with Oracle 8i:
{{{
return Query.__iter__(self)
File 'build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py', line 2205 in
__iter__
File 'build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py', line 2218 in
_execute_and_instances
File 'build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py', line 2209 in
_connection_from_session
File 'build/bdist.linux-x86_64/egg/sqlalchemy/orm/session.py', line 732 in
connection
File 'build/bdist.linux-x86_64/egg/sqlalchemy/orm/session.py', line 736 in
_connection_for_bind
File 'build/bdist.linux-x86_64/egg/sqlalchemy/orm/session.py', line 266 in
_connection_for_bind
File 'build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py', line 2476
in contextual_connect
File 'build/bdist.linux-x86_64/egg/sqlalchemy/pool.py', line 224 in
connect
File 'build/bdist.linux-x86_64/egg/sqlalchemy/pool.py', line 387 in
__init__
File 'build/bdist.linux-x86_64/egg/sqlalchemy/pool.py', line 739 in
_do_get
File 'build/bdist.linux-x86_64/egg/sqlalchemy/pool.py', line 188 in
_create_connection
File 'build/bdist.linux-x86_64/egg/sqlalchemy/pool.py', line 273 in
__init__
File 'build/bdist.linux-x86_64/egg/sqlalchemy/event.py', line 282 in
exec_once
File 'build/bdist.linux-x86_64/egg/sqlalchemy/event.py', line 291 in
__call__
File 'build/bdist.linux-x86_64/egg/sqlalchemy/engine/strategies.py', line
167 in first_connect
File 'build/bdist.linux-
x86_64/egg/sqlalchemy/dialects/oracle/cx_oracle.py', line 564 in
initialize
File 'build/bdist.linux-x86_64/egg/sqlalchemy/dialects/oracle/base.py',
line 696 in initialize
KeyError: <class 'sqlalchemy.types.Interval'>
}}}
The `initialize()` code is here:
{{{
#!python
def initialize(self, connection):
super(OracleDialect, self).initialize(connection)
self.implicit_returning = self.__dict__.get(
'implicit_returning',
self.server_version_info > (10, )
)
if self._is_oracle_8:
self.colspecs = self.colspecs.copy()
self.colspecs.pop(sqltypes.Interval)
self.use_ansi = False
}}}
Question: is there a legitimate reason to be inside `initialize()` more
than once? Apparently that is what has happened here because the
.pop(sqltypes.Interval) has already been run on self.colspecs.
I'm guessing the real problem is with the connection pool or something and
sqlalchemy thinks it needs to initialize this since it isn't properly
connected?
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2776>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-08 17:45:48
|
#2775: bulk update/delete events / invent new system for changing event arguments
-----------------------------------+---------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: enhancement | Status: closed
Priority: medium | Milestone: 0.9.0
Component: orm | Severity: very major - up to 2 days
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+---------------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => fixed
* severity: major - 1-3 hours => very major - up to 2 days
* status_field: in queue => completed/closed
Comment:
r02a81707dc8b7c4d69551cad195fb has the work within master for the moment.
we might consider porting the documentation part of this to 0.8.
before_insert() etc. is left alone. bulk update/delete, it's just
sending the BulkUD object itself for now - I didn't want the **kw style to
fire off implicitly, you need to listen with named=True to take advantage
of that.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2775#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-07 16:24:15
|
#2775: bulk update/delete events / invent new system for changing event arguments
-------------------------+------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.0
Component: orm | Severity: major - 1-3 hours
Keywords: | Progress State: in queue
-------------------------+------------------------------------
the bulk UD events should have access to the arguments that were passed:
{{{
#!python
def after_bulk_update(self, session, query, query_context, values,
synchronize_session, result):
""
}}}
and while we're at it, mapper events should get some more context too:
{{{
#!python
def before_insert(self, session, flush_context, mapper, connection,
target):
""
}}}
how can we pull this off? we'd need to build a really smart argument
adapter that uses inspect:
{{{
#!python
@event.legacy_signature("0.9", ["session", "query", "query_context",
"result"])
def after_bulk_update(self, session, query, query_context, values,
synchronize_session, result):
""
}}}
legacy_signature would need to receive the decorated fn, use inspect to
look at how many arguments it accepts, then produce a translation wrapper
corresponding to the given signature. it should even stick a
"..versionchanged::" directive into the docstring.
another issue, these events take a crapload of arguments. How do we deal
with that? Let's support this too:
{{{
#!python
@event.listens_for(Session, "after_bulk_update")
def after_update(self, **kw):
}}}
with the above signature the event system will detect that, and just send
all args in as key/value pairs, so that event handlers can be written more
simply just to look for what they need.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2775>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-07 16:04:05
|
#2774: docs describe Query.logger as <logging.Logger object at 0x7526690>
-----------------------------------+----------------------------------
Reporter: david | Owner: zzzeek
Type: defect | Status: closed
Priority: low | Milestone:
Component: documentation | Severity: minor - half an hour
Resolution: fixed | Keywords: docs
Progress State: completed/closed |
-----------------------------------+----------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => fixed
* component: cextensions => documentation
* severity: no triage selected yet => minor - half an hour
* status_field: awaiting triage => completed/closed
Comment:
r124db0eb91ec792df7a9c8b86d300caf453424e8
rdb68ecff12f790fd129f03b8
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2774#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-07 07:55:07
|
#2774: docs describe Query.logger as <logging.Logger object at 0x7526690>
-------------------------+-----------------------------------------
Reporter: david | Owner: zzzeek
Type: defect | Status: new
Priority: low | Milestone:
Component: cextensions | Severity: no triage selected yet
Keywords: docs | Progress State: awaiting triage
-------------------------+-----------------------------------------
http://docs.sqlalchemy.org/en/rel_0_8/orm/query.html#sqlalchemy.orm.query.Query.logger
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2774>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-05 19:54:38
|
#722: Insert into () SELECT & SELECT INTO
-----------------------------------+-------------------------------
Reporter: guest | Owner: zzzeek
Type: enhancement | Status: closed
Priority: medium | Milestone: 0.8.xx
Component: sql | Severity: major - 1-3 hours
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+-------------------------------
Changes (by zzzeek):
* keywords: select into =>
* status: new => closed
* milestone: 0.x.xx => 0.8.xx
* resolution: => fixed
* status_field: in queue => completed/closed
Comment:
INSERT .. SELECT should suffice here.
r8373d7599edae2fd85f505d6610d92ede4ecf66f 0.8
rcec89cae156903c9a77dff29a1213e70fa915b52
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/722#comment:4>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-05 19:29:58
|
#2551: apparently INSERTs (and UPDATE, DELETE) can have CTEs in pg 9.1. , plus
UPDATE, SELECT, DELETE in CTEs.
------------------------------+---------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.xx
Component: postgres | Severity: very major - up to 2 days
Resolution: | Keywords:
Progress State: in queue |
------------------------------+---------------------------------------
Comment (by zzzeek):
INSERT from SELECT (I'm assuming that's what "SELECT from INSERT" was
trying to say) is #722.
A SELECT can have INSERT/UPDATE/DELETE inside the WITH clause, examples of
this are in section 7.8.2 of http://www.postgresql.org/docs/9.1/static
/queries-with.html
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2551#comment:6>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-05 00:04:32
|
#2773: error when accessing history w/ backref + make_transient object
-----------------------------------+-------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: closed
Priority: high | Milestone: 0.8.xx
Component: orm | Severity: major - 1-3 hours
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+-------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => fixed
* status_field: in progress => completed/closed
Comment:
r806f5a4183681582f1baabe02e7c5b4473c294ff master
r3f75c6aff6e886e007c75d26e061987437b1bafb 0.8
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2773#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-04 23:52:37
|
#2773: error when accessing history w/ backref + make_transient object
--------------------+------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: new
Priority: high | Milestone: 0.8.xx
Component: orm | Severity: major - 1-3 hours
Keywords: | Progress State: in progress
--------------------+------------------------------------
{{{
#!python
from sqlalchemy.orm import attributes, instrumentation
from sqlalchemy.testing.assertions import eq_
from mock import Mock
class Post(object):
def __init__(self, name):
self.name = name
__hash__ = None
def __eq__(self, other):
return other is not None and other.name == self.name
class Blog(object):
def __init__(self, name):
self.name = name
__hash__ = None
def __eq__(self, other):
return other is not None and other.name == self.name
lazy_posts = Mock()
instrumentation.register_class(Post)
instrumentation.register_class(Blog)
attributes.register_attribute(Post, 'blog', uselist=False,
backref='posts', trackparent=True, useobject=True)
attributes.register_attribute(Blog, 'posts', uselist=True,
backref='blog', callable_=lazy_posts, trackparent=True,
useobject=True)
lazy_posts.return_value = attributes.PASSIVE_NO_RESULT
b = Blog("blog 1")
p = Post("post 1")
state, dict_ = attributes.instance_state(b), attributes.instance_dict(b)
# this sets up NEVER_SET on b.posts
p.blog = b
eq_(state.committed_state, {"posts": attributes.NEVER_SET})
assert 'posts' not in dict_
# then suppose the object was made transient again,
# the lazy loader would return this
lazy_posts.return_value = attributes.ATTR_EMPTY
p2 = Post('asdf')
p2.blog = b
eq_(state.committed_state, {"posts": attributes.NEVER_SET})
eq_(dict_['posts'], [p2])
# then this would fail.
eq_(
Blog.posts.impl.get_history(state, dict_, passive=True),
([p2], [], [])
)
eq_(
Blog.posts.impl.get_all_pending(state, dict_),
[(attributes.instance_state(p2), p2)]
)
}}}
{{{
Traceback (most recent call last):
File "test.py", line 54, in <module>
Blog.posts.impl.get_history(state, dict_, passive=True),
File "/Users/classic/dev/sqlalchemy/lib/sqlalchemy/orm/attributes.py",
line 876, in get_history
return History.from_collection(self, state, current)
File "/Users/classic/dev/sqlalchemy/lib/sqlalchemy/orm/attributes.py",
line 1345, in from_collection
for c in original
TypeError: 'symbol' object is not iterable
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2773>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-07-04 18:31:13
|
#2161: Py3k support for the C extension
-------------------------------+-------------------------------
Reporter: ged | Owner: pjenvey
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.xx
Component: cextensions | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: needs review |
-------------------------------+-------------------------------
Comment (by claudiofreire):
Replying to [comment:6 taavi]:
> Regarding {{{PyObject_HEAD_INIT}}}, looking at Python-2.6.2 vs
Python-3.2, both in {{{Include/object.h}}}, I can see why you'd make the
change from {{{PyObject_HEAD_INIT(type), 0}}} to
{{{PyVarObject_HEAD_INIT(type, 0)}}}. On Py2k they generate identical code
to the compiler by definition:
> {{{
> #define PyVarObject_HEAD_INIT(type, size) \
> PyObject_HEAD_INIT(type) size,
> }}}
>
> And that's NOT the case in Py3k (things get wrapped in an extra set of
curlies):
> {{{
> #define PyVarObject_HEAD_INIT(type, size) \
> { PyObject_HEAD_INIT(type) size },
> }}}
>
> If {{{PyVarObject_HEAD_INIT}}} is the right thing to use in Py3k, then
we should also use it in Py2k.
So, this is py3:
{{{
#ifdef Py_LIMITED_API
typedef struct _typeobject PyTypeObject; /* opaque */
#else
typedef struct _typeobject {
PyObject_VAR_HEAD
}}}
And this is py2
{{{
typedef struct _typeobject {
PyObject_VAR_HEAD
}}}
In both cases, it's variable size. This is done for base classes, which
are stored in tuple-fashion, after the type object's struct.
So, the correct thing is indeed to use VAR.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2161#comment:24>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|