sqlalchemy-tickets Mailing List for SQLAlchemy (Page 96)
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-05-26 14:25:23
|
#2717: AbstractConcreteBase class provides incorrect example
-----------------------------------+-----------------------------------
Reporter: markhildreth | Owner: diana
Type: defect | Status: new
Priority: low | Milestone: 0.8.xx
Component: documentation | Severity: trivial - <10 minutes
Resolution: | Keywords:
Progress State: completed/closed |
-----------------------------------+-----------------------------------
Changes (by diana):
* owner: zzzeek => diana
* status_field: in queue => completed/closed
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2717#comment:3>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-26 14:24:10
|
#2717: AbstractConcreteBase class provides incorrect example
--------------------------------+-----------------------------------
Reporter: markhildreth | Owner: zzzeek
Type: defect | Status: new
Priority: low | Milestone: 0.8.xx
Component: documentation | Severity: trivial - <10 minutes
Resolution: | Keywords:
Progress State: in queue |
--------------------------------+-----------------------------------
Comment (by diana):
fixed in master, 0.8, and 0.9.
r792facf539a5a79cff19f7475fb9b9feb0abb3d0,
rcee8418899259e141f0059c86a32844c49f37118,
r07d200166aa44532e41ac82640eb372f92b00b9f
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2717#comment:2>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-24 19:25:59
|
#2733: using backref raises AttributeError when querying column-based entities
[declarative extension]
-------------------------+-----------------------------------------
Reporter: andrija | Owner: zzzeek
Type: defect | Status: new
Priority: lowest | Milestone:
Component: declarative | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
-------------------------+-----------------------------------------
[both sqlalchemy 0.8.1 and default branch / Python 2.7.3 / Ubuntu 12.04]
Addressing "backref" attribute will raise an !AttributeError in case of
querying column-based entities (`Child.parents` is specified with backref
in `Parent` class):
{{{session.query(Child.id).join(Child.parents)}}}
This will not raise exception if `Child` or `Parent` entities are used in
a query before.
See the attached code for the full example.
I'm not sure if this is a bug or should be expected behaviour. I haven't
tried to reproduce it without declarative extension.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2733>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-23 17:48:24
|
#2732: bug in get_cls_kwargs, affects sybase dialect
-----------------------------------+----------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: closed
Priority: highest | Milestone: 0.8.xx
Component: engine | Severity: minor - half an hour
Resolution: fixed | Keywords:
Progress State: completed/closed |
-----------------------------------+----------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => fixed
* status_field: in queue => completed/closed
Comment:
r1162b831c2d2
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2732#comment:3>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-23 16:37:52
|
#2730: MutableDict does not detect clear() call
---------------------------+----------------------------------
Reporter: wichert | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone: 0.8.xx
Component: ext | Severity: minor - half an hour
Resolution: | Keywords:
Progress State: in queue |
---------------------------+----------------------------------
Changes (by zzzeek):
* milestone: => 0.8.xx
* severity: no triage selected yet => minor - half an hour
* status_field: awaiting triage => in queue
Comment:
there's probably a lot it doesn't detect...
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2730#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-22 22:11:53
|
#2732: bug in get_cls_kwargs, affects sybase dialect
---------------------------+----------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: new
Priority: highest | Milestone: 0.8.xx
Component: engine | Severity: minor - half an hour
Resolution: | Keywords:
Progress State: in queue |
---------------------------+----------------------------------
Comment (by zzzeek):
work in progress
{{{
#!diff
diff -r e57b8df1f95e lib/sqlalchemy/util/langhelpers.py
--- a/lib/sqlalchemy/util/langhelpers.py Wed May 15 15:46:29 2013
-0400
+++ b/lib/sqlalchemy/util/langhelpers.py Wed May 22 18:11:31 2013
-0400
@@ -163,9 +163,11 @@
"""
- for c in cls.__mro__:
+ mro = list(cls.__mro__)
+ while mro:
+ c = mro.pop(0)
if '__init__' in c.__dict__:
- stack = set([c])
+ stack = set([c]) # for very liberal, say set([cls]) here
break
else:
return []
@@ -187,6 +189,8 @@
args.update(names)
if has_kw:
stack.update(class_.__bases__)
+ if mro:
+ stack.add(mro.pop(0))
args.discard('self')
return args
diff -r e57b8df1f95e test/base/test_utils.py
--- a/test/base/test_utils.py Wed May 15 15:46:29 2013 -0400
+++ b/test/base/test_utils.py Wed May 22 18:11:31 2013 -0400
@@ -1084,6 +1084,10 @@
def __init__(self, b1, **kw):
pass
+ class B2(B):
+ def __init__(self, b2):
+ pass
+
class AB(A, B):
def __init__(self, ab):
pass
@@ -1101,15 +1105,24 @@
class CBA(B, A):
pass
+ class CB1A1(B1, A1):
+ pass
+
class CAB1(A, B1):
pass
class CB1A(B1, A):
pass
+ class CB2A(B2, A):
+ pass
+
class D(object):
pass
+ class E(B, A):
+ pass
+
def test(cls, *expected):
eq_(set(util.get_cls_kwargs(cls)), set(expected))
@@ -1122,10 +1135,13 @@
test(BA, 'ba', 'b', 'a')
test(BA1, 'ba', 'b', 'a')
test(CAB, 'a')
- test(CBA, 'b')
+ test(CBA, 'b', 'a')
test(CAB1, 'a')
- test(CB1A, 'b1', 'b')
+ test(CB1A, 'b1', 'b', 'a')
+ test(CB2A, 'b2')
+ test(CB1A1, "a1", "b1", "b")
test(D)
+ test(E, "a", "b")
def test_get_func_kwargs(self):
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2732#comment:2>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-22 16:08:26
|
#2732: bug in get_cls_kwargs, affects sybase dialect
---------------------------+----------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: new
Priority: highest | Milestone: 0.8.xx
Component: engine | Severity: minor - half an hour
Resolution: | Keywords:
Progress State: in queue |
---------------------------+----------------------------------
Description changed by zzzeek:
Old description:
> {{{
> #!python
> from sqlalchemy.util import get_cls_kwargs
> from sqlalchemy.connectors import pyodbc
>
> class A(object):
> def __init__(self, arg1=None, arg2=None):
> pass
>
> class B(pyodbc.PyODBCConnector, A):
> pass
>
> class C(pyodbc.PyODBCConnector, A):
> def __init__(self, **kw):
> pass
>
> print get_cls_kwargs(B)
> print get_cls_kwargs(C)
> }}}
New description:
{{{
#!python
from sqlalchemy.util import get_cls_kwargs
from sqlalchemy.connectors import pyodbc
class A(object):
def __init__(self, arg1=None, arg2=None):
pass
class B(pyodbc.PyODBCConnector, A):
pass
class C(pyodbc.PyODBCConnector, A):
def __init__(self, **kw):
pass
print get_cls_kwargs(B)
print get_cls_kwargs(C)
}}}
output:
{{{
set(['supports_unicode_binds'])
set(['arg1', 'arg2', 'supports_unicode_binds'])
}}}
--
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2732#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-22 16:07:57
|
#2732: bug in get_cls_kwargs, affects sybase dialect
---------------------+---------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: new
Priority: highest | Milestone: 0.8.xx
Component: engine | Severity: minor - half an hour
Keywords: | Progress State: in queue
---------------------+---------------------------------------
{{{
#!python
from sqlalchemy.util import get_cls_kwargs
from sqlalchemy.connectors import pyodbc
class A(object):
def __init__(self, arg1=None, arg2=None):
pass
class B(pyodbc.PyODBCConnector, A):
pass
class C(pyodbc.PyODBCConnector, A):
def __init__(self, **kw):
pass
print get_cls_kwargs(B)
print get_cls_kwargs(C)
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2732>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-21 14:17:28
|
#2731: for_update=whatever always creates a "FOR UPDATE" query
----------------------------------+------------------------------------
Reporter: fayaz | Owner: zzzeek
Type: defect | Status: closed
Priority: medium | Milestone:
Component: sql | Severity: no triage selected yet
Resolution: worksforme | Keywords:
Progress State: awaiting triage |
----------------------------------+------------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => worksforme
Comment:
the docs state here that these behaviors are dialect specific:
http://docs.sqlalchemy.org/en/rel_0_8/core/expression_api.html?highlight=for_update#sqlalchemy.sql.expression.select
for_update=False –
when True, applies FOR UPDATE to the end of the resulting statement.
Certain database dialects also support alternate values for this
parameter:
With the MySQL dialect, the value "read" translates to LOCK IN
SHARE MODE.
With the Oracle and Postgresql dialects, the value "nowait"
translates to FOR UPDATE NOWAIT.
With the Postgresql dialect, the values “read” and "read_nowait"
translate to FOR SHARE and FOR SHARE NOWAIT, respectively.
so here the behavior requires a mysql dialect:
{{{
#!python
from sqlalchemy import *
from sqlalchemy.dialects import mysql
def test():
table = Table('user', MetaData(), Column('id', Integer,
primary_key=True))
query = table.select(for_update='read')
assert "LOCK IN SHARE MODE" in
str(query.compile(dialect=mysql.dialect()))
if __name__ == '__main__':
test()
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2731#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-21 11:06:23
|
#2731: for_update=whatever always creates a "FOR UPDATE" query
--------------------+-----------------------------------------
Reporter: fayaz | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone:
Component: sql | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
--------------------+-----------------------------------------
When using
{{{
table.select(for_update='read')
}}}
The query string representation is still
{{{
SELECT "user".id
FROM "user" FOR UPDATE
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2731>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-20 15:26:51
|
#2730: MutableDict does not detect clear() call
---------------------+-----------------------------------------
Reporter: wichert | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone:
Component: ext | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
---------------------+-----------------------------------------
Seen with SQLAlchemy 0.8.1.
{{{
>>> article.aspects
{'colour': 'black'}
>>> article.aspects.clear()
>>> article in meta.Session.dirty
True
>>> meta.Session.is_modified(article)
False
}}}
Rewriting the code to use {{{article.aspects = {} }}} is a possible
workaround.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2730>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-19 15:38:28
|
#2729: metadata.create_all do not create Enum in postgre ARRAY
--------------------------------+-------------------------------------
Reporter: sowingsadness | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone: 0.8.xx
Component: postgres | Severity: minor - half an hour
Resolution: | Keywords: create_all, enum, ARRAY
Progress State: in queue |
--------------------------------+-------------------------------------
Comment (by sowingsadness):
thx for elegant solution -))
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2729#comment:2>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-19 14:53:41
|
#2729: metadata.create_all do not create Enum in postgre ARRAY
--------------------------------+-------------------------------------
Reporter: sowingsadness | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone: 0.8.xx
Component: postgres | Severity: minor - half an hour
Resolution: | Keywords: create_all, enum, ARRAY
Progress State: in queue |
--------------------------------+-------------------------------------
Changes (by zzzeek):
* severity: no triage selected yet => minor - half an hour
* status_field: awaiting triage => in queue
Comment:
good catch. Here is a better workaround for now:
{{{
#!python
from sqlalchemy import event
Base = declarative_base()
enum = Enum('manager', 'place_admin', 'carwash_admin',
'parking_admin', 'service_admin',
'tire_admin',
'mechanic', 'carwasher', 'tire_mechanic',
name="work_place_roles")
class WorkPlacement(Base):
__tablename__ = 'work_placement'
id = Column(Integer, primary_key=True)
roles = Column(ARRAY(enum))
@event.listens_for(Base.metadata, "before_create")
def _create_enum(metadata, conn, **kw):
enum.create(conn, checkfirst=True)
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2729#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-19 12:59:29
|
#2729: metadata.create_all do not create Enum in postgre ARRAY
---------------------------------+-----------------------------------------
Reporter: sowingsadness | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone: 0.8.xx
Component: postgres | Severity: no triage selected yet
Keywords: create_all, enum, | Progress State: awaiting triage
ARRAY |
---------------------------------+-----------------------------------------
metadata.create_all do not create work_place_roles if Enum in
sqlalchemy.dialects.postgresql.ARRAY
{{{
class WorkPlacement(Base):
__tablename__ = 'work_placement'
roles = Column(ARRAY(Enum('manager', 'place_admin', 'carwash_admin',
'parking_admin', 'service_admin',
'tire_admin',
'mechanic', 'carwasher',
'tire_mechanic', name="work_place_roles")))
}}}
i need do so:
{{{
class WorkPlacement(Base):
__tablename__ = 'work_placement'
tmp_role = Column(Enum('manager', 'place_admin', 'carwash_admin',
'parking_admin', 'service_admin',
'tire_admin',
'mechanic', 'carwasher',
'tire_mechanic', name="work_place_roles"))
roles = Column(ARRAY(Enum(name="work_place_roles")))
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2729>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:54:31
|
#2355: implement pyodbc + mssql + py3k
------------------------------+-------------------------------
Reporter: guest | Owner:
Type: enhancement | Status: new
Priority: high | Milestone: 0.8.xx
Component: mssql | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in queue |
------------------------------+-------------------------------
Comment (by zzzeek):
test change
--
Ticket URL: <http://www.sqlalchemy.org/xyzz/ticket/2355#comment:7>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:26:58
|
New user registration for user foobar3 -- sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:24:58
|
New user registration for user foobar2 -- sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:13:02
|
New user registration for user foobar -- sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:07:52
|
Deleted User for user xenbyionznn -- sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:07:51
|
Deleted User for user williamfume -- sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:07:51
|
Deleted User for user shuvro -- sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:07:51
|
Deleted User for user xenbyiosicl -- sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:07:51
|
Deleted User for user rndtrust -- sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:07:46
|
Deleted User for user reiftinue -- sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
|
From: sqlalchemy <mi...@zz...> - 2013-05-18 18:07:43
|
Deleted User for user ryhamrodne -- sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |