<p dir="auto">I noticed <code class="notranslate">copy.deepcopy()</code> duplicates nested MutableList items.</p>
<p dir="auto"><strong>Example</strong><br>
Let's say, we have a dictionary of this kind:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="body = {
    'key1': None,
    'key2': {
        'location': &lt;sqlalchemy.ext.mutable.MutableDict&gt; (for ex.: {'lat': 10.00, 'lng': 20.00, 'name': 'some name'}),
        'tags': &lt;sqlalchemy.ext.mutable.MutableList&gt; (for ex.: ['tag1', 'tag2'])
    }
}"><pre class="notranslate"><code class="notranslate">body = {
    'key1': None,
    'key2': {
        'location': &lt;sqlalchemy.ext.mutable.MutableDict&gt; (for ex.: {'lat': 10.00, 'lng': 20.00, 'name': 'some name'}),
        'tags': &lt;sqlalchemy.ext.mutable.MutableList&gt; (for ex.: ['tag1', 'tag2'])
    }
}
</code></pre></div>
<p dir="auto"><code class="notranslate">tags</code> declared as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tags = Column(MutableList.as_mutable(JSON))"><pre class="notranslate"><code class="notranslate">tags = Column(MutableList.as_mutable(JSON))
</code></pre></div>
<p dir="auto">When I do:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="msg_body = copy.deepcopy(body)"><pre class="notranslate"><code class="notranslate">msg_body = copy.deepcopy(body)
</code></pre></div>
<p dir="auto">I get:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'tags' = ['tag1', 'tag2', 'tag1', 'tag2']"><pre class="notranslate"><code class="notranslate">'tags' = ['tag1', 'tag2', 'tag1', 'tag2']
</code></pre></div>
<p dir="auto">The same time <code class="notranslate">location</code> is being copied correctly.</p>
<p dir="auto"><strong>Versions</strong></p>
<ul dir="auto">
<li>OS: macOS 10.15.7</li>
<li>Python: 3.7.9</li>
<li>SQLAlchemy: 1.2.4</li>
<li>Database: MySQL 5.7</li>
</ul>
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">this script in <a href="http://docs.sqlalchemy.org/en/latest/dialects/sqlite.html#dotted-column-names" rel="nofollow">http://docs.sqlalchemy.org/en/latest/dialects/sqlite.html#dotted-column-names</a> now passes:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sqlite3

conn = sqlite3.connect(&quot;:memory:&quot;)
cursor = conn.cursor()

cursor.execute(&quot;create table x (a integer, b integer)&quot;)
cursor.execute(&quot;insert into x (a, b) values (1, 1)&quot;)
cursor.execute(&quot;insert into x (a, b) values (2, 2)&quot;)

cursor.execute(&quot;select x.a, x.b from x&quot;)
assert [c[0] for c in cursor.description] == ['a', 'b']

cursor.execute('''
    select x.a, x.b from x where a=1
    union
    select x.a, x.b from x where a=2
''')
assert [c[0] for c in cursor.description] == ['a', 'b'], \
    [c[0] for c in cursor.description]

"><pre class="notranslate"><code class="notranslate">import sqlite3

conn = sqlite3.connect(":memory:")
cursor = conn.cursor()

cursor.execute("create table x (a integer, b integer)")
cursor.execute("insert into x (a, b) values (1, 1)")
cursor.execute("insert into x (a, b) values (2, 2)")

cursor.execute("select x.a, x.b from x")
assert [c[0] for c in cursor.description] == ['a', 'b']

cursor.execute('''
    select x.a, x.b from x where a=1
    union
    select x.a, x.b from x where a=2
''')
assert [c[0] for c in cursor.description] == ['a', 'b'], \
    [c[0] for c in cursor.description]


</code></pre></div>
<p dir="auto">the sqlite checkin is <a href="http://www.sqlite.org/src/info/47f10b7e5d8c1d96" rel="nofollow">http://www.sqlite.org/src/info/47f10b7e5d8c1d96</a>.  We need to turn off translate_colnames for this version and also some tests fail.</p>