summaryrefslogtreecommitdiff
path: root/doc/build/changelog/changelog_13.rst
blob: 517552a3d006c358448535971750d71c4c38abc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
=============
1.3 Changelog
=============

.. changelog_imports::

    .. include:: changelog_12.rst
        :start-line: 5

    .. include:: changelog_11.rst
        :start-line: 5

.. changelog::
    :version: 1.3.23
    :released: February 1, 2021

    .. change::
        :tags: bug, ext
        :tickets: 5836

        Fixed issue where the stringification that is sometimes called when
        attempting to generate the "key" for the ``.c`` collection on a selectable
        would fail if the column were an unlabeled custom SQL construct using the
        ``sqlalchemy.ext.compiler`` extension, and did not provide a default
        compilation form; while this seems like an unusual case, it can get invoked
        for some ORM scenarios such as when the expression is used in an "order by"
        in combination with joined eager loading.  The issue is that the lack of a
        default compiler function was raising :class:`.CompileError` and not
        :class:`.UnsupportedCompilationError`.

    .. change::
        :tags: bug, postgresql
        :tickets: 5645

        For SQLAlchemy 1.3 only, setup.py pins pg8000 to a version lower than
        1.16.6. Version 1.16.6 and above is supported by SQLAlchemy 1.4. Pull
        request courtesy Giuseppe Lumia.

    .. change::
        :tags: bug, postgresql
        :tickets: 5850

        Fixed issue where using :meth:`_schema.Table.to_metadata` (called
        :meth:`_schema.Table.tometadata` in 1.3) in conjunction with a PostgreSQL
        :class:`_postgresql.ExcludeConstraint` that made use of ad-hoc column
        expressions would fail to copy correctly.

    .. change::
        :tags: bug, sql
        :tickets: 5816

        Fixed bug where making use of the :meth:`.TypeEngine.with_variant` method
        on a :class:`.TypeDecorator` type would fail to take into account the
        dialect-specific mappings in use, due to a rule in :class:`.TypeDecorator`
        that was instead attempting to check for chains of :class:`.TypeDecorator`
        instances.


    .. change::
        :tags: bug, mysql, reflection
        :tickets: 5860

        Fixed bug where MySQL server default reflection would fail for numeric
        values with a negation symbol present.


    .. change::
        :tags: bug, oracle
        :tickets: 5813

        Fixed regression in Oracle dialect introduced by :ticket:`4894` in
        SQLAlchemy 1.3.11 where use of a SQL expression in RETURNING for an UPDATE
        would fail to compile, due to a check for "server_default" when an
        arbitrary SQL expression is not a column.


    .. change::
        :tags: usecase, mysql
        :tickets: 5808

        Casting to ``FLOAT`` is now supported in MySQL >= (8, 0, 17) and
        MariaDb >= (10, 4, 5).

    .. change::
        :tags: bug, mysql
        :tickets: 5898

        Fixed long-lived bug in MySQL dialect where the maximum identifier length
        of 255 was too long for names of all types of constraints, not just
        indexes, all of which have a size limit of 64. As metadata naming
        conventions can create too-long names in this area, apply the limit to the
        identifier generator within the DDL compiler.

    .. change::
        :tags: bug, oracle
        :tickets: 5812

        Fixed bug in Oracle dialect where retriving a CLOB/BLOB column via
        :meth:`_dml.Insert.returning` would fail as the LOB value would need to be
        read when returned; additionally, repaired support for retrieval of Unicode
        values via RETURNING under Python 2.

    .. change::
        :tags: bug, mysql
        :tickets: 5821

        Fixed deprecation warnings that arose as a result of the release of PyMySQL
        1.0, including deprecation warnings for the "db" and "passwd" parameters
        now replaced with "database" and "password".


    .. change::
        :tags: bug, mysql
        :tickets: 5800

        Fixed regression from SQLAlchemy 1.3.20 caused by the fix for
        :ticket:`5462` which adds double-parenthesis for MySQL functional
        expressions in indexes, as is required by the backend, this inadvertently
        extended to include arbitrary :func:`_sql.text` expressions as well as
        Alembic's internal textual component,  which are required by Alembic for
        arbitrary index expressions which don't imply double parenthesis.  The
        check has been narrowed to include only binary/ unary/functional
        expressions directly.

.. changelog::
    :version: 1.3.22
    :released: December 18, 2020

    .. change::
        :tags: bug, oracle
        :tickets: 5784
        :versions: 1.4.0b2

        Fixed regression which occured due to :ticket:`5755` which implemented
        isolation level support for Oracle.   It has been reported that many Oracle
        accounts don't actually have permission to query the ``v$transaction``
        view so this feature has been altered to gracefully fallback when it fails
        upon database connect, where the dialect will assume "READ COMMITTED" is
        the default isolation level as was the case prior to SQLAlchemy 1.3.21.
        However, explicit use of the :meth:`_engine.Connection.get_isolation_level`
        method must now necessarily raise an exception, as Oracle databases with
        this restriction explicitly disallow the user from reading the current
        isolation level.

.. changelog::
    :version: 1.3.21
    :released: December 17, 2020

    .. change::
        :tags: bug, orm
        :tickets: 5774
        :versions: 1.4.0b2

        Added a comprehensive check and an informative error message for the case
        where a mapped class, or a string mapped class name, is passed to
        :paramref:`_orm.relationship.secondary`.  This is an extremely common error
        which warrants a clear message.

        Additionally, added a new rule to the class registry resolution such that
        with regards to the :paramref:`_orm.relationship.secondary` parameter, if a
        mapped class and its table are of the identical string name, the
        :class:`.Table` will be favored when resolving this parameter.   In all
        other cases, the class continues to be favored if a class and table
        share the identical name.

    .. change::
        :tags: sqlite, usecase
        :tickets: 5685

        Added ``sqlite_with_rowid=False`` dialect keyword to enable creating
        tables as ``CREATE TABLE … WITHOUT ROWID``. Patch courtesy Sean Anderson.

    .. change::
        :tags: bug, sql
        :tickets: 5691

        A warning is emmitted if a returning() method such as
        :meth:`_sql.Insert.returning` is called multiple times, as this does not
        yet support additive operation.  Version 1.4 will support additive
        operation for this.  Additionally, any combination of the
        :meth:`_sql.Insert.returning` and :meth:`_sql.ValuesBase.return_defaults`
        methods now raises an error as these methods are mutually exclusive;
        previously the operation would fail silently.


    .. change::
        :tags: bug, mssql
        :tickets: 5751

        Fixed bug where a CREATE INDEX statement was rendered incorrectly when
        both ``mssql-include`` and ``mssql_where`` were specified. Pull request
        courtesy @Adiorz.

    .. change::
        :tags: bug, postgresql, mysql
        :tickets: 5729
        :versions: 1.4.0b2

        Fixed regression introduced in 1.3.2 for the PostgreSQL dialect, also
        copied out to the MySQL dialect's feature in 1.3.18, where usage of a non
        :class:`_schema.Table` construct such as :func:`_sql.text` as the argument
        to :paramref:`_sql.Select.with_for_update.of` would fail to be accommodated
        correctly within the PostgreSQL or MySQL compilers.


    .. change::
        :tags: bug, mssql
        :tickets: 5646

        Added SQL Server code "01000" to the list of disconnect codes.


    .. change::
        :tags: usecase, postgresql
        :tickets: 5604
        :versions: 1.4.0b2

        Added new parameter :paramref:`_postgresql.ExcludeConstraint.ops` to the
        :class:`_postgresql.ExcludeConstraint` object, to support operator class
        specification with this constraint.  Pull request courtesy Alon Menczer.

    .. change::
        :tags: bug, mysql, reflection
        :tickets: 5744
        :versions: 1.4.0b2

        Fixed issue where reflecting a server default on MariaDB only that
        contained a decimal point in the value would fail to be reflected
        correctly, leading towards a reflected table that lacked any server
        default.


    .. change::
        :tags: bug, orm
        :tickets: 5664

        Fixed bug in :meth:`_query.Query.update` where objects in the
        :class:`_ormsession.Session` that were already expired would be
        unnecessarily SELECTed individually when they were refreshed by the
        "evaluate"synchronize strategy.

    .. change::
        :tags: usecase, oracle
        :tickets: 5755

        Implemented support for the SERIALIZABLE isolation level for Oracle
        databases, as well as a real implementation for
        :meth:`_engine.Connection.get_isolation_level`.

        .. seealso::

            :ref:`oracle_isolation_level`

    .. change::
        :tags: mysql, sql
        :tickets: 5696

        Added missing keywords to the ``RESERVED_WORDS`` list for the MySQL
        dialect: ``action``, ``level``, ``mode``, ``status``, ``text``, ``time``.
        Pull request courtesy Oscar Batori.

    .. change::
        :tags: bug, orm
        :tickets: 5737
        :versions: 1.4.0b2

        Fixed bug involving the ``restore_load_context`` option of ORM events such
        as :meth:`_ormevent.InstanceEvents.load` such that the flag would not be
        carried along to subclasses which were mapped after the event handler were
        first established.



    .. change::
        :tags: bug, sql
        :tickets: 5656

        Fixed structural compiler issue where some constructs such as MySQL /
        PostgreSQL "on conflict / on duplicate key" would rely upon the state of
        the :class:`_sql.Compiler` object being fixed against their statement as
        the top level statement, which would fail in cases where those statements
        are branched from a different context, such as a DDL construct linked to a
        SQL statement.


    .. change::
        :tags: mssql, sqlite, reflection
        :tickets: 5661

        Fixed issue with composite primary key columns not being reported
        in the correct order. Patch courtesy @fulpm.

.. changelog::
    :version: 1.3.20
    :released: October 12, 2020

    .. change::
        :tags: bug, orm
        :tickets: 4428

        An :class:`.ArgumentError` with more detail is now raised if the target
        parameter for :meth:`_query.Query.join` is set to an unmapped object.
        Prior to this change a less detailed ``AttributeError`` was raised.
        Pull request courtesy Ramon Williams.

    .. change::
        :tags: bug, mysql
        :tickets: 5568

        The "skip_locked" keyword used with ``with_for_update()`` will emit a
        warning when used on MariaDB backends, and will then be ignored.   This is
        a deprecated behavior that will raise in SQLAlchemy 1.4, as an application
        that requests "skip locked" is looking for a non-blocking operation which
        is not available on those backends.



    .. change::
        :tags: bug, engine
        :tickets: 5599

        Fixed issue where a non-string object sent to
        :class:`_exc.SQLAlchemyError` or a subclass, as occurs with some third
        party dialects, would fail to stringify correctly. Pull request
        courtesy Andrzej Bartosiński.

    .. change::
        :tags: bug, sql
        :tickets: 5644

        Fixed issue where the ``pickle.dumps()`` operation against
        :class:`_expression.Over` construct would produce a recursion overflow.

    .. change::
        :tags: postgresql, usecase
        :tickets: 4392

        The psycopg2 dialect now support PostgreSQL multiple host connections, by
        passing host/port combinations to the query string. Pull request courtesy
        Ramon Williams.

        .. seealso::

            :ref:`psycopg2_multi_host`

    .. change::
        :tags: bug, mysql
        :tickets: 5617

        Fixed bug where an UPDATE statement against a JOIN using MySQL multi-table
        format would fail to include the table prefix for the target table if the
        statement had no WHERE clause, as only the WHERE clause were scanned to
        detect a "multi table update" at that particular point.  The target
        is now also scanned if it's a JOIN to get the leftmost table as the
        primary table and the additional entries as additional FROM entries.


    .. change::
        :tags: bug, postgresql
        :tickets: 5518

        Adjusted the :meth:`_types.ARRAY.Comparator.any` and
        :meth:`_types.ARRAY.Comparator.all` methods to implement a straight "NOT"
        operation for negation, rather than negating the comparison operator.

    .. change::
        :tags: bug, pool
        :tickets: 5582

        Fixed issue where the following pool parameters were not being propagated
        to the new pool created when :meth:`_engine.Engine.dispose` were called:
        ``pre_ping``, ``use_lifo``.  Additionally the ``recycle`` and
        ``reset_on_return`` parameter is now propagated for the
        :class:`_engine.AssertionPool` class.

    .. change::
        :tags: bug, ext, associationproxy
        :tickets: 5541, 5542

        An informative error is now raised when attempting to use an association
        proxy element as a plain column expression to be SELECTed from or used in a
        SQL function; this use case is not currently supported.


    .. change::
        :tags: bug, sql
        :tickets: 5618

        Fixed bug where an error was not raised in the case where a
        :func:`_sql.column` were added to more than one :func:`_sql.table` at a
        time.  This raised correctly for the :class:`_schema.Column` and
        :class:`_schema.Table` objects. An :class:`_exc.ArgumentError` is now
        raised when this occurs.

    .. change::
        :tags: bug, orm
        :tickets: 4589

        Fixed issue where using a loader option against a string attribute name
        that is not actually a mapped attribute, such as a plain Python descriptor,
        would raise an uninformative AttributeError;  a descriptive error is now
        raised.



    .. change::
        :tags: mysql, usecase
        :tickets: 5462

        Adjusted the MySQL dialect to correctly parenthesize functional index
        expressions as accepted by MySQL 8. Pull request courtesy Ramon Williams.

    .. change::
        :tags: bug, engine
        :tickets: 5632

        Repaired a function-level import that was not using SQLAlchemy's standard
        late-import system within the sqlalchemy.exc module.


    .. change::
        :tags: change, mysql
        :tickets: 5539

        Add new MySQL reserved words: ``cube``, ``lateral`` added in MySQL 8.0.1
        and 8.0.14, respectively; this indicates that these terms will be quoted if
        used as table or column identifier names.

    .. change::
        :tags: bug, mssql
        :tickets: 5592

        Fixed issue where a SQLAlchemy connection URI for Azure DW with
        ``authentication=ActiveDirectoryIntegrated`` (and no username+password)
        was not constructing the ODBC connection string in a way that was
        acceptable to the Azure DW instance.

    .. change::
        :tags: bug, postgresql
        :tickets: 5520

        Fixed issue where the :class:`_postgresql.ENUM` type would not consult the
        schema translate map when emitting a CREATE TYPE or DROP TYPE during the
        test to see if the type exists or not.  Additionally, repaired an issue
        where if the same enum were encountered multiple times in a single DDL
        sequence, the "check" query would run repeatedly rather than relying upon a
        cached value.


    .. change::
        :tags: bug, tests
        :tickets: 5635

        Fixed incompatibilities in the test suite when running against Pytest 6.x.


.. changelog::
    :version: 1.3.19
    :released: August 17, 2020

    .. change::
        :tags: usecase, py3k
        :tickets: #5357

        Added a ``**kw`` argument to the :meth:`.DeclarativeMeta.__init__` method.
        This allows a class to support the :pep:`487` metaclass hook
        ``__init_subclass__``.  Pull request courtesy Ewen Gillies.


    .. change::
        :tags: bug, sql
        :tickets: 5470

        Repaired an issue where the "ORDER BY" clause rendering a label name rather
        than a complete expression, which is particularly important for SQL Server,
        would fail to occur if the expression were enclosed in a parenthesized
        grouping in some cases.   This case has been added to test support. The
        change additionally adjusts the "automatically add ORDER BY columns when
        DISTINCT is present" behavior of ORM query, deprecated in 1.4, to more
        accurately detect column expressions that are already present.

    .. change::
        :tags: usecase, mysql
        :tickets: 5481

        The MySQL dialect will render FROM DUAL for a SELECT statement that has no
        FROM clause but has a WHERE clause. This allows things like "SELECT 1 WHERE
        EXISTS (subquery)" kinds of queries to be used as well as other use cases.


    .. change::
        :tags: bug, mssql, sql
        :tickets: 5467

        Fixed bug where the mssql dialect incorrectly escaped object names that
        contained ']' character(s).

    .. change::
        :tags: bug, reflection, sqlite, mssql
        :tickets: 5456

        Applied a sweep through all included dialects to ensure names that contain
        single or double quotes are properly escaped when querying system tables,
        for all :class:`.Inspector` methods that accept object names as an argument
        (e.g. table names, view names, etc).   SQLite and MSSQL contained two
        quoting issues that were repaired.

    .. change::
        :tags: bug, mysql
        :tickets: 5411

        Fixed an issue where CREATE TABLE statements were not specifying the
        COLLATE keyword correctly.

    .. change::
        :tags: bug, datatypes, sql
        :tickets: 4733

        The ``LookupError`` message will now provide the user with up to four
        possible values that a column is constrained to via the :class:`.Enum`.
        Values longer than 11 characters will be truncated and replaced with
        ellipses. Pull request courtesy Ramon Williams.

    .. change::
        :tags: bug, postgresql
        :tickets: 5476

        Fixed issue where the return type for the various RANGE comparison
        operators would itself be the same RANGE type rather than BOOLEAN, which
        would cause an undesirable result in the case that a
        :class:`.TypeDecorator` that defined result-processing behavior were in
        use.  Pull request courtesy Jim Bosch.



    .. change::
        :tags: bug, mysql
        :tickets: 5493

        Added MariaDB code 1927 to the list of "disconnect" codes, as recent
        MariaDB versions apparently use this code when the database server was
        stopped.

    .. change::
        :tags: usecase, declarative, orm
        :tickets: 5513

        The name of the virtual column used when using the
        :class:`_declarative.AbstractConcreteBase` and
        :class:`_declarative.ConcreteBase` classes can now be customized, to allow
        for models that have a column that is actually named ``type``.  Pull
        request courtesy Jesse-Bakker.

    .. change::
        :tags: usecase, orm
        :tickets: 5494

        Adjusted the workings of the :meth:`_orm.Mapper.all_orm_descriptors`
        accessor to represent the attributes in the order that they are located in
        a deterministic way, assuming the use of Python 3.6 or higher which
        maintains the sorting order of class attributes based on how they were
        declared.   This sorting is not guaranteed to match the declared order of
        attributes in all cases however; see the method documentation for the exact
        scheme.



    .. change::
        :tags: bug, sql
        :tickets: 5500

        Fixed issue where the
        :paramref:`_engine.Connection.execution_options.schema_translate_map`
        feature would not take effect when the :meth:`_schema.Sequence.next_value`
        function function for a :class:`_schema.Sequence` were used in the
        :paramref:`_schema.Column.server_default` parameter and the create table
        DDL were emitted.

.. changelog::
    :version: 1.3.18
    :released: June 25, 2020

    .. change::
        :tags: bug, sqlite
        :tickets: 5395

        Added "exists" to the list of reserved words for SQLite so that this word
        will be quoted when used as a label or column name. Pull request courtesy
        Thodoris Sotiropoulos.

    .. change::
        :tags: bug, mssql
        :tickets: 5366, 5364

        Refined the logic used by the SQL Server dialect to interpret multi-part
        schema names that contain many dots, to not actually lose any dots if the
        name does not have bracking or quoting used, and additionally to support a
        "dbname" token that has many parts including that it may have multiple,
        independently-bracketed sections.



    .. change::
        :tags: bug, mssql, pyodbc
        :tickets: 5346

        Fixed an issue in the pyodbc connector such that a warning about pyodbc
        "drivername" would be emitted when using a totally empty URL.  Empty URLs
        are normal when producing a non-connected dialect object or when using the
        "creator" argument to create_engine(). The warning now only emits if the
        driver name is missing but other parameters are still present.

    .. change::
        :tags: bug, mssql
        :tickets: 5373

        Fixed issue with assembling the ODBC connection string for the pyodbc
        DBAPI. Tokens containing semicolons and/or braces "{}" were not being
        correctly escaped, causing the ODBC driver to misinterpret the
        connection string attributes.

    .. change::
        :tags: usecase, orm
        :tickets: 5326

        Improve error message when using :meth:`_query.Query.filter_by` in
        a query where the first entity is not a mapped class.

    .. change::
        :tags: sql, schema
        :tickets: 5324

        Introduce :class:`.IdentityOptions` to store common parameters for
        sequences and identity columns.

    .. change::
        :tags: usecase, sql
        :tickets: 5309

        Added a ".schema" parameter to the :func:`_expression.table` construct,
        allowing ad-hoc table expressions to also include a schema name.
        Pull request courtesy Dylan Modesitt.

    .. change::
        :tags: bug, mssql
        :tickets: 5339

        Fixed issue where ``datetime.time`` parameters were being converted to
        ``datetime.datetime``, making them incompatible with comparisons like
        ``>=`` against an actual :class:`_mssql.TIME` column.

    .. change::
        :tags: bug, mssql
        :tickets: 5359

        Fixed an issue where the ``is_disconnect`` function in the SQL Server
        pyodbc dialect was incorrectly reporting the disconnect state when the
        exception messsage had a substring that matched a SQL Server ODBC error
        code.

    .. change::
        :tags: bug, engine
        :tickets: 5326

        Further refinements to the fixes to the "reset" agent fixed in
        :ticket:`5326`, which now emits a warning when it is not being correctly
        invoked and corrects for the behavior.  Additional scenarios have been
        identified and fixed where this warning was being emitted.


    .. change::
        :tags: usecase, sqlite
        :tickets: 5297

        SQLite 3.31 added support for computed column. This change
        enables their support in SQLAlchemy when targeting SQLite.

    .. change::
        :tags: bug, schema
        :tickets: 5276

        Fixed issue where ``dialect_options`` were omitted when a
        database object (e.g., :class:`.Table`) was copied using
        :func:`.tometadata`.

    .. change::
        :tags: bug, sql
        :tickets: 5344

        Correctly apply self_group in type_coerce element.

        The type coerce element did not correctly apply grouping rules when using
        in an expression

    .. change::
        :tags: bug, oracle, reflection
        :tickets: 5421

        Fixed bug in Oracle dialect where indexes that contain the full set of
        primary key columns would be mistaken as the primary key index itself,
        which is omitted, even if there were multiples.  The check has been refined
        to compare the name of the primary key constraint against the index name
        itself, rather than trying to guess based on the columns present in the
        index.

    .. change::
        :tags: change, sql, sybase
        :tickets: 5294

        Added ``.offset`` support to sybase dialect.
        Pull request courtesy Alan D. Snow.

    .. change::
        :tags: bug, engine
        :tickets: 5341

        Fixed issue in :class:`.URL` object where stringifying the object
        would not URL encode special characters, preventing the URL from being
        re-consumable as a real URL.  Pull request courtesy Miguel Grinberg.

    .. change::
        :tags: usecase, mysql
        :tickets: 4860

        Implemented row-level locking support for mysql.  Pull request courtesy
        Quentin Somerville.

    .. change::
        :tags: change, mssql
        :tickets: 5321

        Moved the ``supports_sane_rowcount_returning = False`` requirement from
        the ``PyODBCConnector`` level to the ``MSDialect_pyodbc`` since pyodbc
        does work properly in some circumstances.

    .. change::
        :tags: change, examples

        Added new option ``--raw`` to the examples.performance suite
        which will dump the raw profile test for consumption by any
        number of profiling visualizer tools.   Removed the "runsnake"
        option as runsnake is very hard to build at this point;

    .. change::
        :tags: bug, sql
        :tickets: 5353

        Added :meth:`.Select.with_hint` output to the generic SQL string that is
        produced when calling ``str()`` on a statement.  Previously, this clause
        would be omitted under the assumption that it was dialect specific.
        The hint text is presented within brackets to indicate the rendering
        of such hints varies among backends.


    .. change::
        :tags: usecase, orm
        :tickets: 5198

        Added a new parameter :paramref:`_orm.query_expression.default_expr` to the
        :func:`_orm.query_expression` construct, which will be appled to queries
        automatically if the :func:`_orm.with_expression` option is not used. Pull
        request courtesy Haoyu Sun.

.. changelog::
    :version: 1.3.17
    :released: May 13, 2020

    .. change::
        :tags: bug, oracle
        :tickets: 5246

        Some modifications to how the cx_oracle dialect sets up per-column
        outputtype handlers for LOB and numeric datatypes to adjust for potential
        changes coming in cx_Oracle 8.


    .. change::
        :tags: bug, orm
        :tickets: 5288

        Fixed bug where using :func:`.with_polymorphic` as the target of a join via
        :meth:`.RelationshipComparator.of_type` on a mapper that already has a
        subquery-based with_polymorphic setting that's equivalent to the one
        requested would not correctly alias the ON clause in the join.

    .. change::
        :tags: bug, oracle, performance
        :tickets: 5314

        Changed the implementation of fetching CLOB and BLOB objects to use
        cx_Oracle's native implementation which fetches CLOB/BLOB objects inline
        with other result columns, rather than performing a separate fetch. As
        always, this can be disabled by setting auto_convert_lobs to False.

        As part of this change, the behavior of a CLOB that was given a blank
        string on INSERT now returns None on SELECT, which is now consistent with
        that of VARCHAR on Oracle.


    .. change::
        :tags: usecase, postgresql
        :tickets: 5265

        Added support for columns or type :class:`.ARRAY` of :class:`.Enum`,
        :class:`.JSON` or :class:`_postgresql.JSONB` in PostgreSQL.
        Previously a workaround was required in these use cases.


    .. change::
        :tags: schema
        :tickets: 4138

        Add ``comment`` attribute to :class:`_schema.Column` ``__repr__`` method.

    .. change::
        :tags: bug, orm
        :tickets: 5303

        Fixed issue in the area of where loader options such as selectinload()
        interact with the baked query system, such that the caching of a query is
        not supposed to occur if the loader options themselves have elements such
        as with_polymorphic() objects in them that currently are not
        cache-compatible.  The baked loader could sometimes not fully invalidate
        itself in these some of these scenarios leading to missed eager loads.


    .. change::
        :tags: bug, engine
        :tickets: 5326

        Fixed fairly critical issue where the DBAPI connection could be returned to
        the connection pool while still in an un-rolled-back state. The reset agent
        responsible for rolling back the connection could be corrupted in the case
        that the transaction was "closed" without being rolled back or committed,
        which can occur in some scenarios when using ORM sessions and emitting
        .close() in a certain pattern involving savepoints.   The fix ensures that
        the reset agent is always active.


    .. change::
        :tags: bug, orm
        :tickets: 5304

        Modified the internal "identity set" implementation, which is a set that
        hashes objects on their id() rather than their hash values, to not actually
        call the ``__hash__()`` method of the objects, which are typically
        user-mapped objects.  Some methods were calling this method as a side
        effect of the implementation.


    .. change::
        :tags: usecase, postgresql
        :tickets: 5266

        Raise an explicit :class:`.exc.CompileError` when adding a table with a
        column of type :class:`.ARRAY` of :class:`.Enum` configured with
        :paramref:`.Enum.native_enum` set to ``False`` when
        :paramref:`.Enum.create_constraint` is not set to ``False``

    .. change::
        :tags: bug, schema
        :tickets: 5298

        Fixed issue where an :class:`.Index` that is deferred in being associated
        with a table, such as as when it contains a :class:`.Column` that is not
        associated with any :class:`.Table` yet,  would fail to attach correctly if
        it also contained a non table-oriented expression.


    .. change::
        :tags: change, firebird
        :tickets: 5278

        Adjusted dialect loading for ``firebird://`` URIs so the external
        sqlalchemy-firebird dialect will be used if it has been installed,
        otherwise fall back to the (now deprecated) internal Firebird dialect.

    .. change::
        :tags: bug, mssql, reflection
        :tickets: 5255

        Fix a regression introduced by the reflection of computed column in
        MSSQL when using the legacy TDS version 4.2. The dialect will try
        to detect the protocol version of first connect and run in compatibility
        mode if it cannot detect it.

    .. change::
        :tags: bug, mssql, reflection
        :tickets: 5271

        Fix a regression introduced by the reflection of computed column in
        MSSQL when using SQL server versions before 2012, which does not support
        the ``concat`` function.

    .. change::
        :tags: bug, orm
        :tickets: 5269

        An informative error message is raised when an ORM many-to-one comparison
        is attempted against an object that is not an actual mapped instance.
        Comparisons such as those to scalar subqueries aren't supported;
        generalized comparison with subqueries is better achieved using
        :meth:`~.RelationshipProperty.Comparator.has`.


    .. change::
        :tags: usecase, orm
        :tickets: 5262

        Added an accessor :attr:`.ColumnProperty.Comparator.expressions` which
        provides access to the group of columns mapped under a multi-column
        :class:`.ColumnProperty` attribute.


    .. change::
        :tags: bug, schema
        :tickets: 5316

        A warning is emitted when making use of the :attr:`.MetaData.sorted_tables`
        attribute as well as the :func:`_schema.sort_tables` function, and the
        given tables cannot be correctly sorted due to a cyclic dependency between
        foreign key constraints. In this case, the functions will no longer sort
        the involved tables by foreign key, and a warning will be emitted. Other
        tables that are not part of the cycle will still be returned in dependency
        order. Previously, the sorted_table routines would return a collection that
        would unconditionally omit all foreign keys when a cycle was detected, and
        no warning was emitted.


    .. change::
        :tags: orm, usecase
        :tickets: 5237

        Introduce :paramref:`_orm.relationship.sync_backref` flag in a relationship
        to control if the synchronization events that mutate the in-Python
        attributes are added. This supersedes the previous change :ticket:`5149`,
        which warned that ``viewonly=True`` relationship target of a
        back_populates or backref configuration would be disallowed.

.. changelog::
    :version: 1.3.16
    :released: April 7, 2020

    .. change::
        :tags: oracle, usecase
        :tickets: 5200

        Implemented AUTOCOMMIT isolation level for Oracle when using cx_Oracle.
        Also added a fixed default isolation level of READ COMMITTED for Oracle.


    .. change::
        :tags: bug, mysql
        :tickets: 5239

        Fixed issue in MySQL dialect when connecting to a pseudo-MySQL database
        such as that provided by ProxySQL, the up front check for isolation level
        when it returns no row will not prevent the dialect from continuing to
        connect. A warning is emitted that the isolation level could not be
        detected.


    .. change::
        :tags: bug, tests
        :tickets: 5201

        Fixed an issue that prevented the test suite from running with the
        recently released py.test 5.4.0.


    .. change::
        :tags: bug, oracle, reflection
        :tickets: 5146

        Fixed regression / incorrect fix caused by fix for :ticket:`5146` where the
        Oracle dialect reads from the "all_tab_comments" view to get table comments
        but fails to accommodate for the current owner of the table being
        requested, causing it to read the wrong comment if multiple tables of the
        same name exist in multiple schemas.


    .. change::
        :tags: types, enum
        :tickets: 5183

        The :class:`.Enum` type now supports the parameter :paramref:`.Enum.length`
        to specify the length of the VARCHAR column to create when using
        non native enums by setting :paramref:`.Enum.native_enum` to ``False``

    .. change::
        :tags: bug, orm
        :tickets: 5228

        Fixed bug in :func:`_orm.selectinload` loading option where two or more
        loaders that represent different relationships with the same string key
        name as referenced from a single :func:`_orm.with_polymorphic` construct
        with multiple subclass mappers would fail to invoke each subqueryload
        separately, instead making use of a single string-based slot that would
        prevent the other loaders from being invoked.


    .. change::
        :tags: schema, reflection
        :tickets: 5063

        Added support for reflection of "computed" columns, which are now returned
        as part of the structure returned by :meth:`_reflection.Inspector.get_columns`.
        When reflecting full :class:`_schema.Table` objects, computed columns will
        be represented using the :class:`.Computed` construct.

    .. change::
        :tags: orm, performance
        :tickets: 5162

        Modified the queries used by subqueryload and selectinload to no longer
        ORDER BY the primary key of the parent entity;  this ordering was there to
        allow the rows as they come in to be copied into lists directly with a
        minimal level of Python-side collation.   However, these ORDER BY clauses
        can negatively impact the performance of the query as in many scenarios
        these columns are derived from a subquery or are otherwise not actual
        primary key columns such that SQL planners cannot make use of indexes. The
        Python-side collation uses the native itertools.group_by() to collate the
        incoming rows, and has been modified to allow multiple
        row-groups-per-parent to be assembled together using list.extend(), which
        should still allow for relatively fast Python-side performance.  There will
        still be an ORDER BY present for a relationship that includes an explicit
        order_by parameter, however this is the only ORDER BY that will be added to
        the query for both kinds of loading.

    .. change::
        :tags: mssql, mysql, oracle, usecase
        :tickets: 5137

        Added support for :meth:`.ColumnOperators.is_distinct_from` and
        :meth:`.ColumnOperators.isnot_distinct_from` to SQL Server,
        MySQL, and Oracle.

    .. change::
        :tags: sqlite, usecase
        :tickets: 5164

        Implemented AUTOCOMMIT isolation level for SQLite when using pysqlite.

    .. change::
        :tags: bug, postgresql
        :tickets: 5205

        Fixed issue where a "covering" index, e.g. those which have an  INCLUDE
        clause, would be reflected including all the columns in INCLUDE clause as
        regular columns.  A warning is now emitted if these additional columns are
        detected indicating that they are currently ignored.  Note that full
        support for "covering" indexes is part of :ticket:`4458`.  Pull request
        courtesy Marat Sharafutdinov.

    .. change::
        :tags: sql, types
        :tickets: 5052

        Add ability to literal compile a :class:`DateTime`, :class:`Date`
        or :class:`Time` when using the string dialect for debugging purposes.
        This change does not impact real dialect implementation that retain
        their current behavior.

    .. change::
        :tags: installer
        :tickets: 5207

        Ensured that the "pyproject.toml" file is not included in builds, as the
        presence of this file indicates to pip that a pep-517 installation process
        should be used.  As this mode of operation appears to be not well supported
        by current tools / distros, these problems are avoided within the scope
        of SQLAlchemy installation by omitting the file.


    .. change::
        :tags: bug, orm
        :tickets: 5210

        Fixed issue where a lazyload that uses session-local "get" against a target
        many-to-one relationship where an object with the correct primary key is
        present, however it's an instance of a sibling class, does not correctly
        return None as is the case when the lazy loader actually emits a load for
        that row.

    .. change::
        :tags: bug, orm, declarative
        :tickets: 5238

        The string argument accepted as the first positional argument by the
        :func:`_orm.relationship` function when using the Declarative API is no longer
        interpreted using the Python ``eval()`` function; instead, the name is dot
        separated and the names are looked up directly in the name resolution
        dictionary without treating the value as a Python expression.  However,
        passing a string argument to the other :func:`_orm.relationship` parameters
        that necessarily must accept Python expressions will still use ``eval()``;
        the documentation has been clarified to ensure that there is no ambiguity
        that this is in use.

        .. seealso::

            :ref:`declarative_relationship_eval` - details on string evaluation

.. changelog::
    :version: 1.3.15
    :released: March 11, 2020

    .. change::
        :tags: bug, orm
        :tickets: 5194

        Adjusted the error message emitted by :meth:`_query.Query.join` when a left hand
        side can't be located that the :meth:`_query.Query.select_from` method is the
        best way to resolve the issue.  Also, within the 1.3 series, used a
        deterministic ordering when determining the FROM clause from a given column
        entity passed to :class:`_query.Query` so that the same expression is determined
        each time.


    .. change::
        :tags: orm, bug
        :tickets: 5196

        Fixed regression in 1.3.14 due to :ticket:`4849` where a sys.exc_info()
        call failed to be invoked correctly when a flush error would occur. Test
        coverage has been added for this exception case.


.. changelog::
    :version: 1.3.14
    :released: March 10, 2020

    .. change::
        :tags: bug, sql, postgresql
        :tickets: 5181

        Fixed bug where a CTE of an INSERT/UPDATE/DELETE that also uses RETURNING
        could then not be SELECTed from directly, as the internal state of the
        compiler would try to treat the outer SELECT as a DELETE statement itself
        and access nonexistent state.


    .. change::
        :tags: bug, orm
        :tickets: 5110

        Fixed regression caused in 1.3.13 by :ticket:`5056` where a refactor of the
        ORM path registry system made it such that a path could no longer be
        compared to an empty tuple, which can occur in a particular kind of joined
        eager loading path.   The "empty tuple" use case has been resolved so that
        the path registry is compared to a path registry in all cases;  the
        :class:`.PathRegistry` object itself now implements ``__eq__()`` and
        ``__ne__()`` methods which will take place for all equality comparisons and
        continue to succeed in the not anticipated case that a non-
        :class:`.PathRegistry` object is compared, while emitting a warning that
        this object should not be the subject of the comparison.



    .. change::
        :tags: bug, orm
        :tickets: 5149

        Setting a relationship to viewonly=True which is also the target of a
        back_populates or backref configuration will now emit a warning and
        eventually be disallowed. back_populates refers specifically to mutation
        of an attribute or collection, which is disallowed when the attribute is
        subject to viewonly=True.   The viewonly attribute is not subject to
        persistence behaviors which means it will not reflect correct results
        when it is locally mutated.

    .. change::
        :tags: bug, oracle
        :tickets: 5146

        Fixed a reflection bug where table comments could only be retrieved for
        tables actually owned by the user but not for tables visible to the user
        but owned by someone else.  Pull request courtesy Dave Hirschfeld.

    .. change::
        :tags: bug, performance
        :tickets: 5180

        Revised an internal change to the test system added as a result of
        :ticket:`5085` where a testing-related module per dialect would be loaded
        unconditionally upon making use of that dialect, pulling in SQLAlchemy's
        testing framework as well as the ORM into the module import space.   This
        would only impact initial startup time and memory to a modest extent,
        however it's best that these additional modules aren't reverse-dependent on
        straight Core usage.

    .. change::
        :tags: bug, installation
        :tickets: 5138

        Vendored the ``inspect.formatannotation`` function inside of
        ``sqlalchemy.util.compat``, which is needed for the vendored version of
        ``inspect.formatargspec``.  The function is not documented in cPython and
        is not guaranteed to be available in future Python versions.


    .. change::
        :tags: bug, mssql
        :tickets: 5132

        Fixed issue where the :class:`_mssql.DATETIMEOFFSET` type would not
        accommodate for the ``None`` value, introduced as part of the series of
        fixes for this type first introduced in :ticket:`4983`, :ticket:`5045`.
        Additionally, added support for passing a backend-specific date formatted
        string through this type, as is typically allowed for date/time types on
        most other DBAPIs.

    .. change::
        :tags: bug, engine
        :tickets: 5182

        Expanded the scope of cursor/connection cleanup when a statement is
        executed to include when the result object fails to be constructed, or an
        after_cursor_execute() event raises an error, or autocommit / autoclose
        fails.  This allows the DBAPI cursor to be cleaned up on failure and for
        connectionless execution allows the connection to be closed out and
        returned to the connection pool, where previously it waiting until garbage
        collection would trigger a pool return.

    .. change::
        :tags: bug, postgresql
        :tickets: 5158

        Fixed issue where the "schema_translate_map" feature would not work with a
        PostgreSQL native enumeration type (i.e. :class:`.Enum`,
        :class:`_postgresql.ENUM`) in that while the "CREATE TYPE" statement would
        be emitted with the correct schema, the schema would not be rendered in
        the CREATE TABLE statement at the point at which the enumeration was
        referenced.


    .. change::
        :tags: usecase, ext
        :tickets: 5114

        Added keyword arguments to the :meth:`.MutableList.sort` function so that a
        key function as well as the "reverse" keyword argument can be provided.


    .. change::
        :tags: bug, general, py3k
        :tickets: 4849

        Applied an explicit "cause" to most if not all internally raised exceptions
        that are raised from within an internal exception catch, to avoid
        misleading stacktraces that suggest an error within the handling of an
        exception.  While it would be preferable to suppress the internally caught
        exception in the way that the ``__suppress_context__`` attribute would,
        there does not as yet seem to be a way to do this without suppressing an
        enclosing user constructed context, so for now it exposes the internally
        caught exception as the cause so that full information about the context
        of the error is maintained.

    .. change::
        :tags: orm, bug
        :tickets: 5121

        Fixed an additional regression in the same area as that of :ticket:`5080`
        introduced in 1.3.0b3 via :ticket:`4468` where the ability to create a
        joined option across a :func:`.with_polymorphic` into a relationship
        against the base class of that with_polymorphic, and then further into
        regular mapped relationships would fail as the base class component would
        not add itself to the load path in a way that could be located by the
        loader strategy. The changes applied in :ticket:`5080` have been further
        refined to also accommodate this scenario.

    .. change::
        :tags: bug, postgresql, reflection
        :tickets: 5170

        Fixed bug where PostgreSQL reflection of CHECK constraints would fail to
        parse the constraint if the SQL text contained newline characters. The
        regular expression has been adjusted to accommodate for this case. Pull
        request courtesy Eric Borczuk.

    .. change::
        :tags: usecase, orm
        :tickets: 5129

        Added a new flag :paramref:`.InstanceEvents.restore_load_context` and
        :paramref:`.SessionEvents.restore_load_context` which apply to the
        :meth:`.InstanceEvents.load`, :meth:`.InstanceEvents.refresh`, and
        :meth:`.SessionEvents.loaded_as_persistent` events, which when set will
        restore the "load context" of the object after the event hook has been
        called.  This ensures that the object remains within the "loader context"
        of the load operation that is already ongoing, rather than the object being
        transferred to a new load context due to refresh operations which may have
        occurred in the event. A warning is now emitted when this condition occurs,
        which recommends use of the flag to resolve this case.  The flag is
        "opt-in" so that there is no risk introduced to existing applications.

        The change additionally adds support for the ``raw=True`` flag to
        session lifecycle events.

    .. change::
        :tags: bug, mysql
        :tickets: 5173

        Fixed issue in MySQL :meth:`.mysql.Insert.on_duplicate_key_update` construct
        where using a SQL function or other composed expression for a column argument
        would not properly render the ``VALUES`` keyword surrounding the column
        itself.

.. changelog::
    :version: 1.3.13
    :released: January 22, 2020

    .. change::
        :tags: bug, postgresql
        :tickets: 5039

        Fixed issue where the PostgreSQL dialect would fail to parse a reflected
        CHECK constraint that was a boolean-valued function (as opposed to a
        boolean-valued expression).

    .. change::
        :tags: bug, ext
        :tickets: 5086

        Fixed bug in sqlalchemy.ext.serializer where a unique
        :class:`.BindParameter` object could conflict with itself if it were
        present in the mapping itself, as well as the filter condition of the
        query, as one side would be used against the non-deserialized version and
        the other side would use the deserialized version.  Logic is added to
        :class:`.BindParameter` similar to its "clone" method which will uniquify
        the parameter name upon deserialize so that it doesn't conflict with its
        original.


    .. change::
        :tags: usecase, sql
        :tickets: 5079

        A function created using :class:`.GenericFunction` can now specify that the
        name of the function should be rendered with or without quotes by assigning
        the :class:`.quoted_name` construct to the .name element of the object.
        Prior to 1.3.4, quoting was never applied to function names, and some
        quoting was introduced in :ticket:`4467` but no means to force quoting for
        a mixed case name was available.  Additionally, the :class:`.quoted_name`
        construct when used as the name will properly register its lowercase name
        in the function registry so that the name continues to be available via the
        ``func.`` registry.

        .. seealso::

            :class:`.GenericFunction`


    .. change::
        :tags: bug, engine
        :tickets: 5048

        Fixed issue where the collection of value processors on a
        :class:`.Compiled` object would be mutated when "expanding IN" parameters
        were used with a datatype that has bind value processors; in particular,
        this would mean that when using statement caching and/or baked queries, the
        same compiled._bind_processors collection would be mutated concurrently.
        Since these processors are the same function for a given bind parameter
        namespace every time, there was no actual negative effect of this issue,
        however, the execution of a :class:`.Compiled` object should never be
        causing any changes in its state, especially given that they are intended
        to be thread-safe and reusable once fully constructed.


    .. change::
        :tags: tests, postgresql
        :tickets: 5057

        Improved detection of two phase transactions requirement for the PostgreSQL
        database by testing that max_prepared_transactions is set to a value
        greater than 0.  Pull request courtesy Federico Caselli.


    .. change::
        :tags: bug, orm, engine
        :tickets: 5056, 5050, 5071

        Added test support and repaired a wide variety of unnecessary reference
        cycles created for short-lived objects, mostly in the area of ORM queries.
        Thanks much to Carson Ip for the help on this.


    .. change::
        :tags: orm, bug
        :tickets: 5107

        Fixed regression in loader options introduced in 1.3.0b3 via :ticket:`4468`
        where the ability to create a loader option using
        :meth:`.PropComparator.of_type` targeting an aliased entity that is an
        inheriting subclass of the entity which the preceding relationship refers
        to would fail to produce a matching path.   See also :ticket:`5082` fixed
        in this same release which involves a similar kind of issue.

    .. change::
        :tags: bug, tests
        :tickets: 4946

        Fixed a few test failures which would occur on Windows due to SQLite file
        locking issues, as well as some timing issues in connection pool related
        tests; pull request courtesy Federico Caselli.


    .. change::
        :tags: orm, bug
        :tickets: 5082

        Fixed regression in joined eager loading introduced in 1.3.0b3 via
        :ticket:`4468` where the ability to create a joined option across a
        :func:`.with_polymorphic` into a polymorphic subclass using
        :meth:`.RelationshipProperty.of_type` and then further along regular mapped
        relationships would fail as the polymorphic subclass would not add itself
        to the load path in a way that could be located by the loader strategy.  A
        tweak has been made to resolve this scenario.


    .. change::
        :tags: performance, orm

        Identified a performance issue in the system by which a join is constructed
        based on a mapped relationship.   The clause adaption system would be used
        for the majority of join expressions including in the common case where no
        adaptation is needed.   The conditions under which this adaptation occur
        have been refined so that average non-aliased joins along a simple
        relationship without a "secondary" table use about 70% less function calls.


    .. change::
        :tags: usecase, postgresql
        :tickets: 5040

        Added support for prefixes to the :class:`_expression.CTE` construct, to allow
        support for Postgresql 12 "MATERIALIZED" and "NOT MATERIALIZED" phrases.
        Pull request courtesy Marat Sharafutdinov.

        .. seealso::

            :meth:`_expression.HasCTE.cte`

    .. change::
        :tags: bug, mssql
        :tickets: 5045

        Fixed issue where a timezone-aware ``datetime`` value being converted to
        string for use as a parameter value of a :class:`_mssql.DATETIMEOFFSET`
        column was omitting the fractional seconds.

    .. change::
        :tags: bug, orm
        :tickets: 5068

        Repaired a warning in the ORM flush process that was not covered by  test
        coverage when deleting objects that use the "version_id" feature. This
        warning is generally unreachable unless using a dialect that sets the
        "supports_sane_rowcount" flag to False, which  is not typically the case
        however is possible for some MySQL configurations as well as older Firebird
        drivers, and likely some third party dialects.

    .. change::
        :tags: bug, orm
        :tickets: 5065

        Fixed bug where usage of joined eager loading would not properly wrap the
        query inside of a subquery when :meth:`_query.Query.group_by` were used against
        the query.   When any kind of result-limiting approach is used, such as
        DISTINCT, LIMIT, OFFSET, joined eager loading embeds the row-limited query
        inside of a subquery so that the collection results are not impacted.   For
        some reason, the presence of GROUP BY was never included in this criterion,
        even though it has a similar effect as using DISTINCT.   Additionally, the
        bug would prevent using GROUP BY at all for a joined eager load query for
        most database platforms which forbid non-aggregated, non-grouped columns
        from being in the query, as the additional columns for the joined eager
        load would not be accepted by the database.



.. changelog::
    :version: 1.3.12
    :released: December 16, 2019

    .. change::
        :tags: bug, sql
        :tickets: 5028

        Fixed bug where "distinct" keyword passed to :func:`_expression.select` would not
        treat a string value as a "label reference" in the same way that the
        :meth:`_expression.select.distinct` does; it would instead raise unconditionally. This
        keyword argument and the others passed to :func:`_expression.select` will ultimately
        be deprecated for SQLAlchemy 2.0.


    .. change::
        :tags: bug, orm
        :tickets: 4997

        Fixed issue involving ``lazy="raise"`` strategy where an ORM delete of an
        object would raise for a simple "use-get" style many-to-one relationship
        that had lazy="raise" configured.  This is inconsistent vs. the change
        introduced in 1.3 as part of :ticket:`4353`, where it was established that
        a history operation that does not expect emit SQL should bypass the
        ``lazy="raise"`` check, and instead effectively treat it as
        ``lazy="raise_on_sql"`` for this case.  The fix adjusts the lazy loader
        strategy to not raise for the case where the lazy load was instructed that
        it should not emit SQL if the object were not present.

    .. change::
        :tags: bug, sql

        Changed the text of the exception for "Can't resolve label reference" to
        include other kinds of label coercions, namely that "DISTINCT" is also in
        this category under the PostgreSQL dialect.


    .. change::
        :tags: bug, orm
        :tickets: 5000

        Fixed regression introduced in 1.3.0 related to the association proxy
        refactor in :ticket:`4351` that prevented :func:`.composite` attributes
        from working in terms of an association proxy that references them.

    .. change::
        :tags: bug, mssql
        :tickets: 4983

        Repaired support for the :class:`_mssql.DATETIMEOFFSET` datatype on PyODBC,
        by adding PyODBC-level result handlers as it does not include native
        support for this datatype.  This includes usage of the Python 3 "timezone"
        tzinfo subclass in order to set up a timezone, which on Python 2 makes
        use of a minimal backport of "timezone" in sqlalchemy.util.


    .. change::
        :tags: bug, orm
        :tickets: 4993

        Setting persistence-related flags on :func:`_orm.relationship` while also
        setting viewonly=True will now emit a regular warning, as these flags do
        not make sense for a viewonly=True relationship.   In particular, the
        "cascade" settings have their own warning that is generated based on the
        individual values, such as "delete, delete-orphan", that should not apply
        to a viewonly relationship.   Note however that in the case of "cascade",
        these settings are still erroneously taking effect even though the
        relationship is set up as "viewonly".   In 1.4, all persistence-related
        cascade settings will be disallowed on a viewonly=True relationship in
        order to resolve this issue.

    .. change::
        :tags: bug, sqlite
        :tickets: 5014

        Fixed issue to workaround SQLite's behavior of assigning "numeric" affinity
        to JSON datatypes, first described at :ref:`change_3850`, which returns
        scalar numeric JSON values as a number and not as a string that can be JSON
        deserialized.  The SQLite-specific JSON deserializer now gracefully
        degrades for this case as an exception and bypasses deserialization for
        single numeric values, as from a JSON perspective they are already
        deserialized.



    .. change::
        :tags: bug, orm, py3k
        :tickets: 4990

        Fixed issue where when assigning a collection to itself as a slice, the
        mutation operation would fail as it would first erase the assigned
        collection inadvertently.   As an assignment that does not change  the
        contents should not generate events, the operation is now a no-op. Note
        that the fix only applies to Python 3; in Python 2, the ``__setitem__``
        hook isn't called in this case; ``__setslice__`` is used instead which
        recreates the list item-by-item in all cases.

    .. change::
        :tags: bug, orm
        :tickets: 5034

        Fixed issue where by if the "begin" of a transaction failed at the Core
        engine/connection level, such as due to network error or database is locked
        for some transactional recipes, within the context of the :class:`.Session`
        procuring that connection from the connection pool and then immediately
        returning it, the ORM :class:`.Session` would not close the connection
        despite this connection not being stored within the state of that
        :class:`.Session`.  This would lead to the connection being cleaned out by
        the connection pool weakref handler within garbage collection which is an
        unpreferred codepath that in some special configurations can emit errors in
        standard error.

.. changelog::
    :version: 1.3.11
    :released: November 11, 2019

    .. change::
        :tags: bug, mssql
        :tickets: 4973

        Fixed issue in MSSQL dialect where an expression-based OFFSET value in a
        SELECT would be rejected, even though the dialect can render this
        expression inside of a ROW NUMBER-oriented LIMIT/OFFSET construct.


    .. change::
        :tags: orm, usecase
        :tickets: 4934

        Added accessor :meth:`_query.Query.is_single_entity` to :class:`_query.Query`, which
        will indicate if the results returned by this :class:`_query.Query` will be a
        list of ORM entities, or a tuple of entities or column expressions.
        SQLAlchemy hopes to improve upon the behavior of single entity / tuples in
        future releases such that the behavior would be explicit up front, however
        this attribute should be helpful with the current behavior.  Pull request
        courtesy Patrick Hayes.

    .. change::
        :tags: bug, mysql
        :tickets: 4945

        Added "Connection was killed" message interpreted from the base
        pymysql.Error class in order to detect closed connection, based on reports
        that this message is arriving via a pymysql.InternalError() object which
        indicates pymysql is not handling it correctly.

    .. change::
        :tags: bug, orm
        :tickets: 4954

        The :paramref:`_orm.relationship.omit_join` flag was not intended to be
        manually set to True, and will now emit a warning when this occurs.  The
        omit_join optimization is detected automatically, and the ``omit_join``
        flag was only intended to disable the optimization in the hypothetical case
        that the optimization may have interfered with correct results, which has
        not been observed with the modern version of this feature.   Setting the
        flag to True when it is not automatically detected may cause the selectin
        load feature to not work correctly when a non-default primary join
        condition is in use.


    .. change::
        :tags: bug, orm
        :tickets: 4915

        A warning is emitted if a primary key value is passed to :meth:`_query.Query.get`
        that consists of None for all primary key column positions.   Previously,
        passing a single None outside of a tuple would raise a ``TypeError`` and
        passing a composite None (tuple of None values) would silently pass
        through.   The fix now coerces the single None into a tuple where it is
        handled consistently with the other None conditions.  Thanks to Lev
        Izraelit for the help with this.


    .. change::
        :tags: bug, orm
        :tickets: 4947

        The :class:`.BakedQuery` will not cache a query that was modified by a
        :meth:`.QueryEvents.before_compile` event, so that compilation hooks that
        may be applying ad-hoc modifications to queries will take effect on each
        run.  In particular this is helpful for events that modify queries used in
        lazy loading as well as eager loading such as "select in" loading.  In
        order to re-enable caching for a query modified by this event, a new
        flag ``bake_ok`` is added; see :ref:`baked_with_before_compile` for
        details.

        A longer term plan to provide a new form of SQL caching should solve this
        kind of issue more comprehensively.

    .. change::
        :tags: bug, tests
        :tickets: 4920

        Fixed test failures which would occur with newer SQLite as of version 3.30
        or greater, due to their addition of nulls ordering syntax as well as new
        restrictions on aggregate functions.  Pull request courtesy Nils Philippsen.



    .. change::
        :tags: bug, installation, windows
        :tickets: 4967

        Added a workaround for a setuptools-related failure that has been observed
        as occurring on Windows installations, where setuptools is not correctly
        reporting a build error when the MSVC build dependencies are not installed
        and therefore not allowing graceful degradation into non C extensions
        builds.

    .. change::
        :tags: bug, sql, py3k
        :tickets: 4931

        Changed the ``repr()`` of the :class:`.quoted_name` construct to use
        regular string repr() under Python 3, rather than running it through
        "backslashreplace" escaping, which can be misleading.

    .. change::
        :tags: bug, oracle, firebird
        :tickets: 4931

        Modified the approach of "name normalization" for the Oracle and Firebird
        dialects, which converts from the UPPERCASE-as-case-insensitive convention
        of these dialects into lowercase-as-case-insensitive for SQLAlchemy, to not
        automatically apply the :class:`.quoted_name` construct to a name that
        matches itself under upper or lower case conversion, as is the case for
        many non-european characters.   All names used within metadata structures
        are converted to :class:`.quoted_name` objects in any case; the change
        here would only affect the output of some inspection functions.

    .. change::
        :tags: bug, schema
        :tickets: 4911

        Fixed bug where a table that would have a column label overlap with a plain
        column name, such as "foo.id AS foo_id" vs. "foo.foo_id", would prematurely
        generate the ``._label`` attribute for a column before this overlap could
        be detected due to the use of the ``index=True`` or ``unique=True`` flag on
        the column in conjunction with the default naming convention of
        ``"column_0_label"``.  This would then lead to failures when ``._label``
        were used later to generate a bound parameter name, in particular those
        used by the ORM when generating the WHERE clause for an UPDATE statement.
        The issue has been fixed by using an alternate ``._label`` accessor for DDL
        generation that does not affect the state of the :class:`_schema.Column`.   The
        accessor also bypasses the key-deduplication step as it is not necessary
        for DDL, the naming is now consistently ``"<tablename>_<columnname>"``
        without any subsequent numeric symbols when used in DDL.



    .. change::
        :tags: bug, engine
        :tickets: 4902

        Fixed bug where parameter repr as used in logging and error reporting needs
        additional context in order to distinguish between a list of parameters for
        a single statement and a list of parameter lists, as the "list of lists"
        structure could also indicate a single parameter list where the first
        parameter itself is a list, such as for an array parameter.   The
        engine/connection now passes in an additional boolean indicating how the
        parameters should be considered.  The only SQLAlchemy backend that expects
        arrays as parameters is that of  psycopg2 which uses pyformat parameters,
        so this issue has not been too apparent, however as other drivers that use
        positional gain more features it is important that this be supported. It
        also eliminates the need for the parameter repr function to guess based on
        the parameter structure passed.

    .. change::
        :tags: usecase, schema
        :tickets: 4894

        Added DDL support for "computed columns"; these are DDL column
        specifications for columns that have a server-computed value, either upon
        SELECT (known as "virtual") or at the point of which they are INSERTed or
        UPDATEd (known as "stored").  Support is established for Postgresql, MySQL,
        Oracle SQL Server and Firebird. Thanks to Federico Caselli for lots of work
        on this one.

        .. seealso::

            :ref:`computed_ddl`


    .. change::
        :tags: bug, engine, postgresql
        :tickets: 4955

        Fixed bug in :class:`_reflection.Inspector` where the cache key generation did not
        take into account arguments passed in the form of tuples, such as the tuple
        of view name styles to return for the PostgreSQL dialect. This would lead
        the inspector to cache too generally for a more specific set of criteria.
        The logic has been adjusted to include every keyword element in the cache,
        as every argument is expected to be appropriate for a cache else the
        caching decorator should be bypassed by the dialect.


    .. change::
        :tags: bug, mssql
        :tickets: 4923

        Fixed an issue in the :meth:`_engine.Engine.table_names` method where it would
        feed the dialect's default schema name back into the dialect level table
        function, which in the case of SQL Server would interpret it as a
        dot-tokenized schema name as viewed by the mssql dialect, which would
        cause the method to fail in the case where the database username actually
        had a dot inside of it.  In 1.3, this method is still used by the
        :meth:`_schema.MetaData.reflect` function so is a prominent codepath. In 1.4,
        which is the current master development branch, this issue doesn't exist,
        both because :meth:`_schema.MetaData.reflect` isn't using this method nor does the
        method pass the default schema name explicitly.  The fix nonetheless
        guards against the default server name value returned by the dialect from
        being interpreted as dot-tokenized name under any circumstances by
        wrapping it in quoted_name().

    .. change::
        :tags: bug, orm
        :tickets: 4974

        Fixed ORM bug where a "secondary" table that referred to a selectable which
        in some way would refer to the local primary table would apply aliasing to
        both sides of the join condition when a relationship-related join, either
        via :meth:`_query.Query.join` or by :func:`_orm.joinedload`, were generated.  The
        "local" side is now excluded.

    .. change::
        :tags: usecase, sql
        :tickets: 4276

        Added new accessors to expressions of type :class:`_types.JSON` to allow for
        specific datatype access and comparison, covering strings, integers,
        numeric, boolean elements.   This revises the documented approach of
        CASTing to string when comparing values, instead adding specific
        functionality into the PostgreSQL, SQlite, MySQL dialects to reliably
        deliver these basic types in all cases.

        .. seealso::

            :class:`_types.JSON`

            :meth:`.JSON.Comparator.as_string`

            :meth:`.JSON.Comparator.as_boolean`

            :meth:`.JSON.Comparator.as_float`

            :meth:`.JSON.Comparator.as_integer`

    .. change::
        :tags: usecase, oracle
        :tickets: 4799

        Added dialect-level flag ``encoding_errors`` to the cx_Oracle dialect,
        which can be specified as part of :func:`_sa.create_engine`.   This is passed
        to SQLAlchemy's unicode decoding converter under Python 2, and to
        cx_Oracle's ``cursor.var()`` object as the ``encodingErrors`` parameter
        under Python 3, for the very unusual case that broken encodings are present
        in the target database which cannot be fetched unless error handling is
        relaxed.  The value is ultimately one of the Python "encoding errors"
        parameters passed to ``decode()``.

    .. change::
        :tags: usecase, sql
        :tickets: 4933

        The :func:`_expression.text` construct now supports "unique" bound parameters, which
        will dynamically uniquify themselves on compilation thus allowing multiple
        :func:`_expression.text` constructs with the same bound parameter names to be combined
        together.


    .. change::
        :tags: bug, oracle
        :tickets: 4913

        The :class:`_types.NCHAR` datatype will now bind to the
        ``cx_Oracle.FIXED_NCHAR`` DBAPI data bindings when used in a bound
        parameter, which supplies proper comparison behavior against a
        variable-length string.  Previously, the :class:`_types.NCHAR` datatype
        would bind to ``cx_oracle.NCHAR`` which is not fixed length; the
        :class:`_types.CHAR` datatype already binds to ``cx_Oracle.FIXED_CHAR``
        so it is now consistent that :class:`_types.NCHAR` binds to
        ``cx_Oracle.FIXED_NCHAR``.



    .. change::
        :tags: bug, firebird
        :tickets: 4903

        Added additional "disconnect" message "Error writing data to the
        connection" to Firebird disconnection detection.  Pull request courtesy
        lukens.

.. changelog::
    :version: 1.3.10
    :released: October 9, 2019

    .. change::
        :tags: bug, mssql
        :tickets: 4857

        Fixed bug in SQL Server dialect with new "max_identifier_length" feature
        where the mssql dialect already featured this flag, and the implementation
        did not accommodate for the new initialization hook correctly.


    .. change::
        :tags: bug, oracle
        :tickets: 4898, 4857

        Fixed regression in Oracle dialect that was inadvertently using max
        identifier length of 128 characters on Oracle server 12.2 and greater even
        though the stated contract for the remainder of the 1.3 series is  that
        this value stays at 30 until version SQLAlchemy 1.4.  Also repaired issues
        with the retrieval of the "compatibility" version, and removed the warning
        emitted when the "v$parameter" view was not accessible as this was  causing
        user confusion.

.. changelog::
    :version: 1.3.9
    :released: October 4, 2019

    .. change::
        :tags: usecase, engine
        :tickets: 4857

        Added new :func:`_sa.create_engine` parameter
        :paramref:`_sa.create_engine.max_identifier_length`. This overrides the
        dialect-coded "max identifier length" in order to accommodate for databases
        that have recently changed this length and the SQLAlchemy dialect has
        not yet been adjusted to detect for that version.  This parameter interacts
        with the existing :paramref:`_sa.create_engine.label_length` parameter in that
        it establishes the maximum (and default) value for anonymously generated
        labels.   Additionally, post-connection detection of max identifier lengths
        has been added to the dialect system.  This feature is first being used
        by the Oracle dialect.

        .. seealso::

            :ref:`oracle_max_identifier_lengths` - in the Oracle dialect documentation

    .. change::
        :tags: usecase, oracle
        :tickets: 4857

        The Oracle dialect now emits a warning if Oracle version 12.2 or greater is
        used, and the :paramref:`_sa.create_engine.max_identifier_length` parameter is
        not set.   The version in this specific case defaults to that of the
        "compatibility" version set in the Oracle server configuration, not the
        actual server version.   In version 1.4, the default max_identifier_length
        for 12.2 or greater will move to 128 characters.  In order to maintain
        forwards compatibility, applications should set
        :paramref:`_sa.create_engine.max_identifier_length` to 30 in order to maintain
        the same length behavior, or to 128 in order to test the upcoming behavior.
        This length determines among other things how generated constraint names
        are truncated for statements like ``CREATE CONSTRAINT`` and ``DROP
        CONSTRAINT``, which means a the new length may produce a name-mismatch
        against a name that was generated with the old length, impacting database
        migrations.

        .. seealso::

            :ref:`oracle_max_identifier_lengths` - in the Oracle dialect documentation

    .. change::
        :tags: usecase, sqlite
        :tickets: 4863

        Added support for sqlite "URI" connections, which allow for sqlite-specific
        flags to be passed in the query string such as "read only" for Python
        sqlite3 drivers that support this.

        .. seealso::

            :ref:`pysqlite_uri_connections`

    .. change::
        :tags: bug, tests
        :tickets: 4285

        Fixed unit test regression released in 1.3.8 that would cause failure for
        Oracle, SQL Server and other non-native ENUM platforms due to new
        enumeration tests added as part of :ticket:`4285` enum sortability in the
        unit of work; the enumerations created constraints that were duplicated on
        name.

    .. change::
        :tags: bug, oracle
        :tickets: 4886

        Restored adding cx_Oracle.DATETIME to the setinputsizes() call when a
        SQLAlchemy :class:`.Date`, :class:`.DateTime` or :class:`.Time` datatype is
        used, as some complex queries require this to be present.  This was removed
        in the 1.2 series for arbitrary reasons.

    .. change::
        :tags: bug, mssql
        :tickets: 4883

        Added identifier quoting to the schema name applied to the "use" statement
        which is invoked when a SQL Server multipart schema name is used within  a
        :class:`_schema.Table` that is being reflected, as well as for :class:`_reflection.Inspector`
        methods such as :meth:`_reflection.Inspector.get_table_names`; this accommodates for
        special characters or spaces in the database name.  Additionally, the "use"
        statement is not emitted if the current database matches the target owner
        database name being passed.

    .. change::
        :tags: bug, orm
        :tickets: 4872

        Fixed regression in selectinload loader strategy caused by :ticket:`4775`
        (released in version 1.3.6) where a many-to-one attribute of None would no
        longer be populated by the loader.  While this was usually not noticeable
        due to the lazyloader populating None upon get, it would lead to a detached
        instance error if the object were detached.

    .. change::
        :tags: bug, orm
        :tickets: 4873

        Passing a plain string expression to :meth:`.Session.query` is deprecated,
        as all string coercions were removed in :ticket:`4481` and this one should
        have been included.   The :func:`_expression.literal_column` function may be used to
        produce a textual column expression.

    .. change::
        :tags: usecase, sql
        :tickets: 4847

        Added an explicit error message for the case when objects passed to
        :class:`_schema.Table` are not :class:`.SchemaItem` objects, rather than resolving
        to an attribute error.


    .. change::
        :tags: bug, orm
        :tickets: 4890

        A warning is emitted for a condition in which the :class:`.Session` may
        implicitly swap an object out of the identity map for another one with the
        same primary key, detaching the old one, which can be an observed result of
        load operations which occur within the :meth:`.SessionEvents.after_flush`
        hook.  The warning is intended to notify the user that some special
        condition has caused this to happen and that the previous object may not be
        in the expected state.

    .. change::
        :tags: bug, sql
        :tickets: 4837

        Characters that interfere with "pyformat" or "named" formats in bound
        parameters, namely ``%, (, )`` and the space character, as well as a few
        other typically undesirable characters, are stripped early for a
        :func:`.bindparam` that is using an anonymized name, which is typically
        generated automatically from a named column which itself includes these
        characters in its name and does not use a ``.key``, so that they do not
        interfere either with the SQLAlchemy compiler's use of string formatting or
        with the driver-level parsing of the parameter, both of which could be
        demonstrated before the fix.  The change only applies to anonymized
        parameter names that are generated and consumed internally, not end-user
        defined names, so the change should have no impact on any existing code.
        Applies in particular to the psycopg2 driver which does not otherwise quote
        special parameter names, but also strips leading underscores to suit Oracle
        (but not yet leading numbers, as some anon parameters are currently
        entirely numeric/underscore based); Oracle in any case continues to quote
        parameter names that include special characters.

.. changelog::
    :version: 1.3.8
    :released: August 27, 2019

    .. change::
        :tags: bug, orm
        :tickets: 4823

        Fixed bug where :class:`_orm.Load` objects were not pickleable due to
        mapper/relationship state in the internal context dictionary.  These
        objects are now converted to picklable using similar techniques as that of
        other elements within the loader option system that have long been
        serializable.

    .. change::
        :tags: bug, postgresql
        :tickets: 4623

        Revised the approach for the just added support for the psycopg2
        "execute_values()" feature added in 1.3.7 for :ticket:`4623`.  The approach
        relied upon a regular expression that would fail to match for a more
        complex INSERT statement such as one which had subqueries involved.   The
        new approach matches exactly the string that was rendered as the VALUES
        clause.

    .. change::
        :tags: usecase, orm
        :tickets: 4285

        Added support for the use of an :class:`.Enum` datatype using Python
        pep-435 enumeration objects as values for use as a primary key column
        mapped by the ORM.  As these values are not inherently sortable, as
        required by the ORM for primary keys, a new
        :attr:`.TypeEngine.sort_key_function` attribute is added to the typing
        system which allows any SQL type to  implement a sorting for Python objects
        of its type which is consulted by the unit of work.   The :class:`.Enum`
        type then defines this using the  database value of a given enumeration.
        The sorting scheme can be  also be redefined by passing a callable to the
        :paramref:`.Enum.sort_key_function` parameter.  Pull request courtesy
        Nicolas Caniart.

    .. change::
        :tags: bug, engine
        :tickets: 4807

        Fixed an issue whereby if the dialect "initialize" process which occurs on
        first connect would encounter an unexpected exception, the initialize
        process would fail to complete and then no longer attempt on subsequent
        connection attempts, leaving the dialect in an un-initialized, or partially
        initialized state, within the scope of parameters that need to be
        established based on inspection of a live connection.   The "invoke once"
        logic in the event system has been reworked to accommodate for this
        occurrence using new, private API features that establish an "exec once"
        hook that will continue to allow the initializer to fire off on subsequent
        connections, until it completes without raising an exception. This does not
        impact the behavior of the existing ``once=True`` flag within the event
        system.

    .. change::
        :tags: bug, sqlite, reflection
        :tickets: 4810

        Fixed bug where a FOREIGN KEY that was set up to refer to the parent table
        by table name only without the column names would not correctly be
        reflected as far as setting up the "referred columns", since SQLite's
        PRAGMA does not report on these columns if they weren't given explicitly.
        For some reason this was hardcoded to assume the name of the local column,
        which might work for some cases but is not correct. The new approach
        reflects the primary key of the referred table and uses the constraint
        columns list as the referred columns list, if the remote column(s) aren't
        present in the reflected pragma directly.


    .. change::
        :tags: bug, postgresql
        :tickets: 4822

        Fixed bug where Postgresql operators such as
        :meth:`.postgresql.ARRAY.Comparator.contains` and
        :meth:`.postgresql.ARRAY.Comparator.contained_by` would fail to function
        correctly for non-integer values when used against a
        :class:`_postgresql.array` object, due to an erroneous assert statement.

    .. change::
        :tags: feature, engine
        :tickets: 4815

        Added new parameter :paramref:`_sa.create_engine.hide_parameters` which when
        set to True will cause SQL parameters to no longer be logged, nor rendered
        in the string representation of a :class:`.StatementError` object.


    .. change::
        :tags: usecase, postgresql
        :tickets: 4824

        Added support for reflection of CHECK constraints that include the special
        PostgreSQL qualifier "NOT VALID", which can be present for CHECK
        constraints that were added to an existing table with the directive that
        they not be applied to existing data in the table. The PostgreSQL
        dictionary for CHECK constraints as returned by
        :meth:`_reflection.Inspector.get_check_constraints` may include an additional entry
        ``dialect_options`` which within will contain an entry ``"not_valid":
        True`` if this symbol is detected.   Pull request courtesy Bill Finn.

.. changelog::
    :version: 1.3.7
    :released: August 14, 2019

    .. change::
        :tags: bug, sql
        :tickets: 4778

        Fixed issue where :class:`.Index` object which contained a mixture of
        functional expressions which were not resolvable to a particular column,
        in combination with string-based column names, would fail to initialize
        its internal state correctly leading to failures during DDL compilation.

    .. change::
        :tags: bug, sqlite
        :tickets: 4798

        The dialects that support json are supposed to take arguments
        ``json_serializer`` and ``json_deserializer`` at the create_engine() level,
        however the SQLite dialect calls them ``_json_serializer`` and
        ``_json_deserilalizer``.  The names have been corrected, the old names are
        accepted with a change warning, and these parameters are now documented as
        :paramref:`_sa.create_engine.json_serializer` and
        :paramref:`_sa.create_engine.json_deserializer`.


    .. change::
        :tags: bug, mysql
        :tickets: 4804

        The MySQL dialects will emit "SET NAMES" at the start of a connection when
        charset is given to the MySQL driver, to appease an apparent behavior
        observed in MySQL 8.0 that raises a collation error when a UNION includes
        string columns unioned against columns of the form CAST(NULL AS CHAR(..)),
        which is what SQLAlchemy's polymorphic_union function does.   The issue
        seems to have affected PyMySQL for at least a year, however has recently
        appeared as of mysqlclient 1.4.4 based on changes in how this DBAPI creates
        a connection.  As the presence of this directive impacts three separate
        MySQL charset settings which each have intricate effects based on their
        presense,  SQLAlchemy will now emit the directive on new connections to
        ensure correct behavior.

    .. change::
        :tags: usecase, postgresql
        :tickets: 4623

        Added new dialect flag for the psycopg2 dialect, ``executemany_mode`` which
        supersedes the previous experimental ``use_batch_mode`` flag.
        ``executemany_mode`` supports both the "execute batch" and "execute values"
        functions provided by psycopg2, the latter which is used for compiled
        :func:`_expression.insert` constructs.   Pull request courtesy Yuval Dinari.

        .. seealso::

            :ref:`psycopg2_executemany_mode`




    .. change::
        :tags: bug, sql
        :tickets: 4787

        Fixed bug where :meth:`.TypeEngine.column_expression` method would not be
        applied to subsequent SELECT statements inside of a UNION or other
        :class:`_selectable.CompoundSelect`, even though the SELECT statements are rendered at
        the topmost level of the statement.   New logic now differentiates between
        rendering the column expression, which is needed for all SELECTs in the
        list, vs. gathering the returned data type for the result row, which is
        needed only for the first SELECT.

    .. change::
        :tags: bug, sqlite
        :tickets: 4793

        Fixed bug where usage of "PRAGMA table_info" in SQLite dialect meant that
        reflection features to detect for table existence, list of table columns,
        and list of foreign keys, would default to any table in any attached
        database, when no schema name was given and the table did not exist in the
        base schema.  The fix explicitly runs PRAGMA for the 'main' schema and then
        the 'temp' schema if the 'main' returned no rows, to maintain the behavior
        of tables + temp tables in the "no schema" namespace, attached tables only
        in the "schema" namespace.


    .. change::
        :tags: bug, sql
        :tickets: 4780

        Fixed issue where internal cloning of SELECT constructs could lead to a key
        error if the copy of the SELECT changed its state such that its list of
        columns changed.  This was observed to be occurring in some ORM scenarios
        which may be unique to 1.3 and above, so is partially a regression fix.



    .. change::
        :tags: bug, orm
        :tickets: 4777

        Fixed regression caused by new selectinload for many-to-one logic where
        a primaryjoin condition not based on real foreign keys would cause
        KeyError if a related object did not exist for a given key value on the
        parent object.

    .. change::
        :tags: usecase, mysql
        :tickets: 4783

        Added reserved words ARRAY and MEMBER to the MySQL reserved words list, as
        MySQL 8.0 has now made these reserved.


    .. change::
        :tags: bug, events
        :tickets: 4794

        Fixed issue in event system where using the ``once=True`` flag with
        dynamically generated listener functions would cause event registration of
        future events to fail if those listener functions were garbage collected
        after they were used, due to an assumption that a listened function is
        strongly referenced.  The "once" wrapped is now modified to strongly
        reference the inner function persistently, and documentation is updated
        that using "once" does not imply automatic de-registration of listener
        functions.

    .. change::
        :tags: bug, mysql
        :tickets: 4751

        Added another fix for an upstream MySQL 8 issue where a case sensitive
        table name is reported incorrectly in foreign key constraint reflection,
        this is an extension of the fix first added for :ticket:`4344` which
        affects a case sensitive column name.  The new issue occurs through MySQL
        8.0.17, so the general logic of the 88718 fix remains in place.

        .. seealso::

            https://bugs.mysql.com/bug.php?id=96365 - upstream bug


    .. change::
        :tags: usecase, mssql
        :tickets: 4782

        Added new :func:`_mssql.try_cast` construct for SQL Server which emits
        "TRY_CAST" syntax.  Pull request courtesy Leonel Atencio.

    .. change::
        :tags: bug, orm
        :tickets: 4803

        Fixed bug where using :meth:`_query.Query.first` or a slice expression in
        conjunction with a query that has an expression based "offset" applied
        would raise TypeError, due to an "or" conditional against "offset" that did
        not expect it to be a SQL expression as opposed to an integer or None.


.. changelog::
    :version: 1.3.6
    :released: July 21, 2019

    .. change::
        :tags: bug, engine
        :tickets: 4754

        Fixed bug where using reflection function such as :meth:`_schema.MetaData.reflect`
        with an :class:`_engine.Engine` object that had execution options applied to it
        would fail, as the resulting :class:`.OptionEngine` proxy object failed to
        include a ``.engine`` attribute used within the reflection routines.

    .. change::
        :tags: bug, mysql
        :tickets: 4743

        Fixed bug where the special logic to render "NULL" for the
        :class:`_types.TIMESTAMP` datatype when ``nullable=True`` would not work if the
        column's datatype were a :class:`.TypeDecorator` or a :class:`.Variant`.
        The logic now ensures that it unwraps down to the original
        :class:`_types.TIMESTAMP` so that this special case NULL keyword is correctly
        rendered when requested.

    .. change::
        :tags: performance, orm
        :tickets: 4775

        The optimization applied to selectin loading in :ticket:`4340` where a JOIN
        is not needed to eagerly load related items is now applied to many-to-one
        relationships as well, so that only the related table is queried for a
        simple join condition.   In this case, the related items are queried
        based on the value of a foreign key column on the parent; if these columns
        are deferred or otherwise not loaded on any of the parent objects in
        the collection, the loader falls back to the JOIN method.


    .. change::
        :tags: bug, orm
        :tickets: 4773

        Fixed regression caused by :ticket:`4365` where a join from an entity to
        itself without using aliases no longer raises an informative error message,
        instead failing on an assertion.  The informative error condition has been
        restored.


    .. change::
        :tags: orm, feature
        :tickets: 4736

        Added new loader option method :meth:`_orm.Load.options` which allows loader
        options to be constructed hierarchically, so that many sub-options can be
        applied to a particular path without needing to call :func:`.defaultload`
        many times.  Thanks to Alessio Bogon for the idea.


    .. change::
        :tags: usecase, postgresql
        :tickets: 4771

        Added support for reflection of indexes on PostgreSQL partitioned tables,
        which was added to PostgreSQL as of version 11.

    .. change::
       :tags: bug, mysql
       :tickets: 4624

       Enhanced MySQL/MariaDB version string parsing to accommodate for exotic
       MariaDB version strings where the "MariaDB" word is embedded among other
       alphanumeric characters such as "MariaDBV1".   This detection is critical in
       order to correctly accommodate for API features that have split between MySQL
       and MariaDB such as the "transaction_isolation" system variable.


    .. change::
        :tags: bug, mssql
        :tickets: 4745

        Ensured that the queries used to reflect indexes and view definitions will
        explicitly CAST string parameters into NVARCHAR, as many SQL Server drivers
        frequently treat string values, particularly those with non-ascii
        characters or larger string values, as TEXT which often don't compare
        correctly against VARCHAR characters in SQL Server's information schema
        tables for some reason.    These CAST operations already take place for
        reflection queries against SQL Server ``information_schema.`` tables but
        were missing from three additional queries that are against ``sys.``
        tables.

    .. change::
        :tags: bug, orm
        :tickets: 4713

        Fixed an issue where the :meth:`.orm._ORMJoin.join` method, which is a
        not-internally-used ORM-level method that exposes what is normally an
        internal process of :meth:`_query.Query.join`, did not propagate the ``full`` and
        ``outerjoin`` keyword arguments correctly.  Pull request courtesy Denis
        Kataev.

    .. change::
        :tags: bug, sql
        :tickets: 4758

        Adjusted the initialization for :class:`.Enum` to minimize how often it
        invokes the ``.__members__`` attribute of a given PEP-435 enumeration
        object, to suit the case where this attribute is expensive to invoke, as is
        the case for some popular third party enumeration libraries.


    .. change::
        :tags: bug, orm
        :tickets: 4772

        Fixed bug where a many-to-one relationship that specified ``uselist=True``
        would fail to update correctly during a primary key change where a related
        column needs to change.


    .. change::
        :tags: bug, orm
        :tickets: 4772

        Fixed bug where the detection for many-to-one or one-to-one use with a
        "dynamic" relationship, which is an invalid configuration, would fail to
        raise if the relationship were configured with ``uselist=True``.  The
        current fix is that it warns, instead of raises, as this would otherwise be
        backwards incompatible, however in a future release it will be a raise.


    .. change::
        :tags: bug, orm
        :tickets: 4767

        Fixed bug where a synonym created against a mapped attribute that does not
        exist yet, as is the case when it refers to backref before mappers are
        configured, would raise recursion errors when trying to test for attributes
        on it which ultimately don't exist (as occurs when the classes are run
        through Sphinx autodoc), as the unconfigured state of the synonym would put
        it into an attribute not found loop.


    .. change::
        :tags: usecase, postgresql
        :tickets: 4756

        Added support for multidimensional Postgresql array literals via nesting
        the :class:`_postgresql.array` object within another one.  The
        multidimensional array type is detected automatically.

        .. seealso::

            :class:`_postgresql.array`

    .. change::
        :tags: bug, sql, postgresql
        :tickets: 4760

        Fixed issue where the :class:`_functions.array_agg` construct in combination with
        :meth:`.FunctionElement.filter` would not produce the correct operator
        precedence in combination with the array index operator.


    .. change::
        :tags: bug, sql
        :tickets: 4747

        Fixed an unlikely issue where the "corresponding column" routine for unions
        and other :class:`_selectable.CompoundSelect` objects could return the wrong column in
        some overlapping column situations, thus potentially impacting some ORM
        operations when set operations are in use, if the underlying
        :func:`_expression.select` constructs were used previously in other similar kinds of
        routines, due to a cached value not being cleared.

    .. change::
        :tags: usecase, sqlite
        :tickets: 4766

        Added support for composite (tuple) IN operators with SQLite, by rendering
        the VALUES keyword for this backend.  As other backends such as DB2 are
        known to use the same syntax, the syntax is enabled in the base compiler
        using a dialect-level flag ``tuple_in_values``.   The change also includes
        support for "empty IN tuple" expressions for SQLite when using "in_()"
        between a tuple value and an empty set.


.. changelog::
    :version: 1.3.5
    :released: June 17, 2019

    .. change::
        :tags: bug, mysql
        :tickets: 4715

        Fixed bug where MySQL ON DUPLICATE KEY UPDATE would not accommodate setting
        a column to the value NULL.  Pull request courtesy Lukáš Banič.

    .. change::
        :tags: bug, orm
        :tickets: 4723

        Fixed a series of related bugs regarding joined table inheritance more than
        two levels deep, in conjunction with modification to primary key values,
        where those primary key columns are also linked together in a foreign key
        relationship as is typical for joined table inheritance.  The intermediary
        table in a  three-level inheritance hierarchy will now get its UPDATE if
        only the primary key value has changed and passive_updates=False (e.g.
        foreign key constraints not being enforced), whereas before it would be
        skipped; similarly, with passive_updates=True (e.g. ON UPDATE  CASCADE in
        effect), the third-level table will not receive an UPDATE statement as was
        the case earlier which would fail since CASCADE already modified it.   In a
        related issue, a relationship linked to a three-level inheritance hierarchy
        on the primary key of an intermediary table of a joined-inheritance
        hierarchy will also correctly have its foreign key column updated when the
        parent object's primary key is modified, even if that parent object is a
        subclass of the linked parent class, whereas before these classes would
        not be counted.

    .. change::
        :tags: bug, orm
        :tickets: 4729

        Fixed bug where the :attr:`_orm.Mapper.all_orm_descriptors` accessor would
        return an entry for the :class:`_orm.Mapper` itself under the declarative
        ``__mapper___`` key, when this is not a descriptor.  The ``.is_attribute``
        flag that's present on all :class:`.InspectionAttr` objects is now
        consulted, which has also been modified to be ``True`` for an association
        proxy, as it was erroneously set to False for this object.

    .. change::
        :tags: bug, orm
        :tickets: 4704

        Fixed regression in :meth:`_query.Query.join` where the ``aliased=True`` flag
        would not properly apply clause adaptation to filter criteria, if a
        previous join were made to the same entity.  This is because the adapters
        were placed in the wrong order.   The order has been reversed so that the
        adapter for the most recent ``aliased=True`` call takes precedence as was
        the case in 1.2 and earlier.  This broke the "elementtree" examples among
        other things.

    .. change::
        :tags: bug, orm, py3k
        :tickets: 4674

        Replaced the Python compatibility routines for ``getfullargspec()`` with a
        fully vendored version from Python 3.3.  Originally, Python was emitting
        deprecation warnings for this function in Python 3.8 alphas.  While this
        change was reverted, it was observed that Python 3 implementations for
        ``getfullargspec()`` are an order of magnitude slower as of the 3.4 series
        where it was rewritten against ``Signature``.  While Python plans to
        improve upon this situation, SQLAlchemy projects for now are using a simple
        replacement to avoid any future issues.

    .. change::
        :tags: bug, orm
        :tickets: 4694

        Reworked the attribute mechanics used by :class:`.AliasedClass` to no
        longer rely upon calling ``__getattribute__`` on the MRO of the wrapped
        class, and to instead resolve the attribute normally on the wrapped class
        using getattr(), and then unwrap/adapt that.  This allows a greater range
        of attribute styles on the mapped class including special ``__getattr__()``
        schemes; but it also makes the code simpler and more resilient in general.

    .. change::
        :tags: usecase, postgresql
        :tickets: 4717

        Added support for column sorting flags when reflecting indexes for
        PostgreSQL, including ASC, DESC, NULLSFIRST, NULLSLAST.  Also adds this
        facility to the reflection system in general which can be applied to other
        dialects in future releases.  Pull request courtesy Eli Collins.

    .. change::
        :tags: bug, postgresql
        :tickets: 4701

        Fixed bug where PostgreSQL dialect could not correctly reflect an ENUM
        datatype that has no members, returning a list with ``None`` for the
        ``get_enums()`` call and raising a TypeError when reflecting a column which
        has such a datatype.   The inspection now returns an empty list.

    .. change::
        :tags: bug, sql
        :tickets: 4730

        Fixed a series of quoting issues which all stemmed from the concept of the
        :func:`_expression.literal_column` construct, which when being "proxied" through a
        subquery to be referred towards by a label that matches its text, the label
        would not have quoting rules applied to it, even if the string in the
        :class:`.Label` were set up as a :class:`.quoted_name` construct.  Not
        applying quoting to the text of the :class:`.Label` is a bug because this
        text is strictly a SQL identifier name and not a SQL expression, and the
        string should not have quotes embedded into it already unlike the
        :func:`_expression.literal_column` which it may be applied towards.   The existing
        behavior of a non-labeled :func:`_expression.literal_column` being propagated as is on
        the outside of a subquery is maintained in order to help with manual
        quoting schemes, although it's not clear if valid SQL can be generated for
        such a construct in any case.

.. changelog::
    :version: 1.3.4
    :released: May 27, 2019

    .. change::
        :tags: feature, mssql
        :tickets: 4657

        Added support for SQL Server filtered indexes, via the ``mssql_where``
        parameter which works similarly to that of the ``postgresql_where`` index
        function in the PostgreSQL dialect.

        .. seealso::

            :ref:`mssql_index_where`

    .. change::
       :tags: bug, misc
       :tickets: 4625

       Removed errant "sqla_nose.py" symbol from MANIFEST.in which created an
       undesirable warning message.

    .. change::
        :tags: bug, sql
        :tickets: 4653

        Fixed that the :class:`.GenericFunction` class was inadvertently
        registering itself as one of the named functions.  Pull request courtesy
        Adrien Berchet.

    .. change::
       :tags: bug, engine, postgresql
       :tickets: 4663

       Moved the "rollback" which occurs during dialect initialization so that it
       occurs after additional dialect-specific initialize steps, in particular
       those of the psycopg2 dialect which would inadvertently leave transactional
       state on the first new connection, which could interfere with some
       psycopg2-specific APIs which require that no transaction is started.  Pull
       request courtesy Matthew Wilkes.


    .. change::
        :tags: bug, orm
        :tickets: 4695

        Fixed issue where the :paramref:`.AttributeEvents.active_history` flag
        would not be set for an event listener that propagated to a subclass via the
        :paramref:`.AttributeEvents.propagate` flag.   This bug has been present
        for the full span of the :class:`.AttributeEvents` system.


    .. change::
        :tags: bug, orm
        :tickets: 4690

        Fixed regression where new association proxy system was still not proxying
        hybrid attributes when they made use of the ``@hybrid_property.expression``
        decorator to return an alternate SQL expression, or when the hybrid
        returned an arbitrary :class:`.PropComparator`, at the expression level.
        This involved further generalization of the heuristics used to detect the
        type of object being proxied at the level of :class:`.QueryableAttribute`,
        to better detect if the descriptor ultimately serves mapped classes or
        column expressions.

    .. change::
        :tags: bug, orm
        :tickets: 4686

        Applied the mapper "configure mutex" against the declarative class mapping
        process, to guard against the race which can occur if mappers are used
        while dynamic module import schemes are still in the process of configuring
        mappers for related classes.  This does not guard against all possible race
        conditions, such as if the concurrent import has not yet encountered the
        dependent classes as of yet, however it guards against as much as possible
        within the SQLAlchemy declarative process.

    .. change::
        :tags: bug, mssql
        :tickets: 4680

        Added error code 20047 to "is_disconnect" for pymssql.  Pull request
        courtesy Jon Schuff.


    .. change::
       :tags: bug, postgresql, orm
       :tickets: 4661

       Fixed an issue where the "number of rows matched" warning would emit even if
       the dialect reported "supports_sane_multi_rowcount=False", as is the case
       for psycogp2 with ``use_batch_mode=True`` and others.


    .. change::
        :tags: bug, sql
        :tickets: 4618

        Fixed issue where double negation of a boolean column wouldn't reset
        the "NOT" operator.

    .. change::
        :tags: mysql, bug
        :tickets: 4650

        Added support for DROP CHECK constraint which is required by MySQL 8.0.16
        to drop a CHECK constraint; MariaDB supports plain DROP CONSTRAINT.  The
        logic distinguishes between the two syntaxes by checking the server version
        string for MariaDB presence.    Alembic migrations has already worked
        around this issue by implementing its own DROP for MySQL / MariaDB CHECK
        constraints, however this change implements it straight in Core so that its
        available for general use.   Pull request courtesy Hannes Hansen.

    .. change::
       :tags: bug, orm
       :tickets: 4647

       A warning is now emitted for the case where a transient object is being
       merged into the session with :meth:`.Session.merge` when that object is
       already transient in the :class:`.Session`.   This warns for the case where
       the object would normally be double-inserted.


    .. change::
        :tags: bug, orm
        :tickets: 4676

        Fixed regression in new relationship m2o comparison logic first introduced
        at :ref:`change_4359` when comparing to an attribute that is persisted as
        NULL and is in an un-fetched state in the mapped instance.  Since the
        attribute has no explicit default, it needs to default to NULL when
        accessed in a persistent setting.


    .. change::
        :tags: bug, sql
        :tickets: 4569

        The :class:`.GenericFunction` namespace is being migrated so that function
        names are looked up in a case-insensitive manner, as SQL  functions do not
        collide on case sensitive differences nor is this something which would
        occur with user-defined functions or stored procedures.   Lookups for
        functions declared with :class:`.GenericFunction` now use a case
        insensitive scheme,  however a deprecation case is supported which allows
        two or more :class:`.GenericFunction` objects with the same name of
        different cases to exist, which will cause case sensitive lookups to occur
        for that particular name, while emitting a warning at function registration
        time.  Thanks to Adrien Berchet for a lot of work on this complicated
        feature.


.. changelog::
    :version: 1.3.3
    :released: April 15, 2019

    .. change::
        :tags: bug, postgresql
        :tickets: 4601

        Fixed regression from release 1.3.2 caused by :ticket:`4562` where a URL
        that contained only a query string and no hostname, such as for the
        purposes of specifying a service file with connection information, would no
        longer be propagated to psycopg2 properly.   The change in :ticket:`4562`
        has been adjusted to further suit psycopg2's exact requirements, which is
        that if there are any connection parameters whatsoever, the "dsn" parameter
        is no longer required, so in this case the query string parameters are
        passed alone.

    .. change::
       :tags: bug, pool
       :tickets: 4585

       Fixed behavioral regression as a result of deprecating the "use_threadlocal"
       flag for :class:`_pool.Pool`, where the :class:`.SingletonThreadPool` no longer
       makes use of this option which causes the "rollback on return" logic to take
       place when the same :class:`_engine.Engine` is used multiple times in the context
       of a transaction to connect or implicitly execute, thereby cancelling the
       transaction.   While this is not the recommended way to work with engines
       and connections, it is nonetheless a confusing behavioral change as when
       using :class:`.SingletonThreadPool`, the transaction should stay open
       regardless of what else is done with the same engine in the same thread.
       The ``use_threadlocal`` flag remains deprecated however the
       :class:`.SingletonThreadPool` now implements its own version of the same
       logic.


    .. change::
       :tags: bug, orm
       :tickets: 4584

       Fixed 1.3 regression in new "ambiguous FROMs" query logic introduced in
       :ref:`change_4365` where a :class:`_query.Query` that explicitly places an entity
       in the FROM clause with :meth:`_query.Query.select_from` and also joins to it
       using :meth:`_query.Query.join` would later cause an "ambiguous FROM" error if
       that entity were used in additional joins, as the entity appears twice in
       the "from" list of the :class:`_query.Query`.  The fix resolves this ambiguity by
       folding the standalone entity into the join that it's already a part of in
       the same way that ultimately happens when the SELECT statement is rendered.

    .. change::
        :tags: bug, ext
        :tickets: 4603

        Fixed bug where using ``copy.copy()`` or ``copy.deepcopy()`` on
        :class:`.MutableList` would cause the items within the list to be
        duplicated, due to an inconsistency in how Python pickle and copy both make
        use of ``__getstate__()`` and ``__setstate__()`` regarding lists.  In order
        to resolve, a ``__reduce_ex__`` method had to be added to
        :class:`.MutableList`.  In order to maintain backwards compatibility with
        existing pickles based on ``__getstate__()``, the ``__setstate__()`` method
        remains as well; the test suite asserts that pickles made against the old
        version of the class can still be deserialized by the pickle module.

    .. change::
       :tags: bug, orm
       :tickets: 4606

       Adjusted the :meth:`_query.Query.filter_by` method to not call :func:`.and()`
       internally against multiple criteria, instead passing it off to
       :meth:`_query.Query.filter` as a series of criteria, instead of a single criteria.
       This allows :meth:`_query.Query.filter_by` to defer to :meth:`_query.Query.filter`'s
       treatment of variable numbers of clauses, including the case where the list
       is empty.  In this case, the :class:`_query.Query` object will not have a
       ``.whereclause``, which allows subsequent "no whereclause" methods like
       :meth:`_query.Query.select_from` to behave consistently.

    .. change::
       :tags: bug, mssql
       :tickets: 4587

       Fixed issue in SQL Server dialect where if a bound parameter were present in
       an ORDER BY expression that would ultimately not be rendered in the SQL
       Server version of the statement, the parameters would still be part of the
       execution parameters, leading to DBAPI-level errors.  Pull request courtesy
       Matt Lewellyn.

.. changelog::
    :version: 1.3.2
    :released: April 2, 2019

    .. change::
       :tags: bug, documentation, sql
       :tickets: 4580

       Thanks to :ref:`change_3981`, we no longer need to rely on recipes that
       subclass dialect-specific types directly, :class:`.TypeDecorator` can now
       handle all cases.   Additionally, the above change made it slightly less
       likely that a direct subclass of a base SQLAlchemy type would work as
       expected, which could be misleading.  Documentation has been updated to use
       :class:`.TypeDecorator` for these examples including the PostgreSQL
       "ArrayOfEnum" example datatype and direct support for the "subclass a type
       directly" has been removed.

    .. change::
       :tags: bug, postgresql
       :tickets: 4550

       Modified the :paramref:`.Select.with_for_update.of` parameter so that if a
       join or other composed selectable is passed, the individual :class:`_schema.Table`
       objects will be filtered from it, allowing one to pass a join() object to
       the parameter, as occurs normally when using joined table inheritance with
       the ORM.  Pull request courtesy Raymond Lu.


    .. change::
        :tags: feature, postgresql
        :tickets: 4562

        Added support for parameter-less connection URLs for the psycopg2 dialect,
        meaning, the URL can be passed to :func:`_sa.create_engine` as
        ``"postgresql+psycopg2://"`` with no additional arguments to indicate an
        empty DSN passed to libpq, which indicates to connect to "localhost" with
        no username, password, or database given. Pull request courtesy Julian
        Mehnle.

    .. change::
       :tags: bug, orm, ext
       :tickets: 4574, 4573

       Restored instance-level support for plain Python descriptors, e.g.
       ``@property`` objects, in conjunction with association proxies, in that if
       the proxied object is not within ORM scope at all, it gets classified as
       "ambiguous" but is proxed directly.  For class level access, a basic class
       level``__get__()`` now returns the
       :class:`.AmbiguousAssociationProxyInstance` directly, rather than raising
       its exception, which is the closest approximation to the previous behavior
       that returned the :class:`.AssociationProxy` itself that's possible.  Also
       improved the stringification of these objects to be more descriptive of
       current state.

    .. change::
       :tags: bug, orm
       :tickets: 4537

       Fixed bug where use of :func:`.with_polymorphic` or other aliased construct
       would not properly adapt when the aliased target were used as the
       :meth:`_expression.Select.correlate_except` target of a subquery used inside of a
       :func:`.column_property`. This required a fix to the clause adaption
       mechanics to properly handle a selectable that shows up in the "correlate
       except" list, in a similar manner as which occurs for selectables that show
       up in the "correlate" list.  This is ultimately a fairly fundamental bug
       that has lasted for a long time but it is hard to come across it.


    .. change::
       :tags: bug, orm
       :tickets: 4566

       Fixed regression where a new error message that was supposed to raise when
       attempting to link a relationship option to an AliasedClass without using
       :meth:`.PropComparator.of_type` would instead raise an ``AttributeError``.
       Note that in 1.3, it is no longer valid to create an option path from a
       plain mapper relationship to an :class:`.AliasedClass` without using
       :meth:`.PropComparator.of_type`.

.. changelog::
    :version: 1.3.1
    :released: March 9, 2019

    .. change::
       :tags: bug, mssql
       :tickets: 4525

       Fixed regression in SQL Server reflection due to :ticket:`4393` where the
       removal of open-ended ``**kw`` from the :class:`.Float` datatype caused
       reflection of this type to fail due to a "scale" argument being passed.

    .. change::
       :tags: bug, orm, ext
       :tickets: 4522

       Fixed regression where an association proxy linked to a synonym would no
       longer work, both at instance level and at class level.

.. changelog::
    :version: 1.3.0
    :released: March 4, 2019

    .. change::
       :tags: feature, schema
       :tickets: 4517

       Added new parameters :paramref:`_schema.Table.resolve_fks` and
       :paramref:`.MetaData.reflect.resolve_fks` which when set to False will
       disable the automatic reflection of related tables encountered in
       :class:`_schema.ForeignKey` objects, which can both reduce SQL overhead for omitted
       tables as well as avoid tables that can't be reflected for database-specific
       reasons.  Two :class:`_schema.Table` objects present in the same :class:`_schema.MetaData`
       collection can still refer to each other even if the reflection of the two
       tables occurred separately.


    .. change::
       :tags: feature, orm
       :tickets: 4316

       The :meth:`_query.Query.get` method can now accept a dictionary of attribute keys
       and values as a means of indicating the primary key value to load; is
       particularly useful for composite primary keys.  Pull request courtesy
       Sanjana S.

    .. change::
       :tags: feature, orm
       :tickets: 3133

       A SQL expression can now be assigned to a primary key attribute for an ORM
       flush in the same manner as ordinary attributes as described in
       :ref:`flush_embedded_sql_expressions` where the expression will be evaulated
       and then returned to the ORM using RETURNING, or in the case of pysqlite,
       works using the cursor.lastrowid attribute.Requires either a database that
       supports RETURNING (e.g. Postgresql, Oracle, SQL Server) or pysqlite.

    .. change::
       :tags: bug, sql
       :tickets: 4509

       The :class:`_expression.Alias` class and related subclasses :class:`_expression.CTE`,
       :class:`_expression.Lateral` and :class:`_expression.TableSample` have been reworked so that it is
       not possible for a user to construct the objects directly.  These constructs
       require that the standalone construction function or selectable-bound method
       be used to instantiate new objects.


    .. change::
       :tags: feature, engine
       :tickets: 4500

       Revised the formatting for :class:`.StatementError` when stringified. Each
       error detail is broken up over multiple newlines instead of spaced out on a
       single line.  Additionally, the SQL representation now stringifies the SQL
       statement rather than using ``repr()``, so that newlines are rendered as is.
       Pull request courtesy Nate Clark.

       .. seealso::

            :ref:`change_4500`

.. changelog::
    :version: 1.3.0b3
    :released: March 4, 2019
    :released: February 8, 2019

    .. change::
       :tags: bug, ext
       :tickets: 2642

       Implemented a more comprehensive assignment operation (e.g. "bulk replace")
       when using association proxy with sets or dictionaries.  Fixes the problem
       of redundant proxy objects being created to replace the old ones, which
       leads to excessive events and SQL and in the case of unique constraints
       will cause the flush to fail.

       .. seealso::

          :ref:`change_2642`

    .. change::
        :tags: bug, postgresql
        :tickets: 4473

        Fixed issue where using an uppercase name for an index type (e.g. GIST,
        BTREE, etc. ) or an EXCLUDE constraint would treat it as an identifier to
        be quoted, rather than rendering it as is. The new behavior converts these
        types to lowercase and ensures they contain only valid SQL characters.

    .. change::
       :tags: bug, orm
       :tickets: 4469

       Improved the behavior of :func:`_orm.with_polymorphic` in conjunction with
       loader options, in particular wildcard operations as well as
       :func:`_orm.load_only`.  The polymorphic object will be more accurately
       targeted so that column-level options on the entity will correctly take
       effect.The issue is a continuation of the same kinds of things fixed in
       :ticket:`4468`.


    .. change::
       :tags: bug, sql
       :tickets: 4481

       Fully removed the behavior of strings passed directly as components of a
       :func:`_expression.select` or :class:`_query.Query` object being coerced to :func:`_expression.text`
       constructs automatically; the warning that has been emitted is now an
       ArgumentError or in the case of order_by() / group_by() a CompileError.
       This has emitted a warning since version 1.0 however its presence continues
       to create concerns for the potential of mis-use of this behavior.

       Note that public CVEs have been posted for order_by() / group_by() which
       are resolved by this commit:  CVE-2019-7164  CVE-2019-7548


       .. seealso::

        :ref:`change_4481`

    .. change::
       :tags: bug, sql
       :tickets: 4467

       Quoting is applied to :class:`.Function` names, those which are usually but
       not necessarily generated from the :attr:`_expression.func` construct,  at compile
       time if they contain illegal characters, such as spaces or punctuation. The
       names are as before treated as case insensitive however, meaning if the
       names contain uppercase or mixed case characters, that alone does not
       trigger quoting. The case insensitivity is currently maintained for
       backwards compatibility.


    .. change::
       :tags: bug, sql
       :tickets: 4481

       Added "SQL phrase validation" to key DDL phrases that are accepted as plain
       strings, including :paramref:`_schema.ForeignKeyConstraint.on_delete`,
       :paramref:`_schema.ForeignKeyConstraint.on_update`,
       :paramref:`.ExcludeConstraint.using`,
       :paramref:`_schema.ForeignKeyConstraint.initially`, for areas where a series of SQL
       keywords only are expected.Any non-space characters that suggest the phrase
       would need to be quoted will raise a :class:`.CompileError`.   This change
       is related to the series of changes committed as part of :ticket:`4481`.

    .. change::
       :tags: bug, orm, declarative
       :tickets: 4470

       Added some helper exceptions that invoke when a mapping based on
       :class:`.AbstractConcreteBase`, :class:`.DeferredReflection`, or
       :class:`.AutoMap` is used before the mapping is ready to be used, which
       contain descriptive information on the class, rather than falling through
       into other failure modes that are less informative.


    .. change::
       :tags: change, tests
       :tickets: 4460

       The test system has removed support for Nose, which is unmaintained for
       several years and is producing warnings under Python 3. The test suite is
       currently standardized on Pytest.  Pull request courtesy Parth Shandilya.

.. changelog::
    :version: 1.3.0b2
    :released: March 4, 2019
    :released: January 25, 2019

    .. change::
       :tags: bug, ext
       :tickets: 4401

       Fixed a regression in 1.3.0b1 caused by :ticket:`3423` where association
       proxy objects that access an attribute that's only present on a polymorphic
       subclass would raise an ``AttributeError`` even though the actual instance
       being accessed was an instance of that subclass.

    .. change::
        :tags: bug, orm
        :tickets: 1103

        Fixed long-standing issue where duplicate collection members would cause a
        backref to delete the association between the member and its parent object
        when one of the duplicates were removed, as occurs as a side effect of
        swapping two objects in one statement.

        .. seealso::

            :ref:`change_1103`

    .. change::
       :tags: bug, mssql
       :tickets: 4442

       The ``literal_processor`` for the :class:`.Unicode` and
       :class:`.UnicodeText` datatypes now render an ``N`` character in front of
       the literal string expression as required by SQL Server for Unicode string
       values rendered in SQL expressions.

    .. change::
       :tags: feature, orm
       :tickets: 4423

       Implemented a new feature whereby the :class:`.AliasedClass` construct can
       now be used as the target of a :func:`_orm.relationship`.  This allows the
       concept of "non primary mappers" to no longer be necessary, as the
       :class:`.AliasedClass` is much easier to configure and automatically inherits
       all the relationships of the mapped class, as well as preserves the
       ability for loader options to work normally.

       .. seealso::

            :ref:`change_4423`

    .. change::
       :tags: bug, orm
       :tickets: 4373

       Extended the fix first made as part of :ticket:`3287`, where a loader option
       made against a subclass using a wildcard would extend itself to include
       application of the wildcard to attributes on the super classes as well, to a
       "bound" loader option as well, e.g. in an expression like
       ``Load(SomeSubClass).load_only('foo')``.  Columns that are part of the
       parent class of ``SomeSubClass`` will also be excluded in the same way as if
       the unbound option ``load_only('foo')`` were used.

    .. change::
       :tags: bug, orm
       :tickets: 4433

       Improved error messages emitted by the ORM in the area of loader option
       traversal.  This includes early detection of mis-matched loader strategies
       along with a clearer explanation why these strategies don't match.


    .. change::
       :tags: change, orm
       :tickets: 4412

       Added a new function :func:`.close_all_sessions` which takes
       over the task of the :meth:`.Session.close_all` method, which
       is now deprecated as this is confusing as a classmethod.
       Pull request courtesy Augustin Trancart.

    .. change::
       :tags: feature, orm
       :tickets: 4397

       Added new :meth:`.MapperEvents.before_mapper_configured` event.   This
       event complements the other "configure" stage mapper events with a per
       mapper event that receives each :class:`_orm.Mapper` right before its
       configure step, and additionally may be used to prevent or delay the
       configuration of specific :class:`_orm.Mapper` objects using a new
       return value :attr:`.orm.interfaces.EXT_SKIP`.  See the
       documentation link for an example.

       .. seealso::

          :meth:`.MapperEvents.before_mapper_configured`



    .. change::
       :tags: bug, orm

       The "remove" event for collections is now called before the item is removed
       in the case of the ``collection.remove()`` method, as is consistent with the
       behavior for most other forms of collection item removal (such as
       ``__delitem__``, replacement under ``__setitem__``).  For ``pop()`` methods,
       the remove event still fires after the operation.

    .. change::
        :tags: bug, orm declarative
        :tickets: 4372

       Added a ``__clause_element__()`` method to :class:`.ColumnProperty` which
       can allow the usage of a not-fully-declared column or deferred attribute in
       a declarative mapped class slightly more friendly when it's used in a
       constraint or other column-oriented scenario within the class declaration,
       though this still can't work in open-ended expressions; prefer to call the
       :attr:`.ColumnProperty.expression` attribute if receiving ``TypeError``.

    .. change::
       :tags: bug, orm, engine
       :tickets: 4464

       Added accessors for execution options to Core and ORM, via
       :meth:`_query.Query.get_execution_options`,
       :meth:`_engine.Connection.get_execution_options`,
       :meth:`_engine.Engine.get_execution_options`, and
       :meth:`.Executable.get_execution_options`.  PR courtesy Daniel Lister.

    .. change::
       :tags: bug, orm
       :tickets: 4446

       Fixed issue in association proxy due to :ticket:`3423` which caused the use
       of custom :class:`.PropComparator` objects with hybrid attributes, such as
       the one demonstrated in  the ``dictlike-polymorphic`` example to not
       function within an association proxy.  The strictness that was added in
       :ticket:`3423` has been relaxed, and additional logic to accommodate for
       an association proxy that links to a custom hybrid have been added.

    .. change::
       :tags: change, general
       :tickets: 4393

       A large change throughout the library has ensured that all objects,
       parameters, and behaviors which have been noted as deprecated or legacy now
       emit ``DeprecationWarning`` warnings when invoked.As the Python 3
       interpreter now defaults to displaying deprecation warnings, as well as that
       modern test suites based on tools like tox and pytest tend to display
       deprecation warnings, this change should make it easier to note what API
       features are obsolete. A major rationale for this change is so that long-
       deprecated features that nonetheless still see continue to see real world
       use can  finally be removed in the near future; the biggest example of this
       are the :class:`.SessionExtension` and :class:`.MapperExtension` classes as
       well as a handful of other pre-event extension hooks, which have been
       deprecated since version 0.7 but still remain in the library.  Another is
       that several major longstanding behaviors are to be deprecated as well,
       including the threadlocal engine strategy, the convert_unicode flag, and non
       primary mappers.

       .. seealso::

          :ref:`change_4393_general`


    .. change::
       :tags: change, engine
       :tickets: 4393

       The "threadlocal" engine strategy which has been a legacy feature of
       SQLAlchemy since around version 0.2 is now deprecated, along with the
       :paramref:`_pool.Pool.threadlocal` parameter of :class:`_pool.Pool` which has no
       effect in most modern use cases.

       .. seealso::

          :ref:`change_4393_threadlocal`

    .. change::
       :tags: change, sql
       :tickets: 4393

       The :paramref:`_sa.create_engine.convert_unicode` and
       :paramref:`.String.convert_unicode` parameters have been deprecated.  These
       parameters were built back when most Python DBAPIs had little to no support
       for Python Unicode objects, and SQLAlchemy needed to take on the very
       complex task of marshalling data and SQL strings between Unicode and
       bytestrings throughout the system in a performant way.  Thanks to Python 3,
       DBAPIs were compelled to adapt to Unicode-aware APIs and today all DBAPIs
       supported by SQLAlchemy support Unicode natively, including on Python 2,
       allowing this long-lived and very complicated feature to finally be (mostly)
       removed.  There are still of course a few Python 2 edge cases where
       SQLAlchemy has to deal with Unicode however these are handled automatically;
       in modern use, there should be no need for end-user interaction with these
       flags.

       .. seealso::

          :ref:`change_4393_convertunicode`

    .. change::
       :tags: bug, orm
       :tickets: 3777

       Implemented the ``.get_history()`` method, which also implies availability
       of :attr:`.AttributeState.history`, for :func:`.synonym` attributes.
       Previously, trying to access attribute history via a synonym would raise an
       ``AttributeError``.

    .. change::
       :tags: feature, engine
       :tickets: 3689

       Added public accessor :meth:`.QueuePool.timeout` that returns the configured
       timeout for a :class:`.QueuePool` object.  Pull request courtesy Irina Delamare.

    .. change::
       :tags: feature, sql
       :tickets: 4386

       Amended the :class:`.AnsiFunction` class, the base of common SQL
       functions like ``CURRENT_TIMESTAMP``, to accept positional arguments
       like a regular ad-hoc function.  This to suit the case that many of
       these functions on specific backends accept arguments such as
       "fractional seconds" precision and such.  If the function is created
       with arguments, it renders the parenthesis and the arguments.  If
       no arguments are present, the compiler generates the non-parenthesized form.

.. changelog::
    :version: 1.3.0b1
    :released: March 4, 2019
    :released: November 16, 2018

    .. change::
       :tags: bug, ext
       :tickets: 3423

       Reworked :class:`.AssociationProxy` to store state that's specific to a
       parent class in a separate object, so that a single
       :class:`.AssociationProxy` can serve for multiple parent classes, as is
       intrinsic to inheritance, without any ambiguity in the state returned by it.
       A new method :meth:`.AssociationProxy.for_class` is added to allow
       inspection of class-specific state.

       .. seealso::

            :ref:`change_3423`


    .. change::
       :tags: bug, oracle
       :tickets: 4369

       Updated the parameters that can be sent to the cx_Oracle DBAPI to both allow
       for all current parameters as well as for future parameters not added yet.
       In addition, removed unused parameters that were deprecated in version 1.2,
       and additionally we are now defaulting "threaded" to False.

       .. seealso::

          :ref:`change_4369`

    .. change::
        :tags: bug, oracle
        :tickets: 4242

        The Oracle dialect will no longer use the NCHAR/NCLOB datatypes
        represent generic unicode strings or clob fields in conjunction with
        :class:`.Unicode` and :class:`.UnicodeText` unless the flag
        ``use_nchar_for_unicode=True`` is passed to :func:`_sa.create_engine` -
        this includes CREATE TABLE behavior as well as ``setinputsizes()`` for
        bound parameters.   On the read side, automatic Unicode conversion under
        Python 2 has been added to CHAR/VARCHAR/CLOB result rows, to match the
        behavior of cx_Oracle under Python 3.  In order to mitigate the performance
        hit under Python 2, SQLAlchemy's very performant (when C extensions
        are built) native Unicode handlers are used under Python 2.

        .. seealso::

            :ref:`change_4242`

    .. change::
        :tags: bug, orm
        :tickets: 3844

        Fixed issue regarding passive_deletes="all", where the foreign key
        attribute of an object is maintained with its value even after the object
        is removed from its parent collection.  Previously, the unit of work would
        set this to NULL even though passive_deletes indicated it should not be
        modified.

        .. seealso::

            :ref:`change_3844`

    .. change::
        :tags: bug, ext
        :tickets: 4268

        The long-standing behavior of the association proxy collection maintaining
        only a weak reference to the parent object is reverted; the proxy will now
        maintain a strong reference to the parent for as long as the proxy
        collection itself is also in memory, eliminating the "stale association
        proxy" error. This change is being made on an experimental basis to see if
        any use cases arise where it causes side effects.

        .. seealso::

            :ref:`change_4268`


    .. change::
        :tags: bug, sql
        :tickets: 4302

        Added "like" based operators as "comparison" operators, including
        :meth:`.ColumnOperators.startswith` :meth:`.ColumnOperators.endswith`
        :meth:`.ColumnOperators.ilike` :meth:`.ColumnOperators.notilike` among many
        others, so that all of these operators can be the basis for an ORM
        "primaryjoin" condition.


    .. change::
        :tags: feature, sqlite
        :tickets: 3850

        Added support for SQLite's json functionality via the new
        SQLite implementation for :class:`_types.JSON`, :class:`_sqlite.JSON`.
        The name used for the type is ``JSON``, following an example found at
        SQLite's own documentation. Pull request courtesy Ilja Everilä.

        .. seealso::

            :ref:`change_3850`

    .. change::
       :tags: feature, engine

       Added new "lifo" mode to :class:`.QueuePool`, typically enabled by setting
       the flag :paramref:`_sa.create_engine.pool_use_lifo` to True.   "lifo" mode
       means the same connection just checked in will be the first to be checked
       out again, allowing excess connections to be cleaned up from the server
       side during periods of the pool being only partially utilized.  Pull request
       courtesy Taem Park.

       .. seealso::

          :ref:`change_pr467`

    .. change::
       :tags: bug, orm
       :tickets: 4359

       Improved the behavior of a relationship-bound many-to-one object expression
       such that the retrieval of column values on the related object are now
       resilient against the object being detached from its parent
       :class:`.Session`, even if the attribute has been expired.  New features
       within the :class:`.InstanceState` are used to memoize the last known value
       of a particular column attribute before its expired, so that the expression
       can still evaluate when the object is detached and expired at the same
       time.  Error conditions are also improved using modern attribute state
       features to produce more specific messages as needed.

       .. seealso::

            :ref:`change_4359`

    .. change::
        :tags: feature, mysql
        :tickets: 4219

        Support added for the "WITH PARSER" syntax of CREATE FULLTEXT INDEX
        in MySQL, using the ``mysql_with_parser`` keyword argument.  Reflection
        is also supported, which accommodates MySQL's special comment format
        for reporting on this option as well.  Additionally, the "FULLTEXT" and
        "SPATIAL" index prefixes are now reflected back into the ``mysql_prefix``
        index option.



    .. change::
        :tags: bug, orm, mysql, postgresql
        :tickets: 4246

        The ORM now doubles the "FOR UPDATE" clause within the subquery that
        renders in conjunction with joined eager loading in some cases, as it has
        been observed that MySQL does not lock the rows from a subquery.   This
        means the query renders with two FOR UPDATE clauses; note that on some
        backends such as Oracle, FOR UPDATE clauses on subqueries are silently
        ignored since they are unnecessary.  Additionally, in the case of the "OF"
        clause used primarily with PostgreSQL, the FOR UPDATE is rendered only on
        the inner subquery when this is used so that the selectable can be targeted
        to the table within the SELECT statement.

        .. seealso::

            :ref:`change_4246`

    .. change::
        :tags: feature, mssql
        :tickets: 4158

        Added ``fast_executemany=True`` parameter to the SQL Server pyodbc dialect,
        which enables use of pyodbc's new performance feature of the same name
        when using Microsoft ODBC drivers.

        .. seealso::

            :ref:`change_4158`

    .. change::
        :tags: bug, ext
        :tickets: 4308

        Fixed multiple issues regarding de-association of scalar objects with the
        association proxy.  ``del`` now works, and additionally a new flag
        :paramref:`.AssociationProxy.cascade_scalar_deletes` is added, which when
        set to True indicates that setting a scalar attribute to ``None`` or
        deleting via ``del`` will also set the source association to ``None``.

        .. seealso::

            :ref:`change_4308`


    .. change::
        :tags: feature, ext
        :tickets: 4318

        Added new feature :meth:`.BakedQuery.to_query`, which allows for a
        clean way of using one :class:`.BakedQuery` as a subquery inside of another
        :class:`.BakedQuery` without needing to refer explicitly to a
        :class:`.Session`.


    .. change::
       :tags: feature, sqlite
       :tickets: 4360

       Implemented the SQLite ``ON CONFLICT`` clause as understood at the DDL
       level, e.g. for primary key, unique, and CHECK constraints as well as
       specified on a :class:`_schema.Column` to satisfy inline primary key and NOT NULL.
       Pull request courtesy Denis Kataev.

       .. seealso::

          :ref:`change_4360`

    .. change::
       :tags: feature, postgresql
       :tickets: 4237

       Added rudimental support for reflection of PostgreSQL
       partitioned tables, e.g. that relkind='p' is added to reflection
       queries that return table information.

       .. seealso::

            :ref:`change_4237`

    .. change::
       :tags: feature, ext
       :tickets: 4351

       The :class:`.AssociationProxy` now has standard column comparison operations
       such as :meth:`.ColumnOperators.like` and
       :meth:`.ColumnOperators.startswith` available when the target attribute is a
       plain column - the EXISTS expression that joins to the target table is
       rendered as usual, but the column expression is then use within the WHERE
       criteria of the EXISTS.  Note that this alters the behavior of the
       ``.contains()`` method on the association proxy to make use of
       :meth:`.ColumnOperators.contains` when used on a column-based attribute.

       .. seealso::

          :ref:`change_4351`


    .. change::
        :tags: feature, orm

        Added new flag :paramref:`.Session.bulk_save_objects.preserve_order` to the
        :meth:`.Session.bulk_save_objects` method, which defaults to True. When set
        to False, the given mappings will be grouped into inserts and updates per
        each object type, to allow for greater opportunities to batch common
        operations together.  Pull request courtesy Alessandro Cucci.

    .. change::
        :tags: bug, orm
        :tickets: 4365

        Refactored :meth:`_query.Query.join` to further clarify the individual components
        of structuring the join. This refactor adds the ability for
        :meth:`_query.Query.join` to determine the most appropriate "left" side of the
        join when there is more than one element in the FROM list or the query is
        against multiple entities.  If more than one FROM/entity matches, an error
        is raised that asks for an ON clause to be specified to resolve the
        ambiguity.  In particular this targets the regression we saw in
        :ticket:`4363` but is also of general use.   The codepaths within
        :meth:`_query.Query.join` are now easier to follow and the error cases are
        decided more specifically at an earlier point in the operation.

        .. seealso::

            :ref:`change_4365`

    .. change::
        :tags: bug, sql
        :tickets: 3981

        Fixed issue with :meth:`.TypeEngine.bind_expression` and
        :meth:`.TypeEngine.column_expression` methods where these methods would not
        work if the target type were part of a :class:`.Variant`, or other target
        type of a :class:`.TypeDecorator`.  Additionally, the SQL compiler now
        calls upon the dialect-level implementation when it renders these methods
        so that dialects can now provide for SQL-level processing for built-in
        types.

        .. seealso::

            :ref:`change_3981`


    .. change::
        :tags: bug, orm
        :tickets: 4304

        Fixed long-standing issue in :class:`_query.Query` where a scalar subquery such
        as produced by :meth:`_query.Query.exists`, :meth:`_query.Query.as_scalar` and other
        derivations from :attr:`_query.Query.statement` would not correctly be adapted
        when used in a new :class:`_query.Query` that required entity adaptation, such as
        when the query were turned into a union, or a from_self(), etc. The change
        removes the "no adaptation" annotation from the :func:`_expression.select` object
        produced by the :attr:`_query.Query.statement` accessor.

    .. change::
        :tags: bug, orm, declarative
        :tickets: 4133

        Fixed bug where declarative would not update the state of the
        :class:`_orm.Mapper` as far as what attributes were present, when additional
        attributes were added or removed after the mapper attribute collections had
        already been called and memoized.  Additionally, a ``NotImplementedError``
        is now raised if a fully mapped attribute (e.g. column, relationship, etc.)
        is deleted from a class that is currently mapped, since the mapper will not
        function correctly if the attribute has been removed.

    .. change::
       :tags: bug, mssql
       :tickets: 4362

       Deprecated the use of :class:`.Sequence` with SQL Server in order to affect
       the "start" and "increment" of the IDENTITY value, in favor of new
       parameters ``mssql_identity_start`` and ``mssql_identity_increment`` which
       set these parameters directly.  :class:`.Sequence` will be used to generate
       real ``CREATE SEQUENCE`` DDL with SQL Server in a future release.

       .. seealso::

            :ref:`change_4362`


    .. change::
        :tags: feature, mysql

        Added support for the parameters in an ON DUPLICATE KEY UPDATE statement on
        MySQL to be ordered, since parameter order in a MySQL UPDATE clause is
        significant, in a similar manner as that described at
        :ref:`updates_order_parameters`.  Pull request courtesy Maxim Bublis.

        .. seealso::

            :ref:`change_mysql_ondupordering`

    .. change::
       :tags: feature, sql
       :tickets: 4144

       Added :class:`.Sequence` to the "string SQL" system that will render a
       meaningful string expression (``"<next sequence value: my_sequence>"``)
       when stringifying without a dialect a statement that includes a "sequence
       nextvalue" expression, rather than raising a compilation error.



    .. change::
        :tags: bug, orm
        :tickets: 4232

        An informative exception is re-raised when a primary key value is not
        sortable in Python during an ORM flush under Python 3, such as an ``Enum``
        that has no ``__lt__()`` method; normally Python 3 raises a ``TypeError``
        in this case.   The flush process sorts persistent objects by primary key
        in Python so the values must be sortable.


    .. change::
       :tags: orm, bug
       :tickets: 3604

       Removed the collection converter used by the :class:`.MappedCollection`
       class. This converter was used only to assert that the incoming dictionary
       keys matched that of their corresponding objects, and only during a bulk set
       operation.  The converter can interfere with a custom validator or
       :meth:`.AttributeEvents.bulk_replace` listener that wants to convert
       incoming values further.  The ``TypeError`` which would be raised by this
       converter when an incoming key didn't match the value is removed; incoming
       values during a bulk assignment will be keyed to their value-generated key,
       and not the key that's explicitly present in the dictionary.

       Overall, @converter is superseded by the
       :meth:`.AttributeEvents.bulk_replace` event handler added as part of
       :ticket:`3896`.

    .. change::
       :tags: feature, sql
       :tickets: 3989

       Added new naming convention tokens ``column_0N_name``, ``column_0_N_name``,
       etc., which will render the names / keys / labels for all columns referenced
       by a particular constraint in a sequence.  In order to accommodate for the
       length of such a naming convention, the SQL compiler's auto-truncation
       feature now applies itself to constraint names as well, which creates a
       shortened, deterministically generated name for the constraint that will
       apply to a target backend without going over the character limit of that
       backend.

       The change also repairs two other issues.  One is that the  ``column_0_key``
       token wasn't available even though this token was documented, the other was
       that the ``referred_column_0_name`` token would  inadvertently render the
       ``.key`` and not the ``.name`` of the column if these two values were
       different.

       .. seealso::

          :ref:`change_3989`


    .. change::
        :tags: feature, ext
        :tickets: 4196

        Added support for bulk :meth:`_query.Query.update` and :meth:`_query.Query.delete`
        to the :class:`.ShardedQuery` class within the horizontal sharding
        extension.  This also adds an additional expansion hook to the
        bulk update/delete methods :meth:`_query.Query._execute_crud`.

        .. seealso::

            :ref:`change_4196`

    .. change::
        :tags: feature, sql
        :tickets: 4271

        Added new logic to the "expanding IN" bound parameter feature whereby if
        the given list is empty, a special "empty set" expression that is specific
        to different backends is generated, thus allowing IN expressions to be
        fully dynamic including empty IN expressions.

        .. seealso::

            :ref:`change_4271`



    .. change::
        :tags: feature, mysql

        The "pre-ping" feature of the connection pool now uses
        the ``ping()`` method of the DBAPI connection in the case of
        mysqlclient, PyMySQL and mysql-connector-python.  Pull request
        courtesy Maxim Bublis.

        .. seealso::

            :ref:`change_mysql_ping`

    .. change::
        :tags: feature, orm
        :tickets: 4340

        The "selectin" loader strategy now omits the JOIN in the case of a simple
        one-to-many load, where it instead relies loads only from the related
        table, relying upon the foreign key columns of the related table in order
        to match up to primary keys in the parent table.   This optimization can be
        disabled by setting the :paramref:`_orm.relationship.omit_join` flag to False.
        Many thanks to Jayson Reis for the efforts on this.

        .. seealso::

            :ref:`change_4340`

    .. change::
       :tags: bug, orm
       :tickets: 4353

       Added new behavior to the lazy load that takes place when the "old" value of
       a many-to-one is retrieved, such that exceptions which would be raised due
       to either ``lazy="raise"`` or a detached session error are skipped.

       .. seealso::

        :ref:`change_4353`

    .. change::
        :tags: feature, sql

        The Python builtin ``dir()`` is now supported for a SQLAlchemy "properties"
        object, such as that of a Core columns collection (e.g. ``.c``),
        ``mapper.attrs``, etc.  Allows iPython autocompletion to work as well.
        Pull request courtesy Uwe Korn.

    .. change::
       :tags: feature, orm
       :tickets: 4257

       Added ``.info`` dictionary to the :class:`.InstanceState` class, the object
       that comes from calling :func:`_sa.inspect` on a mapped object.

       .. seealso::

            :ref:`change_4257`

    .. change::
        :tags: feature, sql
        :tickets: 3831

        Added new feature :meth:`.FunctionElement.as_comparison` which allows a SQL
        function to act as a binary comparison operation that can work within the
        ORM.

        .. seealso::

            :ref:`change_3831`

    .. change::
       :tags: bug, orm
       :tickets: 4354

       A long-standing oversight in the ORM, the ``__delete__`` method for a many-
       to-one relationship was non-functional, e.g. for an operation such as ``del
       a.b``.  This is now implemented and is equivalent to setting the attribute
       to ``None``.

       .. seealso::

            :ref:`change_4354`