like frozenset which isn't really the purpose of 'immutabledict' (could be someday,
in which case, we'd change the name back :) )
=======
0.7.0b1
=======
+- Detailed descriptions of each change below are
+ described at:
+ http://www.sqlalchemy.org/trac/wiki/07Migration
+
+- general
+ - New event system, supercedes all extensions, listeners,
+ etc. [ticket:1902]
+
+ - Logging enhancements
+ [ticket:1926]
+
+ - Setup no longer installs a Nose plugin
+ [ticket:1949]
+
- orm
+ - More succinct form of query.join(target, onclause)
+ [ticket:1923]
+
+ - Hybrid Attributes, implements/supercedes synonym()
+ [ticket:1903]
+
+ - Rewrite of composites [ticket:2008]
+
+ - Mutation Event Extension, supercedes "mutable=True"
+
+ - PickleType and ARRAY mutability turned off by default
+ [ticket:1980]
+
+ - Simplified polymorphic_on assignment
+ [ticket:1895]
+
+ - Flushing of Orphans that have no parent is allowed
+ [ticket:1912]
+
+ - Warnings generated when collection members, scalar referents
+ not part of the flush
+ [ticket:1973]
+
+ - Non-`Table`-derived constructs can be mapped
+ [ticket:1876]
+
+ - Tuple label names in Query Improved
+ [ticket:1942]
+
+ - Mapped column attributes reference the most specific
+ column first
+ [ticket:1892]
+
+ - Mapping to joins with two or more same-named columns
+ requires explicit declaration
+ [ticket:1896]
+
+ - Mapper requires that polymorphic_on column be present
+ in the mapped selectable
+ [ticket:1875]
+
+ - compile_mappers() renamed configure_mappers(), simplified
+ configuration internals
+ [ticket:1966]
+
- the aliased() function, if passed a SQL FromClause element
(i.e. not a mapped class), will return element.alias()
instead of raising an error on AliasedClass. [ticket:2018]
in the open transaction of an engine explicitly.
[ticket:1996]
+ - Query.join(), Query.outerjoin(), eagerload(),
+ eagerload_all(), others no longer allow lists
+ of attributes as arguments (i.e. option([x, y, z])
+ form, deprecated since 0.5)
+
+ - ScopedSession.mapper is removed
+ (deprecated since 0.5)
+
- sql
+ - LIMIT/OFFSET clauses now use bind parameters
+ [ticket:805]
+
+=== TypeDecorator works with primary key columns ===
+
+[ticket:2005] [ticket:2006]
+
+=== `DDL()` Constructs now Escape Percent Signs ===
+
+[ticket:1897]
+
+=== `Table.c` / `MetaData.tables` refined a bit, don't allow direct mutation ===
+
+[ticket:1893] [ticket:1917]
+
+=== Callables passed to `bindparam()` don't get evaluated ===
+
+[ticket:1950]
+
+=== types.type_map is now private, types._type_map ===
+
+[ticket:1870]
+
+=== Non-public Pool Methods Underscored ===
+[ticket:1982]
+
- Added NULLS FIRST and NULLS LAST support. It's implemented
as an extension to the asc() and desc() operators, called
nullsfirst() and nullslast(). [ticket:723]
- TypeDecorator is present in the "sqlalchemy" import space.
+-sqlite
+ - SQLite dialect now uses `NullPool` for file-based databases
+ [ticket:1921]
+
- mssql
- the String/Unicode types, and their counterparts VARCHAR/
NVARCHAR, emit "max" as the length when no length is
"""
- _execution_options = util.frozendict()
+ _execution_options = util.immutabledict()
Connection = Connection
def __init__(self, pool, dialect, url,
self.session.expunge_all()
def map_to(self, attrname, tablename=None, selectable=None,
- schema=None, base=None, mapper_args=util.frozendict()):
+ schema=None, base=None, mapper_args=util.immutabledict()):
"""Configure a mapping to the given attrname.
This is the "master" method that can be used to create any
_select_from_entity = None
_filter_aliases = None
_from_obj_alias = None
- _joinpath = _joinpoint = util.frozendict()
- _execution_options = util.frozendict()
- _params = util.frozendict()
- _attributes = util.frozendict()
+ _joinpath = _joinpoint = util.immutabledict()
+ _execution_options = util.immutabledict()
+ _params = util.immutabledict()
+ _attributes = util.immutabledict()
_with_options = ()
_with_hints = ()
_enable_single_crit = True
``MetaData``.
"""
- self.tables = util.frozendict()
+ self.tables = util.immutabledict()
self._schemas = set()
self.bind = bind
self.metadata = self
"""
supports_execution = True
- _execution_options = util.frozendict()
+ _execution_options = util.immutabledict()
@_generative
def execution_options(self, **kw):
__visit_name__ = 'select'
_prefixes = ()
- _hints = util.frozendict()
+ _hints = util.immutabledict()
def __init__(self,
columns,
_execution_options = \
Executable._execution_options.union({'autocommit': True})
- kwargs = util.frozendict()
+ kwargs = util.immutabledict()
def _process_colparams(self, parameters):
if isinstance(parameters, (list, tuple)):
def _expression_adaptations(self):
raise NotImplementedError()
- _blank_dict = util.frozendict()
+ _blank_dict = util.immutabledict()
def _adapt_expression(self, op, othertype):
othertype = othertype._type_affinity
return op, \
threading, py3k, jython, win32, set_types, buffer, pickle, \
update_wrapper, partial, md5_hex, decode_slice, dottedgetter
-from _collections import NamedTuple, ImmutableContainer, frozendict, \
+from _collections import NamedTuple, ImmutableContainer, immutabledict, \
Properties, OrderedProperties, ImmutableProperties, OrderedDict, \
OrderedSet, IdentitySet, OrderedIdentitySet, column_set, \
column_dict, ordered_column_set, populate_column_dict, unique_list, \
__delitem__ = __setitem__ = __setattr__ = _immutable
-class frozendict(ImmutableContainer, dict):
+class immutabledict(ImmutableContainer, dict):
clear = pop = popitem = setdefault = \
update = ImmutableContainer._immutable
pass
def __reduce__(self):
- return frozendict, (dict(self), )
+ return immutabledict, (dict(self), )
def union(self, d):
if not self:
- return frozendict(d)
+ return immutabledict(d)
else:
- d2 = frozendict(self)
+ d2 = immutabledict(self)
dict.update(d2, d)
return d2
def __repr__(self):
- return "frozendict(%s)" % dict.__repr__(self)
+ return "immutabledict(%s)" % dict.__repr__(self)
class Properties(object):
"""Provide a __getattr__/__setattr__ interface over a dict."""
class FrozenDictTest(TestBase):
def test_serialize(self):
- d = util.frozendict({1:2, 3:4})
+ d = util.immutabledict({1:2, 3:4})
for loads, dumps in picklers():
print loads(dumps(d))
numbers of rows that the test suite manipulates.
"""
- class frozendict(dict):
+ class immutabledict(dict):
def __hash__(self):
return id(self)
found = util.IdentitySet(result)
- expected = set([frozendict(e) for e in expected])
+ expected = set([immutabledict(e) for e in expected])
for wrong in itertools.ifilterfalse(lambda o: type(o) == cls, found):
fail('Unexpected type "%s", expected "%s"' % (