summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in 'Relationships API' docspr/170Ernest Walzel2015-04-281-1/+1
| | | | exprssed -> expressed
* - altered part of the use contract first set up in #2992; weMike Bayer2015-04-271-1/+4
| | | | | | | | now skip textual label references when copying ORDER BY elements to the joined-eager-load subquery, as we can't know that these expressions are compatible with this placement; either because they are meant for text(), or because they refer to label names already stated and aren't bound to a table. fixes #3392
* - replace old crufty ddl event test fixture with mockMike Bayer2015-04-271-2/+2
|
* - Fixed regression due to :ticket:`3282` where the ``tables`` collectionMike Bayer2015-04-271-6/+13
| | | | | | | | | | | | | | | | passed as a keyword argument to the :meth:`.DDLEvents.before_create`, :meth:`.DDLEvents.after_create`, :meth:`.DDLEvents.before_drop`, and :meth:`.DDLEvents.after_drop` events would no longer be a list of tables, but instead a list of tuples which contained a second entry with foreign keys to be added or dropped. As the ``tables`` collection, while documented as not necessarily stable, has come to be relied upon, this change is considered a regression. Additionally, in some cases for "drop", this collection would be an iterator that would cause the operation to fail if prematurely iterated. The collection is now a list of table objects in all cases and test coverage for the format of this collection is now added. fixes #3391
* - Fixed a regression regarding the :meth:`.MapperEvents.instrument_class`Mike Bayer2015-04-263-23/+22
| | | | | | | | | | | | | | | | | event where its invocation was moved to be after the class manager's instrumentation of the class, which is the opposite of what the documentation for the event explicitly states. The rationale for the switch was due to Declarative taking the step of setting up the full "instrumentation manager" for a class before it was mapped for the purpose of the new ``@declared_attr`` features described in :ref:`feature_3150`, but the change was also made against the classical use of :func:`.mapper` for consistency. However, SQLSoup relies upon the instrumentation event happening before any instrumentation under classical mapping. The behavior is reverted in the case of classical and declarative mapping, the latter implemented by using a simple memoization without using class manager. fixes #3388
* - Fixed issue in new :meth:`.QueryEvents.before_compile` event whereMike Bayer2015-04-262-2/+2
| | | | | | | changes made to the :class:`.Query` object's collection of entities to load within the event would render in the SQL, but would not be reflected during the loading process. fixes #3387
* - Fixed a regression that was incorrectly fixed in 1.0.0b4Mike Bayer2015-04-245-7/+14
| | | | | | | | | | | | | | | | | | (hence becoming two regressions); reports that SELECT statements would GROUP BY a label name and fail was misconstrued that certain backends such as SQL Server should not be emitting ORDER BY or GROUP BY on a simple label name at all; when in fact, we had forgotten that 0.9 was already emitting ORDER BY on a simple label name for all backends, as described in :ref:`migration_1068`, as 1.0 had rewritten this logic as part of :ticket:`2992`. In 1.0.2, the bug is fixed both that SQL Server, Firebird and others will again emit ORDER BY on a simple label name when passed a :class:`.Label` construct that is expressed in the columns clause, and no backend will emit GROUP BY on a simple label name in this case, as even Postgresql can't reliably do GROUP BY on a simple name in every case. fixes #3338, fixes #3385
* - add the "strict" version of this lookup for __abstract__ as well,Mike Bayer2015-04-241-2/+2
| | | | fixes #3383
* Merge remote-tracking branch 'origin/pr/169'Mike Bayer2015-04-241-3/+4
|\
| * micro-optimize unique_listpr/169Gaƫtan de Menten2015-04-241-3/+4
| | | | | | This makes unique_list approx 2x faster in my (simple) tests
* | - Fixed regression regarding the declarative ``__declare_first__``Mike Bayer2015-04-244-11/+25
|/ | | | | | and ``__declare_last__`` accessors where these would no longer be called on the superclass of the declarative base. fixes #3383
* - Fixed support for "literal_binds" mode when using limit/offsetMike Bayer2015-04-236-12/+14
| | | | | | with Firebird, so that the values are again rendered inline when this is selected. Related to :ticket:`3034`. fixes #3381
* Update base.pypr/168effem-git2015-04-231-2/+2
| | | Fix TypeError: Boolean value of this clause is not defined
* - repair a regression caused by #3282, where we no longer wereMike Bayer2015-04-224-18/+50
| | | | | | | | | | applying any topological sort to tables on SQLite. See the changelog for details, but we now continue to sort tables for SQLite on DROP, prohibit the sort from considering alter, and only warn if we encounter an unresolvable cycle, in which case, then we forego the ordering. use_alter as always is used to break such a cycle. fixes #3378
* - add a warning to SingletonThreadPool that it isn't for general useMike Bayer2015-04-211-0/+13
|
* - Added the string value ``"none"`` to those accepted by theMike Bayer2015-04-211-1/+5
| | | | | | | | :paramref:`.Pool.reset_on_return` parameter as a synonym for ``None``, so that string values can be used for all settings, allowing .ini file utilities like :func:`.engine_from_config` to be usable without issue. fixes #3375
* - Fixed issue where a straight SELECT EXISTS query would fail toMike Bayer2015-04-203-12/+36
| | | | | | | | | | | | | | | | assign the proper result type of Boolean to the result mapping, and instead would leak column types from within the query into the result map. This issue exists in 0.9 and earlier as well, however has less of an impact in those versions. In 1.0, due to #918 this becomes a regression in that we now rely upon the result mapping to be very accurate, else we can assign result-type processors to the wrong column. In all versions, this issue also has the effect that a simple EXISTS will not apply the Boolean type handler, leading to simple 1/0 values for backends without native boolean instead of True/False. The fix includes that an EXISTS columns argument will be anon-labeled like other column expressions; a similar fix is implemented for pure-boolean expressions like ``not_(True())``. fixes #3372
* - Fixed more regressions caused by NEVER_SET; comparisonsMike Bayer2015-04-206-25/+48
| | | | | | | | | to transient objects with attributes unset would leak NEVER_SET, and negated_contains_or_equals would do so for any transient object as the comparison used only the committed value. Repaired the NEVER_SET cases, fixes #3371, and also made negated_contains_or_equals() use state_attr_by_column() just like a non-negated comparison, fixes #3374
* 1.0.1Mike Bayer2015-04-171-1/+1
|
* - Fixed a critical regression caused by :ticket:`3061` where theMike Bayer2015-04-173-1/+5
| | | | | | | | | | | NEVER_SET symbol could easily leak into a lazyload query, subsequent to the flush of a pending object. This would occur typically for a many-to-one relationship that does not use a simple "get" strategy. The good news is that the fix improves efficiency vs. 0.9, because we can now skip the SELECT statement entirely when we detect NEVER_SET symbols present in the parameters; prior to :ticket:`3061`, we couldn't discern if the None here were set or not. fixes #3368
* - Identified an inconsistency when handling :meth:`.Query.join` to theMike Bayer2015-04-151-1/+7
| | | | | | | | | | | same target more than once; it implicitly dedupes only in the case of a relationship join, and due to :ticket:`3233`, in 1.0 a join to the same table twice behaves differently than 0.9 in that it no longer erroneously aliases. To help document this change, the verbiage regarding :ticket:`3233` in the migration notes has been generalized, and a warning has been added when :meth:`.Query.join` is called against the same target relationship more than once. fixes #3367
* - Made a small improvement to the heuristics of relationship whenMike Bayer2015-04-121-0/+9
| | | | | | | | | determining remote side with semi-self-referential (e.g. two joined inh subclasses referring to each other), non-simple join conditions such that the parententity is taken into account and can reduce the need for using the ``remote()`` annotation; this can restore some cases that might have worked without the annotation prior to 0.9.4 via :ticket:`2948`. fixes #3364
* - Fixed issue where a :class:`.MetaData` object that used a namingMike Bayer2015-04-101-1/+4
| | | | | | | | convention would not properly work with pickle. The attribute was skipped leading to inconsistencies and failures if the unpickled :class:`.MetaData` object were used to base additional tables from. fixes #3362
* - ensure that the keys we put into the parameters dictionaryMike Bayer2015-04-081-2/+4
| | | | | | | for an insert from select are the string names, and not the Column objects. The MSSQL dialect in particular relies upon checking for these keys in params to know if identity insert should be on. references #3360
* - Fixed a regression where the "last inserted id" mechanics wouldMike Bayer2015-04-081-12/+20
| | | | | | fail to store the correct value for MSSQL on an INSERT where the primary key value was present in the insert params before execution. fixes #3360
* - pymssql has PEP249 Binary contructor since 2.1.1pr/166Ramiro Morales2015-04-051-4/+5
| | | | See https://github.com/pymssql/pymssql/commit/e7fb15dd29090e1f1bb570842b53aea1ec32d8f0
* - Fixed a long-standing bug where the :class:`.Enum` type as usedMike Bayer2015-04-042-2/+2
| | | | | | | | | | with the psycopg2 dialect in conjunction with non-ascii values and ``native_enum=False`` would fail to decode return results properly. This stemmed from when the PG :class:`.postgresql.ENUM` type used to be a standalone type without a "non native" option. fixes #3354 - corrected the assertsql comparison rule to expect a non-ascii SQL string
* Merge branch 'bb_issue_3084' of https://bitbucket.org/xflr6/sqlalchemy into pr47Mike Bayer2015-04-033-10/+15
|\
| * make sort_tables order deterministicSebastian Bank2015-03-073-10/+15
| |
* | - next will be 1.0.0Mike Bayer2015-04-031-1/+1
| |
* | - changelog + docstring for pullreq github:164Mike Bayer2015-04-031-0/+7
| |
* | Merge remote-tracking branch 'origin/pr/164' into pr164Mike Bayer2015-04-032-6/+9
|\ \
| * | Allow kwargs to be passed through update()pr/164Amir Sadoughi2015-03-202-6/+9
| | | | | | | | | | | | | | | This is useful to be able to pass in mysql_limit=1 from using the ORM.
* | | - Fixed bug where the state tracking within multiple, nestedMike Bayer2015-04-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | :meth:`.Session.begin_nested` operations would fail to propagate the "dirty" flag for an object that had been updated within the inner savepoint, such that if the enclosing savepoint were rolled back, the object would not be part of the state that was expired and therefore reverted to its database state. fixes #3352
* | | - :class:`.Query` doesn't support joins, subselects, or specialMike Bayer2015-04-012-26/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FROM clauses when using the :meth:`.Query.update` or :meth:`.Query.delete` methods; instead of silently ignoring these fields if methods like :meth:`.Query.join` or :meth:`.Query.select_from` has been called, an error is raised. In 0.9.10 this only emits a warning. fixes #3349 - don't needlessly call _compile_context() and build up a whole statement that we never need. Construct QueryContext as it's part of the event contract, but don't actually call upon mapper attributes; use more direct systems of determining the update or delete table. - don't realy need _no_select_modifiers anymore
* | | - Added a list() call around a weak dictionary used within theMike Bayer2015-04-011-1/+1
| | | | | | | | | | | | | | | | | | commit phase of the session, which without it could cause a "dictionary changed size during iter" error if garbage collection interacted within the process. Change was introduced by
* | | - Fixed bug where updated PG index reflection as a result ofMike Bayer2015-04-011-31/+53
| | | | | | | | | | | | | | | | | | | | | :ticket:`3184` would cause index operations to fail on Postgresql versions 8.4 and earlier. The enhancements are now disabled when using an older version of Postgresql. fixes #3343
* | | - The warning emitted by the unicode type for a non-unicode typeMike Bayer2015-03-311-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | has been liberalized to warn for values that aren't even string values, such as integers; previously, the updated warning system of 1.0 made use of string formatting operations which would raise an internal TypeError. While these cases should ideally raise totally, some backends like SQLite and MySQL do accept them and are potentially in use by legacy code, not to mention that they will always pass through if unicode conversion is turned off for the target backend. fixes #3346
* | | - further fixes for #3347; track the mappers we're joiningMike Bayer2015-03-312-22/+53
| | | | | | | | | | | | | | | between fully and match on those, rather than trying to compare selectables; fixes #3347
* | | - Fixed a bug related to "nested" inner join eager loading, whichMike Bayer2015-03-301-22/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exists in 0.9 as well but is more of a regression in 1.0 due to :ticket:`3008` which turns on "nested" by default, such that a joined eager load that travels across sibling paths from a common ancestor using innerjoin=True will correctly splice each "innerjoin" sibling into the appropriate part of the join, when a series of inner/outer joins are mixed together. fixes #3347
* | | call this 1.0.0b5 for the momentMike Bayer2015-03-301-1/+1
| | |
* | | Fix typospr/165Ernest Walzel2015-03-261-1/+1
|/ / | | | | | | | | agaisnt -> against 'a Alias' -> 'an Alias'
* | - fix this for pg8000 of all backends...Mike Bayer2015-03-241-1/+1
| |
* | - also add this to Oracle, and defensively to firebird and sybaseMike Bayer2015-03-243-0/+5
| |
* | - Turned off the "simple order by" flag on the MSSQL dialect; thisMike Bayer2015-03-242-0/+10
| | | | | | | | | | | | | | | | | | | | | | is the flag that per :ticket:`2992` causes an order by or group by an expression that's also in the columns clause to be copied by label, even if referenced as the expression object. The behavior for MSSQL is now the old behavior that copies the whole expression in by default, as MSSQL can be picky on these particularly in GROUP BY expressions. fixes #3338 - Add a test that includes a composed label in a GROUP BY
* | - The "auto-attach" feature of constraints such as :class:`.UniqueConstraint`Mike Bayer2015-03-241-17/+37
| | | | | | | | | | | | | | | | | | | | and :class:`.CheckConstraint` has been further enhanced such that when the constraint is associated with non-table-bound :class:`.Column` objects, the constraint will set up event listeners with the columns themselves such that the constraint auto attaches at the same time the columns are associated with the table. This in particular helps in some edge cases in declarative but is also of general use. fixes #3341
* | - Fixed bug in new "label resolution" feature of :ticket:`2992` whereMike Bayer2015-03-232-2/+3
| | | | | | | | | | | | | | | | a label that was anonymous, then labeled again with a name, would fail to be locatable via a textual label. This situation occurs naturally when a mapped :func:`.column_property` is given an explicit label in a query. fixes #3340
* | - Fixed unicode support for PyMySQL when using an "executemany"Mike Bayer2015-03-221-0/+5
| | | | | | | | | | | | | | | | | | operation with unicode parameters. SQLAlchemy now passes both the statement as well as the bound parameters as unicode objects, as PyMySQL generally uses string interpolation internally to produce the final statement, and in the case of executemany does the "encode" step only on the final statement. fixes #3337
* | - more updates to the unicode mess to frame this inMike Bayer2015-03-225-75/+63
| | | | | | | | as up-to-date recommendations as possible
* | some doc defensesMike Bayer2015-03-213-2/+10
| |