Mike Bayer [Fri, 29 Nov 2013 03:25:09 +0000 (22:25 -0500)]
- fix up rendering of "of"
- move out tests, dialect specific out of compiler, compiler tests use new API,
legacy API tests in test_selecatble
- add support for adaptation of ForUpdateArg, alias support in compilers
Mike Bayer [Wed, 27 Nov 2013 04:24:13 +0000 (23:24 -0500)]
- the wrapped memoized_property here was not working, as the attribute name
didn't match. use straight memoized_props here for now, add a perf test to check it
Mike Bayer [Mon, 25 Nov 2013 19:46:58 +0000 (14:46 -0500)]
- adjustment, the spec says: "Within the user and password field, any ":",
"@", or "/" must be encoded." - so re-apply encoding to both password
and username, don't encode spaces as plus signs, don't encode any chars
outside of :, @, / on stringification - but we still parse for any
%XX character (is that right?)
Mike Bayer [Sun, 24 Nov 2013 23:11:37 +0000 (18:11 -0500)]
- The :func:`.create_engine` routine and the related
:func:`.make_url` function **no longer URL encode the password**.
Database passwords that include characters like spaces, plus signs
and anything else should now represent these characters directly,
without any URL escaping. [ticket:2873]
Mike Bayer [Sat, 23 Nov 2013 22:03:48 +0000 (17:03 -0500)]
- Some refinements to the :class:`.AliasedClass` construct with regards
to descriptors, like hybrids, synonyms, composites, user-defined
descriptors, etc. The attribute
adaptation which goes on has been made more robust, such that if a descriptor
returns another instrumented attribute, rather than a compound SQL
expression element, the operation will still proceed.
Addtionally, the "adapted" operator will retain its class; previously,
a change in class from ``InstrumentedAttribute`` to ``QueryableAttribute``
(a superclass) would interact with Python's operator system such that
an expression like ``aliased(MyClass.x) > MyClass.x`` would reverse itself
to read ``myclass.x < myclass_1.x``. The adapted attribute will also
refer to the new :class:`.AliasedClass` as its parent which was not
always the case before. [ticket:2872]
Mike Bayer [Sat, 23 Nov 2013 01:04:19 +0000 (20:04 -0500)]
- The precision used when coercing a returned floating point value to
Python ``Decimal`` via string is now configurable. The
flag ``decimal_return_scale`` is now supported by all :class:`.Numeric`
and :class:`.Float` types, which will ensure this many digits are taken
from the native floating point value when it is converted to string.
If not present, the type will make use of the value of ``.scale``, if
the type supports this setting and it is non-None. Otherwise the original
default length of 10 is used. [ticket:2867]
Mike Bayer [Fri, 22 Nov 2013 23:35:36 +0000 (18:35 -0500)]
- Fixed bug where SQL statement would be improperly ASCII-encoded
when a pre-DBAPI :class:`.StatementError` were raised within
:meth:`.Connection.execute`, causing encoding errors for
non-ASCII statements. The stringification now remains within
Python unicode thus avoiding encoding errors. [ticket:2871]
Mike Bayer [Fri, 22 Nov 2013 22:56:35 +0000 (17:56 -0500)]
Fixed bug where Oracle ``VARCHAR`` types given with no length
(e.g. for a ``CAST`` or similar) would incorrectly render ``None CHAR``
or similar. [ticket:2870]
Mike Bayer [Thu, 21 Nov 2013 18:30:32 +0000 (13:30 -0500)]
- Fixed bug which prevented the ``serializer`` extension from working
correctly with table or column names that contain non-ASCII
characters. [ticket:2869]
Mike Bayer [Thu, 21 Nov 2013 18:16:49 +0000 (13:16 -0500)]
- Fixed a regression caused by :ticket:`2812` where the repr() for
table and column names would fail if the name contained non-ascii
characters. [ticket:2868]
Mike Bayer [Wed, 20 Nov 2013 00:29:18 +0000 (19:29 -0500)]
- The :class:`.RowProxy` object is now sortable in Python as a regular
tuple is; this is accomplished via ensuring tuple() conversion on
both sides within the ``__eq__()`` method as well as
the addition of a ``__lt__()`` method. [ticket:2848]
Mike Bayer [Wed, 20 Nov 2013 00:16:26 +0000 (19:16 -0500)]
- The ``viewonly`` flag on :func:`.relationship` will now prevent
attribute history from being written on behalf of the target attribute.
This has the effect of the object not being written to the
Session.dirty list if it is mutated. Previously, the object would
be present in Session.dirty, but no change would take place on behalf
of the modified attribute during flush. The attribute still emits
events such as backref events and user-defined events and will still
receive mutations from backrefs. [ticket:2833]
Mike Bayer [Sun, 10 Nov 2013 07:55:06 +0000 (02:55 -0500)]
- tutorial updates
- emphasis on not using a custom contructor by default, making sure it's clear that
you *can* use one
- other separation of narrative from special notes using sidebars
Mike Bayer [Sun, 10 Nov 2013 00:42:01 +0000 (19:42 -0500)]
- add a new sphinx extension "viewsource". takes advantage of part of the viewcode extension
to allow ad-hoc display of the source of any file, as well as a "directory listing" structure.
- reorganize examples/ to take advantage of new extension. in particular, keep moving all
the descriptive text for files etc. into module docstrings, taking more advantage of
self-documentation.
Mike Bayer [Fri, 8 Nov 2013 01:35:24 +0000 (20:35 -0500)]
- Fixed bug which prevented history_meta recipe from working with
joined inheritance schemes more than one level deep.
- don't need to use _lib.py here anymore now that these features are in
sqlalchemy.testing
Mike Bayer [Fri, 1 Nov 2013 19:24:43 +0000 (15:24 -0400)]
- Fixed a regression introduced by the join rewriting feature of
:ticket:`2369` and :ticket:`2587` where a nested join with one side
already an aliased select would fail to translate the ON clause on the
outside correctly; in the ORM this could be seen when using a
SELECT statement as a "secondary" table. [ticket:2858]
Mike Bayer [Thu, 31 Oct 2013 19:29:45 +0000 (15:29 -0400)]
- add a section re: using column_reflect for mapping, link to it from the "naming columns distinctly" and "column_prefix" sections since this is often what ppl are looking for. [ticket:2856] is related.
Mike Bayer [Wed, 30 Oct 2013 14:34:31 +0000 (10:34 -0400)]
- Fixed a regression introduced by :ticket:`2818` where the EXISTS
query being generated would produce a "columns being replaced"
warning for a statement with two same-named columns,
as the internal SELECT wouldn't have use_labels set.
Mike Bayer [Sun, 27 Oct 2013 22:14:44 +0000 (18:14 -0400)]
- Fixed bug where index reflection would mis-interpret indkey values
when using the pypostgresql adapter, which returns these values
as lists vs. psycopg2's return type of string.
[ticket:2855]
Mike Bayer [Fri, 25 Oct 2013 23:11:53 +0000 (19:11 -0400)]
- Fixed bug where Oracle table reflection using synonyms would fail
if the synonym and the table were in different remote schemas.
Patch to fix courtesy Kyle Derr. [ticket:2853]