Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > b0b6ffab06cbeede296e36ce94734bf8 > files > 741

python3-sqlalchemy-1.2.19-1.mga7.armv7hl.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        
        <title>
            
    
    1.2 Changelog
 &mdash;
    SQLAlchemy 1.2 Documentation

        </title>

        
            <!-- begin iterate through site-imported + sphinx environment css_files -->
                <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
                <link rel="stylesheet" href="../_static/docs.css" type="text/css" />
                <link rel="stylesheet" href="../_static/changelog.css" type="text/css" />
                <link rel="stylesheet" href="../_static/sphinx_paramlinks.css" type="text/css" />
            <!-- end iterate through site-imported + sphinx environment css_files -->
        

        

    

    <!-- begin layout.mako headers -->

    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
        <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="SQLAlchemy 1.2 Documentation" href="../index.html" />
        <link rel="up" title="Changes and Migration" href="index.html" />
        <link rel="next" title="1.1 Changelog" href="changelog_11.html" />
        <link rel="prev" title="What’s New in SQLAlchemy 1.2?" href="migration_12.html" />
    <!-- end layout.mako headers -->


    </head>
    <body>
        
















<div id="docs-container">





<div id="docs-top-navigation-container" class="body-background">
<div id="docs-header">
    <div id="docs-version-header">
        Release: <span class="version-num">1.2.19</span>


        | Release Date: April 15, 2019

    </div>

    <h1>SQLAlchemy 1.2 Documentation</h1>

</div>
</div>

<div id="docs-body-container">

    <div id="fixed-sidebar" class="withsidebar">


        <div id="docs-sidebar-popout">
            <h3><a href="../index.html">SQLAlchemy 1.2 Documentation</a></h3>
            <p id="sidebar-topnav">
                <a href="../contents.html">Contents</a> |
                <a href="../genindex.html">Index</a>
            </p>

            <div id="sidebar-search">
                <form class="search" action="../search.html" method="get">
                  <label>
                  Search terms:
                  <input type="text" placeholder="search..." name="q" size="12" />
                  </label>
                  <input type="hidden" name="check_keywords" value="yes" />
                  <input type="hidden" name="area" value="default" />
                </form>
            </div>

        </div>

        <div id="docs-sidebar">

        <div id="sidebar-banner">
            
        </div>

        <div id="docs-sidebar-inner">

        
        <h3>
            <a href="index.html" title="Changes and Migration">Changes and Migration</a>
        </h3>

        <ul>
<li><span class="link-container"><a class="reference external" href="migration_12.html">What’s New in SQLAlchemy 1.2?</a></span></li>
<li class="selected"><span class="link-container"><strong>1.2 Changelog</strong><a class="paramlink headerlink reference internal" href="#">¶</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.19">1.2.19</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.19-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.19-engine">engine</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.19-mssql">mssql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.19-oracle">oracle</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.19-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.18">1.2.18</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.18-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.18-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.18-mysql">mysql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.18-sqlite">sqlite</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.18-mssql">mssql</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.17">1.2.17</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.17-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.17-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.17-oracle">oracle</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.16">1.2.16</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.16-engine">engine</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.16-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.16-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.16-sqlite">sqlite</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.16-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.15">1.2.15</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.15-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.15-orm-declarative">orm declarative</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.15-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.14">1.2.14</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.14-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.14-mysql">mysql</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.13">1.2.13</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.13-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.13-orm-declarative">orm declarative</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.13-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.13-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.13-mysql">mysql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.13-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.12">1.2.12</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.12-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.12-orm-declarative">orm declarative</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.12-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.12-oracle">oracle</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.12-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.11">1.2.11</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.11-orm-declarative">orm declarative</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.11-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.11-oracle">oracle</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.11-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.10">1.2.10</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.10-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.10-sql">sql</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.9">1.2.9</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.9-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.9-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.9-mysql">mysql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.9-sqlite">sqlite</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.9-mssql">mssql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.9-oracle">oracle</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.9-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.8">1.2.8</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.8-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.8-engine">engine</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.8-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.8-mssql">mssql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.8-oracle">oracle</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.8-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.7">1.2.7</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.7-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.7-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.7-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.7-mssql">mssql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.7-oracle">oracle</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.6">1.2.6</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.6-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.6-engine">engine</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.6-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.6-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.6-mssql">mssql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.6-oracle">oracle</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.6-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.5">1.2.5</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.5-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.5-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.5-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.5-mysql">mysql</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.4">1.2.4</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.4-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.4-engine">engine</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.4-sql">sql</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.3">1.2.3</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.3-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.3-engine">engine</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.3-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.3-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.3-sqlite">sqlite</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.3-oracle">oracle</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.3-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.2">1.2.2</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.2-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.2-mysql">mysql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.2-mssql">mssql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.2-oracle">oracle</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.1">1.2.1</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.1-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.1-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.1-mssql">mssql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.1-oracle">oracle</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.1-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0">1.2.0</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0-orm-declarative">orm declarative</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0-engine">engine</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0-mysql">mysql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0-mssql">mssql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0-oracle">oracle</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b3">1.2.0b3</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b3-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b3-orm-declarative">orm declarative</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b3-engine">engine</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b3-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b3-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b3-mysql">mysql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b3-mssql">mssql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b3-oracle">oracle</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b2">1.2.0b2</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b2-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b2-misc">misc</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1">1.2.0b1</a></span><ul>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1-orm">orm</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1-orm-declarative">orm declarative</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1-engine">engine</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1-sql">sql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1-schema">schema</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1-postgresql">postgresql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1-mysql">mysql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1-mssql">mssql</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1-oracle">oracle</a></span></li>
<li><span class="link-container"><a class="reference external" href="#change-1.2.0b1-misc">misc</a></span></li>
</ul>
</li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="changelog_11.html">1.1 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="changelog_10.html">1.0 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="changelog_09.html">0.9 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="changelog_08.html">0.8 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="changelog_07.html">0.7 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="changelog_06.html">0.6 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="changelog_05.html">0.5 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="changelog_04.html">0.4 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="changelog_03.html">0.3 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="changelog_02.html">0.2 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="changelog_01.html">0.1 Changelog</a></span></li>
<li><span class="link-container"><a class="reference external" href="migration_11.html">What’s New in SQLAlchemy 1.1?</a></span></li>
<li><span class="link-container"><a class="reference external" href="migration_10.html">What’s New in SQLAlchemy 1.0?</a></span></li>
<li><span class="link-container"><a class="reference external" href="migration_09.html">What’s New in SQLAlchemy 0.9?</a></span></li>
<li><span class="link-container"><a class="reference external" href="migration_08.html">What’s New in SQLAlchemy 0.8?</a></span></li>
<li><span class="link-container"><a class="reference external" href="migration_07.html">What’s New in SQLAlchemy 0.7?</a></span></li>
<li><span class="link-container"><a class="reference external" href="migration_06.html">What’s New in SQLAlchemy 0.6?</a></span></li>
<li><span class="link-container"><a class="reference external" href="migration_05.html">What’s new in SQLAlchemy 0.5?</a></span></li>
<li><span class="link-container"><a class="reference external" href="migration_04.html">What’s new in SQLAlchemy 0.4?</a></span></li>
</ul>



        </div>

        </div>

    </div>

    

    <div id="docs-body" class="withsidebar" >
        
<div class="section" id="changelog">
<h1>1.2 Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h1>
<div class="section" id="change-1.2.19">
<h2>1.2.19<a class="headerlink" href="#change-1.2.19" title="Permalink to this headline">¶</a></h2>
Released: April 15, 2019<div class="section" id="change-1.2.19-orm">
<h3>orm<a class="headerlink" href="#change-1.2.19-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.19-0"><span class="target" id="change-bb178640246ef9e12f9a5c1636fa0753"><strong>[orm] [bug] </strong></span><p>Fixed a regression in 1.2 due to the introduction of baked queries for
relationship lazy loaders, where a race condition is created during the
generation of the “lazy clause” which occurs within a memoized attribute. If
two threads initialize the memoized attribute concurrently, the baked query
could be generated with bind parameter keys that are then replaced with new
keys by the next run, leading to a lazy load query that specifies the
related criteria as <code class="docutils literal notranslate"><span class="pre">None</span></code>. The fix establishes that the parameter names
are fixed before the new clause and parameter objects are generated, so that
the names are the same every time.</p>
<a class="changeset-link headerlink reference internal" href="#change-bb178640246ef9e12f9a5c1636fa0753">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4507">#4507</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.19-engine">
<h3>engine<a class="headerlink" href="#change-1.2.19-engine" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.19-1"><span class="target" id="change-ea639097b9b731ffff034a3caf64d1b8"><strong>[engine] [bug] </strong></span><p>Comparing two objects of <a class="reference internal" href="../core/engines.html#sqlalchemy.engine.url.URL" title="sqlalchemy.engine.url.URL"><code class="xref py py-class docutils literal notranslate"><span class="pre">URL</span></code></a> using <code class="docutils literal notranslate"><span class="pre">__eq__()</span></code> did not take port
number into consideration, two objects differing only by port number were
considered equal. Port comparison is now added in <code class="docutils literal notranslate"><span class="pre">__eq__()</span></code> method of
<a class="reference internal" href="../core/engines.html#sqlalchemy.engine.url.URL" title="sqlalchemy.engine.url.URL"><code class="xref py py-class docutils literal notranslate"><span class="pre">URL</span></code></a>, objects differing by port number are now not equal.
Additionally, <code class="docutils literal notranslate"><span class="pre">__ne__()</span></code> was not implemented for <a class="reference internal" href="../core/engines.html#sqlalchemy.engine.url.URL" title="sqlalchemy.engine.url.URL"><code class="xref py py-class docutils literal notranslate"><span class="pre">URL</span></code></a> which
caused unexpected result when <code class="docutils literal notranslate"><span class="pre">!=</span></code> was used in Python2, since there are no
implied relationships among the comparison operators in Python2.</p>
<a class="changeset-link headerlink reference internal" href="#change-ea639097b9b731ffff034a3caf64d1b8">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4406">#4406</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.19-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.19-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.19-2"><span class="target" id="change-d3a590256044351b5aaa9c973f707cb4"><strong>[mssql] [bug] </strong></span><p>A commit() is emitted after an isolation level change to SNAPSHOT, as both
pyodbc and pymssql open an implicit transaction which blocks subsequent SQL
from being emitted in the current transaction.</p>
<a class="changeset-link headerlink reference internal" href="#change-d3a590256044351b5aaa9c973f707cb4">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4536">#4536</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.19-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.19-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.19-3"><span class="target" id="change-5c03e6a8efd36dd7e397e3d0801810e2"><strong>[oracle] [bug] </strong></span><p>Added support for reflection of the <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.NCHAR" title="sqlalchemy.types.NCHAR"><code class="xref py py-class docutils literal notranslate"><span class="pre">NCHAR</span></code></a> datatype to the Oracle
dialect, and added <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.NCHAR" title="sqlalchemy.types.NCHAR"><code class="xref py py-class docutils literal notranslate"><span class="pre">NCHAR</span></code></a> to the list of types exported by the
Oracle dialect.</p>
<a class="changeset-link headerlink reference internal" href="#change-5c03e6a8efd36dd7e397e3d0801810e2">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4506">#4506</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.19-misc">
<h3>misc<a class="headerlink" href="#change-1.2.19-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.19-4"><span class="target" id="change-5c696233b5253be50cdea187ff166c20"><strong>[bug] [examples] </strong></span><p>Fixed bug in large_resultsets example case where a re-named “id” variable
due to code reformatting caused the test to fail.  Pull request courtesy
Matt Schuchhardt.</p>
<a class="changeset-link headerlink reference internal" href="#change-5c696233b5253be50cdea187ff166c20">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4528">#4528</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.18">
<h2>1.2.18<a class="headerlink" href="#change-1.2.18" title="Permalink to this headline">¶</a></h2>
Released: February 15, 2019<div class="section" id="change-1.2.18-orm">
<h3>orm<a class="headerlink" href="#change-1.2.18-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.18-0"><span class="target" id="change-f5e2aca3a9b4b910fc0245ad1bd302ce"><strong>[orm] [bug] </strong></span><p>Fixed a regression in 1.2 where a wildcard/load_only loader option would
not work correctly against a loader path where of_type() were used to limit
to a particular subclass.  The fix only works for of_type() of a simple
subclass so far, not a with_polymorphic entity which will be addressed in a
separate issue; it is unlikely this latter case was working previously.</p>
<a class="changeset-link headerlink reference internal" href="#change-f5e2aca3a9b4b910fc0245ad1bd302ce">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4468">#4468</a></p>
</p>
</li>
<li><p id="change-1.2.18-1"><span class="target" id="change-3f1907e5dc26d068e3cbea4550966bb6"><strong>[orm] [bug] </strong></span><p>Fixed fairly simple but critical issue where the
<a class="reference internal" href="../orm/events.html#sqlalchemy.orm.events.SessionEvents.pending_to_persistent" title="sqlalchemy.orm.events.SessionEvents.pending_to_persistent"><code class="xref py py-meth docutils literal notranslate"><span class="pre">SessionEvents.pending_to_persistent()</span></code></a> event would be invoked for
objects not just when they move from pending to persistent, but when they
were also already persistent and just being updated, thus causing the event
to be invoked for all objects on every update.</p>
<a class="changeset-link headerlink reference internal" href="#change-3f1907e5dc26d068e3cbea4550966bb6">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4489">#4489</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.18-sql">
<h3>sql<a class="headerlink" href="#change-1.2.18-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.18-2"><span class="target" id="change-d92f9cf0e1818ecd9ba70cb29d71a065"><strong>[sql] [bug] </strong></span><p>Fixed issue where the <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.JSON" title="sqlalchemy.types.JSON"><code class="xref py py-class docutils literal notranslate"><span class="pre">JSON</span></code></a> type had a read-only
<a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.JSON.should_evaluate_none" title="sqlalchemy.types.JSON.should_evaluate_none"><code class="xref py py-attr docutils literal notranslate"><span class="pre">JSON.should_evaluate_none</span></code></a> attribute, which would cause failures
when making use of the <a class="reference internal" href="../core/type_api.html#sqlalchemy.types.TypeEngine.evaluates_none" title="sqlalchemy.types.TypeEngine.evaluates_none"><code class="xref py py-meth docutils literal notranslate"><span class="pre">TypeEngine.evaluates_none()</span></code></a> method in
conjunction with this type.  Pull request courtesy Sanjana S.</p>
<a class="changeset-link headerlink reference internal" href="#change-d92f9cf0e1818ecd9ba70cb29d71a065">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4485">#4485</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.18-mysql">
<h3>mysql<a class="headerlink" href="#change-1.2.18-mysql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.18-3"><span class="target" id="change-ed94273e8df66685ebb4cc0cbc5269e2"><strong>[mysql] [bug] </strong></span><p>Fixed a second regression caused by <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4344">#4344</a> (the first was
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4361">#4361</a>), which works around MySQL issue 88718, where the lower
casing function used was not correct for Python 2 with OSX/Windows casing
conventions, which would then raise <code class="docutils literal notranslate"><span class="pre">TypeError</span></code>.  Full coverage has been
added to this logic so that every codepath is exercised in a mock style for
all three casing conventions on all versions of Python. MySQL 8.0 has
meanwhile fixed issue 88718 so the workaround is only applies to a
particular span of MySQL 8.0 versions.</p>
<a class="changeset-link headerlink reference internal" href="#change-ed94273e8df66685ebb4cc0cbc5269e2">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4492">#4492</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.18-sqlite">
<h3>sqlite<a class="headerlink" href="#change-1.2.18-sqlite" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.18-4"><span class="target" id="change-f5da1e1e696f5fc8dbc70019f3a67f04"><strong>[sqlite] [bug] </strong></span><p>Fixed bug in SQLite DDL where using an expression as a server side default
required that it be contained within parenthesis to be accepted by the
sqlite parser.  Pull request courtesy Bartlomiej Biernacki.</p>
<a class="changeset-link headerlink reference internal" href="#change-f5da1e1e696f5fc8dbc70019f3a67f04">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4474">#4474</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.18-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.18-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.18-5"><span class="target" id="change-36ca9ca74a716dac8b82c2623bcd43ec"><strong>[mssql] [bug] </strong></span><p>Fixed bug where the SQL Server “IDENTITY_INSERT” logic that allows an INSERT
to proceed with an explicit value on an IDENTITY column was not detecting
the case where <a class="reference internal" href="../core/dml.html#sqlalchemy.sql.expression.Insert.values" title="sqlalchemy.sql.expression.Insert.values"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Insert.values()</span></code></a> were used with a dictionary that
contained a <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><code class="xref py py-class docutils literal notranslate"><span class="pre">Column</span></code></a> as key and a SQL expression as a value.</p>
<a class="changeset-link headerlink reference internal" href="#change-36ca9ca74a716dac8b82c2623bcd43ec">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4499">#4499</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.17">
<h2>1.2.17<a class="headerlink" href="#change-1.2.17" title="Permalink to this headline">¶</a></h2>
Released: January 25, 2019<div class="section" id="change-1.2.17-orm">
<h3>orm<a class="headerlink" href="#change-1.2.17-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.17-0"><span class="target" id="change-92e62821060d3ee82bf81acf9850a1b5"><strong>[orm] [feature] </strong></span><p>Added new event hooks <a class="reference internal" href="../orm/events.html#sqlalchemy.orm.events.QueryEvents.before_compile_update" title="sqlalchemy.orm.events.QueryEvents.before_compile_update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">QueryEvents.before_compile_update()</span></code></a> and
<a class="reference internal" href="../orm/events.html#sqlalchemy.orm.events.QueryEvents.before_compile_delete" title="sqlalchemy.orm.events.QueryEvents.before_compile_delete"><code class="xref py py-meth docutils literal notranslate"><span class="pre">QueryEvents.before_compile_delete()</span></code></a> which complement
<a class="reference internal" href="../orm/events.html#sqlalchemy.orm.events.QueryEvents.before_compile" title="sqlalchemy.orm.events.QueryEvents.before_compile"><code class="xref py py-meth docutils literal notranslate"><span class="pre">QueryEvents.before_compile()</span></code></a> in the case of the <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.update" title="sqlalchemy.orm.query.Query.update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.update()</span></code></a>
and <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.delete" title="sqlalchemy.orm.query.Query.delete"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.delete()</span></code></a> methods.</p>
<a class="changeset-link headerlink reference internal" href="#change-92e62821060d3ee82bf81acf9850a1b5">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4461">#4461</a></p>
</p>
</li>
<li><p id="change-1.2.17-1"><span class="target" id="change-720a2d5845d619f480128b62b966d4d6"><strong>[orm] [bug] </strong></span><p>Fixed issue where when using single-table inheritance in conjunction with a
joined inheritance hierarchy that uses “with polymorphic” loading, the
“single table criteria” for that single-table entity could get confused for
that of other entities from the same hierarchy used in the same query.The
adaption of the “single table criteria” is made more specific to the target
entity to avoid it accidentally getting adapted to other tables in the
query.</p>
<a class="changeset-link headerlink reference internal" href="#change-720a2d5845d619f480128b62b966d4d6">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4454">#4454</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.17-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.17-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.17-2"><span class="target" id="change-5bee77742994d8cf1964b9858dab5b20"><strong>[postgresql] [bug] </strong></span><p>Revised the query used when reflecting CHECK constraints to make use of the
<code class="docutils literal notranslate"><span class="pre">pg_get_constraintdef</span></code> function, as the <code class="docutils literal notranslate"><span class="pre">consrc</span></code> column is being
deprecated in PG 12.  Thanks to John A Stevenson for the tip.</p>
<a class="changeset-link headerlink reference internal" href="#change-5bee77742994d8cf1964b9858dab5b20">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4463">#4463</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.17-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.17-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.17-3"><span class="target" id="change-14756b5be0675946feab88dc7c2d2e41"><strong>[oracle] [bug] </strong></span><p>Fixed regression in integer precision logic due to the refactor of the
cx_Oracle dialect in 1.2.  We now no longer apply the cx_Oracle.NATIVE_INT
type to result columns sending integer values (detected as positive
precision with scale ==0) which encounters integer overflow issues with
values that go beyond the 32 bit boundary.  Instead, the output variable
is left untyped so that cx_Oracle can choose the best option.</p>
<a class="changeset-link headerlink reference internal" href="#change-14756b5be0675946feab88dc7c2d2e41">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4457">#4457</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.16">
<h2>1.2.16<a class="headerlink" href="#change-1.2.16" title="Permalink to this headline">¶</a></h2>
Released: January 11, 2019<div class="section" id="change-1.2.16-engine">
<h3>engine<a class="headerlink" href="#change-1.2.16-engine" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.16-0"><span class="target" id="change-0e379d4c89e7dd9ee9ff1c7fc0681146"><strong>[engine] [bug] </strong></span><p>Fixed a regression introduced in version 1.2 where a refactor
of the <a class="reference internal" href="../core/exceptions.html#sqlalchemy.exc.SQLAlchemyError" title="sqlalchemy.exc.SQLAlchemyError"><code class="xref py py-class docutils literal notranslate"><span class="pre">SQLAlchemyError</span></code></a> base exception class introduced an
inappropriate coercion of a plain string message into Unicode under
python 2k, which is not handled by the Python interpreter for characters
outside of the platform’s encoding (typically ascii).  The
<a class="reference internal" href="../core/exceptions.html#sqlalchemy.exc.SQLAlchemyError" title="sqlalchemy.exc.SQLAlchemyError"><code class="xref py py-class docutils literal notranslate"><span class="pre">SQLAlchemyError</span></code></a> class now passes a bytestring through under
Py2K for <code class="docutils literal notranslate"><span class="pre">__str__()</span></code> as is the behavior of exception objects in general
under Py2K, does a safe coercion to unicode utf-8 with
backslash fallback for <code class="docutils literal notranslate"><span class="pre">__unicode__()</span></code>.  For Py3K the message is
typically unicode already, but if not is again safe-coerced with utf-8
with backslash fallback for the <code class="docutils literal notranslate"><span class="pre">__str__()</span></code> method.</p>
<a class="changeset-link headerlink reference internal" href="#change-0e379d4c89e7dd9ee9ff1c7fc0681146">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4429">#4429</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.16-sql">
<h3>sql<a class="headerlink" href="#change-1.2.16-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.16-1"><span class="target" id="change-c7b7fd1698b55bc163548707664379a1"><strong>[sql] [bug] [mysql] [oracle] </strong></span><p>Fixed issue where the DDL emitted for <code class="xref py py-class docutils literal notranslate"><span class="pre">DropTableComment</span></code>, which
will be used by an upcoming version of Alembic, was incorrect for the MySQL
and Oracle databases.</p>
<a class="changeset-link headerlink reference internal" href="#change-c7b7fd1698b55bc163548707664379a1">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4436">#4436</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.16-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.16-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.16-2"><span class="target" id="change-aa85e14bdc5a7d9b24b74c3ae5c51b55"><strong>[postgresql] [bug] </strong></span><p>Fixed issue where a <a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.ENUM" title="sqlalchemy.dialects.postgresql.ENUM"><code class="xref py py-class docutils literal notranslate"><span class="pre">postgresql.ENUM</span></code></a> or a custom domain present
in a remote schema would not be recognized within column reflection if
the name of the enum/domain or the name of the schema required quoting.
A new parsing scheme now fully parses out quoted or non-quoted tokens
including support for SQL-escaped quotes.</p>
<a class="changeset-link headerlink reference internal" href="#change-aa85e14bdc5a7d9b24b74c3ae5c51b55">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4416">#4416</a></p>
</p>
</li>
<li><p id="change-1.2.16-3"><span class="target" id="change-739f3e2e302617b02471a7c6df228f39"><strong>[postgresql] [bug] </strong></span><p>Fixed issue where multiple <a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.ENUM" title="sqlalchemy.dialects.postgresql.ENUM"><code class="xref py py-class docutils literal notranslate"><span class="pre">postgresql.ENUM</span></code></a> objects referred to
by the same <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.MetaData" title="sqlalchemy.schema.MetaData"><code class="xref py py-class docutils literal notranslate"><span class="pre">MetaData</span></code></a> object would fail to be created if
multiple objects had the same name under different schema names.  The
internal memoization the PostgreSQL dialect uses to track if it has
created a particular <a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.ENUM" title="sqlalchemy.dialects.postgresql.ENUM"><code class="xref py py-class docutils literal notranslate"><span class="pre">postgresql.ENUM</span></code></a> in the database during
a DDL creation sequence now takes schema name into account.</p>
<a class="changeset-link headerlink reference internal" href="#change-739f3e2e302617b02471a7c6df228f39">¶</a><p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.16-sqlite">
<h3>sqlite<a class="headerlink" href="#change-1.2.16-sqlite" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.16-4"><span class="target" id="change-81cefb53ad01ac9a68155235543c0e9d"><strong>[sqlite] [bug] </strong></span><p>Reflection of an index based on SQL expressions are now skipped with a
warning, in the same way as that of the Postgresql dialect, where we currently
do not support reflecting indexes that have SQL expressions within them.
Previously, an index with columns of None were produced which would break
tools like Alembic.</p>
<a class="changeset-link headerlink reference internal" href="#change-81cefb53ad01ac9a68155235543c0e9d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4431">#4431</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.16-misc">
<h3>misc<a class="headerlink" href="#change-1.2.16-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.16-5"><span class="target" id="change-a1936387f8f60cce168ab5a16e39d174"></span><p>Fixed issue in “expanding IN” feature where using the same bound parameter
name more than once in a query would lead to a KeyError within the process
of rewriting the parameters in the query.</p>
<a class="changeset-link headerlink reference internal" href="#change-a1936387f8f60cce168ab5a16e39d174">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4394">#4394</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.15">
<h2>1.2.15<a class="headerlink" href="#change-1.2.15" title="Permalink to this headline">¶</a></h2>
Released: December 11, 2018<div class="section" id="change-1.2.15-orm">
<h3>orm<a class="headerlink" href="#change-1.2.15-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.15-0"><span class="target" id="change-8956e18ad18a04737278e6a8e14d9313"><strong>[orm] [bug] </strong></span><p>Fixed bug where the ORM annotations could be incorrect for the
primaryjoin/secondaryjoin a relationship if one used the pattern
<code class="docutils literal notranslate"><span class="pre">ForeignKey(SomeClass.id)</span></code> in the declarative mappings.   This pattern
would leak undesired annotations into the join conditions which can break
aliasing operations done within <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a> that are not supposed to
impact elements in that join condition.  These annotations are now removed
up front if present.</p>
<a class="changeset-link headerlink reference internal" href="#change-8956e18ad18a04737278e6a8e14d9313">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4367">#4367</a></p>
</p>
</li>
<li><p id="change-1.2.15-1"><span class="target" id="change-9ae4bb6f80c080a468f368b4b752b096"><strong>[orm] [bug] </strong></span><p>In continuing with a similar theme as that of very recent <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4349">#4349</a>,
repaired issue with <a class="reference internal" href="../orm/internals.html#sqlalchemy.orm.properties.RelationshipProperty.Comparator.any" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.any"><code class="xref py py-meth docutils literal notranslate"><span class="pre">RelationshipProperty.Comparator.any()</span></code></a> and
<a class="reference internal" href="../orm/internals.html#sqlalchemy.orm.properties.RelationshipProperty.Comparator.has" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.has"><code class="xref py py-meth docutils literal notranslate"><span class="pre">RelationshipProperty.Comparator.has()</span></code></a> where the “secondary”
selectable needs to be explicitly part of the FROM clause in the
EXISTS subquery to suit the case where this “secondary” is a <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.Join" title="sqlalchemy.sql.expression.Join"><code class="xref py py-class docutils literal notranslate"><span class="pre">Join</span></code></a>
object.</p>
<a class="changeset-link headerlink reference internal" href="#change-9ae4bb6f80c080a468f368b4b752b096">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4366">#4366</a></p>
</p>
</li>
<li><p id="change-1.2.15-2"><span class="target" id="change-1e1a4b3d13cd948a89728041c1419547"><strong>[orm] [bug] </strong></span><p>Fixed regression caused by <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4349">#4349</a> where adding the “secondary”
table to the FROM clause for a dynamic loader would affect the ability of
the <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a> to make a subsequent join to another entity.   The fix
adds the primary entity as the first element of the FROM list since
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.join" title="sqlalchemy.orm.query.Query.join"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.join()</span></code></a> wants to jump from that.   Version 1.3 will have
a more comprehensive solution to this problem as well (<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4365">#4365</a>).</p>
<a class="changeset-link headerlink reference internal" href="#change-1e1a4b3d13cd948a89728041c1419547">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4363">#4363</a></p>
</p>
</li>
<li><p id="change-1.2.15-3"><span class="target" id="change-de7b070af4d6128a91a09711f263b27e"><strong>[orm] [bug] </strong></span><p>Fixed bug where chaining of mapper options using
<code class="xref py py-meth docutils literal notranslate"><span class="pre">RelationshipProperty.of_type()</span></code> in conjunction with a chained option
that refers to an attribute name by string only would fail to locate the
attribute.</p>
<a class="changeset-link headerlink reference internal" href="#change-de7b070af4d6128a91a09711f263b27e">¶</a><p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.15-orm-declarative">
<h3>orm declarative<a class="headerlink" href="#change-1.2.15-orm-declarative" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.15-4"><span class="target" id="change-dac2a6c5ea10784df6a7012dd98ae6cc"><strong>[bug] [declarative] [orm] </strong></span><p>A warning is emitted in the case that a <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.column" title="sqlalchemy.sql.expression.column"><code class="xref py py-func docutils literal notranslate"><span class="pre">column()</span></code></a> object is applied to
a declarative class, as it seems likely this intended to be a
<a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><code class="xref py py-class docutils literal notranslate"><span class="pre">Column</span></code></a> object.</p>
<a class="changeset-link headerlink reference internal" href="#change-dac2a6c5ea10784df6a7012dd98ae6cc">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4374">#4374</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.15-misc">
<h3>misc<a class="headerlink" href="#change-1.2.15-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.15-5"><span class="target" id="change-a04a583b222ac2f88123e4e9bcc29050"></span><p>Added support for the <code class="docutils literal notranslate"><span class="pre">write_timeout</span></code> flag accepted by mysqlclient and
pymysql to  be passed in the URL string.</p>
<a class="changeset-link headerlink reference internal" href="#change-a04a583b222ac2f88123e4e9bcc29050">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4381">#4381</a></p>
</p>
</li>
<li><p id="change-1.2.15-6"><span class="target" id="change-64c3579b97e63115832c910913d75c3a"></span><p>Fixed issue where reflection of a PostgreSQL domain that is expressed as an
array would fail to be recognized.  Pull request courtesy Jakub Synowiec.</p>
<a class="changeset-link headerlink reference internal" href="#change-64c3579b97e63115832c910913d75c3a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4377">#4377</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4380">#4380</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.14">
<h2>1.2.14<a class="headerlink" href="#change-1.2.14" title="Permalink to this headline">¶</a></h2>
Released: November 10, 2018<div class="section" id="change-1.2.14-orm">
<h3>orm<a class="headerlink" href="#change-1.2.14-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.14-0"><span class="target" id="change-c32366292852796144f5a2d6c58491f8"><strong>[orm] [bug] </strong></span><p>Fixed bug in <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session.bulk_update_mappings" title="sqlalchemy.orm.session.Session.bulk_update_mappings"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Session.bulk_update_mappings()</span></code></a> where alternate mapped
attribute names would result in the primary key column of the UPDATE
statement being included in the SET clause, as well as the WHERE clause;
while usually harmless, for SQL Server this can raise an error due to the
IDENTITY column.  This is a continuation of the same bug that was fixed in
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3849">#3849</a>, where testing was insufficient to catch this additional
flaw.</p>
<a class="changeset-link headerlink reference internal" href="#change-c32366292852796144f5a2d6c58491f8">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4357">#4357</a></p>
</p>
</li>
<li><p id="change-1.2.14-1"><span class="target" id="change-161fcfa296f10fe56a3d105557a571a6"><strong>[orm] [bug] </strong></span><p>Fixed a minor performance issue which could in some cases add unnecessary
overhead to result fetching, involving the use of ORM columns and entities
that include those same columns at the same time within a query.  The issue
has to do with hash / eq overhead when referring to the column in different
ways.</p>
<a class="changeset-link headerlink reference internal" href="#change-161fcfa296f10fe56a3d105557a571a6">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4347">#4347</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.14-mysql">
<h3>mysql<a class="headerlink" href="#change-1.2.14-mysql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.14-2"><span class="target" id="change-bf0dd86e82b8850dcc2c2a8aa18a115a"><strong>[mysql] [bug] </strong></span><p>Fixed regression caused by <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4344">#4344</a> released in 1.2.13, where the fix
for MySQL 8.0’s case sensitivity problem with referenced column names when
reflecting foreign key referents is worked around using the
<code class="docutils literal notranslate"><span class="pre">information_schema.columns</span></code> view.  The workaround was failing on OSX /
<code class="docutils literal notranslate"><span class="pre">lower_case_table_names=2</span></code> which produces non-matching casing for the
<code class="docutils literal notranslate"><span class="pre">information_schema.columns</span></code> vs. that of <code class="docutils literal notranslate"><span class="pre">SHOW</span> <span class="pre">CREATE</span> <span class="pre">TABLE</span></code>, so in
case-insensitive SQL modes case-insensitive matching is now used.</p>
<a class="changeset-link headerlink reference internal" href="#change-bf0dd86e82b8850dcc2c2a8aa18a115a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4361">#4361</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.13">
<h2>1.2.13<a class="headerlink" href="#change-1.2.13" title="Permalink to this headline">¶</a></h2>
Released: October 31, 2018<div class="section" id="change-1.2.13-orm">
<h3>orm<a class="headerlink" href="#change-1.2.13-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.13-0"><span class="target" id="change-483a6d37447c5490aeb221f1f62197c3"><strong>[orm] [bug] </strong></span><p>Fixed bug where “dynamic” loader needs to explicitly set the “secondary”
table in the FROM clause of the query, to suit the case where the secondary
is a join object that is otherwise not pulled into the query from its
columns alone.</p>
<a class="changeset-link headerlink reference internal" href="#change-483a6d37447c5490aeb221f1f62197c3">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4349">#4349</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.13-orm-declarative">
<h3>orm declarative<a class="headerlink" href="#change-1.2.13-orm-declarative" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.13-1"><span class="target" id="change-2372f6ffb38e92d4e516bf4d55048ca5"><strong>[bug] [declarative] [orm] </strong></span><p>Fixed regression caused by <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4326">#4326</a> in version 1.2.12 where using
<a class="reference internal" href="../orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.declared_attr" title="sqlalchemy.ext.declarative.declared_attr"><code class="xref py py-class docutils literal notranslate"><span class="pre">declared_attr</span></code></a> with a mixin in conjunction with
<a class="reference internal" href="../orm/mapped_attributes.html#sqlalchemy.orm.synonym" title="sqlalchemy.orm.synonym"><code class="xref py py-func docutils literal notranslate"><span class="pre">orm.synonym()</span></code></a> would fail to map the synonym properly to an inherited
subclass.</p>
<a class="changeset-link headerlink reference internal" href="#change-2372f6ffb38e92d4e516bf4d55048ca5">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4350">#4350</a></p>
</p>
</li>
<li><p id="change-1.2.13-2"><span class="target" id="change-6ca8578706fdf95cac6b14eeebed9eb3"><strong>[bug] [declarative] [orm] </strong></span><p>The column conflict resolution technique discussed at
<a class="reference internal" href="../orm/extensions/declarative/inheritance.html#declarative-column-conflicts"><span class="std std-ref">Resolving Column Conflicts</span></a> is now functional for a <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><code class="xref py py-class docutils literal notranslate"><span class="pre">Column</span></code></a>
that is also a primary key column.  Previously, a check for primary key
columns declared on a single-inheritance subclass would occur before the
column copy were allowed to pass.</p>
<a class="changeset-link headerlink reference internal" href="#change-6ca8578706fdf95cac6b14eeebed9eb3">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4352">#4352</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.13-sql">
<h3>sql<a class="headerlink" href="#change-1.2.13-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.13-3"><span class="target" id="change-8546325495fe62a2077410f954f2f7e8"><strong>[sql] [feature] </strong></span><p>Refactored <a class="reference internal" href="../core/internals.html#sqlalchemy.sql.compiler.SQLCompiler" title="sqlalchemy.sql.compiler.SQLCompiler"><code class="xref py py-class docutils literal notranslate"><span class="pre">SQLCompiler</span></code></a> to expose a
<a class="reference internal" href="../core/internals.html#sqlalchemy.sql.compiler.SQLCompiler.group_by_clause" title="sqlalchemy.sql.compiler.SQLCompiler.group_by_clause"><code class="xref py py-meth docutils literal notranslate"><span class="pre">SQLCompiler.group_by_clause()</span></code></a> method similar to the
<a class="reference internal" href="../core/internals.html#sqlalchemy.sql.compiler.SQLCompiler.order_by_clause" title="sqlalchemy.sql.compiler.SQLCompiler.order_by_clause"><code class="xref py py-meth docutils literal notranslate"><span class="pre">SQLCompiler.order_by_clause()</span></code></a> and <code class="xref py py-meth docutils literal notranslate"><span class="pre">SQLCompiler.limit_clause()</span></code>
methods, which can be overridden by dialects to customize how GROUP BY
renders.  Pull request courtesy Samuel Chou.</p>
<a class="changeset-link headerlink reference internal" href="#change-8546325495fe62a2077410f954f2f7e8">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.13-4"><span class="target" id="change-9b2670e8f0965bbd17e8fa2b694d86a0"><strong>[sql] [bug] </strong></span><p>Fixed bug where the <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Enum.params.create_constraint" title="sqlalchemy.types.Enum"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Enum.create_constraint</span></code></a> flag on  the
<a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Enum" title="sqlalchemy.types.Enum"><code class="xref py py-class docutils literal notranslate"><span class="pre">Enum</span></code></a> datatype would not be propagated to copies of the type, which
affects use cases such as declarative mixins and abstract bases.</p>
<a class="changeset-link headerlink reference internal" href="#change-9b2670e8f0965bbd17e8fa2b694d86a0">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4341">#4341</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.13-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.13-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.13-5"><span class="target" id="change-44976da4a4e3556fd57c438b66a9e88a"><strong>[postgresql] [bug] </strong></span><p>Added support for the <a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.aggregate_order_by" title="sqlalchemy.dialects.postgresql.aggregate_order_by"><code class="xref py py-class docutils literal notranslate"><span class="pre">aggregate_order_by</span></code></a> function to receive
multiple ORDER BY elements, previously only a single element was accepted.</p>
<a class="changeset-link headerlink reference internal" href="#change-44976da4a4e3556fd57c438b66a9e88a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4337">#4337</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.13-mysql">
<h3>mysql<a class="headerlink" href="#change-1.2.13-mysql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.13-6"><span class="target" id="change-1bd3f4aa21b3c4c88adb2b0cb7ed0554"><strong>[mysql] [bug] </strong></span><p>Added word <code class="docutils literal notranslate"><span class="pre">function</span></code> to the list of reserved words for MySQL, which is
now a keyword in MySQL 8.0</p>
<a class="changeset-link headerlink reference internal" href="#change-1bd3f4aa21b3c4c88adb2b0cb7ed0554">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4348">#4348</a></p>
</p>
</li>
<li><p id="change-1.2.13-7"><span class="target" id="change-cfe6035862b19e67987fc610cf73a5ae"><strong>[mysql] [bug] </strong></span><p>Added a workaround for a MySQL bug #88718 introduced in the 8.0 series,
where the reflection of a foreign key constraint is not reporting the
correct case sensitivity for the referred column, leading to errors during
use of the reflected constraint such as when using the automap extension.
The workaround emits an additional query to the information_schema tables in
order to retrieve the correct case sensitive name.</p>
<a class="changeset-link headerlink reference internal" href="#change-cfe6035862b19e67987fc610cf73a5ae">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4344">#4344</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.13-misc">
<h3>misc<a class="headerlink" href="#change-1.2.13-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.13-8"><span class="target" id="change-a9e54c4d05b2a4d893451d1be8d8ba27"><strong>[misc] [bug] </strong></span><p>Fixed issue where part of the utility language helper internals was passing
the wrong kind of argument to the Python <code class="docutils literal notranslate"><span class="pre">__import__</span></code> builtin as the list
of modules to be imported.  The issue produced no symptoms within the core
library but could cause issues with external applications that redefine the
<code class="docutils literal notranslate"><span class="pre">__import__</span></code> builtin or otherwise instrument it. Pull request courtesy Joe
Urciuoli.</p>
<a class="changeset-link headerlink reference internal" href="#change-a9e54c4d05b2a4d893451d1be8d8ba27">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.13-9"><span class="target" id="change-d0a0ef67a801b137367854479fdcf3cb"><strong>[misc] [bug] [py3k] </strong></span><p>Fixed additional warnings generated by Python 3.7 due to changes in the
organization of the Python <code class="docutils literal notranslate"><span class="pre">collections</span></code> and <code class="docutils literal notranslate"><span class="pre">collections.abc</span></code> packages.
Previous <code class="docutils literal notranslate"><span class="pre">collections</span></code> warnings were fixed in version 1.2.11. Pull request
courtesy xtreak.</p>
<a class="changeset-link headerlink reference internal" href="#change-d0a0ef67a801b137367854479fdcf3cb">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4339">#4339</a></p>
</p>
</li>
<li><p id="change-1.2.13-10"><span class="target" id="change-830444d85ac158906d8a62446e1bd53c"><strong>[bug] [ext] </strong></span><p>Added missing <code class="docutils literal notranslate"><span class="pre">.index()</span></code> method to list-based association collections
in the association proxy extension.</p>
<a class="changeset-link headerlink reference internal" href="#change-830444d85ac158906d8a62446e1bd53c">¶</a><p></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.12">
<h2>1.2.12<a class="headerlink" href="#change-1.2.12" title="Permalink to this headline">¶</a></h2>
Released: September 19, 2018<div class="section" id="change-1.2.12-orm">
<h3>orm<a class="headerlink" href="#change-1.2.12-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.12-0"><span class="target" id="change-e32c66c2eec5b9be9808dc9d420477b0"><strong>[orm] [bug] </strong></span><p>Added a check within the weakref cleanup for the <a class="reference internal" href="../orm/internals.html#sqlalchemy.orm.state.InstanceState" title="sqlalchemy.orm.state.InstanceState"><code class="xref py py-class docutils literal notranslate"><span class="pre">InstanceState</span></code></a>
object to check for the presence of the <code class="docutils literal notranslate"><span class="pre">dict</span></code> builtin, in an effort to
reduce error messages generated when these cleanups occur during interpreter
shutdown.  Pull request courtesy Romuald Brunet.</p>
<a class="changeset-link headerlink reference internal" href="#change-e32c66c2eec5b9be9808dc9d420477b0">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.12-1"><span class="target" id="change-c64a174ed7b9a9b870c77a2ccec88371"><strong>[orm] [bug] </strong></span><p>Fixed bug where use of <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.Lateral" title="sqlalchemy.sql.expression.Lateral"><code class="xref py py-class docutils literal notranslate"><span class="pre">Lateral</span></code></a> construct in conjunction with
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.join" title="sqlalchemy.orm.query.Query.join"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.join()</span></code></a> as well as <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.select_entity_from" title="sqlalchemy.orm.query.Query.select_entity_from"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.select_entity_from()</span></code></a> would not
apply clause adaption to the right side of the join.   “lateral” introduces
the use case of the right side of a join being correlatable.  Previously,
adaptation of this clause wasn’t considered.   Note that in 1.2 only,
a selectable introduced by <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.subquery" title="sqlalchemy.orm.query.Query.subquery"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.subquery()</span></code></a> is still not adapted
due to <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4304">#4304</a>; the selectable needs to be produced by the
<a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.select" title="sqlalchemy.sql.expression.select"><code class="xref py py-func docutils literal notranslate"><span class="pre">select()</span></code></a> function to be the right side of the “lateral” join.</p>
<a class="changeset-link headerlink reference internal" href="#change-c64a174ed7b9a9b870c77a2ccec88371">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4334">#4334</a></p>
</p>
</li>
<li><p id="change-1.2.12-2"><span class="target" id="change-94502d5ab2910ee0ea75da8e699f1f94"><strong>[orm] [bug] </strong></span><p>Fixed 1.2 regression caused by <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3472">#3472</a> where the handling of an
“updated_at” style column within the context of a post-update operation
would also occur for a row that is to be deleted following the update,
meaning both that a column with a Python-side value generator would show
the now-deleted value that was emitted for the UPDATE before the DELETE
(which was not the previous behavior), as well as that a SQL- emitted value
generator would have the attribute expired, meaning the previous value
would be unreachable due to the row having been deleted and the object
detached from the session.The “postfetch” logic that was added as part of
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3472">#3472</a> is now skipped entirely for an object that ultimately is to
be deleted.</p>
<a class="changeset-link headerlink reference internal" href="#change-94502d5ab2910ee0ea75da8e699f1f94">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4327">#4327</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.12-orm-declarative">
<h3>orm declarative<a class="headerlink" href="#change-1.2.12-orm-declarative" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.12-3"><span class="target" id="change-450cbb61c7f4ada2be0ba69125da87ea"><strong>[bug] [declarative] [orm] </strong></span><p>Fixed bug where the declarative scan for attributes would receive the
expression proxy delivered by a hybrid attribute at the class level, and
not the hybrid attribute itself, when receiving the descriptor via the
<code class="docutils literal notranslate"><span class="pre">&#64;declared_attr</span></code> callable on a subclass of an already-mapped class. This
would lead to an attribute that did not report itself as a hybrid when
viewed within <a class="reference internal" href="../orm/mapping_api.html#sqlalchemy.orm.mapper.Mapper.all_orm_descriptors" title="sqlalchemy.orm.mapper.Mapper.all_orm_descriptors"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Mapper.all_orm_descriptors</span></code></a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-450cbb61c7f4ada2be0ba69125da87ea">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4326">#4326</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.12-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.12-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.12-4"><span class="target" id="change-e710af9350fd009cf4af769a3faa0511"><strong>[postgresql] [bug] </strong></span><p>Fixed bug in PostgreSQL dialect where compiler keyword arguments such as
<code class="docutils literal notranslate"><span class="pre">literal_binds=True</span></code> were not being propagated to a DISTINCT ON
expression.</p>
<a class="changeset-link headerlink reference internal" href="#change-e710af9350fd009cf4af769a3faa0511">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4325">#4325</a></p>
</p>
</li>
<li><p id="change-1.2.12-5"><span class="target" id="change-f1edbb63aa40ced6179cf428d09a8da3"><strong>[postgresql] [bug] </strong></span><p>Fixed the <a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.array_agg" title="sqlalchemy.dialects.postgresql.array_agg"><code class="xref py py-func docutils literal notranslate"><span class="pre">postgresql.array_agg()</span></code></a> function, which is a slightly
altered version of the usual <code class="xref py py-func docutils literal notranslate"><span class="pre">functions.array_agg()</span></code> function, to also
accept an incoming “type” argument without forcing an ARRAY around it,
essentially the same thing that was fixed for the generic function in 1.1
in <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4107">#4107</a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-f1edbb63aa40ced6179cf428d09a8da3">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4324">#4324</a></p>
</p>
</li>
<li><p id="change-1.2.12-6"><span class="target" id="change-930d0095f5f9fd0159a61c7a9f77b031"><strong>[postgresql] [bug] </strong></span><p>Fixed bug in PostgreSQL ENUM reflection where a case-sensitive, quoted name
would be reported by the query including quotes, which would not match a
target column during table reflection as the quotes needed to be stripped
off.</p>
<a class="changeset-link headerlink reference internal" href="#change-930d0095f5f9fd0159a61c7a9f77b031">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4323">#4323</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.12-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.12-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.12-7"><span class="target" id="change-937164396b7338b217e6894c7cf3cc3d"><strong>[oracle] [bug] </strong></span><p>Fixed issue for cx_Oracle 7.0 where the behavior of Oracle param.getvalue()
now returns a list, rather than a single scalar value, breaking
autoincrement logic throughout the Core and ORM. The dml_ret_array_val
compatibility flag is used for cx_Oracle 6.3 and 6.4 to establish compatible
behavior with 7.0 and forward, for cx_Oracle 6.2.1 and prior a version
number check falls back to the old logic.</p>
<a class="changeset-link headerlink reference internal" href="#change-937164396b7338b217e6894c7cf3cc3d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4335">#4335</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.12-misc">
<h3>misc<a class="headerlink" href="#change-1.2.12-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.12-8"><span class="target" id="change-0fd4099eed78c72baca022db96e988da"><strong>[bug] [ext] </strong></span><p>Fixed issue where <a class="reference internal" href="../orm/extensions/baked.html#sqlalchemy.ext.baked.BakedQuery" title="sqlalchemy.ext.baked.BakedQuery"><code class="xref py py-class docutils literal notranslate"><span class="pre">BakedQuery</span></code></a> did not include the specific query
class used by the <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session" title="sqlalchemy.orm.session.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> as part of the cache key, leading to
incompatibilities when using custom query classes, in particular the
<a class="reference internal" href="../orm/extensions/horizontal_shard.html#sqlalchemy.ext.horizontal_shard.ShardedQuery" title="sqlalchemy.ext.horizontal_shard.ShardedQuery"><code class="xref py py-class docutils literal notranslate"><span class="pre">ShardedQuery</span></code></a> which has some different argument signatures.</p>
<a class="changeset-link headerlink reference internal" href="#change-0fd4099eed78c72baca022db96e988da">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4328">#4328</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.11">
<h2>1.2.11<a class="headerlink" href="#change-1.2.11" title="Permalink to this headline">¶</a></h2>
Released: August 20, 2018<div class="section" id="change-1.2.11-orm-declarative">
<h3>orm declarative<a class="headerlink" href="#change-1.2.11-orm-declarative" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.11-0"><span class="target" id="change-29033a16025ec866916a3937d719c77a"><strong>[bug] [declarative] [orm] </strong></span><p>Fixed issue in previously untested use case, allowing a declarative mapped
class to inherit from a classically-mapped class outside of the declarative
base, including that it accommodates for unmapped intermediate classes. An
unmapped intermediate class may specify <code class="docutils literal notranslate"><span class="pre">__abstract__</span></code>, which is now
interpreted correctly, or the intermediate class can remain unmarked, and
the classically mapped base class will be detected within the hierarchy
regardless. In order to anticipate existing scenarios which may be mixing
in classical mappings into existing declarative hierarchies, an error is
now raised if multiple mapped bases are detected for a given class.</p>
<a class="changeset-link headerlink reference internal" href="#change-29033a16025ec866916a3937d719c77a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4321">#4321</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.11-sql">
<h3>sql<a class="headerlink" href="#change-1.2.11-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.11-1"><span class="target" id="change-4dfd7efdc3a6b7adbb8f5d1e28d7c31d"><strong>[sql] [bug] </strong></span><p>Fixed issue that is closely related to <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3639">#3639</a> where an expression
rendered in a boolean context on a non-native boolean backend would
be compared to 1/0 even though it is already an implicitly boolean
expression, when <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.ColumnElement.self_group" title="sqlalchemy.sql.expression.ColumnElement.self_group"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ColumnElement.self_group()</span></code></a> were used.  While this
does not affect the user-friendly backends (MySQL, SQLite) it was not
handled by Oracle (and possibly SQL Server).   Whether or not the
expression is implicitly boolean on any database is now determined
up front as an additional check to not generate the integer comparison
within the compilation of the statement.</p>
<a class="changeset-link headerlink reference internal" href="#change-4dfd7efdc3a6b7adbb8f5d1e28d7c31d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4320">#4320</a></p>
</p>
</li>
<li><p id="change-1.2.11-2"><span class="target" id="change-0890e32e3ce8b510403981f5894dc152"><strong>[sql] [bug] </strong></span><p>Added missing window function parameters
<a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.WithinGroup.over.params.range_" title="sqlalchemy.sql.expression.WithinGroup.over"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">WithinGroup.over.range_</span></code></a> and <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.WithinGroup.over.params.rows" title="sqlalchemy.sql.expression.WithinGroup.over"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">WithinGroup.over.rows</span></code></a>
parameters to the <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.WithinGroup.over" title="sqlalchemy.sql.expression.WithinGroup.over"><code class="xref py py-meth docutils literal notranslate"><span class="pre">WithinGroup.over()</span></code></a> and
<a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.FunctionFilter.over" title="sqlalchemy.sql.expression.FunctionFilter.over"><code class="xref py py-meth docutils literal notranslate"><span class="pre">FunctionFilter.over()</span></code></a> methods, to correspond to the range/rows
feature added to the “over” method of SQL functions as part of
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3049">#3049</a> in version 1.1.</p>
<a class="changeset-link headerlink reference internal" href="#change-0890e32e3ce8b510403981f5894dc152">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4322">#4322</a></p>
</p>
</li>
<li><p id="change-1.2.11-3"><span class="target" id="change-4253ab820ddbbe2a9385df5d044bd003"><strong>[sql] [bug] </strong></span><p>Fixed bug where the multi-table support for UPDATE and DELETE statements
did not consider the additional FROM elements as targets for correlation,
when a correlated SELECT were also combined with the statement.  This
change now includes that a SELECT statement in the WHERE clause for such a
statement will try to auto-correlate back to these additional tables in the
parent UPDATE/DELETE or unconditionally correlate if
<a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.Select.correlate" title="sqlalchemy.sql.expression.Select.correlate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Select.correlate()</span></code></a> is used.  Note that auto-correlation raises an
error if the SELECT statement would have no FROM clauses as a result, which
can now occur if the parent UPDATE/DELETE specifies the same tables in its
additional set of tables; specify <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.Select.correlate" title="sqlalchemy.sql.expression.Select.correlate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Select.correlate()</span></code></a> explicitly to
resolve.</p>
<a class="changeset-link headerlink reference internal" href="#change-4253ab820ddbbe2a9385df5d044bd003">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4313">#4313</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.11-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.11-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.11-4"><span class="target" id="change-f782b08ad88a2102096dbcacc8cd9974"><strong>[oracle] [bug] </strong></span><p>For cx_Oracle, Integer datatypes will now be bound to “int”, per advice
from the cx_Oracle developers.  Previously, using cx_Oracle.NUMBER caused a
loss in precision within the cx_Oracle 6.x series.</p>
<a class="changeset-link headerlink reference internal" href="#change-f782b08ad88a2102096dbcacc8cd9974">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4309">#4309</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.11-misc">
<h3>misc<a class="headerlink" href="#change-1.2.11-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.11-5"><span class="target" id="change-056915a776406c101b75ad97710c27e0"><strong>[bug] [py3k] </strong></span><p>Started importing “collections” from “collections.abc” under Python 3.3 and
greater for Python 3.8 compatibility.  Pull request courtesy Nathaniel
Knight.</p>
<a class="changeset-link headerlink reference internal" href="#change-056915a776406c101b75ad97710c27e0">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.11-6"><span class="target" id="change-1fa7bddc9c8565517515451adea70248"></span><p>Fixed issue where the “schema” name used for a SQLite database within table
reflection would not quote the schema name correctly.  Pull request
courtesy Phillip Cloud.</p>
<a class="changeset-link headerlink reference internal" href="#change-1fa7bddc9c8565517515451adea70248">¶</a><p></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.10">
<h2>1.2.10<a class="headerlink" href="#change-1.2.10" title="Permalink to this headline">¶</a></h2>
Released: July 13, 2018<div class="section" id="change-1.2.10-orm">
<h3>orm<a class="headerlink" href="#change-1.2.10-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.10-0"><span class="target" id="change-b13f466fa57ab9f4af6900100e865365"><strong>[orm] [bug] </strong></span><p>Fixed bug in <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Bundle" title="sqlalchemy.orm.query.Bundle"><code class="xref py py-class docutils literal notranslate"><span class="pre">Bundle</span></code></a> construct where placing two columns of the
same name would be de-duplicated, when the <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Bundle" title="sqlalchemy.orm.query.Bundle"><code class="xref py py-class docutils literal notranslate"><span class="pre">Bundle</span></code></a> were used as
part of the rendered SQL, such as in the ORDER BY or GROUP BY of the statement.</p>
<a class="changeset-link headerlink reference internal" href="#change-b13f466fa57ab9f4af6900100e865365">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4295">#4295</a></p>
</p>
</li>
<li><p id="change-1.2.10-1"><span class="target" id="change-80daab3893129f9420432132492a5ae0"><strong>[orm] [bug] </strong></span><p>Fixed regression in 1.2.9 due to <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4287">#4287</a> where using a
<a class="reference internal" href="../orm/loading_relationships.html#sqlalchemy.orm.Load" title="sqlalchemy.orm.Load"><code class="xref py py-class docutils literal notranslate"><span class="pre">Load</span></code></a> option in conjunction with a string wildcard would result
in a TypeError.</p>
<a class="changeset-link headerlink reference internal" href="#change-80daab3893129f9420432132492a5ae0">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4298">#4298</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.10-sql">
<h3>sql<a class="headerlink" href="#change-1.2.10-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.10-2"><span class="target" id="change-843b625c84690a09c2fc319025043c45"><strong>[sql] [bug] </strong></span><p>Fixed bug where a <a class="reference internal" href="../core/defaults.html#sqlalchemy.schema.Sequence" title="sqlalchemy.schema.Sequence"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</span></code></a> would be dropped explicitly before any
<a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Table" title="sqlalchemy.schema.Table"><code class="xref py py-class docutils literal notranslate"><span class="pre">Table</span></code></a> that refers to it, which breaks in the case when the
sequence is also involved in a server-side default for that table, when
using <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.MetaData.drop_all" title="sqlalchemy.schema.MetaData.drop_all"><code class="xref py py-meth docutils literal notranslate"><span class="pre">MetaData.drop_all()</span></code></a>.   The step which processes sequences
to be dropped via non server-side column default functions is now invoked
after the table itself is dropped.</p>
<a class="changeset-link headerlink reference internal" href="#change-843b625c84690a09c2fc319025043c45">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4300">#4300</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.9">
<h2>1.2.9<a class="headerlink" href="#change-1.2.9" title="Permalink to this headline">¶</a></h2>
Released: June 29, 2018<div class="section" id="change-1.2.9-orm">
<h3>orm<a class="headerlink" href="#change-1.2.9-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.9-0"><span class="target" id="change-0146519e38fbf1eec3e21e43ce35298e"><strong>[orm] [bug] </strong></span><p>Fixed issue where chaining multiple join elements inside of
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.join" title="sqlalchemy.orm.query.Query.join"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.join()</span></code></a> might not correctly adapt to the previous left-hand
side, when chaining joined inheritance classes that share the same base
class.</p>
<a class="changeset-link headerlink reference internal" href="#change-0146519e38fbf1eec3e21e43ce35298e">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3505">#3505</a></p>
</p>
</li>
<li><p id="change-1.2.9-1"><span class="target" id="change-1b5dc9a86d6a0f9382fbd00bc3577954"><strong>[orm] [bug] </strong></span><p>Fixed bug in cache key generation for baked queries which could cause a
too-short cache key to be generated for the case of eager loads across
subclasses.  This could in turn cause the eagerload query to be cached in
place of a non-eagerload query, or vice versa, for a polymorhic “selectin”
load, or possibly for lazy loads or selectin loads as well.</p>
<a class="changeset-link headerlink reference internal" href="#change-1b5dc9a86d6a0f9382fbd00bc3577954">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4287">#4287</a></p>
</p>
</li>
<li><p id="change-1.2.9-2"><span class="target" id="change-ac0a016922cbc13a5d2e2a17236dbb7d"><strong>[orm] [bug] </strong></span><p>Fixed bug in new polymorphic selectin loading where the BakedQuery used
internally would be mutated by the given loader options, which would both
inappropriately mutate the subclass query as well as carry over the effect
to subsequent queries.</p>
<a class="changeset-link headerlink reference internal" href="#change-ac0a016922cbc13a5d2e2a17236dbb7d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4286">#4286</a></p>
</p>
</li>
<li><p id="change-1.2.9-3"><span class="target" id="change-9664f74fc5949b103b7000fef83bf24f"><strong>[orm] [bug] </strong></span><p>Fixed regression caused by <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4256">#4256</a> (itself a regression fix for
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4228">#4228</a>) which breaks an undocumented behavior which converted for a
non-sequence of entities passed directly to the <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a> constructor
into a single-element sequence.  While this behavior was never supported or
documented, it’s already in use so has been added as a behavioral contract
to <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-9664f74fc5949b103b7000fef83bf24f">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4269">#4269</a></p>
</p>
</li>
<li><p id="change-1.2.9-4"><span class="target" id="change-4fabcf8dbfce4548b62d7b911123019b"><strong>[orm] [bug] </strong></span><p>Fixed an issue that was both a performance regression in 1.2 as well as an
incorrect result regarding the “baked” lazy loader, involving the
generation of cache keys from the original <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a> object’s loader
options.  If the loader options were built up in a “branched” style using
common base elements for multiple options, the same options would be
rendered into the cache key repeatedly, causing both a performance issue as
well as generating the wrong cache key.  This is fixed, along with a
performance improvement when such “branched” options are applied via
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.options" title="sqlalchemy.orm.query.Query.options"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.options()</span></code></a> to prevent the same option objects from being
applied repeatedly.</p>
<a class="changeset-link headerlink reference internal" href="#change-4fabcf8dbfce4548b62d7b911123019b">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4270">#4270</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.9-sql">
<h3>sql<a class="headerlink" href="#change-1.2.9-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.9-5"><span class="target" id="change-c5a88d92b58215d0e7e25b6992c09b76"><strong>[sql] [bug] </strong></span><p>Fixed regression in 1.2 due to <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4147">#4147</a> where a <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Table" title="sqlalchemy.schema.Table"><code class="xref py py-class docutils literal notranslate"><span class="pre">Table</span></code></a> that
has had some of its indexed columns redefined with new ones, as would occur
when overriding columns during reflection or when using
<a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Table.params.extend_existing" title="sqlalchemy.schema.Table"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Table.extend_existing</span></code></a>, such that the <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Table.tometadata" title="sqlalchemy.schema.Table.tometadata"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Table.tometadata()</span></code></a>
method would fail when attempting to copy those indexes as they still
referred to the replaced column.   The copy logic now accommodates for this
condition.</p>
<a class="changeset-link headerlink reference internal" href="#change-c5a88d92b58215d0e7e25b6992c09b76">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4279">#4279</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.9-mysql">
<h3>mysql<a class="headerlink" href="#change-1.2.9-mysql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.9-6"><span class="target" id="change-750aa39cdbe85712e824b07192aae694"><strong>[mysql] [bug] </strong></span><p>Fixed percent-sign doubling in mysql-connector-python dialect, which does
not require de-doubling of percent signs.   Additionally, the  mysql-
connector-python driver is inconsistent in how it passes the column names
in cursor.description, so a workaround decoder has been added to
conditionally decode these randomly-sometimes-bytes values to unicode only
if needed.  Also improved test support for mysql-connector-python, however
it should be noted that this driver still has issues with unicode that
continue to be unresolved as of yet.</p>
<a class="changeset-link headerlink reference internal" href="#change-750aa39cdbe85712e824b07192aae694">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.9-7"><span class="target" id="change-90f31d8990f79256c0618ae6c7429c66"><strong>[mysql] [bug] </strong></span><p>Fixed bug in index reflection where on MySQL 8.0 an index that includes
ASC or DESC in an indexed column specification would not be correctly
reflected, as MySQL 8.0 introduces support for returning this information
in a table definition string.</p>
<a class="changeset-link headerlink reference internal" href="#change-90f31d8990f79256c0618ae6c7429c66">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4293">#4293</a></p>
</p>
</li>
<li><p id="change-1.2.9-8"><span class="target" id="change-b3b360218294d6b67d15c6580e904d9a"><strong>[mysql] [bug] </strong></span><p>Fixed bug in MySQLdb dialect and variants such as PyMySQL where an
additional “unicode returns” check upon connection makes explicit use of
the “utf8” character set, which in MySQL 8.0 emits a warning that utf8mb4
should be used.  This is now replaced with a utf8mb4 equivalent.
Documentation is also updated for the MySQL dialect to specify utf8mb4 in
all examples.  Additional changes have been made to the test suite to use
utf8mb3 charsets and databases (there seem to be collation issues in some
edge cases with utf8mb4), and to support configuration default changes made
in MySQL 8.0 such as explicit_defaults_for_timestamp as well as new errors
raised for invalid MyISAM indexes.</p>
<a class="changeset-link headerlink reference internal" href="#change-b3b360218294d6b67d15c6580e904d9a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4283">#4283</a></p>
</p>
</li>
<li><p id="change-1.2.9-9"><span class="target" id="change-9b0c49ba62803b58c1782a9363c0baed"><strong>[mysql] [bug] </strong></span><p>The <a class="reference internal" href="../core/dml.html#sqlalchemy.sql.expression.Update" title="sqlalchemy.sql.expression.Update"><code class="xref py py-class docutils literal notranslate"><span class="pre">Update</span></code></a> construct now accommodates a <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.Join" title="sqlalchemy.sql.expression.Join"><code class="xref py py-class docutils literal notranslate"><span class="pre">Join</span></code></a> object
as supported by MySQL for UPDATE..FROM.  As the construct already
accepted an alias object for a similar purpose, the feature of UPDATE
against a non-table was already implied so this has been added.</p>
<a class="changeset-link headerlink reference internal" href="#change-9b0c49ba62803b58c1782a9363c0baed">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3645">#3645</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.9-sqlite">
<h3>sqlite<a class="headerlink" href="#change-1.2.9-sqlite" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.9-10"><span class="target" id="change-8cc7b362ac5969ecf11014f977c15bc6"><strong>[sqlite] [bug] </strong></span><p>Fixed issue in test suite where SQLite 3.24 added a new reserved word that
conflicted with a usage in TypeReflectionTest.  Pull request courtesy Nils
Philippsen.</p>
<a class="changeset-link headerlink reference internal" href="#change-8cc7b362ac5969ecf11014f977c15bc6">¶</a><p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.9-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.9-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.9-11"><span class="target" id="change-1ad0f3c4d68dc52ed02ddd5ab61daf98"><strong>[mssql] [bug] </strong></span><p>Fixed bug in MSSQL reflection where when two same-named tables in different
schemas had same-named primary key constraints, foreign key constraints
referring to one of the tables would have their columns doubled, causing
errors.   Pull request courtesy Sean Dunn.</p>
<a class="changeset-link headerlink reference internal" href="#change-1ad0f3c4d68dc52ed02ddd5ab61daf98">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4288">#4288</a></p>
</p>
</li>
<li><p id="change-1.2.9-12"><span class="target" id="change-8aaaf1d233a6489b556221e7806f3658"><strong>[mssql] [bug] [py3k] </strong></span><p>Fixed issue within the SQL Server dialect under Python 3 where when running
against a non-standard SQL server database that does not contain either the
“sys.dm_exec_sessions” or “sys.dm_pdw_nodes_exec_sessions” views, leading
to a failure to fetch the isolation level, the error raise would fail due
to an UnboundLocalError.</p>
<a class="changeset-link headerlink reference internal" href="#change-8aaaf1d233a6489b556221e7806f3658">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4273">#4273</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.9-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.9-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.9-13"><span class="target" id="change-d856b575ddb0095ba0335347d4beb577"><strong>[oracle] [feature] </strong></span><p>Added a new event currently used only by the cx_Oracle dialect,
<code class="xref py py-meth docutils literal notranslate"><span class="pre">DialectEvents.setiputsizes()</span></code>.  The event passes a dictionary of
<a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.BindParameter" title="sqlalchemy.sql.expression.BindParameter"><code class="xref py py-class docutils literal notranslate"><span class="pre">BindParameter</span></code></a> objects to DBAPI-specific type objects that will be
passed, after conversion to parameter names, to the cx_Oracle
<code class="docutils literal notranslate"><span class="pre">cursor.setinputsizes()</span></code> method.  This allows both visibility into the
setinputsizes process as well as the ability to alter the behavior of what
datatypes are passed to this method.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="../dialects/oracle.html#cx-oracle-setinputsizes"><span class="std std-ref">Fine grained control over cx_Oracle data binding performance with setinputsizes</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-d856b575ddb0095ba0335347d4beb577">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4290">#4290</a></p>
</p>
</li>
<li><p id="change-1.2.9-14"><span class="target" id="change-4fcd12b0aafa2097927ffbb3c41e7dc5"><strong>[oracle] [bug] [mysql] </strong></span><p>Fixed INSERT FROM SELECT with CTEs for the Oracle and MySQL dialects, where
the CTE was being placed above the entire statement as is typical with
other databases, however Oracle and MariaDB 10.2 wants the CTE underneath
the “INSERT” segment. Note that the Oracle and MySQL dialects don’t yet
work when a CTE is applied to a subquery inside of an UPDATE or DELETE
statement, as the CTE is still applied to the top rather than inside the
subquery.</p>
<a class="changeset-link headerlink reference internal" href="#change-4fcd12b0aafa2097927ffbb3c41e7dc5">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4275">#4275</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.9-misc">
<h3>misc<a class="headerlink" href="#change-1.2.9-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.9-15"><span class="target" id="change-d062e81187414fc306ae4b2157ef1742"><strong>[feature] [ext] </strong></span><p>Added new attribute <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.lazy_loaded_from" title="sqlalchemy.orm.query.Query.lazy_loaded_from"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Query.lazy_loaded_from</span></code></a> which is populated
with an <a class="reference internal" href="../orm/internals.html#sqlalchemy.orm.state.InstanceState" title="sqlalchemy.orm.state.InstanceState"><code class="xref py py-class docutils literal notranslate"><span class="pre">InstanceState</span></code></a> that is using this <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a> in
order to lazy load a relationship.  The rationale for this is that
it serves as a hint for the horizontal sharding feature to use, such that
the identity token of the state can be used as the default identity token
to use for the query within id_chooser().</p>
<a class="changeset-link headerlink reference internal" href="#change-d062e81187414fc306ae4b2157ef1742">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4243">#4243</a></p>
</p>
</li>
<li><p id="change-1.2.9-16"><span class="target" id="change-2cca6c216347ab83d04c766452b48c1a"><strong>[bug] [py3k] </strong></span><p>Replaced the usage of inspect.formatargspec() with a vendored version
copied from the Python standard library, as inspect.formatargspec()
is deprecated and as of Python 3.7.0 is emitting a warning.</p>
<a class="changeset-link headerlink reference internal" href="#change-2cca6c216347ab83d04c766452b48c1a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4291">#4291</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.8">
<h2>1.2.8<a class="headerlink" href="#change-1.2.8" title="Permalink to this headline">¶</a></h2>
Released: May 28, 2018<div class="section" id="change-1.2.8-orm">
<h3>orm<a class="headerlink" href="#change-1.2.8-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.8-0"><span class="target" id="change-9b703f6d5b2b409051a3d88bc95979dd"><strong>[orm] [bug] </strong></span><p>Fixed regression in 1.2.7 caused by <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4228">#4228</a>, which itself was fixing
a 1.2-level regression, where the <code class="docutils literal notranslate"><span class="pre">query_cls</span></code> callable passed to a
<a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session" title="sqlalchemy.orm.session.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> was assumed to be a subclass of <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a>  with
class method availability, as opposed to an arbitrary callable.    In
particular, the dogpile caching example illustrates <code class="docutils literal notranslate"><span class="pre">query_cls</span></code> as a
function and not a <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a> subclass.</p>
<a class="changeset-link headerlink reference internal" href="#change-9b703f6d5b2b409051a3d88bc95979dd">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4256">#4256</a></p>
</p>
</li>
<li><p id="change-1.2.8-1"><span class="target" id="change-5055e76f656f48de98772f04b257833b"><strong>[orm] [bug] </strong></span><p>Fixed a long-standing regression that occurred in version
1.0, which prevented the use of a custom <code class="xref py py-class docutils literal notranslate"><span class="pre">MapperOption</span></code>
that alters the _params of a <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a> object for a
lazy load, since the lazy loader itself would overwrite those
parameters.   This applies to the “temporal range” example
on the wiki.  Note however that the
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.populate_existing" title="sqlalchemy.orm.query.Query.populate_existing"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.populate_existing()</span></code></a> method is now required in
order to rewrite the mapper options associated with an object
already loaded in the identity map.</p>
<p>As part of this change, a custom defined
<code class="xref py py-class docutils literal notranslate"><span class="pre">MapperOption</span></code> will now cause lazy loaders related to
the target object to use a non-baked query by default unless
the <code class="xref py py-meth docutils literal notranslate"><span class="pre">MapperOption._generate_cache_key()</span></code> method is implemented.
In particular, this repairs one regression which occurred when
using the dogpile.cache “advanced” example, which was not
returning cached results and instead emitting SQL due to an
incompatibility with the baked query loader; with the change,
the <code class="docutils literal notranslate"><span class="pre">RelationshipCache</span></code> option included for many releases
in the dogpile example will disable the “baked” query altogether.
Note that the dogpile example is also modernized to avoid both
of these issues as part of issue <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4258">#4258</a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-5055e76f656f48de98772f04b257833b">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4128">#4128</a></p>
</p>
</li>
<li><p id="change-1.2.8-2"><span class="target" id="change-0c5d6a6d34bbe8c28ae55a13545f34b9"><strong>[orm] [bug] </strong></span><p>Fixed bug where the new <a class="reference internal" href="../orm/extensions/baked.html#sqlalchemy.ext.baked.Result.with_post_criteria" title="sqlalchemy.ext.baked.Result.with_post_criteria"><code class="xref py py-meth docutils literal notranslate"><span class="pre">baked.Result.with_post_criteria()</span></code></a>
method would not interact with a subquery-eager loader correctly,
in that the “post criteria” would not be applied to embedded
subquery eager loaders.   This is related to <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4128">#4128</a> in that
the post criteria feature is now used by the lazy loader.</p>
<a class="changeset-link headerlink reference internal" href="#change-0c5d6a6d34bbe8c28ae55a13545f34b9">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.8-3"><span class="target" id="change-2d8e47f7c3edbc8feada11b28ccf0376"><strong>[orm] [bug] </strong></span><p>Updated the dogpile.caching example to include new structures that
accommodate for the “baked” query system, which is used by default within
lazy loaders and some eager relationship loaders. The dogpile.caching
“relationship_caching” and “advanced” examples were also broken due to
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4256">#4256</a>.  The issue here is also worked-around by the fix in
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4128">#4128</a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-2d8e47f7c3edbc8feada11b28ccf0376">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4258">#4258</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.8-engine">
<h3>engine<a class="headerlink" href="#change-1.2.8-engine" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.8-4"><span class="target" id="change-91d62384ffe56b1e7cf8b543fd222ec5"><strong>[engine] [bug] </strong></span><p>Fixed connection pool issue whereby if a disconnection error were raised
during the connection pool’s “reset on return” sequence in conjunction with
an explicit transaction opened against the enclosing <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Connection" title="sqlalchemy.engine.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a>
object (such as from calling <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session.close" title="sqlalchemy.orm.session.Session.close"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Session.close()</span></code></a> without a rollback or
commit, or calling <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Connection.close" title="sqlalchemy.engine.Connection.close"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.close()</span></code></a> without first closing a
transaction declared with <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Connection.begin" title="sqlalchemy.engine.Connection.begin"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.begin()</span></code></a>), a double-checkin would
result, which could then lead towards concurrent checkouts of the same
connection. The double-checkin condition is now prevented overall by an
assertion, as well as the specific double-checkin scenario has been
fixed.</p>
<a class="changeset-link headerlink reference internal" href="#change-91d62384ffe56b1e7cf8b543fd222ec5">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4252">#4252</a></p>
</p>
</li>
<li><p id="change-1.2.8-5"><span class="target" id="change-7edd190ee14bbb303b82087e322a1fee"><strong>[engine] [bug] </strong></span><p>Fixed a reference leak issue where the values of the parameter dictionary
used in a statement execution would remain referenced by the “compiled
cache”, as a result of storing the key view used by Python 3 dictionary
keys().  Pull request courtesy Olivier Grisel.</p>
<a class="changeset-link headerlink reference internal" href="#change-7edd190ee14bbb303b82087e322a1fee">¶</a><p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.8-sql">
<h3>sql<a class="headerlink" href="#change-1.2.8-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.8-6"><span class="target" id="change-ba58ec578681043a997f32a1f2da67bd"><strong>[sql] [bug] </strong></span><p>Fixed issue where the “ambiguous literal” error message used when
interpreting literal values as SQL expression values would encounter a
tuple value, and fail to format the message properly. Pull request courtesy
Miguel Ventura.</p>
<a class="changeset-link headerlink reference internal" href="#change-ba58ec578681043a997f32a1f2da67bd">¶</a><p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.8-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.8-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.8-7"><span class="target" id="change-eaa588243e92939abc9f7b5639e78af6"><strong>[mssql] [bug] </strong></span><p>Fixed a 1.2 regression caused by <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4061">#4061</a> where the SQL Server
“BIT” type would be considered to be “native boolean”.  The goal here
was to avoid creating a CHECK constraint on the column, however the bigger
issue is that the BIT value does not behave like a true/false constant
and cannot be interpreted as a standalone expression, e.g.
“WHERE &lt;column&gt;”.   The SQL Server dialect now goes back to being
non-native boolean, but with an extra flag that still avoids creating
the CHECK constraint.</p>
<a class="changeset-link headerlink reference internal" href="#change-eaa588243e92939abc9f7b5639e78af6">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4250">#4250</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.8-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.8-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.8-8"><span class="target" id="change-baa722912078e3ae44490613f8b69f28"><strong>[oracle] [bug] </strong></span><p>The Oracle BINARY_FLOAT and BINARY_DOUBLE datatypes now participate within
cx_Oracle.setinputsizes(), passing along NATIVE_FLOAT, so as to support the
NaN value.  Additionally, <code class="xref py py-class docutils literal notranslate"><span class="pre">oracle.BINARY_FLOAT</span></code>,
<code class="xref py py-class docutils literal notranslate"><span class="pre">oracle.BINARY_DOUBLE</span></code> and <a class="reference internal" href="../dialects/oracle.html#sqlalchemy.dialects.oracle.DOUBLE_PRECISION" title="sqlalchemy.dialects.oracle.DOUBLE_PRECISION"><code class="xref py py-class docutils literal notranslate"><span class="pre">oracle.DOUBLE_PRECISION</span></code></a> now
subclass <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Float" title="sqlalchemy.types.Float"><code class="xref py py-class docutils literal notranslate"><span class="pre">Float</span></code></a>, since these are floating point datatypes, not
decimal.  These datatypes were already defaulting the
<a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Float.params.asdecimal" title="sqlalchemy.types.Float"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Float.asdecimal</span></code></a> flag to False in line with what
<a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Float" title="sqlalchemy.types.Float"><code class="xref py py-class docutils literal notranslate"><span class="pre">Float</span></code></a> already does.</p>
<a class="changeset-link headerlink reference internal" href="#change-baa722912078e3ae44490613f8b69f28">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4264">#4264</a></p>
</p>
</li>
<li><p id="change-1.2.8-9"><span class="target" id="change-9b163bb6a349006ab5df98e2187b8b43"><strong>[oracle] [bug] </strong></span><p>Added reflection capabilities for the <code class="xref py py-class docutils literal notranslate"><span class="pre">oracle.BINARY_FLOAT</span></code>,
<code class="xref py py-class docutils literal notranslate"><span class="pre">oracle.BINARY_DOUBLE</span></code> datatypes.</p>
<a class="changeset-link headerlink reference internal" href="#change-9b163bb6a349006ab5df98e2187b8b43">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.8-10"><span class="target" id="change-5343d6bb608fe9d17e3911259a7e5648"><strong>[oracle] [bug] </strong></span><p>Altered the Oracle dialect such that when an <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Integer" title="sqlalchemy.types.Integer"><code class="xref py py-class docutils literal notranslate"><span class="pre">Integer</span></code></a> type is in
use, the cx_Oracle.NUMERIC type is set up for setinputsizes().  In
SQLAlchemy 1.1 and earlier, cx_Oracle.NUMERIC was passed for all numeric
types unconditionally, and in 1.2 this was removed to allow for better
numeric precision.  However, for integers, some database/client setups
will fail to coerce boolean values True/False into integers which introduces
regressive behavior when using SQLAlchemy 1.2.  Overall, the setinputsizes
logic seems like it will need a lot more flexibility going forward so this
is a start for that.</p>
<a class="changeset-link headerlink reference internal" href="#change-5343d6bb608fe9d17e3911259a7e5648">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4259">#4259</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.8-misc">
<h3>misc<a class="headerlink" href="#change-1.2.8-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.8-11"><span class="target" id="change-9202197faf1754b760abd6a0e132d836"><strong>[bug] [ext] </strong></span><p>The horizontal sharding extension now makes use of the identity token
added to ORM identity keys as part of <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4137">#4137</a>, when an object
refresh or column-based deferred load or unexpiration operation occurs.
Since we know the “shard” that the object originated from, we make
use of this value when refreshing, thereby avoiding queries against
other shards that don’t match this object’s identity in any case.</p>
<a class="changeset-link headerlink reference internal" href="#change-9202197faf1754b760abd6a0e132d836">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4247">#4247</a></p>
</p>
</li>
<li><p id="change-1.2.8-12"><span class="target" id="change-886d73f19954e0eca8dcf0afca64c521"><strong>[bug] [ext] </strong></span><p>Fixed a race condition which could occur if automap
<a class="reference internal" href="../orm/extensions/automap.html#sqlalchemy.ext.automap.AutomapBase.prepare" title="sqlalchemy.ext.automap.AutomapBase.prepare"><code class="xref py py-meth docutils literal notranslate"><span class="pre">AutomapBase.prepare()</span></code></a> were used within a multi-threaded context
against other threads which  may call <a class="reference internal" href="../orm/mapping_api.html#sqlalchemy.orm.configure_mappers" title="sqlalchemy.orm.configure_mappers"><code class="xref py py-func docutils literal notranslate"><span class="pre">configure_mappers()</span></code></a> as a
result of use of other mappers.  The unfinished mapping work of automap
is particularly sensitive to being pulled in by a
<a class="reference internal" href="../orm/mapping_api.html#sqlalchemy.orm.configure_mappers" title="sqlalchemy.orm.configure_mappers"><code class="xref py py-func docutils literal notranslate"><span class="pre">configure_mappers()</span></code></a> step leading to errors.</p>
<a class="changeset-link headerlink reference internal" href="#change-886d73f19954e0eca8dcf0afca64c521">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4266">#4266</a></p>
</p>
</li>
<li><p id="change-1.2.8-13"><span class="target" id="change-111f47fc16870033bae080c73ce5f4d6"><strong>[bug] [tests] </strong></span><p>Fixed a bug in the test suite where if an external dialect returned
<code class="docutils literal notranslate"><span class="pre">None</span></code> for <code class="docutils literal notranslate"><span class="pre">server_version_info</span></code>, the exclusion logic would raise an
<code class="docutils literal notranslate"><span class="pre">AttributeError</span></code>.</p>
<a class="changeset-link headerlink reference internal" href="#change-111f47fc16870033bae080c73ce5f4d6">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4249">#4249</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.7">
<h2>1.2.7<a class="headerlink" href="#change-1.2.7" title="Permalink to this headline">¶</a></h2>
Released: April 20, 2018<div class="section" id="change-1.2.7-orm">
<h3>orm<a class="headerlink" href="#change-1.2.7-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.7-0"><span class="target" id="change-51666f3c2226d8014d2cbe73b3395741"><strong>[orm] [bug] </strong></span><p>Fixed regression in 1.2 within sharded query feature where the
new “identity_token” element was not being correctly considered within
the scope of a lazy load operation, when searching the identity map
for a related many-to-one element.   The new behavior will allow for
making use of the “id_chooser” in order to determine the best identity
key to retrieve from the identity map.  In order to achieve this, some
refactoring of 1.2’s “identity_token” approach has made some slight changes
to the implementation of <code class="docutils literal notranslate"><span class="pre">ShardedQuery</span></code> which should be noted for other
derivations of this class.</p>
<a class="changeset-link headerlink reference internal" href="#change-51666f3c2226d8014d2cbe73b3395741">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4228">#4228</a></p>
</p>
</li>
<li><p id="change-1.2.7-1"><span class="target" id="change-3ccaef14a1c65313e85f38aa44adafb1"><strong>[orm] [bug] </strong></span><p>Fixed issue in single-inheritance loading where the use of an aliased
entity against a single-inheritance subclass in conjunction with the
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.select_from" title="sqlalchemy.orm.query.Query.select_from"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.select_from()</span></code></a> method would cause the SQL to be rendered with
the unaliased table mixed in to the query, causing a cartesian product.  In
particular this was affecting the new “selectin” loader when used against a
single-inheritance subclass.</p>
<a class="changeset-link headerlink reference internal" href="#change-3ccaef14a1c65313e85f38aa44adafb1">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4241">#4241</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.7-sql">
<h3>sql<a class="headerlink" href="#change-1.2.7-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.7-2"><span class="target" id="change-5ce39ec57892cca82072b5c5bac02115"><strong>[sql] [bug] </strong></span><p>Fixed issue where the compilation of an INSERT statement with the
“literal_binds” option that also uses an explicit sequence and “inline”
generation, as on PostgreSQL and Oracle, would fail to accommodate the
extra keyword argument within the sequence processing routine.</p>
<a class="changeset-link headerlink reference internal" href="#change-5ce39ec57892cca82072b5c5bac02115">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4231">#4231</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.7-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.7-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.7-3"><span class="target" id="change-a6e7612f5d1ede3827ca31815cf3893d"><strong>[postgresql] [feature] </strong></span><p>Added new PG type <a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.REGCLASS" title="sqlalchemy.dialects.postgresql.REGCLASS"><code class="xref py py-class docutils literal notranslate"><span class="pre">postgresql.REGCLASS</span></code></a> which assists in casting
table names to OID values.  Pull request courtesy Sebastian Bank.</p>
<a class="changeset-link headerlink reference internal" href="#change-a6e7612f5d1ede3827ca31815cf3893d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4160">#4160</a></p>
</p>
</li>
<li><p id="change-1.2.7-4"><span class="target" id="change-671daa89b835c215e73976fe223cf4e2"><strong>[postgresql] [bug] </strong></span><p>Fixed bug where the special “not equals” operator for the PostgreSQL
“range” datatypes such as DATERANGE would fail to render “IS NOT NULL” when
compared to the Python <code class="docutils literal notranslate"><span class="pre">None</span></code> value.</p>
<a class="changeset-link headerlink reference internal" href="#change-671daa89b835c215e73976fe223cf4e2">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4229">#4229</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.7-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.7-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.7-5"><span class="target" id="change-46c604653a3d70219d27c0ce40297321"><strong>[mssql] [bug] </strong></span><p>Fixed 1.2 regression caused by <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4060">#4060</a> where the query used to
reflect SQL Server cross-schema foreign keys was limiting the criteria
incorrectly.</p>
<a class="changeset-link headerlink reference internal" href="#change-46c604653a3d70219d27c0ce40297321">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4234">#4234</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.7-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.7-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.7-6"><span class="target" id="change-4eed1bf7d41771b76f4017023dc0e89d"><strong>[oracle] [bug] </strong></span><p>The Oracle NUMBER datatype is reflected as INTEGER if the precision is NULL
and the scale is zero, as this is how INTEGER values come back when
reflected from Oracle’s tables.  Pull request courtesy Kent Bower.</p>
<a class="changeset-link headerlink reference internal" href="#change-4eed1bf7d41771b76f4017023dc0e89d">¶</a><p></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.6">
<h2>1.2.6<a class="headerlink" href="#change-1.2.6" title="Permalink to this headline">¶</a></h2>
Released: March 30, 2018<div class="section" id="change-1.2.6-orm">
<h3>orm<a class="headerlink" href="#change-1.2.6-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.6-0"><span class="target" id="change-de687cd75572168b09d49b54e355b151"><strong>[orm] [bug] </strong></span><p>Fixed bug where using <a class="reference internal" href="../orm/extensions/mutable.html#sqlalchemy.ext.mutable.Mutable.associate_with" title="sqlalchemy.ext.mutable.Mutable.associate_with"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Mutable.associate_with()</span></code></a> or
<a class="reference internal" href="../orm/extensions/mutable.html#sqlalchemy.ext.mutable.Mutable.as_mutable" title="sqlalchemy.ext.mutable.Mutable.as_mutable"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Mutable.as_mutable()</span></code></a> in conjunction with a class that has non-
primary mappers set up with alternatively-named attributes would produce an
attribute error.  Since non-primary mappers are not used for persistence,
the mutable extension now excludes non-primary mappers from its
instrumentation steps.</p>
<a class="changeset-link headerlink reference internal" href="#change-de687cd75572168b09d49b54e355b151">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4215">#4215</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.6-engine">
<h3>engine<a class="headerlink" href="#change-1.2.6-engine" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.6-1"><span class="target" id="change-3d0d911aebd76f7eb7cdfe197329c0c7"><strong>[engine] [bug] </strong></span><p>Fixed bug in connection pool where a connection could be present in the
pool without all of its “connect” event handlers called, if a previous
“connect” handler threw an exception; note that the dialects themselves
have connect handlers that emit SQL, such as those which set transaction
isolation, which can fail if the database is in a non-available state, but
still allows a connection.  The connection is now invalidated first if any
of the connect handlers fail.</p>
<a class="changeset-link headerlink reference internal" href="#change-3d0d911aebd76f7eb7cdfe197329c0c7">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4225">#4225</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.6-sql">
<h3>sql<a class="headerlink" href="#change-1.2.6-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.6-2"><span class="target" id="change-801934fd532d364b69192936dfbc9032"><strong>[sql] [bug] </strong></span><p>Fixed a regression that occurred from the previous fix to <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4204">#4204</a> in
version 1.2.5, where a CTE that refers to itself after the
<a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.CTE.alias" title="sqlalchemy.sql.expression.CTE.alias"><code class="xref py py-meth docutils literal notranslate"><span class="pre">CTE.alias()</span></code></a> method has been called would not refer to itself
correctly.</p>
<a class="changeset-link headerlink reference internal" href="#change-801934fd532d364b69192936dfbc9032">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4204">#4204</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.6-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.6-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.6-3"><span class="target" id="change-953b37e4377ab3cef32be607a605458d"><strong>[postgresql] [feature] </strong></span><p>Added support for “PARTITION BY” in PostgreSQL table definitions,
using “postgresql_partition_by”.  Pull request courtesy
Vsevolod Solovyov.</p>
<a class="changeset-link headerlink reference internal" href="#change-953b37e4377ab3cef32be607a605458d">¶</a><p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.6-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.6-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.6-4"><span class="target" id="change-cf319f41b6040e6112255aaeba63d388"><strong>[mssql] [bug] </strong></span><p>Adjusted the SQL Server version detection for pyodbc to only allow for
numeric tokens, filtering out non-integers, since the dialect does tuple-
numeric comparisons with this value.  This is normally true for all known
SQL Server / pyodbc drivers in any case.</p>
<a class="changeset-link headerlink reference internal" href="#change-cf319f41b6040e6112255aaeba63d388">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4227">#4227</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.6-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.6-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.6-5"><span class="target" id="change-4510f1a5f24789f69cf8632a581be6d5"><strong>[oracle] [bug] </strong></span><p>The minimum cx_Oracle version supported is 5.2 (June 2015).  Previously,
the dialect asserted against version 5.0 but as of 1.2.2 we are using some
symbols that did not appear until 5.2.</p>
<a class="changeset-link headerlink reference internal" href="#change-4510f1a5f24789f69cf8632a581be6d5">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4211">#4211</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.6-misc">
<h3>misc<a class="headerlink" href="#change-1.2.6-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.6-6"><span class="target" id="change-bab1fe121d5651029caf9f812d1ca9da"><strong>[bug] [declarative] </strong></span><p>Removed a warning that would be emitted when calling upon
<code class="docutils literal notranslate"><span class="pre">__table_args__</span></code>, <code class="docutils literal notranslate"><span class="pre">__mapper_args__</span></code> as named with a <code class="docutils literal notranslate"><span class="pre">&#64;declared_attr</span></code>
method, when called from a non-mapped declarative mixin.  Calling these
directly is documented as the approach to use when one is overriding one
of these methods on a mapped class.  The warning still emits for regular
attribute names.</p>
<a class="changeset-link headerlink reference internal" href="#change-bab1fe121d5651029caf9f812d1ca9da">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4221">#4221</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.5">
<h2>1.2.5<a class="headerlink" href="#change-1.2.5" title="Permalink to this headline">¶</a></h2>
Released: March 6, 2018<div class="section" id="change-1.2.5-orm">
<h3>orm<a class="headerlink" href="#change-1.2.5-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.5-0"><span class="target" id="change-9b069a974cc58094d8f056eddc6b6809"><strong>[orm] [feature] </strong></span><p>Added new feature <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.only_return_tuples" title="sqlalchemy.orm.query.Query.only_return_tuples"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.only_return_tuples()</span></code></a>.  Causes the
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a> object to return keyed tuple objects unconditionally even
if the query is against a single entity.   Pull request courtesy Eric
Atkin.</p>
<a class="changeset-link headerlink reference internal" href="#change-9b069a974cc58094d8f056eddc6b6809">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.5-1"><span class="target" id="change-d3fe0a4dd5efdd400de1094c835c7329"><strong>[orm] [bug] </strong></span><p>Fixed bug in new “polymorphic selectin” loading when a selection of
polymorphic objects were to be partially loaded from a relationship
lazy loader, leading to an “empty IN” condition within the load that
raises an error for the “inline” form of “IN”.</p>
<a class="changeset-link headerlink reference internal" href="#change-d3fe0a4dd5efdd400de1094c835c7329">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4199">#4199</a></p>
</p>
</li>
<li><p id="change-1.2.5-2"><span class="target" id="change-f17dd188b9695907a01399d01b8c0afd"><strong>[orm] [bug] </strong></span><p>Fixed 1.2 regression where a mapper option that contains an
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.util.AliasedClass" title="sqlalchemy.orm.util.AliasedClass"><code class="xref py py-class docutils literal notranslate"><span class="pre">AliasedClass</span></code></a> object, as is typical when using the
<a class="reference internal" href="../orm/internals.html#sqlalchemy.orm.attributes.QueryableAttribute.of_type" title="sqlalchemy.orm.attributes.QueryableAttribute.of_type"><code class="xref py py-meth docutils literal notranslate"><span class="pre">QueryableAttribute.of_type()</span></code></a> method, could not be pickled.   1.1’s
behavior was to omit the aliased class objects from the path, so this
behavior is restored.</p>
<a class="changeset-link headerlink reference internal" href="#change-f17dd188b9695907a01399d01b8c0afd">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4209">#4209</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.5-sql">
<h3>sql<a class="headerlink" href="#change-1.2.5-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.5-3"><span class="target" id="change-23e74dcef861e05e9c1fdbb4bc94c73d"><strong>[sql] [bug] </strong></span><p>Fixed bug in :class:.`CTE` construct along the same lines as that of
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4204">#4204</a> where a <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.CTE" title="sqlalchemy.sql.expression.CTE"><code class="xref py py-class docutils literal notranslate"><span class="pre">CTE</span></code></a> that was aliased would not copy itself
correctly during a “clone” operation as is frequent within the ORM as well
as when using the <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.ClauseElement.params" title="sqlalchemy.sql.expression.ClauseElement.params"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ClauseElement.params()</span></code></a> method.</p>
<a class="changeset-link headerlink reference internal" href="#change-23e74dcef861e05e9c1fdbb4bc94c73d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4210">#4210</a></p>
</p>
</li>
<li><p id="change-1.2.5-4"><span class="target" id="change-69deb22593ecc611d69ca8464c88e318"><strong>[sql] [bug] </strong></span><p>Fixed bug in CTE rendering where a <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.CTE" title="sqlalchemy.sql.expression.CTE"><code class="xref py py-class docutils literal notranslate"><span class="pre">CTE</span></code></a> that was also turned into
an <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.Alias" title="sqlalchemy.sql.expression.Alias"><code class="xref py py-class docutils literal notranslate"><span class="pre">Alias</span></code></a> would not render its “ctename AS aliasname” clause
appropriately if there were more than one reference to the CTE in a FROM
clause.</p>
<a class="changeset-link headerlink reference internal" href="#change-69deb22593ecc611d69ca8464c88e318">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4204">#4204</a></p>
</p>
</li>
<li><p id="change-1.2.5-5"><span class="target" id="change-43a6cf73a069768f97629184bb7e6e81"><strong>[sql] [bug] </strong></span><p>Fixed bug in new “expanding IN parameter” feature where the bind parameter
processors for values wasn’t working at all, tests failed to cover this
pretty basic case which includes that ENUM values weren’t working.</p>
<a class="changeset-link headerlink reference internal" href="#change-43a6cf73a069768f97629184bb7e6e81">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4198">#4198</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.5-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.5-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.5-6"><span class="target" id="change-7101ab8c89822f1211ad90d6d5696f0f"><strong>[postgresql] [bug] [py3k] </strong></span><p>Fixed bug in PostgreSQL COLLATE / ARRAY adjustment first introduced
in <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4006">#4006</a> where new behaviors in Python 3.7 regular expressions
caused the fix to fail.</p>
<a class="changeset-link headerlink reference internal" href="#change-7101ab8c89822f1211ad90d6d5696f0f">¶</a><p>This change is also <strong>backported</strong> to: 1.1.18</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4208">#4208</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.5-mysql">
<h3>mysql<a class="headerlink" href="#change-1.2.5-mysql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.5-7"><span class="target" id="change-973b92df268cc0267ce34a8314b8b7b4"><strong>[mysql] [bug] </strong></span><p>MySQL dialects now query the server version using <code class="docutils literal notranslate"><span class="pre">SELECT</span> <span class="pre">&#64;&#64;version</span></code>
explicitly to the server to ensure we are getting the correct version
information back.   Proxy servers like MaxScale interfere with the value
that is passed to the DBAPI’s connection.server_version value so this
is no longer reliable.</p>
<a class="changeset-link headerlink reference internal" href="#change-973b92df268cc0267ce34a8314b8b7b4">¶</a><p>This change is also <strong>backported</strong> to: 1.1.18</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4205">#4205</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.4">
<h2>1.2.4<a class="headerlink" href="#change-1.2.4" title="Permalink to this headline">¶</a></h2>
Released: February 22, 2018<div class="section" id="change-1.2.4-orm">
<h3>orm<a class="headerlink" href="#change-1.2.4-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.4-0"><span class="target" id="change-3380565b9e065cfafe872e455ca9eb17"><strong>[orm] [bug] </strong></span><p>Fixed 1.2 regression in ORM versioning feature where a mapping against a
<a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.select" title="sqlalchemy.sql.expression.select"><code class="xref py py-func docutils literal notranslate"><span class="pre">select()</span></code></a> or <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.alias" title="sqlalchemy.sql.expression.alias"><code class="xref py py-func docutils literal notranslate"><span class="pre">alias()</span></code></a> that also used a versioning column
against the underlying table would fail due to the check added as part of
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3673">#3673</a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-3380565b9e065cfafe872e455ca9eb17">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4193">#4193</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.4-engine">
<h3>engine<a class="headerlink" href="#change-1.2.4-engine" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.4-1"><span class="target" id="change-f4848c9249eea34ee4f7fa3d41fdefe0"><strong>[engine] [bug] </strong></span><p>Fixed regression caused in 1.2.3 due to fix from <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4181">#4181</a> where
the changes to the event system involving <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Engine" title="sqlalchemy.engine.Engine"><code class="xref py py-class docutils literal notranslate"><span class="pre">Engine</span></code></a> and
<code class="xref py py-class docutils literal notranslate"><span class="pre">OptionEngine</span></code> did not accommodate for event removals, which
would raise an <code class="docutils literal notranslate"><span class="pre">AttributeError</span></code> when invoked at the class
level.</p>
<a class="changeset-link headerlink reference internal" href="#change-f4848c9249eea34ee4f7fa3d41fdefe0">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4190">#4190</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.4-sql">
<h3>sql<a class="headerlink" href="#change-1.2.4-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.4-2"><span class="target" id="change-eb278cb84338854ac6e9258b8fd81140"><strong>[sql] [bug] </strong></span><p>Fixed bug where CTE expressions would not have their name or alias name
quoted when the given name is case sensitive or otherwise requires quoting.
Pull request courtesy Eric Atkin.</p>
<a class="changeset-link headerlink reference internal" href="#change-eb278cb84338854ac6e9258b8fd81140">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4197">#4197</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.3">
<h2>1.2.3<a class="headerlink" href="#change-1.2.3" title="Permalink to this headline">¶</a></h2>
Released: February 16, 2018<div class="section" id="change-1.2.3-orm">
<h3>orm<a class="headerlink" href="#change-1.2.3-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.3-0"><span class="target" id="change-477f92b60e4a3c26a2eddd94c52c24de"><strong>[orm] [feature] </strong></span><p>Added new argument <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.attributes.set_attribute.params.inititator" title="sqlalchemy.orm.attributes.set_attribute"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">attributes.set_attribute.inititator</span></code></a>
to the <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.attributes.set_attribute" title="sqlalchemy.orm.attributes.set_attribute"><code class="xref py py-func docutils literal notranslate"><span class="pre">attributes.set_attribute()</span></code></a> function, allowing an
event token received from a listener function to be propagated
to subsequent set events.</p>
<a class="changeset-link headerlink reference internal" href="#change-477f92b60e4a3c26a2eddd94c52c24de">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.3-1"><span class="target" id="change-a4b232c2b1024c30569ec8593f2d5863"><strong>[orm] [bug] </strong></span><p>Fixed issue in post_update feature where an UPDATE is emitted
when the parent object has been deleted but the dependent object
is not.   This issue has existed for a long time however
since 1.2 now asserts rows matched for post_update, this
was raising an error.</p>
<a class="changeset-link headerlink reference internal" href="#change-a4b232c2b1024c30569ec8593f2d5863">¶</a><p>This change is also <strong>backported</strong> to: 1.1.16</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4187">#4187</a></p>
</p>
</li>
<li><p id="change-1.2.3-2"><span class="target" id="change-b1003c93723ddc7cde3bfc631f75c2d9"><strong>[orm] [bug] </strong></span><p>Fixed regression caused by fix for issue <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4116">#4116</a> affecting versions
1.2.2 as well as 1.1.15, which had the effect of mis-calculation of the
“owning class” of an <a class="reference internal" href="../orm/extensions/associationproxy.html#sqlalchemy.ext.associationproxy.AssociationProxy" title="sqlalchemy.ext.associationproxy.AssociationProxy"><code class="xref py py-class docutils literal notranslate"><span class="pre">AssociationProxy</span></code></a> as the <code class="docutils literal notranslate"><span class="pre">NoneType</span></code> class
in some declarative mixin/inheritance situations as well as if the
association proxy were accessed off of an un-mapped class.  The “figure out
the owner” logic has been replaced by an in-depth routine that searches
through the complete mapper hierarchy assigned to the class or subclass to
determine the correct (we hope) match; will not assign the owner if no
match is found.  An exception is now raised if the proxy is used
against an un-mapped instance.</p>
<a class="changeset-link headerlink reference internal" href="#change-b1003c93723ddc7cde3bfc631f75c2d9">¶</a><p>This change is also <strong>backported</strong> to: 1.1.16</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4185">#4185</a></p>
</p>
</li>
<li><p id="change-1.2.3-3"><span class="target" id="change-8546bfc69c9b83a40c2a1ade1f384ae9"><strong>[orm] [bug] </strong></span><p>Fixed bug where the <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Bundle" title="sqlalchemy.orm.query.Bundle"><code class="xref py py-class docutils literal notranslate"><span class="pre">Bundle</span></code></a> object did not
correctly report upon the primary <a class="reference internal" href="../orm/mapping_api.html#sqlalchemy.orm.mapper.Mapper" title="sqlalchemy.orm.mapper.Mapper"><code class="xref py py-class docutils literal notranslate"><span class="pre">Mapper</span></code></a> object
represented by the bundle, if any.   An immediate
side effect of this issue was that the new selectinload
loader strategy wouldn’t work with the horizontal sharding
extension.</p>
<a class="changeset-link headerlink reference internal" href="#change-8546bfc69c9b83a40c2a1ade1f384ae9">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4175">#4175</a></p>
</p>
</li>
<li><p id="change-1.2.3-4"><span class="target" id="change-8d252c86837c4df9cec8524c5e2b592e"><strong>[orm] [bug] </strong></span><p>Fixed bug in concrete inheritance mapping where user-defined
attributes such as hybrid properties that mirror the names
of mapped attributes from sibling classes would be overwritten by
the mapper as non-accessible at the instance level.   Additionally
ensured that user-bound descriptors are not implicitly invoked at the class
level during the mapper configuration stage.</p>
<a class="changeset-link headerlink reference internal" href="#change-8d252c86837c4df9cec8524c5e2b592e">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4188">#4188</a></p>
</p>
</li>
<li><p id="change-1.2.3-5"><span class="target" id="change-eed28b95fd53c4b4a528aac8737990ac"><strong>[orm] [bug] </strong></span><p>Fixed bug where the <a class="reference internal" href="../orm/constructors.html#sqlalchemy.orm.reconstructor" title="sqlalchemy.orm.reconstructor"><code class="xref py py-func docutils literal notranslate"><span class="pre">orm.reconstructor()</span></code></a> event
helper would not be recognized if it were applied to the
<code class="docutils literal notranslate"><span class="pre">__init__()</span></code> method of the mapped class.</p>
<a class="changeset-link headerlink reference internal" href="#change-eed28b95fd53c4b4a528aac8737990ac">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4178">#4178</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.3-engine">
<h3>engine<a class="headerlink" href="#change-1.2.3-engine" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.3-6"><span class="target" id="change-da25b2ad5ed28d9370ef5f758f076fa4"><strong>[engine] [bug] </strong></span><p>Fixed bug where events associated with an <code class="xref py py-class docutils literal notranslate"><span class="pre">Engine</span></code>
at the class level would be doubled when the
<a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Engine.execution_options" title="sqlalchemy.engine.Engine.execution_options"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Engine.execution_options()</span></code></a> method were used.  To
achieve this, the semi-private class <code class="xref py py-class docutils literal notranslate"><span class="pre">OptionEngine</span></code>
no longer accepts events directly at the class level
and will raise an error; the class only propagates class-level
events from its parent <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Engine" title="sqlalchemy.engine.Engine"><code class="xref py py-class docutils literal notranslate"><span class="pre">Engine</span></code></a>.   Instance-level
events continue to work as before.</p>
<a class="changeset-link headerlink reference internal" href="#change-da25b2ad5ed28d9370ef5f758f076fa4">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4181">#4181</a></p>
</p>
</li>
<li><p id="change-1.2.3-7"><span class="target" id="change-c214bfaa6f96eb21f56b36e183578453"><strong>[engine] [bug] </strong></span><p>The <a class="reference internal" href="../core/engines.html#sqlalchemy.engine.url.URL" title="sqlalchemy.engine.url.URL"><code class="xref py py-class docutils literal notranslate"><span class="pre">URL</span></code></a> object now allows query keys to be specified multiple
times where their values will be joined into a list.  This is to support
the plugins feature documented at <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.CreateEnginePlugin" title="sqlalchemy.engine.CreateEnginePlugin"><code class="xref py py-class docutils literal notranslate"><span class="pre">CreateEnginePlugin</span></code></a> which
documents that “plugin” can be passed multiple times. Additionally, the
plugin names can be passed to <a class="reference internal" href="../core/engines.html#sqlalchemy.create_engine" title="sqlalchemy.create_engine"><code class="xref py py-func docutils literal notranslate"><span class="pre">create_engine()</span></code></a> outside of the URL
using the new <a class="reference internal" href="../core/engines.html#sqlalchemy.create_engine.params.plugins" title="sqlalchemy.create_engine"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">create_engine.plugins</span></code></a> parameter.</p>
<a class="changeset-link headerlink reference internal" href="#change-c214bfaa6f96eb21f56b36e183578453">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4170">#4170</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.3-sql">
<h3>sql<a class="headerlink" href="#change-1.2.3-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.3-8"><span class="target" id="change-620ed1eeae24d310c2f98c1e090b985e"><strong>[sql] [feature] </strong></span><p>Added support for <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Enum" title="sqlalchemy.types.Enum"><code class="xref py py-class docutils literal notranslate"><span class="pre">Enum</span></code></a> to persist the values of the enumeration,
rather than the keys, when using a Python pep-435 style enumerated object.
The user supplies a callable function that will return the string values to
be persisted.  This allows enumerations against non-string values to be
value-persistable as well.  Pull request courtesy Jon Snyder.</p>
<a class="changeset-link headerlink reference internal" href="#change-620ed1eeae24d310c2f98c1e090b985e">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3906">#3906</a></p>
</p>
</li>
<li><p id="change-1.2.3-9"><span class="target" id="change-a1979c130f001daa5fdaf6c33fa18680"><strong>[sql] [bug] </strong></span><p>Fixed bug where the <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Enum" title="sqlalchemy.types.Enum"><code class="xref py py-class docutils literal notranslate"><span class="pre">Enum</span></code></a> type wouldn’t handle
enum “aliases” correctly, when more than one key refers to the
same value.  Pull request courtesy Daniel Knell.</p>
<a class="changeset-link headerlink reference internal" href="#change-a1979c130f001daa5fdaf6c33fa18680">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4180">#4180</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.3-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.3-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.3-10"><span class="target" id="change-2a43720b55a38e9af7d7a7d378d89db4"><strong>[postgresql] [bug] </strong></span><p>Added “SSL SYSCALL error: Operation timed out” to the list
of messages that trigger a “disconnect” scenario for the
psycopg2 driver.  Pull request courtesy André Cruz.</p>
<a class="changeset-link headerlink reference internal" href="#change-2a43720b55a38e9af7d7a7d378d89db4">¶</a><p>This change is also <strong>backported</strong> to: 1.1.16</p>
<p></p>
</p>
</li>
<li><p id="change-1.2.3-11"><span class="target" id="change-09346d20e912a3e5d9122380da7fb7a4"><strong>[postgresql] [bug] </strong></span><p>Added “TRUNCATE” to the list of keywords accepted by the
PostgreSQL dialect as an “autocommit”-triggering keyword.
Pull request courtesy Jacob Hayes.</p>
<a class="changeset-link headerlink reference internal" href="#change-09346d20e912a3e5d9122380da7fb7a4">¶</a><p>This change is also <strong>backported</strong> to: 1.1.16</p>
<p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.3-sqlite">
<h3>sqlite<a class="headerlink" href="#change-1.2.3-sqlite" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.3-12"><span class="target" id="change-fe52c42c43d57d23499af28b7df65a1a"><strong>[sqlite] [bug] </strong></span><p>Fixed the import error raised when a platform
has neither pysqlite2 nor sqlite3 installed, such
that the sqlite3-related import error is raised,
not the pysqlite2 one which is not the actual
failure mode.  Pull request courtesy Robin.</p>
<a class="changeset-link headerlink reference internal" href="#change-fe52c42c43d57d23499af28b7df65a1a">¶</a><p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.3-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.3-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.3-13"><span class="target" id="change-c8658a1ae5ac82306cc4b6d4fae77966"><strong>[oracle] [feature] </strong></span><p>The ON DELETE options for foreign keys are now part of
Oracle reflection.  Oracle does not support ON UPDATE
cascades.  Pull request courtesy Miroslav Shubernetskiy.</p>
<a class="changeset-link headerlink reference internal" href="#change-c8658a1ae5ac82306cc4b6d4fae77966">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.3-14"><span class="target" id="change-c7963aac1b4ef025ad59eef80ceec00d"><strong>[oracle] [bug] </strong></span><p>Fixed bug in cx_Oracle disconnect detection, used by pre_ping and other
features, where an error could be raised as DatabaseError which includes a
numeric error code; previously we weren’t checking in this case for a
disconnect code.</p>
<a class="changeset-link headerlink reference internal" href="#change-c7963aac1b4ef025ad59eef80ceec00d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4182">#4182</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.3-misc">
<h3>misc<a class="headerlink" href="#change-1.2.3-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.3-15"><span class="target" id="change-a3d0c091ae4cf6e8f93418c492515b69"><strong>[bug] [pool] </strong></span><p>Fixed a fairly serious connection pool bug where a connection that is
acquired after being refreshed as a result of a user-defined
<a class="reference internal" href="../core/exceptions.html#sqlalchemy.exc.DisconnectionError" title="sqlalchemy.exc.DisconnectionError"><code class="xref py py-class docutils literal notranslate"><span class="pre">DisconnectionError</span></code></a> or due to the 1.2-released “pre_ping” feature
would not be correctly reset if the connection were returned to the pool by
weakref cleanup (e.g. the front-facing object is garbage collected); the
weakref would still refer to the previously invalidated DBAPI connection
which would have the reset operation erroneously called upon it instead.
This would lead to stack traces in the logs and a connection being checked
into the pool without being reset, which can cause locking issues.</p>
<a class="changeset-link headerlink reference internal" href="#change-a3d0c091ae4cf6e8f93418c492515b69">¶</a><p>This change is also <strong>backported</strong> to: 1.1.16</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4184">#4184</a></p>
</p>
</li>
<li><p id="change-1.2.3-16"><span class="target" id="change-686b1c814b79369e9057766dd3849bb5"><strong>[bug] [tests] </strong></span><p>A test added in 1.2 thought to confirm a Python 2.7 behavior turns out to
be confirming the behavior only as of Python 2.7.8. Python bug #8743 still
impacts set comparison in Python 2.7.7 and earlier, so the test in question
involving AssociationSet no longer runs for these older Python 2.7
versions.</p>
<a class="changeset-link headerlink reference internal" href="#change-686b1c814b79369e9057766dd3849bb5">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3265">#3265</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.2">
<h2>1.2.2<a class="headerlink" href="#change-1.2.2" title="Permalink to this headline">¶</a></h2>
Released: January 24, 2018<div class="section" id="change-1.2.2-orm">
<h3>orm<a class="headerlink" href="#change-1.2.2-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.2-0"><span class="target" id="change-bcab7d7969540dd60184cf8320c6c77e"><strong>[orm] [bug] </strong></span><p>Fixed 1.2 regression regarding new bulk_replace event
where a backref would fail to remove an object from the
previous owner when a bulk-assignment assigned the
object to a new owner.</p>
<a class="changeset-link headerlink reference internal" href="#change-bcab7d7969540dd60184cf8320c6c77e">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4171">#4171</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.2-mysql">
<h3>mysql<a class="headerlink" href="#change-1.2.2-mysql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.2-1"><span class="target" id="change-aa484e8d4140abfcc6078b06c11f3643"><strong>[mysql] [bug] </strong></span><p>Added more MySQL 8.0 reserved words to the MySQL dialect
for quoting purposes.  Pull request courtesy
Riccardo Magliocchetti.</p>
<a class="changeset-link headerlink reference internal" href="#change-aa484e8d4140abfcc6078b06c11f3643">¶</a><p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.2-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.2-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.2-2"><span class="target" id="change-9786127357a9ba55a25a840601c5ca7f"><strong>[mssql] [bug] </strong></span><p>Added ODBC error code 10054 to the list of error
codes that count as a disconnect for ODBC / MSSQL server.</p>
<a class="changeset-link headerlink reference internal" href="#change-9786127357a9ba55a25a840601c5ca7f">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4164">#4164</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.2-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.2-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.2-3"><span class="target" id="change-858d90ed4ee9cbb340eff5b764f025ab"><strong>[oracle] [bug] </strong></span><p>The cx_Oracle dialect now calls setinputsizes() with cx_Oracle.NCHAR
unconditionally when the NVARCHAR2 datatype, in SQLAlchemy corresponding
to sqltypes.Unicode(), is in use.  Per cx_Oracle’s author this allows
the correct conversions to occur within the Oracle client regardless
of the setting for NLS_NCHAR_CHARACTERSET.</p>
<a class="changeset-link headerlink reference internal" href="#change-858d90ed4ee9cbb340eff5b764f025ab">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4163">#4163</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.1">
<h2>1.2.1<a class="headerlink" href="#change-1.2.1" title="Permalink to this headline">¶</a></h2>
Released: January 15, 2018<div class="section" id="change-1.2.1-orm">
<h3>orm<a class="headerlink" href="#change-1.2.1-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.1-0"><span class="target" id="change-5d7551bf65898d95178cd3b88c4b5e42"><strong>[orm] [bug] </strong></span><p>Fixed bug where an object that is expunged during a rollback of
a nested or subtransaction which also had its primary key mutated
would not be correctly removed from the session, causing subsequent
issues in using the session.</p>
<a class="changeset-link headerlink reference internal" href="#change-5d7551bf65898d95178cd3b88c4b5e42">¶</a><p>This change is also <strong>backported</strong> to: 1.1.16</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4151">#4151</a></p>
</p>
</li>
<li><p id="change-1.2.1-1"><span class="target" id="change-b94b005debc9ce2595cac54223fd2ed9"><strong>[orm] [bug] </strong></span><p>Fixed regression where pickle format of a Load / _UnboundLoad object (e.g.
loader options) changed and <code class="docutils literal notranslate"><span class="pre">__setstate__()</span></code> was raising an
UnboundLocalError for an object received from the legacy format, even
though an attempt was made to do so.  tests are now added to ensure this
works.</p>
<a class="changeset-link headerlink reference internal" href="#change-b94b005debc9ce2595cac54223fd2ed9">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4159">#4159</a></p>
</p>
</li>
<li><p id="change-1.2.1-2"><span class="target" id="change-7563c2ec3bb75f347dcefff6299130bc"><strong>[orm] [bug] </strong></span><p>Fixed regression caused by new lazyload caching scheme in <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3954">#3954</a>
where a query that makes use of loader options with of_type would cause
lazy loads of unrelated paths to fail with a TypeError.</p>
<a class="changeset-link headerlink reference internal" href="#change-7563c2ec3bb75f347dcefff6299130bc">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4153">#4153</a></p>
</p>
</li>
<li><p id="change-1.2.1-3"><span class="target" id="change-47dd85bffd871622b66f3d8b34194a7e"><strong>[orm] [bug] </strong></span><p>Fixed bug in new “selectin” relationship loader where the loader could try
to load a non-existent relationship when loading a collection of
polymorphic objects, where only some of the mappers include that
relationship, typically when <a class="reference internal" href="../orm/internals.html#sqlalchemy.orm.interfaces.PropComparator.of_type" title="sqlalchemy.orm.interfaces.PropComparator.of_type"><code class="xref py py-meth docutils literal notranslate"><span class="pre">PropComparator.of_type()</span></code></a> is being used.</p>
<a class="changeset-link headerlink reference internal" href="#change-47dd85bffd871622b66f3d8b34194a7e">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4156">#4156</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.1-sql">
<h3>sql<a class="headerlink" href="#change-1.2.1-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.1-4"><span class="target" id="change-be5e4ce5a4de7fec14dc12a6aa94e7ac"><strong>[sql] [bug] </strong></span><p>Fixed bug in <a class="reference internal" href="../core/dml.html#sqlalchemy.sql.expression.Insert.values" title="sqlalchemy.sql.expression.Insert.values"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Insert.values()</span></code></a> where using the “multi-values”
format in combination with <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><code class="xref py py-class docutils literal notranslate"><span class="pre">Column</span></code></a> objects as keys rather
than strings would fail.   Pull request courtesy Aubrey Stark-Toller.</p>
<a class="changeset-link headerlink reference internal" href="#change-be5e4ce5a4de7fec14dc12a6aa94e7ac">¶</a><p>This change is also <strong>backported</strong> to: 1.1.16</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4162">#4162</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.1-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.1-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.1-5"><span class="target" id="change-61c4d78570e491a8ce1eb3308d81c10a"><strong>[mssql] [bug] </strong></span><p>Fixed regression in 1.2 where newly repaired quoting
of collation names in <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3785">#3785</a> breaks SQL Server,
which explicitly does not understand a quoted collation
name.   Whether or not mixed-case collation names are
quoted or not is now deferred down to a dialect-level
decision so that each dialect can prepare these identifiers
directly.</p>
<a class="changeset-link headerlink reference internal" href="#change-61c4d78570e491a8ce1eb3308d81c10a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4154">#4154</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.1-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.1-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.1-6"><span class="target" id="change-689050e0fc210554643dd9b2f2d566e7"><strong>[oracle] [bug] </strong></span><p>Fixed regression where the removal of most setinputsizes
rules from cx_Oracle dialect impacted the TIMESTAMP
datatype’s ability to retrieve fractional seconds.</p>
<a class="changeset-link headerlink reference internal" href="#change-689050e0fc210554643dd9b2f2d566e7">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4157">#4157</a></p>
</p>
</li>
<li><p id="change-1.2.1-7"><span class="target" id="change-bafb78210d9f1ffcbbd5e1b7c4aa7908"><strong>[oracle] [bug] </strong></span><p>Fixed regression in Oracle imports where a missing comma caused
an undefined symbol to be present.  Pull request courtesy
Miroslav Shubernetskiy.</p>
<a class="changeset-link headerlink reference internal" href="#change-bafb78210d9f1ffcbbd5e1b7c4aa7908">¶</a><p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.1-misc">
<h3>misc<a class="headerlink" href="#change-1.2.1-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.1-8"><span class="target" id="change-9170955d02ac54efe47f8ac9311a42c3"><strong>[bug] [ext] </strong></span><p>Fixed regression in association proxy due to <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3769">#3769</a>
(allow for chained any() / has()) where contains() against
an association proxy chained in the form
(o2m relationship, associationproxy(m2o relationship, m2o relationship))
would raise an error regarding the re-application of contains()
on the final link of the chain.</p>
<a class="changeset-link headerlink reference internal" href="#change-9170955d02ac54efe47f8ac9311a42c3">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4150">#4150</a></p>
</p>
</li>
<li><p id="change-1.2.1-9"><span class="target" id="change-cf421d82223d5c342879b5049eacfb7a"><strong>[bug] [tests] </strong></span><p>Removed an oracle-specific requirements rule from the public
test suite that was interfering with third party dialect
suites.</p>
<a class="changeset-link headerlink reference internal" href="#change-cf421d82223d5c342879b5049eacfb7a">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.1-10"><span class="target" id="change-995d3a575f02e8608bbdea7153344dea"><strong>[bug] [tests] </strong></span><p>Added a new exclusion rule group_by_complex_expression
which disables tests that use “GROUP BY &lt;expr&gt;”, which seems
to be not viable for at least two third party dialects.</p>
<a class="changeset-link headerlink reference internal" href="#change-995d3a575f02e8608bbdea7153344dea">¶</a><p></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.0">
<h2>1.2.0<a class="headerlink" href="#change-1.2.0" title="Permalink to this headline">¶</a></h2>
Released: December 27, 2017<div class="section" id="change-1.2.0-orm">
<h3>orm<a class="headerlink" href="#change-1.2.0-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0-0"><span class="target" id="change-30e0e43873214bd96cccae8783b79d74"><strong>[orm] [feature] </strong></span><p>Added a new data member to the identity key tuple
used by the ORM’s identity map, known as the
“identity_token”.  This token defaults to None but
may be used by database sharding schemes to differentiate
objects in memory with the same primary key that come
from different databases.   The horizontal sharding
extension integrates this token applying the shard
identifier to it, thus allowing primary keys to be
duplicated across horizontally sharded backends.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-4137"><span class="std std-ref">Identity key enhancements to support sharding</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-30e0e43873214bd96cccae8783b79d74">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4137">#4137</a></p>
</p>
</li>
<li><p id="change-1.2.0-1"><span class="target" id="change-d8f8f409b89acb178ae834b45212a896"><strong>[orm] [bug] [ext] </strong></span><p>Fixed bug where the association proxy would inadvertently link itself
to an <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.util.AliasedClass" title="sqlalchemy.orm.util.AliasedClass"><code class="xref py py-class docutils literal notranslate"><span class="pre">AliasedClass</span></code></a> object if it were called first with
the <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.util.AliasedClass" title="sqlalchemy.orm.util.AliasedClass"><code class="xref py py-class docutils literal notranslate"><span class="pre">AliasedClass</span></code></a> as a parent, causing errors upon subsequent
usage.</p>
<a class="changeset-link headerlink reference internal" href="#change-d8f8f409b89acb178ae834b45212a896">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4116">#4116</a></p>
</p>
</li>
<li><p id="change-1.2.0-2"><span class="target" id="change-c6f02ce56a0e29a7a216aa6f5c145b0d"><strong>[orm] [bug] </strong></span><p>Fixed bug in <a class="reference internal" href="../orm/loading_relationships.html#sqlalchemy.orm.contains_eager" title="sqlalchemy.orm.contains_eager"><code class="xref py py-func docutils literal notranslate"><span class="pre">contains_eager()</span></code></a> query option where making use of a
path that used <a class="reference internal" href="../orm/internals.html#sqlalchemy.orm.interfaces.PropComparator.of_type" title="sqlalchemy.orm.interfaces.PropComparator.of_type"><code class="xref py py-meth docutils literal notranslate"><span class="pre">PropComparator.of_type()</span></code></a> to refer to a subclass
across more than one level of joins would also require that the “alias”
argument were provided with the same subtype in order to avoid adding
unwanted FROM clauses to the query; additionally,  using
<a class="reference internal" href="../orm/loading_relationships.html#sqlalchemy.orm.contains_eager" title="sqlalchemy.orm.contains_eager"><code class="xref py py-func docutils literal notranslate"><span class="pre">contains_eager()</span></code></a> across subclasses that use <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.aliased" title="sqlalchemy.orm.aliased"><code class="xref py py-func docutils literal notranslate"><span class="pre">aliased()</span></code></a> objects
of subclasses as the <a class="reference internal" href="../orm/internals.html#sqlalchemy.orm.interfaces.PropComparator.of_type" title="sqlalchemy.orm.interfaces.PropComparator.of_type"><code class="xref py py-meth docutils literal notranslate"><span class="pre">PropComparator.of_type()</span></code></a> argument will also
render correctly.</p>
<a class="changeset-link headerlink reference internal" href="#change-c6f02ce56a0e29a7a216aa6f5c145b0d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4130">#4130</a></p>
</p>
</li>
<li><p id="change-1.2.0-3"><span class="target" id="change-a72a0a82ef757da19e5b7c309c71d52a"><strong>[orm] [bug] </strong></span><p>The <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.exists" title="sqlalchemy.orm.query.Query.exists"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.exists()</span></code></a> method will now disable eager loaders for when
the query is rendered.  Previously, joined-eager load joins would be rendered
unnecessarily as well as subquery eager load queries would be needlessly
generated.   The new behavior matches that of the <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.subquery" title="sqlalchemy.orm.query.Query.subquery"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.subquery()</span></code></a>
method.</p>
<a class="changeset-link headerlink reference internal" href="#change-a72a0a82ef757da19e5b7c309c71d52a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4032">#4032</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0-orm-declarative">
<h3>orm declarative<a class="headerlink" href="#change-1.2.0-orm-declarative" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0-4"><span class="target" id="change-ad1f5f8203c21744b691b270f124bc2a"><strong>[bug] [declarative] [orm] </strong></span><p>Fixed bug where a descriptor that is elsewhere a mapped column
or relationship within a hierarchy based on <a class="reference internal" href="../orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.AbstractConcreteBase" title="sqlalchemy.ext.declarative.AbstractConcreteBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractConcreteBase</span></code></a>
would be referred towards during a refresh operation, causing an error
as the attribute is not mapped as a mapper property.
A similar issue can arise for other attributes like the “type” column
added by <a class="reference internal" href="../orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.AbstractConcreteBase" title="sqlalchemy.ext.declarative.AbstractConcreteBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractConcreteBase</span></code></a> if the class fails to include
“concrete=True” in its mapper, however the check here should also
prevent that scenario from causing a problem.</p>
<a class="changeset-link headerlink reference internal" href="#change-ad1f5f8203c21744b691b270f124bc2a">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4124">#4124</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0-engine">
<h3>engine<a class="headerlink" href="#change-1.2.0-engine" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0-5"><span class="target" id="change-ccbda2ea1050b37ab5a8c0531fbe56b8"><strong>[engine] [feature] </strong></span><p>The “password” attribute of the <a class="reference internal" href="../core/engines.html#sqlalchemy.engine.url.URL" title="sqlalchemy.engine.url.URL"><code class="xref py py-class docutils literal notranslate"><span class="pre">url.URL</span></code></a> object can now be
any user-defined or user-subclassed string object that responds to the
Python <code class="docutils literal notranslate"><span class="pre">str()</span></code> builtin.   The object passed will be maintained as the
datamember <code class="xref py py-attr docutils literal notranslate"><span class="pre">url.URL.password_original</span></code> and will be consulted
when the <code class="xref py py-attr docutils literal notranslate"><span class="pre">url.URL.password</span></code> attribute is read to produce the
string value.</p>
<a class="changeset-link headerlink reference internal" href="#change-ccbda2ea1050b37ab5a8c0531fbe56b8">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4089">#4089</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0-sql">
<h3>sql<a class="headerlink" href="#change-1.2.0-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0-6"><span class="target" id="change-25e5ab06b2dd9dcbc39e3a59dec6a997"><strong>[sql] [bug] </strong></span><p>Fixed bug where <code class="docutils literal notranslate"><span class="pre">__repr__</span></code> of <a class="reference internal" href="../core/defaults.html#sqlalchemy.schema.ColumnDefault" title="sqlalchemy.schema.ColumnDefault"><code class="xref py py-class docutils literal notranslate"><span class="pre">ColumnDefault</span></code></a> would fail
if the argument were a tuple.  Pull request courtesy Nicolas Caniart.</p>
<a class="changeset-link headerlink reference internal" href="#change-25e5ab06b2dd9dcbc39e3a59dec6a997">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4126">#4126</a></p>
</p>
</li>
<li><p id="change-1.2.0-7"><span class="target" id="change-5837d64b203c35a8e3a8f9dbb7e35344"><strong>[sql] [bug] </strong></span><p>Reworked the new “autoescape” feature introduced in
<a class="reference internal" href="migration_12.html#change-2694"><span class="std std-ref">New “autoescape” option for startswith(), endswith()</span></a> in 1.2.0b2 to be fully automatic; the escape
character now defaults to a forwards slash <code class="docutils literal notranslate"><span class="pre">&quot;/&quot;</span></code> and
is applied to percent, underscore, as well as the escape
character itself, for fully automatic escaping.  The
character can also be changed using the “escape” parameter.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-2694"><span class="std std-ref">New “autoescape” option for startswith(), endswith()</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-5837d64b203c35a8e3a8f9dbb7e35344">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2694">#2694</a></p>
</p>
</li>
<li><p id="change-1.2.0-8"><span class="target" id="change-da1d3f61ccd3a36700404d0c80f71849"><strong>[sql] [bug] </strong></span><p>Fixed bug where the <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Table.tometadata" title="sqlalchemy.schema.Table.tometadata"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Table.tometadata()</span></code></a> method would not properly
accommodate <a class="reference internal" href="../core/constraints.html#sqlalchemy.schema.Index" title="sqlalchemy.schema.Index"><code class="xref py py-class docutils literal notranslate"><span class="pre">Index</span></code></a> objects that didn’t consist of simple
column expressions, such as indexes against a <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.text" title="sqlalchemy.sql.expression.text"><code class="xref py py-func docutils literal notranslate"><span class="pre">text()</span></code></a> construct,
indexes that used SQL expressions or <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.Over.func" title="sqlalchemy.sql.expression.Over.func"><code class="xref py py-attr docutils literal notranslate"><span class="pre">func</span></code></a>, etc.   The routine
now copies expressions fully to a new <a class="reference internal" href="../core/constraints.html#sqlalchemy.schema.Index" title="sqlalchemy.schema.Index"><code class="xref py py-class docutils literal notranslate"><span class="pre">Index</span></code></a> object while
substituting all table-bound <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><code class="xref py py-class docutils literal notranslate"><span class="pre">Column</span></code></a> objects for those
of the target table.</p>
<a class="changeset-link headerlink reference internal" href="#change-da1d3f61ccd3a36700404d0c80f71849">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4147">#4147</a></p>
</p>
</li>
<li><p id="change-1.2.0-9"><span class="target" id="change-7440f336eed86bb57d14281ac216b0df"><strong>[sql] [bug] </strong></span><p>Changed the “visit name” of <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.ColumnElement" title="sqlalchemy.sql.expression.ColumnElement"><code class="xref py py-class docutils literal notranslate"><span class="pre">ColumnElement</span></code></a> from “column” to
“column_element”, so that when this element is used as the basis for a
user-defined SQL element, it is not assumed to behave like a table-bound
<a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.ColumnClause" title="sqlalchemy.sql.expression.ColumnClause"><code class="xref py py-class docutils literal notranslate"><span class="pre">ColumnClause</span></code></a> when processed by various SQL traversal utilities,
as are commonly used by the ORM.</p>
<a class="changeset-link headerlink reference internal" href="#change-7440f336eed86bb57d14281ac216b0df">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4142">#4142</a></p>
</p>
</li>
<li><p id="change-1.2.0-10"><span class="target" id="change-24a3854b7682a17b8a68be43b4208014"><strong>[sql] [bug] [ext] </strong></span><p>Fixed issue in <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.ARRAY" title="sqlalchemy.types.ARRAY"><code class="xref py py-class docutils literal notranslate"><span class="pre">ARRAY</span></code></a> datatype which is essentially the same
issue as that of <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3832">#3832</a>, except not a regression, where
column attachment events on top of <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.ARRAY" title="sqlalchemy.types.ARRAY"><code class="xref py py-class docutils literal notranslate"><span class="pre">ARRAY</span></code></a> would not fire
correctly, thus interfering with systems which rely upon this.   A key
use case that was broken by this is the use of mixins to declare
columns that make use of <code class="xref py py-meth docutils literal notranslate"><span class="pre">MutableList.as_mutable()</span></code>.</p>
<a class="changeset-link headerlink reference internal" href="#change-24a3854b7682a17b8a68be43b4208014">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4141">#4141</a></p>
</p>
</li>
<li><p id="change-1.2.0-11"><span class="target" id="change-171173ef4b836ca84f5092d033dae7a9"><strong>[sql] [bug] </strong></span><p>Fixed bug in new “expanding bind parameter” feature whereby if multiple
params were used in one statement, the regular expression would not
match the parameter name correctly.</p>
<a class="changeset-link headerlink reference internal" href="#change-171173ef4b836ca84f5092d033dae7a9">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4140">#4140</a></p>
</p>
</li>
<li><p id="change-1.2.0-12"><span class="target" id="change-0763fda9db01bda940d2bef6fe16b5aa"><strong>[sql] [enhancement] </strong></span><p>Implemented “DELETE..FROM” syntax for PostgreSQL, MySQL, MS SQL Server
(as well as within the unsupported Sybase dialect) in a manner similar
to how “UPDATE..FROM” works.  A DELETE statement that refers to more than
one table will switch into “multi-table” mode and render the appropriate
“USING” or multi-table “FROM” clause as understood by the database.
Pull request courtesy Pieter Mulder.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-959"><span class="std std-ref">Multiple-table criteria support for DELETE</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-0763fda9db01bda940d2bef6fe16b5aa">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/959">#959</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.0-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0-13"><span class="target" id="change-b84583d78ae85a12aef933ed5fbe43b6"><strong>[postgresql] [feature] </strong></span><p>Added new <a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.MONEY" title="sqlalchemy.dialects.postgresql.MONEY"><code class="xref py py-class docutils literal notranslate"><span class="pre">postgresql.MONEY</span></code></a> datatype.  Pull request courtesy
Cleber J Santos.</p>
<a class="changeset-link headerlink reference internal" href="#change-b84583d78ae85a12aef933ed5fbe43b6">¶</a><p></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0-mysql">
<h3>mysql<a class="headerlink" href="#change-1.2.0-mysql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0-14"><span class="target" id="change-947df4a451b5fdefb3815b93f55b4d8f"><strong>[mysql] [bug] </strong></span><p>MySQL 5.7.20 now warns for use of the &#64;tx_isolation variable; a version
check is now performed and uses &#64;transaction_isolation instead
to prevent this warning.</p>
<a class="changeset-link headerlink reference internal" href="#change-947df4a451b5fdefb3815b93f55b4d8f">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4120">#4120</a></p>
</p>
</li>
<li><p id="change-1.2.0-15"><span class="target" id="change-1195a0fc15c3f9db8c883c355c4797fe"><strong>[mysql] [bug] </strong></span><p>Fixed regression from issue 1.2.0b3 where “MariaDB” version comparison can
fail for some particular MariaDB version strings under Python 3.</p>
<a class="changeset-link headerlink reference internal" href="#change-1195a0fc15c3f9db8c883c355c4797fe">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4115">#4115</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.0-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0-16"><span class="target" id="change-241b940fac3edf34325016a0644d5245"><strong>[mssql] [bug] </strong></span><p>Fixed bug where sqltypes.BINARY and sqltypes.VARBINARY datatypes
would not include correct bound-value handlers for pyodbc,
which allows the pyodbc.NullParam value to be passed that
helps with FreeTDS.</p>
<a class="changeset-link headerlink reference internal" href="#change-241b940fac3edf34325016a0644d5245">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4121">#4121</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.0-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0-17"><span class="target" id="change-6af749c41675bf4e3a73435434142ac2"><strong>[oracle] [bug] </strong></span><p>Added some additional rules to fully handle <code class="docutils literal notranslate"><span class="pre">Decimal('Infinity')</span></code>,
<code class="docutils literal notranslate"><span class="pre">Decimal('-Infinity')</span></code> values with cx_Oracle numerics when using
<code class="docutils literal notranslate"><span class="pre">asdecimal=True</span></code>.</p>
<a class="changeset-link headerlink reference internal" href="#change-6af749c41675bf4e3a73435434142ac2">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4064">#4064</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0-misc">
<h3>misc<a class="headerlink" href="#change-1.2.0-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0-18"><span class="target" id="change-5c0e3ddc48b3ba0a9435218763e9954b"><strong>[misc] [feature] </strong></span><p>Added a new errors section to the documentation with background
about common error messages.   Selected exceptions within SQLAlchemy
will include a link in their string output to the relevant section
within this page.</p>
<a class="changeset-link headerlink reference internal" href="#change-5c0e3ddc48b3ba0a9435218763e9954b">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.0-19"><span class="target" id="change-e3202f95abb4b8cae129ecee23fba960"><strong>[enhancement] [ext] </strong></span><p>Added new method <a class="reference internal" href="../orm/extensions/baked.html#sqlalchemy.ext.baked.Result.with_post_criteria" title="sqlalchemy.ext.baked.Result.with_post_criteria"><code class="xref py py-meth docutils literal notranslate"><span class="pre">baked.Result.with_post_criteria()</span></code></a> to baked
query system, allowing non-SQL-modifying transformations to take place
after the query has been pulled from the cache.  Among other things,
this method can be used with <a class="reference internal" href="../orm/extensions/horizontal_shard.html#sqlalchemy.ext.horizontal_shard.ShardedQuery" title="sqlalchemy.ext.horizontal_shard.ShardedQuery"><code class="xref py py-class docutils literal notranslate"><span class="pre">horizontal_shard.ShardedQuery</span></code></a>
to set the shard identifier.   <a class="reference internal" href="../orm/extensions/horizontal_shard.html#sqlalchemy.ext.horizontal_shard.ShardedQuery" title="sqlalchemy.ext.horizontal_shard.ShardedQuery"><code class="xref py py-class docutils literal notranslate"><span class="pre">horizontal_shard.ShardedQuery</span></code></a>
has also been modified such that its <code class="xref py py-meth docutils literal notranslate"><span class="pre">ShardedQuery.get()</span></code> method
interacts correctly with that of <a class="reference internal" href="../orm/extensions/baked.html#sqlalchemy.ext.baked.Result" title="sqlalchemy.ext.baked.Result"><code class="xref py py-class docutils literal notranslate"><span class="pre">baked.Result</span></code></a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-e3202f95abb4b8cae129ecee23fba960">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4135">#4135</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.0b3">
<h2>1.2.0b3<a class="headerlink" href="#change-1.2.0b3" title="Permalink to this headline">¶</a></h2>
Released: October 13, 2017<div class="section" id="change-1.2.0b3-orm">
<h3>orm<a class="headerlink" href="#change-1.2.0b3-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b3-0"><span class="target" id="change-f76c8a0fc6bed37c1258f8e7df5135e0"><strong>[orm] [bug] </strong></span><p>Fixed bug where ORM relationship would warn against conflicting sync
targets (e.g. two relationships would both write to the same column) for
sibling classes in an inheritance hierarchy, where the two relationships
would never actually conflict during writes.</p>
<a class="changeset-link headerlink reference internal" href="#change-f76c8a0fc6bed37c1258f8e7df5135e0">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4078">#4078</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-1"><span class="target" id="change-b72881932589315a9f86a6889488f91f"><strong>[orm] [bug] </strong></span><p>Fixed bug where correlated select used against single-table inheritance
entity would fail to render correctly in the outer query, due to adjustment
for single inheritance discriminator criteria inappropriately re-applying
the criteria to the outer query.</p>
<a class="changeset-link headerlink reference internal" href="#change-b72881932589315a9f86a6889488f91f">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4103">#4103</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-2"><span class="target" id="change-84e05e47868f6bd6ae21e1953eb92f72"><strong>[orm] [bug] </strong></span><p>Fixed bug in <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session.merge" title="sqlalchemy.orm.session.Session.merge"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Session.merge()</span></code></a> following along similar lines as that
of <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4030">#4030</a>, where an internal check for a target object in
the identity map could lead to an error if it were to be garbage collected
immediately before the merge routine actually retrieves the object.</p>
<a class="changeset-link headerlink reference internal" href="#change-84e05e47868f6bd6ae21e1953eb92f72">¶</a><p>This change is also <strong>backported</strong> to: 1.1.14</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4069">#4069</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-3"><span class="target" id="change-c9ab479afc2a7a7e73d4c7a67068862c"><strong>[orm] [bug] </strong></span><p>Fixed bug where an <a class="reference internal" href="../orm/loading_columns.html#sqlalchemy.orm.undefer_group" title="sqlalchemy.orm.undefer_group"><code class="xref py py-func docutils literal notranslate"><span class="pre">undefer_group()</span></code></a> option would not be recognized
if it extended from a relationship that was loading using joined eager
loading.  Additionally, as the bug led to excess work being performed,
Python function call counts are also improved by 20% within the initial
calculation of result set columns, complementing the joined eager load
improvements of <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3915">#3915</a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-c9ab479afc2a7a7e73d4c7a67068862c">¶</a><p>This change is also <strong>backported</strong> to: 1.1.14</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4048">#4048</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-4"><span class="target" id="change-4d941c89a74fe9e3e0223ce3f6b6895d"><strong>[orm] [bug] </strong></span><p>Fixed bug in <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session.merge" title="sqlalchemy.orm.session.Session.merge"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Session.merge()</span></code></a> where objects in a collection that had
the primary key attribute set to <code class="docutils literal notranslate"><span class="pre">None</span></code> for a key that is  typically
autoincrementing would be considered to be a database-persisted key for
part of the internal deduplication process, causing only one object to
actually be inserted in the database.</p>
<a class="changeset-link headerlink reference internal" href="#change-4d941c89a74fe9e3e0223ce3f6b6895d">¶</a><p>This change is also <strong>backported</strong> to: 1.1.14</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4056">#4056</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-5"><span class="target" id="change-cba2058be61cb4363bb00ebbc3dc4265"><strong>[orm] [bug] </strong></span><p>An <a class="reference internal" href="../core/exceptions.html#sqlalchemy.exc.InvalidRequestError" title="sqlalchemy.exc.InvalidRequestError"><code class="xref py py-class docutils literal notranslate"><span class="pre">InvalidRequestError</span></code></a> is raised when a <a class="reference internal" href="../orm/mapped_attributes.html#sqlalchemy.orm.synonym" title="sqlalchemy.orm.synonym"><code class="xref py py-func docutils literal notranslate"><span class="pre">synonym()</span></code></a>
is used against an attribute that is not against a <a class="reference internal" href="../orm/internals.html#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><code class="xref py py-class docutils literal notranslate"><span class="pre">MapperProperty</span></code></a>,
such as an association proxy.  Previously, a recursion overflow would
occur trying to locate non-existent attributes.</p>
<a class="changeset-link headerlink reference internal" href="#change-cba2058be61cb4363bb00ebbc3dc4265">¶</a><p>This change is also <strong>backported</strong> to: 1.1.14</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4067">#4067</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-6"><span class="target" id="change-ad1f49a3581d9df5ec209818b0af9373"><strong>[orm] [bug] </strong></span><p>Fixed regression introduced in 1.2.0b1 due to <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3934">#3934</a> where the
<a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session" title="sqlalchemy.orm.session.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> would fail to “deactivate” the transaction, if a
rollback failed (the target issue is when MySQL loses track of a SAVEPOINT).
This would cause a subsequent call to <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session.rollback" title="sqlalchemy.orm.session.Session.rollback"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Session.rollback()</span></code></a> to raise
an error a second time, rather than completing and bringing the
<a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session" title="sqlalchemy.orm.session.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> back to ACTIVE.</p>
<a class="changeset-link headerlink reference internal" href="#change-ad1f49a3581d9df5ec209818b0af9373">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4050">#4050</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-7"><span class="target" id="change-84f4c27694b4feda33139433b3a9d7e2"><strong>[orm] [bug] </strong></span><p>Fixed issue where the <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.make_transient_to_detached" title="sqlalchemy.orm.session.make_transient_to_detached"><code class="xref py py-func docutils literal notranslate"><span class="pre">make_transient_to_detached()</span></code></a> function
would expire all attributes on the target object, including “deferred”
attributes, which has the effect of the attribute being undeferred
for the next refresh, causing an unexpected load of the attribute.</p>
<a class="changeset-link headerlink reference internal" href="#change-84f4c27694b4feda33139433b3a9d7e2">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4084">#4084</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-8"><span class="target" id="change-4e1acb016183339b392d207204d78f43"><strong>[orm] [bug] </strong></span><p>Fixed bug involving delete-orphan cascade where a related item
that becomes an orphan before the parent object is part of a
session is still tracked as moving into orphan status, which results
in it being expunged from the session rather than being flushed.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This fix was inadvertently merged during the 1.2.0b3
release and was <strong>not added to the changelog</strong> at that time.
This changelog note was added to the release retroactively as of
version 1.2.13.</p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-4e1acb016183339b392d207204d78f43">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4040">#4040</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-9"><span class="target" id="change-fc0713fc81b94b73c505a120d826ed70"><strong>[orm] [bug] </strong></span><p>Fixed bug in <a class="reference internal" href="migration_12.html#change-3948"><span class="std std-ref">“selectin” polymorphic loading, loads subclasses using separate IN queries</span></a> which prevented “selectin” and
“inline” settings in a multi-level class hierarchy from interacting
together as expected.    A new example is added to the documentation.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="../orm/inheritance_loading.html#polymorphic-selectin-and-withpoly"><span class="std std-ref">Combining selectin and with_polymorphic</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-fc0713fc81b94b73c505a120d826ed70">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4026">#4026</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-10"><span class="target" id="change-cf040022589a4d0dfd90cb00e0aee5df"><strong>[orm] [bug] </strong></span><p>Removed the warnings that are emitted when the LRU caches employed
by the mapper as well as loader strategies reach their threshold; the
purpose of this warning was at first a guard against excess cache keys
being generated but became basically a check on the “creating many
engines” antipattern.   While this is still an antipattern, the presence
of test suites which both create an engine per test as well as raise
on all warnings will be an inconvenience; it should not be critical
that such test suites change their architecture just for this warning
(though engine-per-test suite is always better).</p>
<a class="changeset-link headerlink reference internal" href="#change-cf040022589a4d0dfd90cb00e0aee5df">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4071">#4071</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-11"><span class="target" id="change-a94ad3783f59eedf661f5baa53918f8d"><strong>[orm] [bug] </strong></span><p>Fixed regression where the use of a <a class="reference internal" href="../orm/loading_columns.html#sqlalchemy.orm.undefer_group" title="sqlalchemy.orm.undefer_group"><code class="xref py py-func docutils literal notranslate"><span class="pre">undefer_group()</span></code></a> option
in conjunction with a lazy loaded relationship option would cause
an attribute error, due to a bug in the SQL cache key generation
added in 1.2 as part of <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3954">#3954</a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-a94ad3783f59eedf661f5baa53918f8d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4049">#4049</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-12"><span class="target" id="change-dff3a469788c81a46440584406cb22be"><strong>[orm] [bug] </strong></span><p>Modified the change made to the ORM update/delete evaluator in
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3366">#3366</a> such that if an unmapped column expression is present
in the update or delete, if the evaluator can match its name to the
mapped columns of the target class, a warning is emitted, rather than
raising UnevaluatableError.  This is essentially the pre-1.2 behavior,
and is to allow migration for applications that are currently relying
upon this pattern.  However, if the given attribute name cannot be
matched to the columns of the mapper, the UnevaluatableError is
still raised, which is what was fixed in <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3366">#3366</a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-dff3a469788c81a46440584406cb22be">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4073">#4073</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b3-orm-declarative">
<h3>orm declarative<a class="headerlink" href="#change-1.2.0b3-orm-declarative" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b3-13"><span class="target" id="change-17cc0aae24a08ea441e3d04c60265f92"><strong>[bug] [declarative] [orm] </strong></span><p>A warning is emitted if a subclass attempts to override an attribute
that was declared on a superclass using <code class="docutils literal notranslate"><span class="pre">&#64;declared_attr.cascading</span></code>
that the overridden attribute will be ignored. This use
case cannot be fully supported down to further subclasses without more
complex development efforts, so for consistency the “cascading” is
honored all the way down regardless of overriding attributes.</p>
<a class="changeset-link headerlink reference internal" href="#change-17cc0aae24a08ea441e3d04c60265f92">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4091">#4091</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-14"><span class="target" id="change-05f2e2581fd43312cb004e7dcd7e4ae9"><strong>[bug] [declarative] [orm] </strong></span><p>A warning is emitted if the <code class="docutils literal notranslate"><span class="pre">&#64;declared_attr.cascading</span></code> attribute is
used with a special declarative name such as <code class="docutils literal notranslate"><span class="pre">__tablename__</span></code>, as this
has no effect.</p>
<a class="changeset-link headerlink reference internal" href="#change-05f2e2581fd43312cb004e7dcd7e4ae9">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4092">#4092</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b3-engine">
<h3>engine<a class="headerlink" href="#change-1.2.0b3-engine" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b3-15"><span class="target" id="change-59216bf554cd22c8f8a6085b339cb67f"><strong>[engine] [feature] </strong></span><p>Added <code class="docutils literal notranslate"><span class="pre">__next__()</span></code> and <code class="docutils literal notranslate"><span class="pre">next()</span></code> methods to <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.ResultProxy" title="sqlalchemy.engine.ResultProxy"><code class="xref py py-class docutils literal notranslate"><span class="pre">ResultProxy</span></code></a>,
so that the <code class="docutils literal notranslate"><span class="pre">next()</span></code> builtin function works on the object directly.
<a class="reference internal" href="../core/connections.html#sqlalchemy.engine.ResultProxy" title="sqlalchemy.engine.ResultProxy"><code class="xref py py-class docutils literal notranslate"><span class="pre">ResultProxy</span></code></a> has long had an <code class="docutils literal notranslate"><span class="pre">__iter__()</span></code> method which already
allows it to respond to the <code class="docutils literal notranslate"><span class="pre">iter()</span></code> builtin.   The implementation
for <code class="docutils literal notranslate"><span class="pre">__iter__()</span></code> is unchanged, as performance testing has indicated
that iteration using a <code class="docutils literal notranslate"><span class="pre">__next__()</span></code> method with <code class="docutils literal notranslate"><span class="pre">StopIteration</span></code>
is about 20% slower in both Python 2.7 and 3.6.</p>
<a class="changeset-link headerlink reference internal" href="#change-59216bf554cd22c8f8a6085b339cb67f">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4077">#4077</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-16"><span class="target" id="change-e56e8b0b03bc2ca7363dfcadb79cfcf0"><strong>[engine] [bug] </strong></span><p>Made some adjustments to <a class="reference internal" href="../core/pooling.html#sqlalchemy.pool.Pool" title="sqlalchemy.pool.Pool"><code class="xref py py-class docutils literal notranslate"><span class="pre">Pool</span></code></a> and <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Connection" title="sqlalchemy.engine.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a> such
that recovery logic is not run underneath exception catches for
<code class="docutils literal notranslate"><span class="pre">pool.Empty</span></code>, <code class="docutils literal notranslate"><span class="pre">AttributeError</span></code>, since when the recovery operation
itself fails, Python 3 creates a misleading stack trace referring to the
<code class="docutils literal notranslate"><span class="pre">Empty</span></code> / <code class="docutils literal notranslate"><span class="pre">AttributeError</span></code> as the cause, when in fact these exception
catches are part of control flow.</p>
<a class="changeset-link headerlink reference internal" href="#change-e56e8b0b03bc2ca7363dfcadb79cfcf0">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4028">#4028</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b3-sql">
<h3>sql<a class="headerlink" href="#change-1.2.0b3-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b3-17"><span class="target" id="change-dccdac1a5cdcb48a46eac8a0d0dfe89c"><strong>[sql] [bug] </strong></span><p>Fixed bug where the recently added <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.ColumnOperators.any_" title="sqlalchemy.sql.operators.ColumnOperators.any_"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ColumnOperators.any_()</span></code></a>
and <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.ColumnOperators.all_" title="sqlalchemy.sql.operators.ColumnOperators.all_"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ColumnOperators.all_()</span></code></a> methods didn’t work when called
as methods, as opposed to using the standalone functions
<a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.any_" title="sqlalchemy.sql.expression.any_"><code class="xref py py-func docutils literal notranslate"><span class="pre">any_()</span></code></a> and <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.all_" title="sqlalchemy.sql.expression.all_"><code class="xref py py-func docutils literal notranslate"><span class="pre">all_()</span></code></a>.  Also
added documentation examples for these relatively unintuitive
SQL operators.</p>
<a class="changeset-link headerlink reference internal" href="#change-dccdac1a5cdcb48a46eac8a0d0dfe89c">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4093">#4093</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-18"><span class="target" id="change-7b16284d071d08e4e35c60c521483855"><strong>[sql] [bug] </strong></span><p>Added a new method <a class="reference internal" href="../core/internals.html#sqlalchemy.engine.default.DefaultExecutionContext.get_current_parameters" title="sqlalchemy.engine.default.DefaultExecutionContext.get_current_parameters"><code class="xref py py-meth docutils literal notranslate"><span class="pre">DefaultExecutionContext.get_current_parameters()</span></code></a>
which is used within a function-based default value generator in
order to retrieve the current parameters being passed to the statement.
The new function differs from the
<a class="reference internal" href="../core/internals.html#sqlalchemy.engine.default.DefaultExecutionContext.current_parameters" title="sqlalchemy.engine.default.DefaultExecutionContext.current_parameters"><code class="xref py py-attr docutils literal notranslate"><span class="pre">DefaultExecutionContext.current_parameters</span></code></a> attribute in
that it also provides for optional grouping of parameters that
correspond to a multi-valued “insert” construct.  Previously it was not
possible to identify the subset of parameters that were relevant to
the function call.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-4075"><span class="std std-ref">Parameter helper for multi-valued INSERT with contextual default generator</span></a></p>
<p><a class="reference internal" href="../core/defaults.html#context-default-functions"><span class="std std-ref">Context-Sensitive Default Functions</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-7b16284d071d08e4e35c60c521483855">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4075">#4075</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-19"><span class="target" id="change-abc58f35ab05cb752677db93e9ae2be0"><strong>[sql] [bug] </strong></span><p>Fixed bug in new SQL comments feature where table and column comment
would not be copied when using <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Table.tometadata" title="sqlalchemy.schema.Table.tometadata"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Table.tometadata()</span></code></a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-abc58f35ab05cb752677db93e9ae2be0">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4087">#4087</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-20"><span class="target" id="change-3217dd32960005728cda538db3ade448"><strong>[sql] [bug] </strong></span><p>In release 1.1, the <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Boolean" title="sqlalchemy.types.Boolean"><code class="xref py py-class docutils literal notranslate"><span class="pre">Boolean</span></code></a> type was broken in that
boolean coercion via <code class="docutils literal notranslate"><span class="pre">bool()</span></code> would occur for backends that did not
feature “native boolean”, but would not occur for native boolean backends,
meaning the string <code class="docutils literal notranslate"><span class="pre">&quot;0&quot;</span></code> now behaved inconsistently. After a poll, a
consensus was reached that non-boolean values should be raising an error,
especially in the ambiguous case of string <code class="docutils literal notranslate"><span class="pre">&quot;0&quot;</span></code>; so the <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Boolean" title="sqlalchemy.types.Boolean"><code class="xref py py-class docutils literal notranslate"><span class="pre">Boolean</span></code></a>
datatype will now raise <code class="docutils literal notranslate"><span class="pre">ValueError</span></code> if an incoming value is not
within the range <code class="docutils literal notranslate"><span class="pre">None,</span> <span class="pre">True,</span> <span class="pre">False,</span> <span class="pre">1,</span> <span class="pre">0</span></code>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-4102"><span class="std std-ref">Boolean datatype now enforces strict True/False/None values</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-3217dd32960005728cda538db3ade448">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4102">#4102</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-21"><span class="target" id="change-960df57bb66ab0e3db44969a07d2d5c5"><strong>[sql] [bug] </strong></span><p>Refined the behavior of <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.Operators.op" title="sqlalchemy.sql.operators.Operators.op"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Operators.op()</span></code></a> such that in all cases,
if the <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.Operators.op.params.is_comparison" title="sqlalchemy.sql.operators.Operators.op"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Operators.op.is_comparison</span></code></a> flag is set to True,
the return type of the resulting expression will be
<a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Boolean" title="sqlalchemy.types.Boolean"><code class="xref py py-class docutils literal notranslate"><span class="pre">Boolean</span></code></a>, and if the flag is False, the return type of the
resulting expression will be the same type as that of the left-hand
expression, which is the typical default behavior of other operators.
Also added a new parameter <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.Operators.op.params.return_type" title="sqlalchemy.sql.operators.Operators.op"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Operators.op.return_type</span></code></a> as well
as a helper method <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.Operators.bool_op" title="sqlalchemy.sql.operators.Operators.bool_op"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Operators.bool_op()</span></code></a>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-4063"><span class="std std-ref">The typing behavior of custom operators has been made consistent</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-960df57bb66ab0e3db44969a07d2d5c5">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4063">#4063</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-22"><span class="target" id="change-8097a1bdc249a354dff642542caddcc7"><strong>[sql] [bug] </strong></span><p>Internal refinements to the <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Enum" title="sqlalchemy.types.Enum"><code class="xref py py-class docutils literal notranslate"><span class="pre">Enum</span></code></a>, <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Interval" title="sqlalchemy.types.Interval"><code class="xref py py-class docutils literal notranslate"><span class="pre">Interval</span></code></a>, and
<a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Boolean" title="sqlalchemy.types.Boolean"><code class="xref py py-class docutils literal notranslate"><span class="pre">Boolean</span></code></a> types, which now extend a common mixin
<code class="xref py py-class docutils literal notranslate"><span class="pre">Emulated</span></code> that indicates a type that provides Python-side
emulation of a DB native type, switching out to the DB native type when a
supporting backend is in use.   The PostgreSQL <a class="reference internal" href="../dialects/oracle.html#sqlalchemy.dialects.oracle.INTERVAL" title="sqlalchemy.dialects.oracle.INTERVAL"><code class="xref py py-class docutils literal notranslate"><span class="pre">INTERVAL</span></code></a> type
when used directly will now include the correct type coercion rules for
SQL expressions that also take effect for <code class="xref py py-class docutils literal notranslate"><span class="pre">sqltypes.Interval</span></code>
(such as adding a date to an interval yields a datetime).</p>
<a class="changeset-link headerlink reference internal" href="#change-8097a1bdc249a354dff642542caddcc7">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4088">#4088</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b3-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.0b3-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b3-23"><span class="target" id="change-c87d7e681b81cf6e451bec1193f64785"><strong>[postgresql] [feature] </strong></span><p>Added a new flag <code class="docutils literal notranslate"><span class="pre">use_batch_mode</span></code> to the psycopg2 dialect.  This flag
enables the use of psycopg2’s <code class="docutils literal notranslate"><span class="pre">psycopg2.extras.execute_batch</span></code>
extension when the <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Engine" title="sqlalchemy.engine.Engine"><code class="xref py py-class docutils literal notranslate"><span class="pre">Engine</span></code></a> calls upon
<code class="docutils literal notranslate"><span class="pre">cursor.executemany()</span></code>. This extension provides a critical
performance increase by over an order of magnitude when running INSERT
statements in batch.  The flag is False by default as it is considered
to be experimental for now.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-4109"><span class="std std-ref">Support for Batch Mode / Fast Execution Helpers</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-c87d7e681b81cf6e451bec1193f64785">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4109">#4109</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-24"><span class="target" id="change-1e1fc664a07988306fff6c289f92fbc9"><strong>[postgresql] [bug] </strong></span><p>Made further fixes to the <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.ARRAY" title="sqlalchemy.types.ARRAY"><code class="xref py py-class docutils literal notranslate"><span class="pre">ARRAY</span></code></a> class in conjunction with
COLLATE, as the fix made in <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4006">#4006</a> failed to accommodate
for a multidimensional array.</p>
<a class="changeset-link headerlink reference internal" href="#change-1e1fc664a07988306fff6c289f92fbc9">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4006">#4006</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-25"><span class="target" id="change-cdfc81cd73eb133e3bacb6d011e7918c"><strong>[postgresql] [bug] </strong></span><p>Fixed bug in <a class="reference internal" href="../core/functions.html#sqlalchemy.sql.functions.array_agg" title="sqlalchemy.sql.functions.array_agg"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array_agg</span></code></a> function where passing an argument
that is already of type <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.ARRAY" title="sqlalchemy.types.ARRAY"><code class="xref py py-class docutils literal notranslate"><span class="pre">ARRAY</span></code></a>, such as a PostgreSQL
<a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.array" title="sqlalchemy.dialects.postgresql.array"><code class="xref py py-obj docutils literal notranslate"><span class="pre">postgresql.array</span></code></a> construct, would produce a <code class="docutils literal notranslate"><span class="pre">ValueError</span></code>, due
to the function attempting to nest the arrays.</p>
<a class="changeset-link headerlink reference internal" href="#change-cdfc81cd73eb133e3bacb6d011e7918c">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4107">#4107</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-26"><span class="target" id="change-f578628285ac401ee2041f8631749e12"><strong>[postgresql] [bug] </strong></span><p>Fixed bug in PostgreSQL <a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.dml.Insert.on_conflict_do_update" title="sqlalchemy.dialects.postgresql.dml.Insert.on_conflict_do_update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">postgresql.dml.Insert.on_conflict_do_update()</span></code></a>
which would prevent the insert statement from being used as a CTE,
e.g. via <a class="reference internal" href="../core/dml.html#sqlalchemy.sql.expression.Insert.cte" title="sqlalchemy.sql.expression.Insert.cte"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Insert.cte()</span></code></a>, within another statement.</p>
<a class="changeset-link headerlink reference internal" href="#change-f578628285ac401ee2041f8631749e12">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4074">#4074</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-27"><span class="target" id="change-9985e177b2500d32f3f39a1139a3f32d"><strong>[postgresql] [bug] </strong></span><p>Fixed bug where the pg8000 driver would fail if using
<a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.MetaData.reflect" title="sqlalchemy.schema.MetaData.reflect"><code class="xref py py-meth docutils literal notranslate"><span class="pre">MetaData.reflect()</span></code></a> with a schema name, since the schema name would
be sent as a “quoted_name” object that’s a string subclass, which pg8000
doesn’t recognize.   The quoted_name type is added to pg8000’s
py_types collection on connect.</p>
<a class="changeset-link headerlink reference internal" href="#change-9985e177b2500d32f3f39a1139a3f32d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4041">#4041</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-28"><span class="target" id="change-e75a448fc0498808684264ad8aed2d1b"><strong>[postgresql] [bug] </strong></span><p>Enabled UUID support for the pg8000 driver, which supports native Python
uuid round trips for this datatype.  Arrays of UUID are still not supported,
however.</p>
<a class="changeset-link headerlink reference internal" href="#change-e75a448fc0498808684264ad8aed2d1b">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4016">#4016</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b3-mysql">
<h3>mysql<a class="headerlink" href="#change-1.2.0b3-mysql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b3-29"><span class="target" id="change-c037c0876975e0f768afcf75219f08af"><strong>[mysql] [bug] </strong></span><p>Warning emitted when MariaDB 10.2.8 or earlier in the 10.2
series is detected as there are major issues with CHECK
constraints within these versions that were resolved as of
10.2.9.</p>
<p>Note that this changelog message was NOT released with
SQLAlchemy 1.2.0b3 and was added retroactively.</p>
<a class="changeset-link headerlink reference internal" href="#change-c037c0876975e0f768afcf75219f08af">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4097">#4097</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-30"><span class="target" id="change-c81cc8c241e2e98e761414f9ee7714fa"><strong>[mysql] [bug] </strong></span><p>Changed the name of the <code class="docutils literal notranslate"><span class="pre">.values</span></code> attribute of the new MySQL
INSERT..ON DUPLICATE KEY UPDATE construct to <code class="docutils literal notranslate"><span class="pre">.inserted</span></code>, as
<a class="reference internal" href="../core/dml.html#sqlalchemy.sql.expression.Insert" title="sqlalchemy.sql.expression.Insert"><code class="xref py py-class docutils literal notranslate"><span class="pre">Insert</span></code></a> already has a method called <a class="reference internal" href="../core/dml.html#sqlalchemy.sql.expression.Insert.values" title="sqlalchemy.sql.expression.Insert.values"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Insert.values()</span></code></a>.
The <code class="docutils literal notranslate"><span class="pre">.inserted</span></code> attribute ultimately renders the MySQL <code class="docutils literal notranslate"><span class="pre">VALUES()</span></code>
function.</p>
<a class="changeset-link headerlink reference internal" href="#change-c81cc8c241e2e98e761414f9ee7714fa">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4072">#4072</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b3-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.0b3-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b3-31"><span class="target" id="change-f516740c33d90bd540e1277a5f28c689"><strong>[mssql] [feature] </strong></span><p>Added a new <a class="reference internal" href="../dialects/mssql.html#sqlalchemy.dialects.mssql.TIMESTAMP" title="sqlalchemy.dialects.mssql.TIMESTAMP"><code class="xref py py-class docutils literal notranslate"><span class="pre">mssql.TIMESTAMP</span></code></a> datatype, that
correctly acts like a binary datatype for SQL Server
rather than a datetime type, as SQL Server breaks the
SQL standard here.  Also added <a class="reference internal" href="../dialects/mssql.html#sqlalchemy.dialects.mssql.ROWVERSION" title="sqlalchemy.dialects.mssql.ROWVERSION"><code class="xref py py-class docutils literal notranslate"><span class="pre">mssql.ROWVERSION</span></code></a>,
as the “TIMESTAMP” type in SQL Server is deprecated in
favor of ROWVERSION.</p>
<a class="changeset-link headerlink reference internal" href="#change-f516740c33d90bd540e1277a5f28c689">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4086">#4086</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-32"><span class="target" id="change-ba232ba00dfafa93d45b77f149ba23c0"><strong>[mssql] [feature] </strong></span><p>Added support for “AUTOCOMMIT” isolation level, as established
via <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Connection.execution_options" title="sqlalchemy.engine.Connection.execution_options"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.execution_options()</span></code></a>, to the
PyODBC and pymssql dialects.   This isolation level sets the
appropriate DBAPI-specific flags on the underlying
connection object.</p>
<a class="changeset-link headerlink reference internal" href="#change-ba232ba00dfafa93d45b77f149ba23c0">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4058">#4058</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-33"><span class="target" id="change-fa565b6f02b9344e6a9cc4c719ad7701"><strong>[mssql] [bug] </strong></span><p>Added a full range of “connection closed” exception codes to the
PyODBC dialect for SQL Server, including ‘08S01’, ‘01002’, ‘08003’,
‘08007’, ‘08S02’, ‘08001’, ‘HYT00’, ‘HY010’.  Previously, only ‘08S01’
was covered.</p>
<a class="changeset-link headerlink reference internal" href="#change-fa565b6f02b9344e6a9cc4c719ad7701">¶</a><p>This change is also <strong>backported</strong> to: 1.1.15</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4095">#4095</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-34"><span class="target" id="change-c0849ca6dbefcb3746c6338710a2c2dd"><strong>[mssql] [bug] </strong></span><p>SQL Server supports what SQLAlchemy calls “native boolean”
with its BIT type, as this type only accepts 0 or 1 and the
DBAPIs return its value as True/False.   So the SQL Server
dialects now enable “native boolean” support, in that a
CHECK constraint is not generated for a <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Boolean" title="sqlalchemy.types.Boolean"><code class="xref py py-class docutils literal notranslate"><span class="pre">Boolean</span></code></a>
datatype.  The only difference vs. other native boolean
is that there are no “true” / “false” constants so “1” and
“0” are still rendered here.</p>
<a class="changeset-link headerlink reference internal" href="#change-c0849ca6dbefcb3746c6338710a2c2dd">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4061">#4061</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-35"><span class="target" id="change-f8b49735f3124a7a982840820ac4c22f"><strong>[mssql] [bug] </strong></span><p>Fixed the pymssql dialect so that percent signs in SQL text, such
as used in modulus expressions or literal textual values, are
<strong>not</strong> doubled up, as seems to be what pymssql expects.  This is
despite the fact that the pymssql DBAPI uses the “pyformat” parameter
style which itself considers the percent sign to be significant.</p>
<a class="changeset-link headerlink reference internal" href="#change-f8b49735f3124a7a982840820ac4c22f">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4057">#4057</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-36"><span class="target" id="change-36ecc4fc84834f9f801e742004c70ecf"><strong>[mssql] [bug] </strong></span><p>Fixed bug where the SQL Server dialect could pull columns from multiple
schemas when reflecting a self-referential foreign key constraint, if
multiple schemas contained a constraint of the same name against a
table of the same name.</p>
<a class="changeset-link headerlink reference internal" href="#change-36ecc4fc84834f9f801e742004c70ecf">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4060">#4060</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-37"><span class="target" id="change-7952491cc2ddf0db254ae96523537f9a"><strong>[mssql] [bug] [orm] </strong></span><p>Added a new class of “rowcount support” for dialects that is specific to
when “RETURNING”, which on SQL Server looks like “OUTPUT inserted”, is in
use, as the PyODBC backend isn’t able to give us rowcount on an UPDATE or
DELETE statement when OUTPUT is in effect.  This primarily affects the ORM
when a flush is updating a row that contains server-calculated values,
raising an error if the backend does not return the expected row count.
PyODBC now states that it supports rowcount except if OUTPUT.inserted is
present, which is taken into account by the ORM during a flush as to
whether it will look for a rowcount.</p>
<a class="changeset-link headerlink reference internal" href="#change-7952491cc2ddf0db254ae96523537f9a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4062">#4062</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-38"><span class="target" id="change-768ae3695d7147089692aceef55c7979"><strong>[mssql] [bug] [orm] </strong></span><p>Enabled the “sane_rowcount” flag for the pymssql dialect, indicating
that the DBAPI now reports the correct number of rows affected from
an UPDATE or DELETE statement.  This impacts mostly the ORM versioning
feature in that it now can verify the number of rows affected on a
target version.</p>
<a class="changeset-link headerlink reference internal" href="#change-768ae3695d7147089692aceef55c7979">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.0b3-39"><span class="target" id="change-b5033112e73120a8454916704323b976"><strong>[mssql] [bug] </strong></span><p>Added a rule to SQL Server index reflection to ignore the so-called
“heap” index that is implicitly present on a table that does not
specify a clustered index.</p>
<a class="changeset-link headerlink reference internal" href="#change-b5033112e73120a8454916704323b976">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4059">#4059</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b3-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.0b3-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b3-40"><span class="target" id="change-7cb9a3370310381d19eb1a17c5a84a91"><strong>[oracle] [bug] [performance] [py2k] </strong></span><p>Fixed performance regression caused by the fix for <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3937">#3937</a> where
cx_Oracle as of version 5.3 dropped the <code class="docutils literal notranslate"><span class="pre">.UNICODE</span></code> symbol from its
namespace,  which was interpreted as cx_Oracle’s “WITH_UNICODE” mode being
turned on unconditionally, which invokes functions on the SQLAlchemy
side which convert all strings to unicode unconditionally and causing
a performance impact.  In fact, per cx_Oracle’s author the
“WITH_UNICODE” mode has been removed entirely as of 5.1, so the expensive unicode
conversion functions are no longer necessary and are disabled if
cx_Oracle 5.1 or greater is detected under Python 2.  The warning against
“WITH_UNICODE” mode that was removed under <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3937">#3937</a> is also restored.</p>
<a class="changeset-link headerlink reference internal" href="#change-7cb9a3370310381d19eb1a17c5a84a91">¶</a><p>This change is also <strong>backported</strong> to: 1.1.13, 1.0.19</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4035">#4035</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-41"><span class="target" id="change-8bd5d771067c1e4f6d1f240ad3c8af9e"><strong>[oracle] [bug] </strong></span><p>Partial support for persisting and retrieving the Oracle value
“infinity” is implemented with cx_Oracle, using Python float values
only, e.g. <code class="docutils literal notranslate"><span class="pre">float(&quot;inf&quot;)</span></code>.  Decimal support is not yet fulfilled by
the cx_Oracle DBAPI driver.</p>
<a class="changeset-link headerlink reference internal" href="#change-8bd5d771067c1e4f6d1f240ad3c8af9e">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4064">#4064</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-42"><span class="target" id="change-62bc5be868d89ab0275dc529f0e4bea1"><strong>[oracle] [bug] </strong></span><p>The cx_Oracle dialect has been reworked and modernized to take advantage of
new patterns that weren’t present in the old 4.x series of cx_Oracle. This
includes that the minimum cx_Oracle version is the 5.x series and that
cx_Oracle 6.x is now fully tested. The most significant change involves
type conversions, primarily regarding the numeric / floating point and LOB
datatypes, making more effective use of cx_Oracle type handling hooks to
simplify how bind parameter and result data is processed.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-cxoracle-12"><span class="std std-ref">Major Refactor to cx_Oracle Dialect, Typing System</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-62bc5be868d89ab0275dc529f0e4bea1">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.0b3-43"><span class="target" id="change-ff230aec4198aa49b238e69dd8760b9f"><strong>[oracle] [bug] </strong></span><p>two phase support for cx_Oracle has been completely removed for all
versions of cx_Oracle, whereas in 1.2.0b1 this change only took effect for
the 6.x series of cx_Oracle.  This feature never worked correctly
in any version of cx_Oracle and in cx_Oracle 6.x, the API which SQLAlchemy
relied upon was removed.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-cxoracle-12"><span class="std std-ref">Major Refactor to cx_Oracle Dialect, Typing System</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-ff230aec4198aa49b238e69dd8760b9f">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3997">#3997</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-44"><span class="target" id="change-b6a69d32d043a258407e6f3be39fb620"><strong>[oracle] [bug] </strong></span><p>The column keys present in a result set when using <a class="reference internal" href="../core/dml.html#sqlalchemy.sql.expression.Insert.returning" title="sqlalchemy.sql.expression.Insert.returning"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Insert.returning()</span></code></a>
with the cx_Oracle backend now use the correct column / label names
like that of all other dialects.  Previously, these came out as
<code class="docutils literal notranslate"><span class="pre">ret_nnn</span></code>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-cxoracle-12"><span class="std std-ref">Major Refactor to cx_Oracle Dialect, Typing System</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-b6a69d32d043a258407e6f3be39fb620">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.0b3-45"><span class="target" id="change-5c4852bc948271f9332a367daffddd06"><strong>[oracle] [bug] </strong></span><p>Several parameters to the cx_Oracle dialect are now deprecated and will
have no effect: <code class="docutils literal notranslate"><span class="pre">auto_setinputsizes</span></code>, <code class="docutils literal notranslate"><span class="pre">exclude_setinputsizes</span></code>,
<code class="docutils literal notranslate"><span class="pre">allow_twophase</span></code>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-cxoracle-12"><span class="std std-ref">Major Refactor to cx_Oracle Dialect, Typing System</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-5c4852bc948271f9332a367daffddd06">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.0b3-46"><span class="target" id="change-d6a2cc54504a82ca56a38285efdf7330"><strong>[oracle] [bug] </strong></span><p>Fixed bug where an index reflected under Oracle with an expression like
“column DESC” would not be returned, if the table also had no primary
key, as a result of logic that attempts to filter out the
index implicitly added by Oracle onto the primary key columns.</p>
<a class="changeset-link headerlink reference internal" href="#change-d6a2cc54504a82ca56a38285efdf7330">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4042">#4042</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-47"><span class="target" id="change-95c51f1358e2f445dedc209792402656"><strong>[oracle] [bug] </strong></span><p>Fixed more regressions caused by cx_Oracle 6.0; at the moment, the only
behavioral change for users is disconnect detection now detects for
cx_Oracle.DatabaseError in addition to cx_Oracle.InterfaceError, as
this behavior seems to have changed.   Other issues regarding numeric
precision and uncloseable connections are pending with the upstream
cx_Oracle issue tracker.</p>
<a class="changeset-link headerlink reference internal" href="#change-95c51f1358e2f445dedc209792402656">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4045">#4045</a></p>
</p>
</li>
<li><p id="change-1.2.0b3-48"><span class="target" id="change-e79f1fb75bb6e44752825e386a3de596"><strong>[oracle] [bug] </strong></span><p>Fixed bug where Oracle 8 “non ansi” join mode would not add the
<code class="docutils literal notranslate"><span class="pre">(+)</span></code> operator to expressions that used an operator other than the
<code class="docutils literal notranslate"><span class="pre">=</span></code> operator.  The <code class="docutils literal notranslate"><span class="pre">(+)</span></code> needs to be on all columns that are part
of the right-hand side.</p>
<a class="changeset-link headerlink reference internal" href="#change-e79f1fb75bb6e44752825e386a3de596">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4076">#4076</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.0b2">
<h2>1.2.0b2<a class="headerlink" href="#change-1.2.0b2" title="Permalink to this headline">¶</a></h2>
Released: July 24, 2017<div class="section" id="change-1.2.0b2-orm">
<h3>orm<a class="headerlink" href="#change-1.2.0b2-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b2-0"><span class="target" id="change-cd7870ef7fb94fa78eab3f05f91ec380"><strong>[orm] [bug] </strong></span><p>Fixed regression from 1.1.11 where adding additional non-entity
columns to a query that includes an entity with subqueryload
relationships would fail, due to an inspection added in 1.1.11 as a
result of <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4011">#4011</a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-cd7870ef7fb94fa78eab3f05f91ec380">¶</a><p>This change is also <strong>backported</strong> to: 1.1.12</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4033">#4033</a></p>
</p>
</li>
<li><p id="change-1.2.0b2-1"><span class="target" id="change-9f84dd840fadaccae78ca48ed7f34faf"><strong>[orm] [bug] </strong></span><p>Fixed bug involving JSON NULL evaluation logic added in 1.1 as part
of <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3514">#3514</a> where the logic would not accommodate ORM
mapped attributes named differently from the <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><code class="xref py py-class docutils literal notranslate"><span class="pre">Column</span></code></a>
that was mapped.</p>
<a class="changeset-link headerlink reference internal" href="#change-9f84dd840fadaccae78ca48ed7f34faf">¶</a><p>This change is also <strong>backported</strong> to: 1.1.12</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4031">#4031</a></p>
</p>
</li>
<li><p id="change-1.2.0b2-2"><span class="target" id="change-000b1ccb24caa2e31c3065cfc1aaaa93"><strong>[orm] [bug] </strong></span><p>Added <code class="docutils literal notranslate"><span class="pre">KeyError</span></code> checks to all methods within
<code class="xref py py-class docutils literal notranslate"><span class="pre">WeakInstanceDict</span></code> where a check for <code class="docutils literal notranslate"><span class="pre">key</span> <span class="pre">in</span> <span class="pre">dict</span></code> is
followed by indexed access to that key, to guard against a race against
garbage collection that under load can remove the key from the dict
after the code assumes its present, leading to very infrequent
<code class="docutils literal notranslate"><span class="pre">KeyError</span></code> raises.</p>
<a class="changeset-link headerlink reference internal" href="#change-000b1ccb24caa2e31c3065cfc1aaaa93">¶</a><p>This change is also <strong>backported</strong> to: 1.1.12</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4030">#4030</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b2-misc">
<h3>misc<a class="headerlink" href="#change-1.2.0b2-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b2-3"><span class="target" id="change-8fe630598354c3b2e789a0b3260416f3"><strong>[bug] [py3k] [tests] </strong></span><p>Fixed issue in testing fixtures which was incompatible with a change
made as of Python 3.6.2 involving context managers.</p>
<a class="changeset-link headerlink reference internal" href="#change-8fe630598354c3b2e789a0b3260416f3">¶</a><p>This change is also <strong>backported</strong> to: 1.1.12, 1.0.18</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4034">#4034</a></p>
</p>
</li>
</ul>
</div>
</div>
<div class="section" id="change-1.2.0b1">
<h2>1.2.0b1<a class="headerlink" href="#change-1.2.0b1" title="Permalink to this headline">¶</a></h2>
Released: July 10, 2017<div class="section" id="change-1.2.0b1-orm">
<h3>orm<a class="headerlink" href="#change-1.2.0b1-orm" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b1-0"><span class="target" id="change-cb0775735471e444591a8fe143945bd3"><strong>[orm] [feature] </strong></span><p>An <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.aliased" title="sqlalchemy.orm.aliased"><code class="xref py py-func docutils literal notranslate"><span class="pre">aliased()</span></code></a> construct can now be passed to the
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.select_entity_from" title="sqlalchemy.orm.query.Query.select_entity_from"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.select_entity_from()</span></code></a> method.   Entities will be pulled
from the selectable represented by the <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.aliased" title="sqlalchemy.orm.aliased"><code class="xref py py-func docutils literal notranslate"><span class="pre">aliased()</span></code></a> construct.
This allows special options for <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.aliased" title="sqlalchemy.orm.aliased"><code class="xref py py-func docutils literal notranslate"><span class="pre">aliased()</span></code></a> such as
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.aliased.params.adapt_on_names" title="sqlalchemy.orm.aliased"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">aliased.adapt_on_names</span></code></a> to be used in conjunction with
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.select_entity_from" title="sqlalchemy.orm.query.Query.select_entity_from"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.select_entity_from()</span></code></a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-cb0775735471e444591a8fe143945bd3">¶</a><p>This change is also <strong>backported</strong> to: 1.1.7</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3933">#3933</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-1"><span class="target" id="change-f7e8ccaab26e800250f86065246d6cfc"><strong>[orm] [feature] </strong></span><p>Added <code class="docutils literal notranslate"><span class="pre">.autocommit</span></code> attribute to <a class="reference internal" href="../orm/contextual.html#sqlalchemy.orm.scoping.scoped_session" title="sqlalchemy.orm.scoping.scoped_session"><code class="xref py py-class docutils literal notranslate"><span class="pre">scoped_session</span></code></a>, proxying
the <code class="docutils literal notranslate"><span class="pre">.autocommit</span></code> attribute of the underling <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session" title="sqlalchemy.orm.session.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a>
currently assigned to the thread.  Pull request courtesy
Ben Fagin.</p>
<a class="changeset-link headerlink reference internal" href="#change-f7e8ccaab26e800250f86065246d6cfc">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.0b1-2"><span class="target" id="change-096c79c29e329ed398741902be59802d"><strong>[orm] [feature] </strong></span><p>Added a new feature <a class="reference internal" href="../orm/loading_columns.html#sqlalchemy.orm.with_expression" title="sqlalchemy.orm.with_expression"><code class="xref py py-func docutils literal notranslate"><span class="pre">orm.with_expression()</span></code></a> that allows an ad-hoc
SQL expression to be added to a specific entity in a query at result
time.  This is an alternative to the SQL expression being delivered as
a separate element in the result tuple.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3058"><span class="std std-ref">ORM attributes that can receive ad-hoc SQL expressions</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-096c79c29e329ed398741902be59802d">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3058">#3058</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-3"><span class="target" id="change-c9e2e3fa0db62d0b08b57eded1584199"><strong>[orm] [feature] </strong></span><p>Added a new style of mapper-level inheritance loading
“polymorphic selectin”.  This style of loading
emits queries for each subclass in an inheritance
hierarchy subsequent to the load of the base
object type, using IN to specify the desired
primary key values.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3948"><span class="std std-ref">“selectin” polymorphic loading, loads subclasses using separate IN queries</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-c9e2e3fa0db62d0b08b57eded1584199">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3948">#3948</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-4"><span class="target" id="change-61a879cd6129f3d1141b8bc4004fcb28"><strong>[orm] [feature] </strong></span><p>Added a new kind of eager loading called “selectin” loading.  This
style of loading is very similar to “subquery” eager loading,
except that it uses an IN expression given a list of primary key
values from the loaded parent objects, rather than re-stating the
original query.   This produces a more efficient query that is
“baked” (e.g. the SQL string is cached) and also works in the
context of <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.yield_per" title="sqlalchemy.orm.query.Query.yield_per"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.yield_per()</span></code></a>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3944"><span class="std std-ref">New “selectin” eager loading, loads all collections at once using IN</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-61a879cd6129f3d1141b8bc4004fcb28">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3944">#3944</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-5"><span class="target" id="change-38f3dfd5f2ded7b9f6d7d7609bc4bf74"><strong>[orm] [feature] </strong></span><p>The <code class="docutils literal notranslate"><span class="pre">lazy=&quot;select&quot;</span></code> loader strategy now makes used of the
<a class="reference internal" href="../orm/extensions/baked.html#sqlalchemy.ext.baked.BakedQuery" title="sqlalchemy.ext.baked.BakedQuery"><code class="xref py py-class docutils literal notranslate"><span class="pre">BakedQuery</span></code></a> query caching system in all cases.  This
removes most overhead of generating a <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a> object and
running it into a <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.select" title="sqlalchemy.sql.expression.select"><code class="xref py py-func docutils literal notranslate"><span class="pre">select()</span></code></a> and then string SQL statement from
the process of lazy-loading related collections and objects.  The
“baked” lazy loader has also been improved such that it can now
cache in most cases where query load options are used.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3954"><span class="std std-ref">“Baked” loading now the default for lazy loads</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-38f3dfd5f2ded7b9f6d7d7609bc4bf74">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3954">#3954</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-6"><span class="target" id="change-e18033787c010a74613e0adb5d0aea8c"><strong>[orm] [feature] [ext] </strong></span><p>The <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.update" title="sqlalchemy.orm.query.Query.update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.update()</span></code></a> method can now accommodate both
hybrid attributes as well as composite attributes as a source
of the key to be placed in the SET clause.   For hybrids, an
additional decorator <a class="reference internal" href="../orm/extensions/hybrid.html#sqlalchemy.ext.hybrid.hybrid_property.update_expression" title="sqlalchemy.ext.hybrid.hybrid_property.update_expression"><code class="xref py py-meth docutils literal notranslate"><span class="pre">hybrid_property.update_expression()</span></code></a>
is supplied for which the user supplies a tuple-returning function.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3229"><span class="std std-ref">Support for bulk updates of hybrids, composites</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-e18033787c010a74613e0adb5d0aea8c">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3229">#3229</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-7"><span class="target" id="change-cfc266867efe909bf2374c7511e0c6d0"><strong>[orm] [feature] </strong></span><p>Added new attribute event <a class="reference internal" href="../orm/events.html#sqlalchemy.orm.events.AttributeEvents.bulk_replace" title="sqlalchemy.orm.events.AttributeEvents.bulk_replace"><code class="xref py py-meth docutils literal notranslate"><span class="pre">AttributeEvents.bulk_replace()</span></code></a>.
This event is triggered when a collection is assigned to a
relationship, before the incoming collection is compared with the
existing one.  This early event allows for conversion of incoming
non-ORM objects as well.  The event is integrated with the
<code class="docutils literal notranslate"><span class="pre">&#64;validates</span></code> decorator.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3896-event"><span class="std std-ref">New bulk_replace event</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-cfc266867efe909bf2374c7511e0c6d0">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3896">#3896</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-8"><span class="target" id="change-7b7854a4008f0842a63a5df4ccd5da10"><strong>[orm] [feature] </strong></span><p>Added new event handler <a class="reference internal" href="../orm/events.html#sqlalchemy.orm.events.AttributeEvents.modified" title="sqlalchemy.orm.events.AttributeEvents.modified"><code class="xref py py-meth docutils literal notranslate"><span class="pre">AttributeEvents.modified()</span></code></a> which is
triggered when the func:<cite>.attributes.flag_modified</cite> function is
invoked, which is common when using the <a class="reference internal" href="../orm/extensions/mutable.html#module-sqlalchemy.ext.mutable" title="sqlalchemy.ext.mutable"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sqlalchemy.ext.mutable</span></code></a>
extension module.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3303"><span class="std std-ref">New “modified” event handler for sqlalchemy.ext.mutable</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-7b7854a4008f0842a63a5df4ccd5da10">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3303">#3303</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-9"><span class="target" id="change-e07f11bc13e4f03c82eeed59339607b5"><strong>[orm] [bug] </strong></span><p>Fixed issue with subquery eagerloading which continues on from
the series of issues fixed in <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2699">#2699</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3106">#3106</a>,
<a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3893">#3893</a> involving that the “subquery” contains the correct
FROM clause when beginning from a joined inheritance subclass
and then subquery eager loading onto a relationship from
the base class, while the query also includes criteria against
the subclass. The fix in the previous tickets did not accommodate
for additional subqueryload operations loading more deeply from
the first level, so the fix has been further generalized.</p>
<a class="changeset-link headerlink reference internal" href="#change-e07f11bc13e4f03c82eeed59339607b5">¶</a><p>This change is also <strong>backported</strong> to: 1.1.11</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4011">#4011</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-10"><span class="target" id="change-598a26cd8610657b6c797e7b062c959e"><strong>[orm] [bug] </strong></span><p>Fixed bug where a cascade such as “delete-orphan” (but others as well)
would fail to locate an object linked to a relationship that itself
is local to a subclass in an inheritance relationship, thus causing
the operation to not take place.</p>
<a class="changeset-link headerlink reference internal" href="#change-598a26cd8610657b6c797e7b062c959e">¶</a><p>This change is also <strong>backported</strong> to: 1.1.10</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3986">#3986</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-11"><span class="target" id="change-d5aaa03b4d24c86d0bc8585647db4f69"><strong>[orm] [bug] </strong></span><p>Fixed a race condition which could occur under threaded environments
as a result of the caching added via <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3915">#3915</a>.   An internal
collection of <code class="docutils literal notranslate"><span class="pre">Column</span></code> objects could be regenerated on an alias
object inappropriately, confusing a joined eager loader when it
attempts to render SQL and collect results and resulting in an
attribute error.   The collection is now generated up front before
the alias object is cached and shared among threads.</p>
<a class="changeset-link headerlink reference internal" href="#change-d5aaa03b4d24c86d0bc8585647db4f69">¶</a><p>This change is also <strong>backported</strong> to: 1.1.7</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3947">#3947</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-12"><span class="target" id="change-fa67ce4c3869817cdc74fd58ff5ca54e"><strong>[orm] [bug] </strong></span><p>An UPDATE emitted as a result of the
<a class="reference internal" href="../orm/relationship_api.html#sqlalchemy.orm.relationship.params.post_update" title="sqlalchemy.orm.relationship"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">relationship.post_update</span></code></a> feature will now integrate with
the versioning feature to both bump the version id of the row as well
as assert that the existing version number was matched.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3496"><span class="std std-ref">post_update integrates with ORM versioning</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-fa67ce4c3869817cdc74fd58ff5ca54e">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3496">#3496</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-13"><span class="target" id="change-21bf00984dcf04fa68883e4588196816"><strong>[orm] [bug] </strong></span><p>Repaired several use cases involving the
<a class="reference internal" href="../orm/relationship_api.html#sqlalchemy.orm.relationship.params.post_update" title="sqlalchemy.orm.relationship"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">relationship.post_update</span></code></a> feature when used in conjunction
with a column that has an “onupdate” value.   When the UPDATE emits,
the corresponding object attribute is now expired or refreshed so that
the newly generated “onupdate” value can populate on the object;
previously the stale value would remain.  Additionally, if the target
attribute is set in Python for the INSERT of the object, the value is
now re-sent during the UPDATE so that the “onupdate” does not overwrite
it (note this works just as well for server-generated onupdates).
Finally, the <code class="xref py py-meth docutils literal notranslate"><span class="pre">SessionEvents.refresh_flush()</span></code> event is now emitted
for these attributes when refreshed within the flush.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3471"><span class="std std-ref">Refinements to post_update in conjunction with onupdate</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-21bf00984dcf04fa68883e4588196816">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3471">#3471</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3472">#3472</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-14"><span class="target" id="change-aa76f0d268c4620e0c3262b1f64c4222"><strong>[orm] [bug] </strong></span><p>Fixed bug where programmatic version_id counter in conjunction with
joined table inheritance would fail if the version_id counter
were not actually incremented and no other values on the base table
were modified, as the UPDATE would have an empty SET clause.  Since
programmatic version_id where version counter is not incremented
is a documented use case, this specific condition is now detected
and the UPDATE now sets the version_id value to itself, so that
concurrency checks still take place.</p>
<a class="changeset-link headerlink reference internal" href="#change-aa76f0d268c4620e0c3262b1f64c4222">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3996">#3996</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-15"><span class="target" id="change-26dc9c442da9402d5126ebe4e68a6eb9"><strong>[orm] [bug] </strong></span><p>The versioning feature does not support NULL for the version counter.
An exception is now raised if the version id is programmatic and
was set to NULL for an UPDATE.  Pull request courtesy Diana Clarke.</p>
<a class="changeset-link headerlink reference internal" href="#change-26dc9c442da9402d5126ebe4e68a6eb9">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3673">#3673</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-16"><span class="target" id="change-3385cf4b820c6d952325493e550d12ca"><strong>[orm] [bug] </strong></span><p>Removed a very old keyword argument from <a class="reference internal" href="../orm/contextual.html#sqlalchemy.orm.scoping.scoped_session" title="sqlalchemy.orm.scoping.scoped_session"><code class="xref py py-class docutils literal notranslate"><span class="pre">scoped_session</span></code></a>
called <code class="docutils literal notranslate"><span class="pre">scope</span></code>.  This keyword was never documented and was an
early attempt at allowing for variable scopes.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3796"><span class="std std-ref">“scope” keyword removed from scoped_session</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-3385cf4b820c6d952325493e550d12ca">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3796">#3796</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-17"><span class="target" id="change-f4bc1014fe1ba5232937a3a366bd8a4b"><strong>[orm] [bug] </strong></span><p>Fixed bug where combining a “with_polymorphic” load in conjunction
with subclass-linked relationships that specify joinedload with
innerjoin=True, would fail to demote those “innerjoins” to
“outerjoins” to suit the other polymorphic classes that don’t
support that relationship.   This applies to both a single and a
joined inheritance polymorphic load.</p>
<a class="changeset-link headerlink reference internal" href="#change-f4bc1014fe1ba5232937a3a366bd8a4b">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3988">#3988</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-18"><span class="target" id="change-e10cce8303e1e2c220ed3169fdcf8b57"><strong>[orm] [bug] </strong></span><p>Added new argument <code class="xref py py-paramref docutils literal notranslate"><span class="pre">with_for_update</span></code> to the
<a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session.refresh" title="sqlalchemy.orm.session.Session.refresh"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Session.refresh()</span></code></a> method.  When the <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.with_lockmode" title="sqlalchemy.orm.query.Query.with_lockmode"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.with_lockmode()</span></code></a>
method were deprecated in favor of <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.with_for_update" title="sqlalchemy.orm.query.Query.with_for_update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.with_for_update()</span></code></a>,
the <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session.refresh" title="sqlalchemy.orm.session.Session.refresh"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Session.refresh()</span></code></a> method was never updated to reflect
the new option.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3991"><span class="std std-ref">Added “for update” arguments to Session.refresh</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-e10cce8303e1e2c220ed3169fdcf8b57">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3991">#3991</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-19"><span class="target" id="change-418aeaf3945b7377505b7fdda14271b7"><strong>[orm] [bug] </strong></span><p>Fixed bug where a <a class="reference internal" href="../orm/mapping_columns.html#sqlalchemy.orm.column_property" title="sqlalchemy.orm.column_property"><code class="xref py py-func docutils literal notranslate"><span class="pre">column_property()</span></code></a> that is also marked as
“deferred” would be marked as “expired” during a flush, causing it
to be loaded along with the unexpiry of regular attributes even
though this attribute was never accessed.</p>
<a class="changeset-link headerlink reference internal" href="#change-418aeaf3945b7377505b7fdda14271b7">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3984">#3984</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-20"><span class="target" id="change-53e4c107d146a4836cecf74f760a20e9"><strong>[orm] [bug] </strong></span><p>Fixed bug in subquery eager loading where the “join_depth” parameter
for self-referential relationships would not be correctly honored,
loading all available levels deep rather than correctly counting
the specified number of levels for eager loading.</p>
<a class="changeset-link headerlink reference internal" href="#change-53e4c107d146a4836cecf74f760a20e9">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3967">#3967</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-21"><span class="target" id="change-b8e189209cf5c9fd80306580cd4b19b3"><strong>[orm] [bug] </strong></span><p>Added warnings to the LRU “compiled cache” used by the <a class="reference internal" href="../orm/mapping_api.html#sqlalchemy.orm.mapper.Mapper" title="sqlalchemy.orm.mapper.Mapper"><code class="xref py py-class docutils literal notranslate"><span class="pre">Mapper</span></code></a>
(and ultimately will be for other ORM-based LRU caches) such that
when the cache starts hitting its size limits, the application will
emit a warning that this is a performance-degrading situation that
may require attention.   The LRU caches can reach their size limits
primarily if an application is making use of an unbounded number
of <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Engine" title="sqlalchemy.engine.Engine"><code class="xref py py-class docutils literal notranslate"><span class="pre">Engine</span></code></a> objects, which is an antipattern.  Otherwise,
this may suggest an issue that should be brought to the SQLAlchemy
developer’s attention.</p>
<a class="changeset-link headerlink reference internal" href="#change-b8e189209cf5c9fd80306580cd4b19b3">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.0b1-22"><span class="target" id="change-2cd66f48069c88913a860adeb116b6f9"><strong>[orm] [bug] </strong></span><p>Fixed bug to improve upon the specificity of loader options that
take effect subsequent to the lazy load of a related entity, so
that the loader options will match to an aliased or non-aliased
entity more specifically if those options include entity information.</p>
<a class="changeset-link headerlink reference internal" href="#change-2cd66f48069c88913a860adeb116b6f9">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3963">#3963</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-23"><span class="target" id="change-7b2f16907a73d835857bff3ba92320bd"><strong>[orm] [bug] </strong></span><p>The <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.attributes.flag_modified" title="sqlalchemy.orm.attributes.flag_modified"><code class="xref py py-func docutils literal notranslate"><span class="pre">attributes.flag_modified()</span></code></a> function now raises
<a class="reference internal" href="../core/exceptions.html#sqlalchemy.exc.InvalidRequestError" title="sqlalchemy.exc.InvalidRequestError"><code class="xref py py-class docutils literal notranslate"><span class="pre">InvalidRequestError</span></code></a> if the named attribute key is not
present within the object, as this is assumed to be present
in the flush process.  To mark an object “dirty” for a flush
without referring to any specific attribute, the
<a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.attributes.flag_dirty" title="sqlalchemy.orm.attributes.flag_dirty"><code class="xref py py-func docutils literal notranslate"><span class="pre">attributes.flag_dirty()</span></code></a> function may be used.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3753"><span class="std std-ref">Use flag_dirty() to mark an object as “dirty” without any attribute changing</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-7b2f16907a73d835857bff3ba92320bd">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3753">#3753</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-24"><span class="target" id="change-b1e620dece39006ab44c47044e9a6fee"><strong>[orm] [bug] </strong></span><p>The “evaluate” strategy used by <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.update" title="sqlalchemy.orm.query.Query.update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.update()</span></code></a> and
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.delete" title="sqlalchemy.orm.query.Query.delete"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.delete()</span></code></a> can now accommodate a simple
object comparison from a many-to-one relationship to an instance,
when the attribute names of the primary key / foreign key columns
don’t match the actual names of the columns.  Previously this would
do a simple name-based match and fail with an AttributeError.</p>
<a class="changeset-link headerlink reference internal" href="#change-b1e620dece39006ab44c47044e9a6fee">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3366">#3366</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-25"><span class="target" id="change-c6446599edd4fbe7a777979f77aeed73"><strong>[orm] [bug] </strong></span><p>The <code class="docutils literal notranslate"><span class="pre">&#64;validates</span></code> decorator now allows the decorated method to receive
objects from a “bulk collection set” operation that have not yet
been compared to the existing collection.  This allows incoming values
to be converted to compatible ORM objects as is already allowed
from an “append” event.   Note that this means that the
<code class="docutils literal notranslate"><span class="pre">&#64;validates</span></code> method is called for <strong>all</strong> values during a collection
assignment, rather than just the ones that are new.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3896-validates"><span class="std std-ref">A &#64;validates method receives all values on bulk-collection set before comparison</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-c6446599edd4fbe7a777979f77aeed73">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3896">#3896</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-26"><span class="target" id="change-cf31a58cbaa24d51134bcc22605b1fa5"><strong>[orm] [bug] </strong></span><p>Fixed bug in single-table inheritance where the select_from()
argument would not be taken into account when limiting rows
to a subclass.  Previously, only expressions in the
columns requested would be taken into account.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3891"><span class="std std-ref">Fixed issue involving single-table inheritance with select_from()</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-cf31a58cbaa24d51134bcc22605b1fa5">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3891">#3891</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-27"><span class="target" id="change-8bfb471543f94a895a8cf8278c87c1f3"><strong>[orm] [bug] </strong></span><p>When assigning a collection to an attribute mapped by a relationship,
the previous collection is no longer mutated.  Previously, the old
collection would be emptied out in conjunction with the “item remove”
events that fire off; the events now fire off without affecting
the old collection.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3913"><span class="std std-ref">Previous collection is no longer mutated upon replacement</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-8bfb471543f94a895a8cf8278c87c1f3">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3913">#3913</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-28"><span class="target" id="change-9baae71e09a8acd4eaae6e38d314f3e5"><strong>[orm] [bug] </strong></span><p>The state of the <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session" title="sqlalchemy.orm.session.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> is now present when the
<a class="reference internal" href="../orm/events.html#sqlalchemy.orm.events.SessionEvents.after_rollback" title="sqlalchemy.orm.events.SessionEvents.after_rollback"><code class="xref py py-meth docutils literal notranslate"><span class="pre">SessionEvents.after_rollback()</span></code></a> event is emitted, that is,  the
attribute state of objects prior to their being expired.   This is now
consistent with the  behavior of the
<a class="reference internal" href="../orm/events.html#sqlalchemy.orm.events.SessionEvents.after_commit" title="sqlalchemy.orm.events.SessionEvents.after_commit"><code class="xref py py-meth docutils literal notranslate"><span class="pre">SessionEvents.after_commit()</span></code></a> event which  also emits before the
attribute state of objects is expired.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3934"><span class="std std-ref">The after_rollback() Session event now emits before the expiration of objects</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-9baae71e09a8acd4eaae6e38d314f3e5">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3934">#3934</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-29"><span class="target" id="change-277837335706da5acead8ff2bfae1d9e"><strong>[orm] [bug] </strong></span><p>Fixed bug where <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.with_parent" title="sqlalchemy.orm.query.Query.with_parent"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.with_parent()</span></code></a> would not work if the
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query" title="sqlalchemy.orm.query.Query"><code class="xref py py-class docutils literal notranslate"><span class="pre">Query</span></code></a> were against an <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.aliased" title="sqlalchemy.orm.aliased"><code class="xref py py-func docutils literal notranslate"><span class="pre">aliased()</span></code></a> construct rather than
a regular mapped class.  Also adds a new parameter
<code class="xref py py-paramref docutils literal notranslate"><span class="pre">util.with_parent.from_entity</span></code> to the standalone
<code class="xref py py-func docutils literal notranslate"><span class="pre">util.with_parent()</span></code> function as well as
<a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.with_parent" title="sqlalchemy.orm.query.Query.with_parent"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.with_parent()</span></code></a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-277837335706da5acead8ff2bfae1d9e">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3607">#3607</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b1-orm-declarative">
<h3>orm declarative<a class="headerlink" href="#change-1.2.0b1-orm-declarative" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b1-30"><span class="target" id="change-bb548bcd28bd6e6ebe5731e04fe495ab"><strong>[bug] [declarative] [orm] </strong></span><p>Fixed bug where using <a class="reference internal" href="../orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.declared_attr" title="sqlalchemy.ext.declarative.declared_attr"><code class="xref py py-class docutils literal notranslate"><span class="pre">declared_attr</span></code></a> on an
<a class="reference internal" href="../orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.AbstractConcreteBase" title="sqlalchemy.ext.declarative.AbstractConcreteBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractConcreteBase</span></code></a> where a particular return value were some
non-mapped symbol, including <code class="docutils literal notranslate"><span class="pre">None</span></code>, would cause the attribute
to hard-evaluate just once and store the value to the object
dictionary, not allowing it to invoke for subclasses.   This behavior
is normal when <a class="reference internal" href="../orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.declared_attr" title="sqlalchemy.ext.declarative.declared_attr"><code class="xref py py-class docutils literal notranslate"><span class="pre">declared_attr</span></code></a> is on a mapped class, and
does not occur on a mixin or abstract class.  Since
<a class="reference internal" href="../orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.AbstractConcreteBase" title="sqlalchemy.ext.declarative.AbstractConcreteBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractConcreteBase</span></code></a> is both “abstract” and actually
“mapped”, a special exception case is made here so that the
“abstract” behavior takes precedence for <a class="reference internal" href="../orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.declared_attr" title="sqlalchemy.ext.declarative.declared_attr"><code class="xref py py-class docutils literal notranslate"><span class="pre">declared_attr</span></code></a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-bb548bcd28bd6e6ebe5731e04fe495ab">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3848">#3848</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b1-engine">
<h3>engine<a class="headerlink" href="#change-1.2.0b1-engine" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b1-31"><span class="target" id="change-a3719a5315e0512e5f58e300a29fb830"><strong>[engine] [feature] </strong></span><p>Added native “pessimistic disconnection” handling to the <a class="reference internal" href="../core/pooling.html#sqlalchemy.pool.Pool" title="sqlalchemy.pool.Pool"><code class="xref py py-class docutils literal notranslate"><span class="pre">Pool</span></code></a>
object.  The new parameter <a class="reference internal" href="../core/pooling.html#sqlalchemy.pool.Pool.params.pre_ping" title="sqlalchemy.pool.Pool"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Pool.pre_ping</span></code></a>, available from
the engine as <a class="reference internal" href="../core/engines.html#sqlalchemy.create_engine.params.pool_pre_ping" title="sqlalchemy.create_engine"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">create_engine.pool_pre_ping</span></code></a>, applies an
efficient form of the “pre-ping” recipe featured in the pooling
documentation, which upon each connection check out, emits a simple
statement, typically “SELECT 1”, to test the connection for liveness.
If the existing connection is no longer able to respond to commands,
the connection is transparently recycled, and all other connections
made prior to the current timestamp are invalidated.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="../core/pooling.html#pool-disconnects-pessimistic"><span class="std std-ref">Disconnect Handling - Pessimistic</span></a></p>
<p><a class="reference internal" href="migration_12.html#change-3919"><span class="std std-ref">Pessimistic disconnection detection added to the connection pool</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-a3719a5315e0512e5f58e300a29fb830">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3919">#3919</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-32"><span class="target" id="change-91d00df850ed31fa0de087a5154613e6"><strong>[engine] [bug] </strong></span><p>Added an exception handler that will warn for the “cause” exception on
Py2K when the “autorollback” feature of <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Connection" title="sqlalchemy.engine.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a> itself
raises an exception. In Py3K, the two exceptions are naturally reported
by the interpreter as one occurring during the handling of the other.
This is continuing with the series of changes for rollback failure
handling that were last visited as part of <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2696">#2696</a> in 1.0.12.</p>
<a class="changeset-link headerlink reference internal" href="#change-91d00df850ed31fa0de087a5154613e6">¶</a><p>This change is also <strong>backported</strong> to: 1.1.7</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3946">#3946</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-33"><span class="target" id="change-a772f7ade2efbc63fff56d82941d3d37"><strong>[engine] [bug] </strong></span><p>Fixed bug where in the unusual case of passing a
<a class="reference internal" href="../core/internals.html#sqlalchemy.engine.interfaces.Compiled" title="sqlalchemy.engine.interfaces.Compiled"><code class="xref py py-class docutils literal notranslate"><span class="pre">Compiled</span></code></a> object directly to <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Connection.execute" title="sqlalchemy.engine.Connection.execute"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.execute()</span></code></a>,
the dialect with which the <a class="reference internal" href="../core/internals.html#sqlalchemy.engine.interfaces.Compiled" title="sqlalchemy.engine.interfaces.Compiled"><code class="xref py py-class docutils literal notranslate"><span class="pre">Compiled</span></code></a> object were generated
was not consulted for the paramstyle of the string statement, instead
assuming it would match the dialect-level paramstyle, causing
mismatches to occur.</p>
<a class="changeset-link headerlink reference internal" href="#change-a772f7ade2efbc63fff56d82941d3d37">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3938">#3938</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b1-sql">
<h3>sql<a class="headerlink" href="#change-1.2.0b1-sql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b1-34"><span class="target" id="change-78f673e2717a4d0a644cb309714716a1"><strong>[sql] [feature] </strong></span><p>Added a new kind of <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.bindparam" title="sqlalchemy.sql.expression.bindparam"><code class="xref py py-func docutils literal notranslate"><span class="pre">bindparam()</span></code></a> called “expanding”.  This is
for use in <code class="docutils literal notranslate"><span class="pre">IN</span></code> expressions where the list of elements is rendered
into individual bound parameters at statement execution time, rather
than at statement compilation time.  This allows both a single bound
parameter name to be linked to an IN expression of multiple elements,
as well as allows query caching to be used with IN expressions.  The
new feature allows the related features of “select in” loading and
“polymorphic in” loading to make use of the baked query extension
to reduce call overhead.   This feature should be considered to be
<strong>experimental</strong> for 1.2.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3953"><span class="std std-ref">Late-expanded IN parameter sets allow IN expressions with cached statements</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-78f673e2717a4d0a644cb309714716a1">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3953">#3953</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-35"><span class="target" id="change-3f38508932257c303017b1276f285c39"><strong>[sql] [feature] [mysql] [oracle] [postgresql] </strong></span><p>Added support for SQL comments on <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Table" title="sqlalchemy.schema.Table"><code class="xref py py-class docutils literal notranslate"><span class="pre">Table</span></code></a> and <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><code class="xref py py-class docutils literal notranslate"><span class="pre">Column</span></code></a>
objects, via the new <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Table.params.comment" title="sqlalchemy.schema.Table"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Table.comment</span></code></a> and
<a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Column.params.comment" title="sqlalchemy.schema.Column"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Column.comment</span></code></a> arguments.   The comments are included
as part of DDL on table creation, either inline or via an appropriate
ALTER statement, and are also reflected back within table reflection,
as well as via the <a class="reference internal" href="../core/reflection.html#sqlalchemy.engine.reflection.Inspector" title="sqlalchemy.engine.reflection.Inspector"><code class="xref py py-class docutils literal notranslate"><span class="pre">Inspector</span></code></a>.   Supported backends currently
include MySQL, PostgreSQL, and Oracle.  Many thanks to Frazer McLean
for a large amount of effort on this.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-1546"><span class="std std-ref">Support for SQL Comments on Table, Column, includes DDL, reflection</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-3f38508932257c303017b1276f285c39">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/1546">#1546</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-36"><span class="target" id="change-ad241310fb02556eba722f2a6d930e7a"><strong>[sql] [feature] </strong></span><p>The longstanding behavior of the <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ColumnOperators.in_()</span></code></a> and
<a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.ColumnOperators.notin_" title="sqlalchemy.sql.operators.ColumnOperators.notin_"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ColumnOperators.notin_()</span></code></a> operators emitting a warning when
the right-hand condition is an empty sequence has been revised;
a simple “static” expression of “1 != 1” or “1 = 1” is now rendered
by default, rather than pulling in the original left-hand
expression.  This causes the result for a NULL column comparison
against an empty set to change from NULL to true/false.  The
behavior is configurable, and the old behavior can be enabled
using the <a class="reference internal" href="../core/engines.html#sqlalchemy.create_engine.params.empty_in_strategy" title="sqlalchemy.create_engine"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">create_engine.empty_in_strategy</span></code></a> parameter
to <a class="reference internal" href="../core/engines.html#sqlalchemy.create_engine" title="sqlalchemy.create_engine"><code class="xref py py-func docutils literal notranslate"><span class="pre">create_engine()</span></code></a>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3907"><span class="std std-ref">The IN / NOT IN operator’s empty collection behavior is now configurable; default expression simplified</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-ad241310fb02556eba722f2a6d930e7a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3907">#3907</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-37"><span class="target" id="change-7dc92f1b469c217df53e62f4fc810685"><strong>[sql] [feature] </strong></span><p>Added a new option <code class="docutils literal notranslate"><span class="pre">autoescape</span></code> to the “startswith” and
“endswith” classes of comparators; this supplies an escape character
also applies it to all occurrences of the wildcard characters “%”
and “_” automatically.  Pull request courtesy Diana Clarke.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This feature has been changed as of 1.2.0 from its initial
implementation in 1.2.0b2 such that autoescape is now passed as a
boolean value, rather than a specific character to use as the escape
character.</p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-2694"><span class="std std-ref">New “autoescape” option for startswith(), endswith()</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-7dc92f1b469c217df53e62f4fc810685">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2694">#2694</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-38"><span class="target" id="change-0ff7e5c317c386a068590c6c798eed04"><strong>[sql] [bug] </strong></span><p>Fixed AttributeError which would occur in <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.WithinGroup" title="sqlalchemy.sql.expression.WithinGroup"><code class="xref py py-class docutils literal notranslate"><span class="pre">WithinGroup</span></code></a>
construct during an iteration of the structure.</p>
<a class="changeset-link headerlink reference internal" href="#change-0ff7e5c317c386a068590c6c798eed04">¶</a><p>This change is also <strong>backported</strong> to: 1.1.11</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4012">#4012</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-39"><span class="target" id="change-263fecdcbf27efd51cefd3336d42d67d"><strong>[sql] [bug] </strong></span><p>Fixed regression released in 1.1.5 due to <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3859">#3859</a> where
adjustments to the “right-hand-side” evaluation of an expression
based on <a class="reference internal" href="../core/type_api.html#sqlalchemy.types.Variant" title="sqlalchemy.types.Variant"><code class="xref py py-class docutils literal notranslate"><span class="pre">Variant</span></code></a> to honor the underlying type’s
“right-hand-side” rules caused the <a class="reference internal" href="../core/type_api.html#sqlalchemy.types.Variant" title="sqlalchemy.types.Variant"><code class="xref py py-class docutils literal notranslate"><span class="pre">Variant</span></code></a> type
to be inappropriately lost, in those cases when we <em>do</em> want the
left-hand side type to be transferred directly to the right hand side
so that bind-level rules can be applied to the expression’s argument.</p>
<a class="changeset-link headerlink reference internal" href="#change-263fecdcbf27efd51cefd3336d42d67d">¶</a><p>This change is also <strong>backported</strong> to: 1.1.9</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3952">#3952</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-40"><span class="target" id="change-7453ec21c3d5845d528953398c2cb25f"><strong>[sql] [bug] [postgresql] </strong></span><p>Changed the mechanics of <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.ResultProxy" title="sqlalchemy.engine.ResultProxy"><code class="xref py py-class docutils literal notranslate"><span class="pre">ResultProxy</span></code></a> to unconditionally
delay the “autoclose” step until the <a class="reference internal" href="../core/connections.html#sqlalchemy.engine.Connection" title="sqlalchemy.engine.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a> is done
with the object; in the case where PostgreSQL ON CONFLICT with
RETURNING returns no rows, autoclose was occurring in this previously
non-existent use case, causing the usual autocommit behavior that
occurs unconditionally upon INSERT/UPDATE/DELETE to fail.</p>
<a class="changeset-link headerlink reference internal" href="#change-7453ec21c3d5845d528953398c2cb25f">¶</a><p>This change is also <strong>backported</strong> to: 1.1.9</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3955">#3955</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-41"><span class="target" id="change-1fad45cc15656cda65855bf99c2cf5f1"><strong>[sql] [bug] </strong></span><p>The rules for type coercion between <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Numeric" title="sqlalchemy.types.Numeric"><code class="xref py py-class docutils literal notranslate"><span class="pre">Numeric</span></code></a>, <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Integer" title="sqlalchemy.types.Integer"><code class="xref py py-class docutils literal notranslate"><span class="pre">Integer</span></code></a>,
and date-related types now include additional logic that will attempt
to preserve the settings of the incoming type on the “resolved” type.
Currently the target for this is the <code class="docutils literal notranslate"><span class="pre">asdecimal</span></code> flag, so that
a math operation between <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Numeric" title="sqlalchemy.types.Numeric"><code class="xref py py-class docutils literal notranslate"><span class="pre">Numeric</span></code></a> or <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Float" title="sqlalchemy.types.Float"><code class="xref py py-class docutils literal notranslate"><span class="pre">Float</span></code></a> and
<a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Integer" title="sqlalchemy.types.Integer"><code class="xref py py-class docutils literal notranslate"><span class="pre">Integer</span></code></a> will preserve the “asdecimal” flag as well as
if the type should be the <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Float" title="sqlalchemy.types.Float"><code class="xref py py-class docutils literal notranslate"><span class="pre">Float</span></code></a> subclass.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-floats-12"><span class="std std-ref">Stronger typing added to “float” datatypes</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-1fad45cc15656cda65855bf99c2cf5f1">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4018">#4018</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-42"><span class="target" id="change-1d633c4a7f97aca2e3b504909664bc2c"><strong>[sql] [bug] [mysql] </strong></span><p>The result processor for the <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Float" title="sqlalchemy.types.Float"><code class="xref py py-class docutils literal notranslate"><span class="pre">Float</span></code></a> type now unconditionally
runs values through the <code class="docutils literal notranslate"><span class="pre">float()</span></code> processor if the dialect
specifies that it also supports “native decimal” mode.  While most
backends will deliver Python <code class="docutils literal notranslate"><span class="pre">float</span></code> objects for a floating point
datatype, the MySQL backends in some cases lack the typing information
in order to provide this and return <code class="docutils literal notranslate"><span class="pre">Decimal</span></code> unless the float
conversion is done.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-floats-12"><span class="std std-ref">Stronger typing added to “float” datatypes</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-1d633c4a7f97aca2e3b504909664bc2c">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4020">#4020</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-43"><span class="target" id="change-9dcaa97f0f4cbf235e9b217e527da345"><strong>[sql] [bug] </strong></span><p>Added some extra strictness to the handling of Python “float” values
passed to SQL statements.  A “float” value will be associated with the
<a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Float" title="sqlalchemy.types.Float"><code class="xref py py-class docutils literal notranslate"><span class="pre">Float</span></code></a> datatype and not the Decimal-coercing <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.Numeric" title="sqlalchemy.types.Numeric"><code class="xref py py-class docutils literal notranslate"><span class="pre">Numeric</span></code></a>
datatype as was the case before, eliminating a confusing warning
emitted on SQLite as well as unnecessary coercion to Decimal.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-floats-12"><span class="std std-ref">Stronger typing added to “float” datatypes</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-9dcaa97f0f4cbf235e9b217e527da345">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4017">#4017</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-44"><span class="target" id="change-0e83f42915a4ea5e8345424a0eb4f54a"><strong>[sql] [bug] </strong></span><p>The operator precedence for all comparison operators such as LIKE, IS,
IN, MATCH, equals, greater than, less than, etc. has all been merged
into one level, so that expressions which make use of these against
each other will produce parentheses between them.   This suits the
stated operator precedence of databases like Oracle, MySQL and others
which place all of these operators as equal precedence, as well as
PostgreSQL as of 9.5 which has also flattened its operator precedence.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3999"><span class="std std-ref">Flattened operator precedence for comparison operators</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-0e83f42915a4ea5e8345424a0eb4f54a">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3999">#3999</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-45"><span class="target" id="change-c4a6ee4b98d2534fb8fa43b0a7465fe9"><strong>[sql] [bug] </strong></span><p>Repaired issue where the type of an expression that used
<a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.ColumnOperators.is_" title="sqlalchemy.sql.operators.ColumnOperators.is_"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ColumnOperators.is_()</span></code></a> or similar would not be a “boolean” type,
instead the type would be “nulltype”, as well as when using custom
comparison operators against an untyped expression.   This typing can
impact how the expression behaves in larger contexts as well as
in result-row-handling.</p>
<a class="changeset-link headerlink reference internal" href="#change-c4a6ee4b98d2534fb8fa43b0a7465fe9">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3873">#3873</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-46"><span class="target" id="change-879c55c9328428b955cb465433d9e3eb"><strong>[sql] [bug] </strong></span><p>Fixed the negation of a <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.Label" title="sqlalchemy.sql.expression.Label"><code class="xref py py-class docutils literal notranslate"><span class="pre">Label</span></code></a> construct so that the
inner element is negated correctly, when the <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.not_" title="sqlalchemy.sql.expression.not_"><code class="xref py py-func docutils literal notranslate"><span class="pre">not_()</span></code></a> modifier
is applied to the labeled expression.</p>
<a class="changeset-link headerlink reference internal" href="#change-879c55c9328428b955cb465433d9e3eb">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3969">#3969</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-47"><span class="target" id="change-146668ccedda4ebea6eefd9ac0ca2d8b"><strong>[sql] [bug] </strong></span><p>The system by which percent signs in SQL statements are “doubled”
for escaping purposes has been refined.   The “doubling” of percent
signs mostly associated with the <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.literal_column" title="sqlalchemy.sql.expression.literal_column"><code class="xref py py-obj docutils literal notranslate"><span class="pre">literal_column</span></code></a> construct
as well as operators like <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.ColumnOperators.contains" title="sqlalchemy.sql.operators.ColumnOperators.contains"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ColumnOperators.contains()</span></code></a> now
occurs based on the stated paramstyle of the DBAPI in use; for
percent-sensitive paramstyles as are common with the PostgreSQL
and MySQL drivers the doubling will occur, for others like that
of SQLite it will not.   This allows more database-agnostic use
of the <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.literal_column" title="sqlalchemy.sql.expression.literal_column"><code class="xref py py-obj docutils literal notranslate"><span class="pre">literal_column</span></code></a> construct to be possible.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3740"><span class="std std-ref">Percent signs in literal_column() now conditionally escaped</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-146668ccedda4ebea6eefd9ac0ca2d8b">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3740">#3740</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-48"><span class="target" id="change-e56fb9222d81d2bd30c560cd2af5ac06"><strong>[sql] [bug] </strong></span><p>Fixed bug where a column-level <a class="reference internal" href="../core/constraints.html#sqlalchemy.schema.CheckConstraint" title="sqlalchemy.schema.CheckConstraint"><code class="xref py py-class docutils literal notranslate"><span class="pre">CheckConstraint</span></code></a> would fail
to compile the SQL expression using the underlying dialect compiler
as well as apply proper flags to generate literal values as
inline, in the case that the sqltext is a Core expression and
not just a plain string.   This was long-ago fixed for table-level
check constraints in 0.9 as part of <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2742">#2742</a>, which more commonly
feature Core SQL expressions as opposed to plain string expressions.</p>
<a class="changeset-link headerlink reference internal" href="#change-e56fb9222d81d2bd30c560cd2af5ac06">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3957">#3957</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-49"><span class="target" id="change-72b8617afaff1fd65aa36f0660cbebe7"><strong>[sql] [bug] </strong></span><p>Fixed bug where a SQL-oriented Python-side column default could fail to
be executed properly upon INSERT in the “pre-execute” codepath, if the
SQL itself were an untyped expression, such as plain text.  The “pre-
execute” codepath is fairly uncommon however can apply to non-integer
primary key columns with SQL defaults when RETURNING is not used.</p>
<a class="changeset-link headerlink reference internal" href="#change-72b8617afaff1fd65aa36f0660cbebe7">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3923">#3923</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-50"><span class="target" id="change-f6db9797677028acd124886f341cc1f3"><strong>[sql] [bug] </strong></span><p>The expression used for COLLATE as rendered by the column-level
<a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.expression.collate" title="sqlalchemy.sql.expression.collate"><code class="xref py py-func docutils literal notranslate"><span class="pre">expression.collate()</span></code></a> and <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.operators.ColumnOperators.collate" title="sqlalchemy.sql.operators.ColumnOperators.collate"><code class="xref py py-meth docutils literal notranslate"><span class="pre">ColumnOperators.collate()</span></code></a> is now
quoted as an identifier when the name is case sensitive, e.g. has
uppercase characters.  Note that this does not impact type-level
collation, which is already quoted.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3785"><span class="std std-ref">The column-level COLLATE keyword now quotes the collation name</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-f6db9797677028acd124886f341cc1f3">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3785">#3785</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-51"><span class="target" id="change-f514767b9d4a464f31ff3909effd1e86"><strong>[sql] [bug] </strong></span><p>Fixed bug where the use of an <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.Alias" title="sqlalchemy.sql.expression.Alias"><code class="xref py py-class docutils literal notranslate"><span class="pre">Alias</span></code></a> object in a column
context would raise an argument error when it tried to group itself
into a parenthesized expression.   Using <a class="reference internal" href="../core/selectable.html#sqlalchemy.sql.expression.Alias" title="sqlalchemy.sql.expression.Alias"><code class="xref py py-class docutils literal notranslate"><span class="pre">Alias</span></code></a> in this way
is not yet a fully supported API, however it applies to some end-user
recipes and may have a more prominent role in support of some
future PostgreSQL features.</p>
<a class="changeset-link headerlink reference internal" href="#change-f514767b9d4a464f31ff3909effd1e86">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3939">#3939</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b1-schema">
<h3>schema<a class="headerlink" href="#change-1.2.0b1-schema" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b1-52"><span class="target" id="change-acfb5ba6a15ae3c31a0b25070ca5a95a"><strong>[schema] [bug] </strong></span><p>An <a class="reference internal" href="../core/exceptions.html#sqlalchemy.exc.ArgumentError" title="sqlalchemy.exc.ArgumentError"><code class="xref py py-class docutils literal notranslate"><span class="pre">ArgumentError</span></code></a> is now raised if a
<a class="reference internal" href="../core/constraints.html#sqlalchemy.schema.ForeignKeyConstraint" title="sqlalchemy.schema.ForeignKeyConstraint"><code class="xref py py-class docutils literal notranslate"><span class="pre">ForeignKeyConstraint</span></code></a> object is created with a mismatched
number of “local” and “remote” columns, which otherwise causes the
internal state of the constraint to be incorrect.   Note that this
also impacts the condition where a dialect’s reflection process
produces a mismatched set of columns for a foreign key constraint.</p>
<a class="changeset-link headerlink reference internal" href="#change-acfb5ba6a15ae3c31a0b25070ca5a95a">¶</a><p>This change is also <strong>backported</strong> to: 1.1.10</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3949">#3949</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b1-postgresql">
<h3>postgresql<a class="headerlink" href="#change-1.2.0b1-postgresql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b1-53"><span class="target" id="change-0821828b8adc294009bd356fb39bbb5c"><strong>[postgresql] [bug] </strong></span><p>Continuing with the fix that correctly handles PostgreSQL
version string “10devel” released in 1.1.8, an additional regexp
bump to handle version strings of the form “10beta1”.   While
PostgreSQL now offers better ways to get this information, we
are sticking w/ the regexp at least through 1.1.x for the least
amount of risk to compatibility w/ older or alternate PostgreSQL
databases.</p>
<a class="changeset-link headerlink reference internal" href="#change-0821828b8adc294009bd356fb39bbb5c">¶</a><p>This change is also <strong>backported</strong> to: 1.1.11</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4005">#4005</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-54"><span class="target" id="change-7cdab07c4f3bb3e14aea5a8dd89c39c0"><strong>[postgresql] [bug] </strong></span><p>Fixed bug where using <a class="reference internal" href="../core/type_basics.html#sqlalchemy.types.ARRAY" title="sqlalchemy.types.ARRAY"><code class="xref py py-class docutils literal notranslate"><span class="pre">ARRAY</span></code></a> with a string type that
features a collation would fail to produce the correct syntax
within CREATE TABLE.</p>
<a class="changeset-link headerlink reference internal" href="#change-7cdab07c4f3bb3e14aea5a8dd89c39c0">¶</a><p>This change is also <strong>backported</strong> to: 1.1.11</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4006">#4006</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-55"><span class="target" id="change-44a9aec898c216f1b11eac5bc05199f9"><strong>[postgresql] [bug] </strong></span><p>Added “autocommit” support for GRANT, REVOKE keywords.  Pull request
courtesy Jacob Hayes.</p>
<a class="changeset-link headerlink reference internal" href="#change-44a9aec898c216f1b11eac5bc05199f9">¶</a><p>This change is also <strong>backported</strong> to: 1.1.10</p>
<p></p>
</p>
</li>
<li><p id="change-1.2.0b1-56"><span class="target" id="change-059a2417bb5247cc5eb46217722922e1"><strong>[postgresql] [bug] </strong></span><p>Added support for parsing the PostgreSQL version string for
a development version like “PostgreSQL 10devel”.  Pull request
courtesy Sean McCully.</p>
<a class="changeset-link headerlink reference internal" href="#change-059a2417bb5247cc5eb46217722922e1">¶</a><p>This change is also <strong>backported</strong> to: 1.1.8</p>
<p></p>
</p>
</li>
<li><p id="change-1.2.0b1-57"><span class="target" id="change-3e3a0effbe27e98615607a54a9450e26"><strong>[postgresql] [bug] </strong></span><p>Fixed bug where the base <code class="xref py py-class docutils literal notranslate"><span class="pre">sqltypes.ARRAY</span></code> datatype would not
invoke the bind/result processors of <a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.ARRAY" title="sqlalchemy.dialects.postgresql.ARRAY"><code class="xref py py-class docutils literal notranslate"><span class="pre">postgresql.ARRAY</span></code></a>.</p>
<a class="changeset-link headerlink reference internal" href="#change-3e3a0effbe27e98615607a54a9450e26">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3964">#3964</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-58"><span class="target" id="change-b8b8438fc9c2f49bbdbb3968bd279a19"><strong>[postgresql] [bug] </strong></span><p>Added support for all possible “fields” identifiers when reflecting the
PostgreSQL <code class="docutils literal notranslate"><span class="pre">INTERVAL</span></code> datatype, e.g. “YEAR”, “MONTH”, “DAY TO
MINUTE”, etc..   In addition, the <a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.INTERVAL" title="sqlalchemy.dialects.postgresql.INTERVAL"><code class="xref py py-class docutils literal notranslate"><span class="pre">postgresql.INTERVAL</span></code></a>
datatype itself now includes a new parameter
<a class="reference internal" href="../dialects/postgresql.html#sqlalchemy.dialects.postgresql.INTERVAL.params.fields" title="sqlalchemy.dialects.postgresql.INTERVAL"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">postgresql.INTERVAL.fields</span></code></a> where these qualifiers can be
specified; the qualifier is also reflected back into the resulting
datatype upon reflection / inspection.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3959"><span class="std std-ref">Support for fields specification in INTERVAL, including full reflection</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-b8b8438fc9c2f49bbdbb3968bd279a19">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3959">#3959</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b1-mysql">
<h3>mysql<a class="headerlink" href="#change-1.2.0b1-mysql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b1-59"><span class="target" id="change-d2ab2a4dc478143ad011a48cbb732729"><strong>[mysql] [feature] </strong></span><p>Added support for MySQL’s ON DUPLICATE KEY UPDATE
MySQL-specific <a class="reference internal" href="../dialects/mysql.html#sqlalchemy.dialects.mysql.dml.Insert" title="sqlalchemy.dialects.mysql.dml.Insert"><code class="xref py py-class docutils literal notranslate"><span class="pre">mysql.dml.Insert</span></code></a> object.
Pull request courtesy Michael Doronin.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-4009"><span class="std std-ref">Support for INSERT..ON DUPLICATE KEY UPDATE</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-d2ab2a4dc478143ad011a48cbb732729">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4009">#4009</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-60"><span class="target" id="change-e7b042668e72e5434d7403311c673320"><strong>[mysql] [bug] </strong></span><p>MySQL 5.7 has introduced permission limiting for the “SHOW VARIABLES”
command; the MySQL dialect will now handle when SHOW returns no
row, in particular for the initial fetch of SQL_MODE, and will
emit a warning that user permissions should be modified to allow the
row to be present.</p>
<a class="changeset-link headerlink reference internal" href="#change-e7b042668e72e5434d7403311c673320">¶</a><p>This change is also <strong>backported</strong> to: 1.1.11</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4007">#4007</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-61"><span class="target" id="change-ab99568837a0023f789f8465304d333a"><strong>[mysql] [bug] </strong></span><p>Removed an ancient and unnecessary intercept of the UTC_TIMESTAMP
MySQL function, which was getting in the way of using it with a
parameter.</p>
<a class="changeset-link headerlink reference internal" href="#change-ab99568837a0023f789f8465304d333a">¶</a><p>This change is also <strong>backported</strong> to: 1.1.10</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3966">#3966</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-62"><span class="target" id="change-951f8c643e22768cbed3253b9761c308"><strong>[mysql] [bug] </strong></span><p>Fixed bug in MySQL dialect regarding rendering of table options in
conjunction with PARTITION options when rendering CREATE TABLE.
The PARTITION related options need to follow the table options,
whereas previously this ordering was not enforced.</p>
<a class="changeset-link headerlink reference internal" href="#change-951f8c643e22768cbed3253b9761c308">¶</a><p>This change is also <strong>backported</strong> to: 1.1.10</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3961">#3961</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-63"><span class="target" id="change-0a9582a00d45066b45d561fdda0e5b97"><strong>[mysql] [bug] </strong></span><p>Added support for views that are unreflectable due to stale
table definitions, when calling <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.MetaData.reflect" title="sqlalchemy.schema.MetaData.reflect"><code class="xref py py-meth docutils literal notranslate"><span class="pre">MetaData.reflect()</span></code></a>; a warning
is emitted for the table that cannot respond to <code class="docutils literal notranslate"><span class="pre">DESCRIBE</span></code>,
but the operation succeeds.</p>
<a class="changeset-link headerlink reference internal" href="#change-0a9582a00d45066b45d561fdda0e5b97">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3871">#3871</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b1-mssql">
<h3>mssql<a class="headerlink" href="#change-1.2.0b1-mssql" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b1-64"><span class="target" id="change-486c0c9ab6ace4af6cacc93b51766d8c"><strong>[mssql] [bug] </strong></span><p>Fixed bug where SQL Server transaction isolation must be fetched
from a different view when using Azure data warehouse, the query
is now attempted against both views and then a NotImplemented
is raised unconditionally if failure continues to provide the
best resiliency against future arbitrary API changes in new
SQL Server versions.</p>
<a class="changeset-link headerlink reference internal" href="#change-486c0c9ab6ace4af6cacc93b51766d8c">¶</a><p>This change is also <strong>backported</strong> to: 1.1.11</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3994">#3994</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-65"><span class="target" id="change-a893e9f0c437788d7c48812650b68f98"><strong>[mssql] [bug] </strong></span><p>Added a placeholder type <a class="reference internal" href="../dialects/mssql.html#sqlalchemy.dialects.mssql.XML" title="sqlalchemy.dialects.mssql.XML"><code class="xref py py-class docutils literal notranslate"><span class="pre">mssql.XML</span></code></a> to the SQL Server
dialect, so that a reflected table which includes this type can
be re-rendered as a CREATE TABLE.  The type has no special round-trip
behavior nor does it currently support additional qualifying
arguments.</p>
<a class="changeset-link headerlink reference internal" href="#change-a893e9f0c437788d7c48812650b68f98">¶</a><p>This change is also <strong>backported</strong> to: 1.1.11</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3973">#3973</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-66"><span class="target" id="change-c0fdc99114fd688c7d7338f003f8190c"><strong>[mssql] [bug] </strong></span><p>The SQL Server dialect now allows for a database and/or owner name
with a dot inside of it, using brackets explicitly in the string around
the owner and optionally the database name as well.  In addition,
sending the <a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.elements.quoted_name" title="sqlalchemy.sql.elements.quoted_name"><code class="xref py py-class docutils literal notranslate"><span class="pre">quoted_name</span></code></a> construct for the schema name will
not split on the dot and will deliver the full string as the “owner”.
<a class="reference internal" href="../core/sqlelement.html#sqlalchemy.sql.elements.quoted_name" title="sqlalchemy.sql.elements.quoted_name"><code class="xref py py-class docutils literal notranslate"><span class="pre">quoted_name</span></code></a> is also now available from the <code class="docutils literal notranslate"><span class="pre">sqlalchemy.sql</span></code>
import space.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-2626"><span class="std std-ref">SQL Server schema names with embedded dots supported</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-c0fdc99114fd688c7d7338f003f8190c">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/2626">#2626</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b1-oracle">
<h3>oracle<a class="headerlink" href="#change-1.2.0b1-oracle" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b1-67"><span class="target" id="change-d6c8df7dd31dc7d11d2ea15180680b33"><strong>[oracle] [feature] [postgresql] </strong></span><p>Added new keywords <a class="reference internal" href="../core/defaults.html#sqlalchemy.schema.Sequence.params.cache" title="sqlalchemy.schema.Sequence"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Sequence.cache</span></code></a> and
<a class="reference internal" href="../core/defaults.html#sqlalchemy.schema.Sequence.params.order" title="sqlalchemy.schema.Sequence"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Sequence.order</span></code></a> to <a class="reference internal" href="../core/defaults.html#sqlalchemy.schema.Sequence" title="sqlalchemy.schema.Sequence"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sequence</span></code></a>, to allow rendering
of the CACHE parameter understood by Oracle and PostgreSQL, and the
ORDER parameter understood by Oracle.  Pull request
courtesy David Moore.</p>
<a class="changeset-link headerlink reference internal" href="#change-d6c8df7dd31dc7d11d2ea15180680b33">¶</a><p>This change is also <strong>backported</strong> to: 1.1.12</p>
<p></p>
</p>
</li>
<li><p id="change-1.2.0b1-68"><span class="target" id="change-a6cff0040f0fdc3d7314f4265f2227bb"><strong>[oracle] [feature] </strong></span><p>The Oracle dialect now inspects unique and check constraints when using
<a class="reference internal" href="../core/reflection.html#sqlalchemy.engine.reflection.Inspector.get_unique_constraints" title="sqlalchemy.engine.reflection.Inspector.get_unique_constraints"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Inspector.get_unique_constraints()</span></code></a>,
<a class="reference internal" href="../core/reflection.html#sqlalchemy.engine.reflection.Inspector.get_check_constraints" title="sqlalchemy.engine.reflection.Inspector.get_check_constraints"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Inspector.get_check_constraints()</span></code></a>.
As Oracle does not have unique constraints that are separate from a unique
<a class="reference internal" href="../core/constraints.html#sqlalchemy.schema.Index" title="sqlalchemy.schema.Index"><code class="xref py py-class docutils literal notranslate"><span class="pre">Index</span></code></a>, a <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Table" title="sqlalchemy.schema.Table"><code class="xref py py-class docutils literal notranslate"><span class="pre">Table</span></code></a> that’s reflected will still continue
to not have <a class="reference internal" href="../core/constraints.html#sqlalchemy.schema.UniqueConstraint" title="sqlalchemy.schema.UniqueConstraint"><code class="xref py py-class docutils literal notranslate"><span class="pre">UniqueConstraint</span></code></a> objects associated with it.
Pull requests courtesy Eloy Felix.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-4003"><span class="std std-ref">Oracle Unique, Check constraints now reflected</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-a6cff0040f0fdc3d7314f4265f2227bb">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/4003">#4003</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-69"><span class="target" id="change-de55aaadc0939d36d5cc6ae90bb6c5b0"><strong>[oracle] [bug] </strong></span><p>Support for two-phase transactions has been removed entirely for
cx_Oracle when version 6.0b1 or later of the DBAPI is in use.  The two-
phase feature historically has never been usable under cx_Oracle 5.x in
any case, and cx_Oracle 6.x has removed the connection-level “twophase”
flag upon which this feature relied.</p>
<a class="changeset-link headerlink reference internal" href="#change-de55aaadc0939d36d5cc6ae90bb6c5b0">¶</a><p>This change is also <strong>backported</strong> to: 1.1.11</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3997">#3997</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-70"><span class="target" id="change-6744cdb6fbe736a3a04e62bd4c3f8e8f"><strong>[oracle] [bug] </strong></span><p>Fixed bug in cx_Oracle dialect where version string parsing would
fail for cx_Oracle version 6.0b1 due to the “b” character.  Version
string parsing is now via a regexp rather than a simple split.</p>
<a class="changeset-link headerlink reference internal" href="#change-6744cdb6fbe736a3a04e62bd4c3f8e8f">¶</a><p>This change is also <strong>backported</strong> to: 1.1.10</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3975">#3975</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-71"><span class="target" id="change-1cb29222b94ee7cb881b3887f080f132"><strong>[oracle] [bug] </strong></span><p>The cx_Oracle dialect now supports “sane multi rowcount”, that is,
when a series of parameter sets are executed via DBAPI
<code class="docutils literal notranslate"><span class="pre">cursor.executemany()</span></code>, we can make use of <code class="docutils literal notranslate"><span class="pre">cursor.rowcount</span></code> to
verify the number of rows matched.  This has an impact within the
ORM when detecting concurrent modification scenarios, in that
some simple conditions can now be detected even when the ORM
is batching statements, as well as when the more strict versioning
feature is used, the ORM can still use statement batching.  The
flag is enabled for cx_Oracle assuming at least version 5.0, which
is now commonplace.</p>
<a class="changeset-link headerlink reference internal" href="#change-1cb29222b94ee7cb881b3887f080f132">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3932">#3932</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-72"><span class="target" id="change-90a021757ddda4222c8cdbe032d76af2"><strong>[oracle] [bug] </strong></span><p>Oracle reflection now “normalizes” the name given to a foreign key
constraint, that is, returns it as all lower case for a case
insensitive name.  This was already the behavior for indexes
and primary key constraints as well as all table and column names.
This will allow Alembic autogenerate scripts to compare and render
foreign key constraint names correctly when initially specified
as case insensitive.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3276"><span class="std std-ref">Oracle foreign key constraint names are now “name normalized”</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-90a021757ddda4222c8cdbe032d76af2">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3276">#3276</a></p>
</p>
</li>
</ul>
</div>
<div class="section" id="change-1.2.0b1-misc">
<h3>misc<a class="headerlink" href="#change-1.2.0b1-misc" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p id="change-1.2.0b1-73"><span class="target" id="change-4d591c7d88603069f42a94276f311cfd"><strong>[feature] [ext] </strong></span><p>Added new flag <a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session.params.enable_baked_queries" title="sqlalchemy.orm.session.Session"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">Session.enable_baked_queries</span></code></a> to the
<a class="reference internal" href="../orm/session_api.html#sqlalchemy.orm.session.Session" title="sqlalchemy.orm.session.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> to allow baked queries to be disabled
session-wide, reducing memory use.   Also added new <a class="reference internal" href="../orm/extensions/baked.html#sqlalchemy.ext.baked.Bakery" title="sqlalchemy.ext.baked.Bakery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Bakery</span></code></a>
wrapper so that the bakery returned by <a class="reference internal" href="../orm/extensions/baked.html#sqlalchemy.ext.baked.BakedQuery.params.bakery" title="sqlalchemy.ext.baked.BakedQuery"><code class="xref py py-paramref docutils literal notranslate"><span class="pre">BakedQuery.bakery</span></code></a>
can be inspected.</p>
<a class="changeset-link headerlink reference internal" href="#change-4d591c7d88603069f42a94276f311cfd">¶</a><p></p>
</p>
</li>
<li><p id="change-1.2.0b1-74"><span class="target" id="change-4e0521c3e9fd87a613b536ec3bc6de5e"><strong>[bug] [ext] </strong></span><p>Protected against testing “None” as a class in the case where
declarative classes are being garbage collected and new
automap prepare() operations are taking place concurrently, very
infrequently hitting a weakref that has not been fully acted upon
after gc.</p>
<a class="changeset-link headerlink reference internal" href="#change-4e0521c3e9fd87a613b536ec3bc6de5e">¶</a><p>This change is also <strong>backported</strong> to: 1.1.10</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3980">#3980</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-75"><span class="target" id="change-c4dca0d46cc7d70dfaa3ec16f144a20b"><strong>[bug] [ext] </strong></span><p>Fixed bug in <a class="reference internal" href="../orm/extensions/mutable.html#module-sqlalchemy.ext.mutable" title="sqlalchemy.ext.mutable"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sqlalchemy.ext.mutable</span></code></a> where the
<a class="reference internal" href="../orm/extensions/mutable.html#sqlalchemy.ext.mutable.Mutable.as_mutable" title="sqlalchemy.ext.mutable.Mutable.as_mutable"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Mutable.as_mutable()</span></code></a> method would not track a type that had
been copied using <code class="xref py py-meth docutils literal notranslate"><span class="pre">TypeEngine.copy()</span></code>.  This became more of
a regression in 1.1 compared to 1.0 because the <a class="reference internal" href="../core/custom_types.html#sqlalchemy.types.TypeDecorator" title="sqlalchemy.types.TypeDecorator"><code class="xref py py-class docutils literal notranslate"><span class="pre">TypeDecorator</span></code></a>
class is now a subclass of <a class="reference internal" href="../core/events.html#sqlalchemy.events.SchemaEventTarget" title="sqlalchemy.events.SchemaEventTarget"><code class="xref py py-class docutils literal notranslate"><span class="pre">SchemaEventTarget</span></code></a>, which among
other things indicates to the parent <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><code class="xref py py-class docutils literal notranslate"><span class="pre">Column</span></code></a> that the type
should be copied when the <a class="reference internal" href="../core/metadata.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><code class="xref py py-class docutils literal notranslate"><span class="pre">Column</span></code></a> is.  These copies are
common when using declarative with mixins or abstract classes.</p>
<a class="changeset-link headerlink reference internal" href="#change-c4dca0d46cc7d70dfaa3ec16f144a20b">¶</a><p>This change is also <strong>backported</strong> to: 1.1.8</p>
<p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3950">#3950</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-76"><span class="target" id="change-ae951c77360db76383bfe26ac4c458dd"><strong>[bug] [ext] </strong></span><p>Added support for bound parameters, e.g. those normally set up
via <a class="reference internal" href="../orm/query.html#sqlalchemy.orm.query.Query.params" title="sqlalchemy.orm.query.Query.params"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.params()</span></code></a>, to the <a class="reference internal" href="../orm/extensions/baked.html#sqlalchemy.ext.baked.Result.count" title="sqlalchemy.ext.baked.Result.count"><code class="xref py py-meth docutils literal notranslate"><span class="pre">baked.Result.count()</span></code></a>
method.  Previously, support for parameters were omitted. Pull request
courtesy Pat Deegan.</p>
<a class="changeset-link headerlink reference internal" href="#change-ae951c77360db76383bfe26ac4c458dd">¶</a><p>This change is also <strong>backported</strong> to: 1.1.8</p>
<p></p>
</p>
</li>
<li><p id="change-1.2.0b1-77"><span class="target" id="change-e2881f188e5a16485124774ef8b93cc1"><strong>[bug] [ext] </strong></span><p>The <a class="reference internal" href="../orm/extensions/associationproxy.html#sqlalchemy.ext.associationproxy.AssociationProxy.any" title="sqlalchemy.ext.associationproxy.AssociationProxy.any"><code class="xref py py-meth docutils literal notranslate"><span class="pre">AssociationProxy.any()</span></code></a>, <a class="reference internal" href="../orm/extensions/associationproxy.html#sqlalchemy.ext.associationproxy.AssociationProxy.has" title="sqlalchemy.ext.associationproxy.AssociationProxy.has"><code class="xref py py-meth docutils literal notranslate"><span class="pre">AssociationProxy.has()</span></code></a>
and <a class="reference internal" href="../orm/extensions/associationproxy.html#sqlalchemy.ext.associationproxy.AssociationProxy.contains" title="sqlalchemy.ext.associationproxy.AssociationProxy.contains"><code class="xref py py-meth docutils literal notranslate"><span class="pre">AssociationProxy.contains()</span></code></a> comparison methods now support
linkage to an attribute that is itself also an
<a class="reference internal" href="../orm/extensions/associationproxy.html#sqlalchemy.ext.associationproxy.AssociationProxy" title="sqlalchemy.ext.associationproxy.AssociationProxy"><code class="xref py py-class docutils literal notranslate"><span class="pre">AssociationProxy</span></code></a>, recursively.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3769"><span class="std std-ref">AssociationProxy any(), has(), contains() work with chained association proxies</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-e2881f188e5a16485124774ef8b93cc1">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3769">#3769</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-78"><span class="target" id="change-04ed9e696dc3bd328545f79be4957f07"><strong>[bug] [ext] </strong></span><p>Implemented in-place mutation operators <code class="docutils literal notranslate"><span class="pre">__ior__</span></code>, <code class="docutils literal notranslate"><span class="pre">__iand__</span></code>,
<code class="docutils literal notranslate"><span class="pre">__ixor__</span></code> and <code class="docutils literal notranslate"><span class="pre">__isub__</span></code> for <a class="reference internal" href="../orm/extensions/mutable.html#sqlalchemy.ext.mutable.MutableSet" title="sqlalchemy.ext.mutable.MutableSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">mutable.MutableSet</span></code></a>
and <code class="docutils literal notranslate"><span class="pre">__iadd__</span></code> for <a class="reference internal" href="../orm/extensions/mutable.html#sqlalchemy.ext.mutable.MutableList" title="sqlalchemy.ext.mutable.MutableList"><code class="xref py py-class docutils literal notranslate"><span class="pre">mutable.MutableList</span></code></a> so that change
events are fired off when these mutator methods are used to alter the
collection.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3853"><span class="std std-ref">In-place mutation operators work for MutableSet, MutableList</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-04ed9e696dc3bd328545f79be4957f07">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3853">#3853</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-79"><span class="target" id="change-aa77fcdf3141d828491fab8de5abc0bc"><strong>[bug] [declarative] </strong></span><p>A warning is emitted if the <a class="reference internal" href="../orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.declared_attr.cascading" title="sqlalchemy.ext.declarative.declared_attr.cascading"><code class="xref py py-attr docutils literal notranslate"><span class="pre">declared_attr.cascading</span></code></a> modifier
is used with a declarative attribute that is itself declared on
a class that is to be mapped, as opposed to a declarative mixin
class or <code class="docutils literal notranslate"><span class="pre">__abstract__</span></code> class.  The <a class="reference internal" href="../orm/extensions/declarative/api.html#sqlalchemy.ext.declarative.declared_attr.cascading" title="sqlalchemy.ext.declarative.declared_attr.cascading"><code class="xref py py-attr docutils literal notranslate"><span class="pre">declared_attr.cascading</span></code></a>
modifier currently only applies to mixin/abstract classes.</p>
<a class="changeset-link headerlink reference internal" href="#change-aa77fcdf3141d828491fab8de5abc0bc">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3847">#3847</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-80"><span class="target" id="change-beb1fb9a601c62d22c25da93ef673e7e"><strong>[bug] [ext] </strong></span><p>Improved the association proxy list collection so that premature
autoflush against a newly created association object can be prevented
in the case where <code class="docutils literal notranslate"><span class="pre">list.append()</span></code> is being used, and a lazy load
would be invoked when the association proxy accesses the endpoint
collection.  The endpoint collection is now accessed first before
the creator is invoked to produce the association object.</p>
<a class="changeset-link headerlink reference internal" href="#change-beb1fb9a601c62d22c25da93ef673e7e">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3941">#3941</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-81"><span class="target" id="change-4584905b3dcd2827cc26f2c79db199de"><strong>[bug] [ext] </strong></span><p>The <a class="reference internal" href="../orm/extensions/hybrid.html#sqlalchemy.ext.hybrid.hybrid_property" title="sqlalchemy.ext.hybrid.hybrid_property"><code class="xref py py-class docutils literal notranslate"><span class="pre">sqlalchemy.ext.hybrid.hybrid_property</span></code></a> class now supports
calling mutators like <code class="docutils literal notranslate"><span class="pre">&#64;setter</span></code>, <code class="docutils literal notranslate"><span class="pre">&#64;expression</span></code> etc. multiple times
across subclasses, and now provides a <code class="docutils literal notranslate"><span class="pre">&#64;getter</span></code> mutator, so that
a particular hybrid can be repurposed across subclasses or other
classes.  This now matches the behavior of <code class="docutils literal notranslate"><span class="pre">&#64;property</span></code> in standard
Python.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="migration_12.html#change-3911-3912"><span class="std std-ref">Hybrid attributes support reuse among subclasses, redefinition of &#64;getter</span></a></p>
</div>
<a class="changeset-link headerlink reference internal" href="#change-4584905b3dcd2827cc26f2c79db199de">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3911">#3911</a>, <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3912">#3912</a></p>
</p>
</li>
<li><p id="change-1.2.0b1-82"><span class="target" id="change-90f4a27f6d48d72af5851e39f99a3f88"><strong>[bug] [ext] </strong></span><p>Fixed a bug in the <code class="docutils literal notranslate"><span class="pre">sqlalchemy.ext.serializer</span></code> extension whereby
an “annotated” SQL element (as produced by the ORM for many types
of SQL expressions) could not be reliably serialized.  Also bumped
the default pickle level for the serializer to “HIGHEST_PROTOCOL”.</p>
<a class="changeset-link headerlink reference internal" href="#change-90f4a27f6d48d72af5851e39f99a3f88">¶</a><p>References: <a class="reference external" href="http://www.sqlalchemy.org/trac/ticket/3918">#3918</a></p>
</p>
</li>
</ul>
</div>
</div>
</div>

    </div>

</div>

<div id="docs-bottom-navigation" class="docs-navigation-links, withsidebar">
        Previous:
        <a href="migration_12.html" title="previous chapter">What’s New in SQLAlchemy 1.2?</a>
        Next:
        <a href="changelog_11.html" title="next chapter">1.1 Changelog</a>

    <div id="docs-copyright">
        &copy; <a href="../copyright.html">Copyright</a> 2007-2019, the SQLAlchemy authors and contributors.
        Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.0.1.
    </div>
</div>

</div>



        
        

    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
          URL_ROOT:    '../',
          VERSION:     '1.2.19',
          COLLAPSE_MODINDEX: false,
          FILE_SUFFIX: '.html'
      };
    </script>

    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>

    <!-- begin iterate through sphinx environment script_files -->
        <script type="text/javascript" src="../_static/jquery.js"></script>
        <script type="text/javascript" src="../_static/underscore.js"></script>
        <script type="text/javascript" src="../_static/doctools.js"></script>
        <script type="text/javascript" src="../_static/language_data.js"></script>
    <!-- end iterate through sphinx environment script_files -->

    <script type="text/javascript" src="../_static/detectmobile.js"></script>
    <script type="text/javascript" src="../_static/init.js"></script>


    </body>
</html>