Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f814da2

Browse files
committed
- 1.3.0b2
1 parent cb615dc commit f814da2

File tree

18 files changed

+226
-210
lines changed

18 files changed

+226
-210
lines changed

doc/build/changelog/changelog_13.rst

Lines changed: 224 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,230 @@
1212

1313
.. changelog::
1414
:version: 1.3.0b2
15-
:include_notes_from: unreleased_13
15+
:released: January 25, 2019
16+
17+
.. change::
18+
:tags: bug, ext
19+
:tickets: 4401
20+
21+
Fixed a regression in 1.3.0b1 caused by :ticket:`3423` where association
22+
proxy objects that access an attribute that's only present on a polymorphic
23+
subclass would raise an ``AttributeError`` even though the actual instance
24+
being accessed was an instance of that subclass.
25+
26+
.. change::
27+
:tags: bug, orm
28+
:tickets: 1103
29+
30+
Fixed long-standing issue where duplicate collection members would cause a
31+
backref to delete the association between the member and its parent object
32+
when one of the duplicates were removed, as occurs as a side effect of
33+
swapping two objects in one statement.
34+
35+
.. seealso::
36+
37+
:ref:`change_1103`
38+
39+
.. change::
40+
:tags: bug, mssql
41+
:tickets: 4222
42+
43+
The ``literal_processor`` for the :class:`.Unicode` and
44+
:class:`.UnicodeText` datatypes now render an ``N`` character in front of
45+
the literal string expression as required by SQL Server for Unicode string
46+
values rendered in SQL expressions.
47+
48+
.. change::
49+
:tags: feature, orm
50+
:tickets: 4423
51+
52+
Implemented a new feature whereby the :class:`.AliasedClass` construct can
53+
now be used as the target of a :func:`.relationship`. This allows the
54+
concept of "non primary mappers" to no longer be necessary, as the
55+
:class:`.AliasedClass` is much easier to configure and automatically inherits
56+
all the relationships of the mapped class, as well as preserves the
57+
ability for loader options to work normally.
58+
59+
.. seealso::
60+
61+
:ref:`change_4423`
62+
63+
.. change::
64+
:tags: bug, orm
65+
:tickets: 4373
66+
67+
Extended the fix first made as part of :ticket:`3287`, where a loader option
68+
made against a subclass using a wildcard would extend itself to include
69+
application of the wildcard to attributes on the super classes as well, to a
70+
"bound" loader option as well, e.g. in an expression like
71+
``Load(SomeSubClass).load_only('foo')``. Columns that are part of the
72+
parent class of ``SomeSubClass`` will also be excluded in the same way as if
73+
the unbound option ``load_only('foo')`` were used.
74+
75+
.. change::
76+
:tags: bug, orm
77+
:tickets: 4433
78+
79+
Improved error messages emitted by the ORM in the area of loader option
80+
traversal. This includes early detection of mis-matched loader strategies
81+
along with a clearer explanation why these strategies don't match.
82+
83+
84+
.. change::
85+
:tags: change, orm
86+
:tickets: 4412
87+
88+
Added a new function :func:`.close_all_sessions` which takes
89+
over the task of the :meth:`.Session.close_all` method, which
90+
is now deprecated as this is confusing as a classmethod.
91+
Pull request courtesy Augustin Trancart.
92+
93+
.. change::
94+
:tags: feature, orm
95+
:tickets: 4397
96+
97+
Added new :meth:`.MapperEvents.before_mapper_configured` event. This
98+
event complements the other "configure" stage mapper events with a per
99+
mapper event that receives each :class:`.Mapper` right before its
100+
configure step, and additionally may be used to prevent or delay the
101+
configuration of specific :class:`.Mapper` objects using a new
102+
return value :attr:`.orm.interfaces.EXT_SKIP`. See the
103+
documentation link for an example.
104+
105+
.. seealso::
106+
107+
:meth:`.MapperEvents.before_mapper_configured`
108+
109+
110+
111+
.. change::
112+
:tags: bug, orm
113+
114+
The "remove" event for collections is now called before the item is removed
115+
in the case of the ``collection.remove()`` method, as is consistent with the
116+
behavior for most other forms of collection item removal (such as
117+
``__delitem__``, replacement under ``__setitem__``). For ``pop()`` methods,
118+
the remove event still fires after the operation.
119+
120+
.. change::
121+
:tags: bug, orm declarative
122+
:tickets: 4372
123+
124+
Added a ``__clause_element__()`` method to :class:`.ColumnProperty` which
125+
can allow the usage of a not-fully-declared column or deferred attribute in
126+
a declarative mapped class slightly more friendly when it's used in a
127+
constraint or other column-oriented scenario within the class declaration,
128+
though this still can't work in open-ended expressions; prefer to call the
129+
:attr:`.ColumnProperty.expression` attribute if receiving ``TypeError``.
130+
131+
.. change::
132+
:tags: bug, orm, engine
133+
:tickets: 4406
134+
135+
Added accessors for execution options to Core and ORM, via
136+
:meth:`.Query.get_execution_options`,
137+
:meth:`.Connection.get_execution_options`,
138+
:meth:`.Engine.get_execution_options`, and
139+
:meth:`.Executable.get_execution_options`. PR courtesy Daniel Lister.
140+
141+
.. change::
142+
:tags: bug, orm
143+
:tickets: 4446
144+
145+
Fixed issue in association proxy due to :ticket:`3423` which caused the use
146+
of custom :class:`.PropComparator` objects with hybrid attribites, such as
147+
the one demonstrated in the ``dictlike-polymorphic`` example to not
148+
function within an association proxy. The strictness that was added in
149+
:ticket:`3423` has been relaxed, and additional logic to accomodate for
150+
an association proxy that links to a custom hybrid have been added.
151+
152+
.. change::
153+
:tags: change, general
154+
:tickets: 4393
155+
156+
A large change throughout the library has ensured that all objects,
157+
parameters, and behaviors which have been noted as deprecated or legacy now
158+
emit ``DeprecationWarning`` warnings when invoked.As the Python 3
159+
interpreter now defaults to displaying deprecation warnings, as well as that
160+
modern test suites based on tools like tox and pytest tend to display
161+
deprecation warnings, this change should make it easier to note what API
162+
features are obsolete. A major rationale for this change is so that long-
163+
deprecated features that nonetheless still see continue to see real world
164+
use can finally be removed in the near future; the biggest example of this
165+
are the :class:`.SessionExtension` and :class:`.MapperExtension` classes as
166+
well as a handful of other pre-event extension hooks, which have been
167+
deprecated since version 0.7 but still remain in the library. Another is
168+
that several major longstanding behaviors are to be deprecated as well,
169+
including the threadlocal engine strategy, the convert_unicode flag, and non
170+
primary mappers.
171+
172+
.. seealso::
173+
174+
:ref:`change_4393_general`
175+
176+
177+
.. change::
178+
:tags: change, engine
179+
:tickets: 4393
180+
181+
The "threadlocal" engine strategy which has been a legacy feature of
182+
SQLAlchemy since around version 0.2 is now deprecated, along with the
183+
:paramref:`.Pool.threadlocal` parameter of :class:`.Pool` which has no
184+
effect in most modern use cases.
185+
186+
.. seealso::
187+
188+
:ref:`change_4393_threadlocal`
189+
190+
.. change::
191+
:tags: change, sql
192+
:tickets: 4393
193+
194+
The :paramref:`.create_engine.convert_unicode` and
195+
:paramref:`.String.convert_unicode` parameters have been deprecated. These
196+
parameters were built back when most Python DBAPIs had little to no support
197+
for Python Unicode objects, and SQLAlchemy needed to take on the very
198+
complex task of marshalling data and SQL strings between Unicode and
199+
bytestrings throughout the system in a performant way. Thanks to Python 3,
200+
DBAPIs were compelled to adapt to Unicode-aware APIs and today all DBAPIs
201+
supported by SQLAlchemy support Unicode natively, including on Python 2,
202+
allowing this long-lived and very complicated feature to finally be (mostly)
203+
removed. There are still of course a few Python 2 edge cases where
204+
SQLAlchemy has to deal with Unicode however these are handled automatically;
205+
in modern use, there should be no need for end-user interaction with these
206+
flags.
207+
208+
.. seealso::
209+
210+
:ref:`change_4393_convertunicode`
211+
212+
.. change::
213+
:tags: bug, orm
214+
:tickets: 3777
215+
216+
Implemented the ``.get_history()`` method, which also implies availability
217+
of :attr:`.AttributeState.history`, for :func:`.synonym` attributes.
218+
Previously, trying to access attribute history via a synonym would raise an
219+
``AttributeError``.
220+
221+
.. change::
222+
:tags: feature, engine
223+
:tickets: 3689
224+
225+
Added public accessor :meth:`.QueuePool.timeout` that returns the configured
226+
timeout for a :class:`.QueuePool` object. Pull request courtesy Irina Delamare.
227+
228+
.. change::
229+
:tags: feature, sql
230+
:tickets: 4386
231+
232+
Amended the :class:`.AnsiFunction` class, the base of common SQL
233+
functions like ``CURRENT_TIMESTAMP``, to accept positional arguments
234+
like a regular ad-hoc function. This to suit the case that many of
235+
these functions on specific backends accept arguments such as
236+
"fractional seconds" precision and such. If the function is created
237+
with arguments, it renders the parenthesis and the arguments. If
238+
no arguments are present, the compiler generates the non-parenthesized form.
16239

17240
.. changelog::
18241
:version: 1.3.0b1

doc/build/changelog/unreleased_13/1103.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

doc/build/changelog/unreleased_13/3689.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

doc/build/changelog/unreleased_13/3777.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

doc/build/changelog/unreleased_13/4372.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

doc/build/changelog/unreleased_13/4373.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

doc/build/changelog/unreleased_13/4386.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

doc/build/changelog/unreleased_13/4393.rst

Lines changed: 0 additions & 59 deletions
This file was deleted.

doc/build/changelog/unreleased_13/4397.rst

Lines changed: 0 additions & 17 deletions
This file was deleted.

doc/build/changelog/unreleased_13/4401.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)