root / elixir / tags / 0.6.1 / CHANGES

Revision 392, 18.1 kB (checked in by ged, 3 years ago)

update changelog, prepare for release

Line 
10.6.1 - 2008-08-18
2
3New features:
4- Allow ManyToOne relationships to use manually created fields as their
5  "supporting column". This means that the columns can be customized without
6  resorting to using the ugly "column_kwargs" (patch from Jason R. Coombs,
7  closes #39).
8- Extra args and kwargs to Synonym and ColumnProperty are forwarded to their
9  underlying constructs. This allows for example deferred ColumnProperties.
10- Added a more helpful assertion message when inverse relationship types don't
11  match.
12
13Changes:
14- Removed support for the deprecated "with_fields" syntax
15- Entity.__init__ calls Entity.set instead of duplicating its functionality
16
17Bug fixes:
18- Fixed the "Target resolves to several entities" exception message to actually
19  include the target name.
20- Renamed the on_reconstitute method decorator to reconstructor, to track the
21  corresponding change in SA's trunk.
22
230.6.0 - 2008-07-18
24
25Please see http://elixir.ematia.de/trac/wiki/Migrate05to06 for detailed
26upgrade notes.
27
28New features:
29- Added two new methods on the base entity: from_dict and to_dict, which can
30  be used to create (or output) a whole hierarchy of instances from (to) a
31  simple JSON-like dictionary notation (patch from Paul Johnston,
32  closes ticket #40).
33- Added experimental (!) support for concrete table inheritance (both
34  polymorphic or not). Concrete polymorphic inheritance requires SQLAlchemy
35  0.4.5 or later.
36- Moved the "entity to string" mapping and resolving code to the (newly
37  created) EntityCollection class (which stores lists of entities). This
38  allows one to provide a custom mapping method if needed. The default class
39  also overrides the __getattr__ method, providing and handy way to get at your
40  entities. See http://elixir.ematia.de/trac/browser/elixir/tags/0.6.0/tests/test_collections#L58
41- Added new "identity" option which can be used to set a custom polymorphic
42  identity for an entity. It also accepts a callable so that you can generate
43  the identity name automatically from the class itself.
44- Added __setattr__ method on Metaclass so that you can add properties
45  slightly more easily after class definition (but *before* setup_all):
46    class A(Entity):
47        pass
48    A.name = Field(String(32))
49- Added add_table_column, add_mapper_property and add_mapper_extension helper
50  methods in EntityBuilders.
51- Added full_tablename property on EntityDescriptor (includes schema name if
52  any).
53- Added on_reconstitute event/method decorator. Only works with SA 0.5.
54- Added support for viewonly relationships (OneToMany and OneToOne).
55- Added support for filtered OneToMany relationships. Produce viewonly
56  relations. See http://elixir.ematia.de/trac/browser/elixir/tags/0.6.0/tests/test_o2m.py
57  for an example.
58- Added support for callables for some arguments on relationships: primaryjoin,
59  secondaryjoin and remote_side. It means those can be evaluated at setup time
60  (when tables and their columns already exist) instead of definition time.
61
62Changes:
63- Default "target entity resolving code" changed slightly. It now uses a global
64  collection keyed on the entity name. This means that entities can refer to
65  other entities in a different module simply with the target entity name
66  instead of its full path. The full path is only required when there is an
67  ambiguity (ie when there are two classes with the same name in two different
68  modules). Closes #9.
69- Added support for SQLAlchemy 0.5, and dropped support for version 0.3 and
70  earlier.
71- The default session (elixir.session) uses sessionmaker() instead of
72  create_session(), which means it has now the following characteristics:
73    * autoflush=True
74    * autocommit=False (with SA 0.5 -- equivalent to transactional=True with
75      SA 0.4)
76    * autoexpire=True (with SA 0.5).
77- removed objectstore and other SA 0.3 (or older) support code.
78
79Bug fixes:
80- Fixed multi-table inheritance when using a non default schema (closes #38)
81- Fixed ManyToOne relationships using 'key' kwarg in their column_kwargs
82  (patch by Jason R. Coombs)
83- Fixed inheritance with autoloaded entities: when using autoload, we
84  shouldn't try to add columns to the table (closes tickets #41 and #43).
85- Fixed acts_as_list extension with autoloaded entities (patch from maqr,
86  closes ticket #52).
87- Fixed ColumnProperty to work with latest version of SQLAlchemy (O.4.5 and
88  later)
89- Fixed ManyToMany relationships when not using the default schema
90  (patch from Diez B. Roggisch, closes ticket #48)
91
92Misc:
93- Added AUTHORS list. If you are missing from this list, don't hesitate to
94  contact me.
95
960.5.2 - 2008-03-28
97
98New features:
99- Added an optional `check_concurrency` keyword argument to the versioning
100  extension, supporting the usage of SQLAlchemy's built-in optimistic
101  concurrency check.
102
103Changes:
104- Made Elixir python 2.3 compatible again (based on patches from
105  Jason R. Coombs)
106
107Bug fixes:
108- Fixed act_as_list extension to work with DBMS that require subselects to be
109  aliased (patch by Alice McGregor)
110- Fixed the versioning extension so that the history table is updated within
111  the current transaction (patch from and closes ticket #35).
112
1130.5.1 - 2008-02-07
114
115New features:
116- Added a new elixir plugin for managing entities as (ordered) lists.
117- Added a `column_format` keyword argument to `ManyToMany` which can be used
118  to specify an alternate format string for column names in the mapping table.
119- Added support for custom base classes which inherit from another class (ie
120  not directly from object).
121- Added an alternate (nicer) syntax to define synonym properties.  This syntax
122  has a more limited scope, except that it can refer to properties defined in
123  a parent entity. This is based on a patch from Alexandre da Silva.
124
125Changes:
126- Added check so that using an inexisting column in an order_by or other
127  column-name based argument raises an exception.
128- The polymorphic_identity kwarg in using_mapper_options is not overriden
129  anymore by the one generated by Elixir (patch from Ben Bangert).
130- Moved the format of the multi-table inheritance column to a constant in
131  options (so that it can be changed globally).
132- The foreign key constraint of the column in a multi-table inheritance is
133  configured with a cascade rule.
134
135Bug fixes:
136- A child entity doesn't inherit anymore its parent entity statements (such as
137  options) if it doesn't use any statement itself.
138- Made inheritance work for custom base classes (closes #25).
139- Fixed the inverse relationship matching when the inverse relationship is
140  defined in a parent Entity (thanks to Alexandre da Silva).
141- Fixed bug in setup_entities (it always used the global entity list and not
142  the list given as argument).
143- Fixed the versioning extension not appropriately handling versioned
144  entities with onupdate events (patch from Remi Jolin, closes #29).
145- Fixed videostore example (patch from Jason R. Coombs, closes #31).
146
1470.5.0 - 2007-12-08
148
149Please see http://elixir.ematia.de/trac/wiki/Migrate04to05 for detailed
150upgrade notes.
151
152New features:
153- Added set method on base Entity (set attributes using kwargs)
154
155Changes:
156- Autosetup defaults to False ! (please look at those upgrade notes!)
157- Polymorphic defaults to True (inheritance is polymorphic by default).
158- Removed one of the autosetup triggers altogether: there is no "fake" mapper
159  registered in SQLAlchemy's mapper_registry anymore, so if you try to
160  access the class mapper directly (not through the 'mapper' attribute on
161  the class), before the setup phase happens, it won't work. This was done
162  because of a change in SQLAlchemy trunk (future SA 0.4.2) which broke that
163  piece of code (and prevented to use autosetup at all). Since that code
164  was a hack in the first place, instead of doing some even uglier hackery,
165  I got rid of it altogether.
166- Moved some format strings to constants in options, so that one can change
167  them if he wants to.
168- Allow overriding primary_key columns on autoloaded entities (closes tickets
169  #20 and #22)
170- Columns created by ManyToOne relationships can now optionally (through
171  column_kwargs) *not* create an index (ie it's not harcoded anymore).
172  Suggestion by Jason R. Coombs.
173
174Bug fixes:
175- Fixed a nasty bug which prevented inheritance to work correctly when using
176  the attribute syntax in many cases.
177- Fixed associable extension to work with SQLAlchemy trunk (future 0.4.2).
178- Fixed an incompatibility with zope.interfaces.
179- Tweaked the initialization sequence again (in fact revert an older change)
180  which prevented to reuse class properties of one class in other (subsequent)
181  classes.
182- Fixed our tests to work with SA trunk (future 0.4.2) (unicode data + use of
183  deprecated attributes)
184
1850.4.0 - 2007-10-29
186
187Please see http://elixir.ematia.de/trac/wiki/Migrate03to04 for detailed
188upgrade notes.
189
190New features:
191- Implemented a new syntax to declare fields and relationships, much closer to
192  what is found in other Python ORM's. The with_fields syntax is now
193  deprecated in favor of a that new syntax. The old statement based (has_field
194  et al.) syntax is still available though (and will remain so for quite some
195  time). This was done with help from a patch by Adam Gomaa.
196- Implemented polymorphic single-table inheritance as well as polymorphic and
197  non-polymorphic multi-table (aka joined table) inheritance.
198- Added ext sub-package for additional Elixir statements.
199- Added associable extension for generating polymorphic associations with
200  Elixir statements.
201- Added versioning extension to keep track to all changes to your entities by
202  storing them in a secondary table.
203- Added encryption extenstion to encrypt/decrypt some fields data on the fly
204  when writing to/reading from the database.
205- Added support for synonym properties.
206- Added shortcut syntax to define column_properties.
207- Added a .query attribute on all entities. The old .query() syntax is still
208  available.
209- Added support to add any SQLAlchemy property on your mapper, through the
210  GenericProperty class (as well as the has_property statement). These can
211  work even if they rely on the entity columns (an thus need them to be
212  defined before the property can be declared). See tests/test_properties.py
213  for examples.
214- Added support for "manual session management" (ie you can now define an
215  entity with "using_options(session=None)" and it won't use any
216  SessionContext extension, nor receive the "query" attribute.
217- Made the statement system more powerfull.
218
219Changes:
220- The setup time was changed. That is the table and mapper are not created as
221  soon as the class is defined, but rather when first used, or when explicitly
222  calling the setup function (recommended). This also allowed us to reorder
223  the setup process and allows, among others to use a ManyToOne-generated
224  column as a primary key, to use unique constraints on those columns, to
225  order by those columns and so on...
226- Made Elixir work with both SQLAlchemy 0.4 and 0.3.10 (with help from a patch
227  by Ants Aasma).
228- Moved away from assign_mapper, now all assign_mapper-provided methods are on
229  the Entity class. Now, if people don't like them, they have the option to
230  simply provide another base class.
231- Default objectstore is now a ScopedSession when working on SQLAlchemy 0.4.
232  It means that it's not wrapped in an Objectstore object at all. This means,
233  that depending on the version of SA you are using, you'll get a slightly
234  different behavior.
235- Relationships to other classes can now also be defined using the classes
236  themselves in addition to the class namees. Obviously, this doesn't work for
237  forward references.
238- Classes defined inside a function can now have relationships to each other.
239- Added default __init__ method on entities so that subclasses can override it
240  and still have the "set attribute by keyword" behavior by calling super()
241- Added "through" and "via" keyword arguments on relationships and has_field
242  statement, to proxy values through relationships (uses association_proxy)
243- Made EntityMeta public, so that people can actually define their own base
244  class.
245- Changed the order of relationship kwargs processing so that computed kwargs
246  can be overridden by kwargs manually passed to the statement. This should
247  only be used if you know what you are doing.
248- Added onupdate kwarg to BelongsTo relationships for consistency with the
249  ondelete kwarg
250- Added ondelete and onupdate kwargs for use with has_and_belongs_to_many
251  to apply on delete clauses to foreign key constraints on the m2m table.
252- Columns of the intermediary table of an has_and_belongs_to_many relationship
253  are now marked as primary keys.
254- Reworked how entities look for primary keys on related entities. This
255  enables one "normal" entity (fully defined in Elixir) to refer to an entity
256  which is autoloaded.
257- Added translation (from column name to column object) of the primary_key
258  mapper option so that it can actually be used. This allows to have entities
259  without any primary key defined at the table level.
260- Added the possibility to give a custom name for ManyToOne constraints
261  (patch from and closes ticket #16)
262- Dropped support for the old threadlocal SA extension (which doesn't even exist
263  anymore in SA 0.4)
264
265Bug fixes:
266- Reworked/cleaned tests so that they don't leak stuff to other tests (both at
267  the method level and module level) anymore. Uses nosetest's module level
268  fixture.
269- Fixed relationships to entities whose primary_key field has been defined
270  with a "key" argument (based on a patch by Paul Johnston).
271- Fixed some buggy tests.
272- Fixed relationships to tables using a schema (patch by Neil Blakey-Milner)
273- Made inverse relationships use backrefs. This fixes the "bidirectional
274  coherency" problem some people had before doing a flush. (based on a patch
275  from Remi Jolin).
276
2770.3.0 - 2007-03-27
278- Made the provided metadata not threadlocal. This could break things for you
279  in some rare case. Please see the (newly created) FAQ file for details about
280  this.
281- Added support for autoloading/reflecting databases with
282  has_and_belongs_to_many relationships. The tablename argument is now
283  optional, but still recommended, otherwise you'll have to use the same exact
284  name for your intermediary table than the one generated. You also _have to_
285  specify at least one of either local_side or remote_side argument.
286- Added support for the "version_id_col" option on entities. This option adds
287  a column to the table which will be used to prevent concurrent modifications
288  on any row of the entity's table (i.e. it will raise an error if it happens).
289- Made the colname argument optional for belongs_to relationships in
290  autoloaded entities. It is only required to specify it if you have several
291  belongs_to relationships between two entities/tables.
292- Applied patch from "Wavy" so that columns of a table are in the same order
293  as they were declared (this only works for the has_field statement).
294- Applied patch from Isaac Csandl to add an "ondelete" argument to
295  belongs_to relationships. The content of that argument is forwarded to the
296  foreign key constraint.
297- Foreign key names generated by belongs_to relationships use column names
298  instead of relation names in case we have a relation with the same name
299  defined in several entities inheriting from the same entity using single-
300  table inheritance (and we set a custom column name in one of them to avoid
301  a column-name conflict).
302- Using invalid options on entities will now raise an exception
303- Added __version__
304- Use an explicit metaclass for entities, so that people can define their own
305  base class.
306- Changed the approach to reflecting/autoloading belongs_to relationships.
307  This shouldn't change anything to how it's used but allowed me to factor
308  some code with has_and_belongs_to_many relationships.
309- The tablename option can now be given a callable so that people can provide
310  their own function to get the table name for an entity. The tablename option
311  can now also be set globally (using the options_defaults dictionary). Of
312  course, this only makes sense for the callable usecase.
313
314- Fixed bug preventing having entities without any statement.
315- Fixed documentation for belongs_to relationships (the arguemnt is "required",
316  not "nullable").
317- Fixed typo which broke the use_alter argument on belongs_to relationships.
318- Fixed inheritance unit test to pass SQLAlchemy type check on relations
319  (introduced in SA 0.3.6)
320- Fixed wrong field length in autoload test (it was not noticeable with sqlite).
321- Actually make the code python 2.3 compatible (Robin's patch was based on
322  0.1.0 while I had introduced more decorators in the trunk in the mean time).
323
324- Made some PEP8 tweaks in many places. Used the pep8 script provided with
325  Cheesecake.
326- Some cleanup/useless code removal
327
3280.2.0 - 2007-02-28
329- Applied patch from Robin Munn to make the code python 2.3 compatible
330- Per a suggestion on the mailing list, look at the calling stack frame to
331  ensure that we apply statements to the proper class.  We now attach the
332  statement list to the class itself, rather than attaching it to a global
333  list that is neither threadsafe, nor safe when doing nested class
334  definition.  Also added a test to validate that this works.
335- implemented singletable non-polymorphic inheritance
336- added support to pass non-keyword arguments to tables. You just pass
337  them to the using_table_options statement and they will be forwarded to the
338  table along with the keyword arguments. This can be used to set table
339  constraints.
340- added support for deferred columns (use the "deferred" keyword argument on
341  fields)
342- added a "required" keyword argument on fields and BelongsTo
343  relationships. This is the opposite of the "nullable" SA argument.
344- added a "column_kwargs" keyword argument to BelongsTo relationships
345  to forward any keyword argument directly to the SA Column.
346- added support for the use_alter and constraint_kwargs kwargs on BelongsTo
347  relationships (forwarded to SA ForeignKeyConstraint).
348    -> removed the systematic use_alter on BelongsTo relations since it
349       can now be specified only when needed.
350    -> removed it from HasAndBelongsToMany relations, since I think a
351       circular foreign key dependency can't happen with those relations.
352- fixed foreign key names on MySQL (and possibly other) databases by
353  making sure the generated name is unique for the whole database, and not
354  only for the table on which it applies.
355- corrected some docstrings
356
3570.1.0 - 2007-02-12
358initial release
Note: See TracBrowser for help on using the browser.