Files @ b69785f5be6b
Branch filter:

Location: rattail-project/rattail/CHANGES.rst

b69785f5be6b 41.8 KiB text/prs.fallenstein.rst Show Annotation Show as Raw Download as Raw
Lance Edgar
Add initial importers for new/final importing framework

Er, hopefully final. This one gets test coverage at least, hopefully
that makes it official.
   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

CHANGELOG
=========

0.6.26 (2016-05-11)
-------------------

* Pseudo-release to work around PyPI bug?


0.6.25 (2016-05-11)
-------------------

* Remove unused 'ignore role changes' flag for data change recorder.

* Grow size of "change key" columns to 255 chars.

* Refactor "record changes" mechanism to allow custom behavior.


0.6.24 (2016-05-07)
-------------------

* Fix bug when importing new Employee record.


0.6.23 (2016-05-06)
-------------------

* Remove alembic import from ``db.util`` module.


0.6.22 (2016-05-05)
-------------------

* Refactor scheduled/worked shift models to share some logic.

* Make 'tests' a proper subpackage again; add some tests.


0.6.21 (2016-05-03)
-------------------

* Fix bug in ``format_phone_number()`` function.


0.6.20 (2016-05-03)
-------------------

* Fix line endings for email templates.

* Add ``--timeout`` arg support to ``datasync wait`` command.

* Refactor where phone number normalization logic lives.


0.6.19 (2016-05-02)
-------------------

* Add basic user feedback email template.

* Add ``.gitattributes`` file to enforce DOS line endings for mail templates.

* Rename original ``ImportSubcommand`` to ``OldImportSubcommand``.

* Add support for 'normalized_number' field in phone importer.


0.6.18 (2016-04-29)
-------------------

* Add empty ``Watcher.process_changes()`` method for datasync.


0.6.17 (2016-04-28)
-------------------

* Add ``RattailConfig.workdir()`` convenience method.

* Add ``time.get_sunday()`` convenience function.

* Add ``ScheduledShift`` model to schema.


0.6.16 (2016-04-26)
-------------------

* Tweak default behavior for importer-based datasync consumer.


0.6.15 (2016-04-26)
-------------------

* Tweak when we add new data instance to session, to avoid premature flushes.


0.6.14 (2016-04-25)
-------------------

* Add ``WorkedShift`` data model to schema, importer.

* Add bulk Rattail importer, plus various tweaks.


0.6.13 (2016-04-24)
-------------------

* Add ``add_mail_alias()`` fabric function.

* Add ``Watcher.setup()`` method for datasync.

* Add ``Consumer.setup()`` method for datasync.

* Skip data sync for "empty" host record, in importer-based consumers.

* Add ``config.parse_bool()`` function.

* Add ``model_mapper`` and ``model_table`` attributes to base importer class.

* Add base importer and handler for PostgreSQL "bulk copy" importing.

.* Add ``--start-date`` and ``--end-date`` args to importer command.

* Add ``RattailConfig.production()`` method.

* Add multi-batch change transaction support for datasync consumers.

* Provide method by which importers may prevent create/update/delete.

* Add ``data`` kwarg to ``Importer.cache_instance_data()`` method.

* Alter ``make_utc()`` function to allow returning zone-aware time.

* Add initial begin/rollback/commit abstraction to import handlers.

* Add ``invoke_importer()`` method to datasync import consumers.


0.6.12 (2016-04-12)
-------------------

* Fix bug where ``usedb`` flag wasn't being set from ``make_config()``.


0.6.11 (2016-04-06)
-------------------

* Fix bug in ProductCode importer when new records are created.


0.6.10 (2016-04-05)
-------------------

* Fix config bug for recording changes in rattail db.


0.6.9 (2016-04-05)
------------------

* Tweak import logging and warning email templates; add runtime etc.

* Tweak some logging when initial/basic changes are recorded.

* Improve the core importer class to better allow non-SQLAlchemy targets.

* Add new importer-based datasync consumer class.

* Make a copy of the ``RecordRenderer`` class for new importer framework.

* Add host session to main transaction, when importing from SQLAlchemy.

* Add mechanism to record changes only for sessions on certain engines.

* Add ``Importer.get_single_instance()`` for easier customization.


0.6.8 (2016-03-11)
------------------

* Fix ``cmp(GPC)`` behavior when ``other`` is None etc.


0.6.7 (2016-02-27)
------------------

* Add initial color-coded diffs to data import warning emails.

* Fix bug with importing of customer first/last name.

* Tweak ``unicode(Employee)`` output.


0.6.6 (2016-02-27)
------------------

* Add ``date_argument`` back to ``rattail.commands`` root.


0.6.5 (2016-02-27)
------------------

* Make ``commands`` subpackage, add ``rattail-dev`` command.

* Tweak logging wording when datasync threads die from error.


0.6.4
-----

* Make sure message recipients are unique.

* Tweak some wording on data import warnings email template.


0.6.3
-----

* Tweak logging, warning template for new data importers.


0.6.2
-----

* Make config object's underlying db session somewhat configurable.


0.6.1
-----

* Fix bug in Rattail->Rattail import handler.


0.6.0
-----

* Add new importing framework, yay!

* Fix support for 'full_name' field in employee data importer.

* Tweak some ORM mappings, to support cascading deletes.

* Add ``Message.has_recipient()`` method.


0.5.36
------

* Tweak how changes are sorted by class name, in Rattail datasync consumer.

* Add ``metadata`` kwarg to the topographical sortkey function maker.


0.5.35
------

* Change how we sort dependencies when processing datasync changes for rattail.

* Tweak how ``Person.display_name`` is handled during data import.


0.5.34
------

* Check for null password before attempting bcrypt authentication.

* Add recursion support to table dependency sorter function.


0.5.33
------

* Increase field size for ``Change.class_name``.


0.5.32
------

* Sort department associations by name, by default.

* Add ``EmployeeStore`` association model, with import.

* Record change on employee when store/dept association are deleted.


0.5.31
------

* Give vendor catalog rows a default description of empty string.

* Tweak how vendor catalog parsers interpret decimal values.

* Change how a vendor catalog batch gets its vendor (parser needn't declare one).

* Make upgrade of pip optional when doing ``mkvirtualenv()`` via fabric.


0.5.30
------

* Add temp hack to avoid ``Person.modified`` when doing a data dump.

* Only compare 'effective' fields when checking data diff during import.

* Add import normalizers for Department and Employee models.

* Add new ``EmployeeDepartment`` model, and importer.


0.5.29
------

* Bugfix; remove ``progress`` kwarg from (another) importing ``setup()`` method.


0.5.28
------

* Add ``Importer.normalizer_class`` default attribute.


0.5.27
------

* Add ``User.employee`` convenience attribute.

* Remove Python 2.6 from supported versions in trove classifiers.

* Don't use db when fetching timezone from config.

* Remove ``progress`` kwarg from db importing ``setup()`` methods.

* Change how 'ignored' models are handled for rattail datasync consumers.

* Add 'normalizer' concept to data importer.

* Add initial 'messages' support in schema/import.

* Add initial rattail->rattail data importer.


0.5.26
------

* Move "process warnings" logic for importers, to handler for simpler overriding.


0.5.25
------

* Add ``Person.middle_name`` and ``Person.modified``.

* Make datasync errors cause the parent thread to terminate.


0.5.24
------

* Add ``str(RattailError)`` logic.

* Tweak ``repr(Change)`` output, to add ``deleted`` flag.

* Make a more generic dependency sorting function, for datasync.

* Add ``Email.invalid`` flag.

* Record change for Person when email/phone is being deleted.

* Add ``MailingAddress`` to schema.

* Tweak cache API to allow caller to specify query, and prevent duplicate keys.

* Add support for importing ``CustomerPhoneNumber`` data.

* Tweak ORM relationship for ``CustomerPerson.customer``.

* Add ``teardown()`` method for cleanup after data importing.

* Add support for "preferred" pseudo-field when importing phone/email data.


0.5.23
------

* Add ``Category.products`` backref.


0.5.22
------

* Add ``uid`` param to ``bootstrap_rattail()`` fablib function.

* Add delete-orphan cascade for ``Person._customers`` relation.


0.5.21
------

* Don't warn when sending HTML-only email messages.

* Log debug instead of warning when duplicate cache key found.

* Return email/phone when adding to person.


0.5.20
------

* Add warning in ``db.cache.cache_model()`` when duplicate keys are found.

* Raise custom exception when no templates found for email.


0.5.19
------

* Add attachment support to ``mail.send_email()`` function.

* Add "wait for changes" support to datasync command.


0.5.18
------

* Replace ``rsync()`` function in fablib.

* Add ``Email.abstract`` attribute, and tweak fallback key.


0.5.17
------

* Overhaul email framework.


0.5.16
------

* Add support for 'primary' pseudo-field when importing product codes.


0.5.15
------

* Fix possible bug when importing cost preferences.

* Fix bug in importer, when there are no source data records.


0.5.14
------

* Add ``files.move_lpt()`` function, remove ``minimal_move()``.


0.5.13
------

* Fix the db 'dump' function to use unicode and utf-8 file encoding.

* Add ``files.minimal_move()`` function, for "moving" files to LPT ports.


0.5.12
------

* Install ndg-httpsclient also, when installing pip site-wide.

* Fix edge case bug when importing $0 product prices.


0.5.11
------

* Add ``download_db()`` fablib functions for mysql, postgresql.

* Add ``configure_virtualenvwrapper()`` to fablib, for adding per-user config.

* Add ``Deployer`` class to fablib, for ``deploy.sudoers()`` support.

* Always install/upgrade pip and friends when making a new virtualenv.

* Check for existence of MySQL database before dropping it, in fablib.

* Add "watcher consumes self" concept to datasync daemon.

* Add time zone coercion to logged timestamps, if configuring logging in general.


0.5.10
------

* Add ``default.enabled`` config logic for ``rattail.mail``.

* Add ``ErrorTestConsumer`` for testing datasync error handling.

* General overhaul of ``rattail.fablib`` subpackage, to support online docs.

  * Add Mako support to ``deploy()`` functions.

  * Add ``rsync()`` function.

  * Add ``bootstrap_rattail()`` function.

  * Add ``get_debian_version()`` function.

* Fix subtle bug if email template not found.

* Revamp the ``initdb`` command a bit.

* Add ``db_model`` property to ``Command`` class.

* Add docs to ``release`` task.


0.5.9
-----

* Add ability to disable emails on a per-type basis.

* Add basic exception logging to datasync daemon.

* Clean up some logging calls when recording instance changes.

* Improve ``repr(Change)`` output.

* Add some more custom units of measure (packets, doses).

* Tweak startup logic involving config and logging.


0.5.8
-----

* Grow ``DataSyncChange.payload_type`` column.


0.5.7
-----

* Add ``Change.uuid`` as new primary key for the table.

* Add 'datasync' daemon.

* Add ``clonedb`` command.

* Remove version restriction for SQLAlchemy-Utils.

* Improve the ``localtime()`` function a bit.

* Tweak 'settings' API functions so they don't require a session.


0.5.6
-----

* Fix manifest to include email templates.


0.5.5
-----

* Add temporary hack for sake of WinCE label batches.


0.5.4
-----

* Add config to old ``BatchExecutor`` constructor.

* Add ``--no-extend-config`` arg to command line system, for sake of tests.

* Add support for "fallback key" when sending mail with config.

* Add ``ImportHandler`` class, update ``ImportSubcommand`` to use it etc.


0.5.3
-----

* Configure logging when initializing Windows services.


0.5.2
-----

* Fix another dang bug in ``config.get_user_dir()``.


0.5.1
-----

* Fix bug in ``config.get_user_file()`` signature.


0.5.0
-----

The main reason for the version bump here, is the removal of the 'edbob'
dependency.  This has been a long-anticipated event.

* Fix cascade rules for user/role relationships.

* Add default ``repr()`` behavior to data model classes.

* Fix type bug in ``db.api.get_department()``.

* Add custom errors for when SA / Python for Windows Extensions not installed.

* Remove some unused/unwanted command line arguments.

* Move some config-related functions to ``rattail.db.config``.

* Overhaul config system, finally replacing edbob (yay!).

* Remove support for certain deprecated (edbob) config settings.

* Remove ``make-config`` command, and edbob dependency!

* Add ``config`` arg to ``labels.LabelFormatter`` constructor.

* Refactor guts of ``sil.consume_batch_id()`` function.

* Add optional ``progress`` arg to ``BatchHandler.execute()`` method.


0.4.30
------

* Add ``core.UNSPECIFIED`` convenience object.

* Fix data bug in ``user_x_role`` table.


0.4.29
------

* Add config for recycling IMAP connection in bouncer daemon.


0.4.28
------

* Add 2nd version of UNFI catalog parser.


0.4.27
------

* Ignore warnings about running on Python 2.6, we know it's an issue.


0.4.26
------

* Add version restriction for SQLAlchemy-Utils.


0.4.25
------

* Add initial support for email bounce schema, daemon etc.


0.4.24
------

* Add ``files.locking_copy_old()`` function...for now.


0.4.23
------

* Add ``get_store()`` API function.

* Add row to batch prior to cognizing the row.  (If cognize fails, remove row
  from batch.)


0.4.22
------

* Fix bug in KeHe invoice parser, if row has no UPC.


0.4.21
------

* Set default filename for file-based batches if it's safe to do so.

* Add ``MakeFileBatch`` generic filemon action.

* Add ``BatchHandler.executable()`` method, for sake of UI.

* In batch handlers, let ``cognize_row()`` return ``False`` to skip the row.

* Add ``date-organize`` command for help with archiving data files etc.


0.4.20
------

* Add support for configurable Reply-To address when sending email.

* Always upgrade pip (and install wheel) when "installing" pip.

* Add 'key' as 3rd positional / 1st keyword arg to ``cache_model()`` function.

* Give commands a proper ``RattailConfig`` object instance.

* Add ``RattailConfig.getint()`` method to allow a default value.

* Change behavior of ``files.locking_copy()`` function.


0.4.19
------

* Add basic support for email attachments.


0.4.18
------

* Don't normalize ``Employee.display_name`` to null, in importer.


0.4.17
------

* Don't change mode for 'app/log' folder in ``mkvirtualenv()``.

* Add config setting to globally disable sending of emails.

* Add ``User.get_email_address()`` and ``User.email_address``.

* Add ``mail.get_template()``; allow override of subject and recipients.

* Allow override of UID when creating system user via Fabric.

* Add ``grant_mysql_access()`` function for Fabric.

* Fix bug in ``create_mysql_user()`` Fabric function.

* Don't normalize customer name fields to ``None`` when importing.


0.4.16
------

* Add some SSH config stuff for Fabric.

* Add ``get_product_by_vendor_code()`` API function.

* Add ``PathNotFound`` exception, normalize to it within ``locking_copy_test()``.


0.4.15
------

* Add ``--max-updates`` arg to import commands.


0.4.14
------

* Don't normalize ``Product.size`` to null when importing.


0.4.13
------

* Fix constructors etc. for old-style batch providers.


0.4.12
------

* Normalize duplicate source records during data import.

* Make config a required arg to ``BatchProvider`` constructor.

* Tweak ``locking_copy_test()`` to assume destination is always a folder.


0.4.11
------

* Add ``Person.employee`` relationship and ``User.employee`` convenience
  property.

* Change how customer phone data is handled in importer.

* Add ``get_department()`` API function.

* Tweak filemon and dbsync init scripts to avoid issue of root-owned log file.

* Add ``files.locking_copy_test()`` function.


0.4.10
------

* Don't normalize simple instance fields unless they're involved in the import.

* Log warning when duplicate key is detected during import.


0.4.9
-----

* Add ``UnicodeDictWriter`` and ``csvutil`` API docs.

* Various changes to allow custom commands to sit in front of non-Rattail
  database.

* Tweak case quantity in Albert's invoice parser.

* Add ``--warnings`` flag to base import command.

* Fix phone number normalization for customer importer.

* Add ``DataProvider.int_()`` method for importers.

* Add supposed optimization for simple fields within importer.


0.4.8
-----

* Add unit of measure for cubic feet.


0.4.7
-----

* Stop normalizing some fields on data import.

* Catch import error when configuring db in command startup.


0.4.6
-----

* Add deposit links, taxes, product organic flag.

* Improve product and vendor schema some more.

* Revert to simple names and descriptions for model ``unicode()``.

* Add ``GPC.pretty()`` method.

* Add ``order_by`` kwarg to ``db.cache.cache_model()`` function.

* Add ``get_subdepartment()`` API function.

* Add duplicate UPC warning in ``ProductCost`` importer.

* Hopefully fix ``install_pip`` Fabric function.


0.4.5
-----

* Add ``status_text`` field to batch row tables.

* Add ``BatchHandler.make_batch()`` method.

* Add ``FileBatchHandler`` class.

* Add ``repr()`` for batch models.

* Add vendor catalog batch importer.

* Add vendor invoice batch importer.

* Add some docs for new batch system.

* Add initial ``RattailConfig`` class.

* Make sure ``unzip`` is installed when fabricating POD stuff.

* Fix some string formatting for Python 2.6.


0.4.4
-----

* Make ``Employee.person`` column unique.

* Try again to make database stuff an optional dependency...

* Increase size of ``ProductCost.code`` column.

* Add ``Product.case_pack`` column.

* Add ``encoding_errors`` kwarg to ``UnicodeWriter`` class constructor.


0.4.3
-----

* Fix Alembic ``env.py`` script to accommodate Continuum.

* Add ``Product.deleted`` column.


0.4.2
-----

* Fix password prompt on Windows for ``make-user`` command.


0.4.1
-----

* Rework how Continuum versioning is configured.


0.4.0
-----

This version primarily got the bump it did because of the addition of the data
import framework and support for SQLAlchemy-Continuum versioning.  There were
several other minor changes as well.

* Allow Fabric ``env`` to override POD download URL.

* Quote packages when installing via Fabric ``pip()`` function.

* Add ``time.make_utc()`` function.

* Add ``db.util.maxlen()`` function.

* Add ``set_regular_price()`` and ``set_current_sale_price()`` API functions.

* Add ``db.cache.cache_model()`` function.

* Add ``csvutil.UnicodeWriter`` class.

* Add ``db.importing`` subpackage.

* Add ``ImportSubcommand`` as base class for data import subcommands.

* Add ``import-csv`` command.

* Fix encoding issue when sending email with non-ASCII chars in message.

* Increase length of ``Vendor.name`` column.

* Add encoding support to ``files.count_lines()``.

* Add initial versioning support with SQLAlchemy-Continuum.


0.3.50
------

* Add Alembic files to the manifest.


0.3.49
------

* Make all constraint and index names explicit.

* Add core Alembic migration repository.


0.3.48
------

* Fix filemon fallback watcher to ignore things which aren't files.


0.3.47
------

* Pause execution within filemon action loops (fix CPU usage).

* Add fallback watcher feature for filemon on Windows.


0.3.46
------

* Add ``Product.pretty_upc`` and improve ``unicode(Product)``.

* Make ``Vendor.id`` unique; add ``get_vendor()`` API function.

* Change default batch purge date to 60 days out instead of 90.

* Make SIL writer use a temp path if caller doesn't provide one.

* Add ``Product.cost_for_vendor()`` method.

* New batch mixin system...

* Split ``db.model`` into subpackage.


0.3.45
------

* Quote PG username when setting password via Fabric.

* Allow override of progress text in ``sil.Writer.write_rows()``.

* Move bcrypt requirement into 'auth' extra feature.


0.3.44
------

* Fix some string literal bugs.


0.3.43
------

* Add ``shell=False`` arg to some Fabric calls for PostgreSQL.


0.3.42
------

* Add ``consume_batch_id()`` convenience method to ``sil.Writer`` class.

* Add mail alias option to ``make_system_user()`` Fabric function.

* Add virtualenvwrapper to profile script for root and current user.

* Make alembic a core requirement, for now...


0.3.41
------

* Add ``fablib`` subpackage.

* Add ``obfuscate_url_pw()`` to ``db.util`` module.

* Add ``temp_path()`` method to ``rattail.sil.Writer`` class.


0.3.40
------

* Allow overriding key used to determine mail template name.

* Add ``Store.database_key`` column.

* Move some function logic to ``db.util``.

* Add ``csvutil.UnicodeDictReader`` class.


0.3.39
------

* Let mail template paths be specified as relative to a Python package.


0.3.38
------

* Tweak ``BatchProvider`` constructor, to prepare for edbob removal.

* Email notification rewrite.

* Improve Unicode handling within some label printing logic.


0.3.37
------

* Add ``Product.not_for_sale`` flag.


0.3.36
------

* Add ``time`` module.


0.3.35
------

* Fix bug in SIL writer (make sure all writes use instance method).


0.3.34
------

* Add error handling when attempting user authentication with non-ASCII characters.

* Add timeout to ``locking_copy()``.


0.3.33
------

* Add ``User.active`` and disallow authentication for inactive users.


0.3.32
------

* Add ``ReportCode`` and ``Product.report_code`` to schema.

* Fix ``Product.family`` relationship.

* Add ``rattail.config`` module, currently with ``parse_list()`` function only.


0.3.31
------

* Fix unicode bug in filemon config parsing on Python 2.6.


0.3.30
------

* File Monitor overhaul!

   * New configuration syntax (old syntax still supported but deprecated).
   * Class-based actions.
   * Configure keyword arguments to action callables.
   * Configure retry for actions.
   * Add (some) tests, docs.


0.3.29
------

* Add support for older SQLAlchemy (0.6.3 specifically).


0.3.28
------

* Accept config section name within ``rattail.db.util.get_engines()`` and
  ``rattail.db.util.get_default_engine()``.

* Remove deprecated ``record_changes`` option in ``[rattail.db]`` config
  section.

* Remove deprecated ``rattail.db.init()`` function stub.


0.3.27
------

* Don't require bcrypt unless 'db' feature is requested.


0.3.26
------

* Add ``filemon.util.raise_exception`` for simple file monitor testing.

* Add tox support; fix several test oddities.

* Fix thread naming bug in Windows file monitor.


0.3.25
------

* Require process elevation for ``make-user`` command.

* Use 64-bit registry key when hiding user account on 64-bit Windows.

* Refactor to remove namespace structure.


0.3.24
------

* Stop using ``logging.get_logger()`` adapter wrapper, until we know how to do
  it right.


0.3.23
------

* Use ``find_packages()`` again, as the last build was broken.  (But still
  exclude tests.)


0.3.22
------

* Add some error checking when starting Linux daemons.

* Add ``'uid'`` and ``'username'`` to logger adapter context dict.

* Add initial POD integration module.

* Stop using ``find_packages()``; it was including tests.

* Add "lock" support to Windows file monitor.


0.3.21
------

* Add custom ``LoggerAdapter`` implementation; used by file monitor.
    
  Hopefully this does a better job and avoids some wheel reinvention.


0.3.20
------

* Better leverage config when initializing Win32 services.


0.3.19
------

* Define ``Command`` and ``Subcommand`` classes.
    
  These are (finally) no longer borrowed from ``edbob``, yay.

* Add SQLAlchemy to core dependencies.

* Database config/init overhaul.
    
  This contains some not-very-atomic changes:

  * Get rid of ``get_session_class()`` function and return to global
    ``Session`` class approach.
  * Primary database ``Session`` is now configured as part of command
    initialization, by default.
  * Make ``config`` object available to subcommands, and ``Daemon`` instances
    (the beginning of the end for ``edbob.config``!).
  * Add ``--stdout`` and ``--stderr`` arguments to primary ``Command``.  These
    are in turn made available to subcommands.
  * Overhauled some subcommand logic per new patterns.
  * Get rid of a few other random references to ``edbob``.
  * Added and improved several tests.
  * Added ability to run tests using arbitrary database engine.


0.3.18
------

* Populate ``rattail.db.model.__all__`` dynamically.

* Add ``util.load_entry_points()``.


0.3.17
------

* Add SQLAlchemy engine poolclass awareness to config file.


0.3.16
------

* Make ``get_sync_engines()`` require a config object.

* Add ``getset_factory()`` to ``rattail.db.core``.

* Dont auto-import ``core`` and ``changes`` from ``rattail.db``.

* Handle keyboard interrupt when running dbsync on Linux console.

* Make ``rattail.db.model`` the true home for all models.


0.3.15
------

* Removed global ``Session`` from ``rattail.db``.
    
  A Session class may now be had via ``get_session_class()``.

* Removed reliance on ``edbob.db.engines``.

* Added initial docs (barely, mostly for testing Buildbot).

* Updated tests to work on Python 2.6.

* Improved init scripts to create PID file parent directory as needed.

* Allow Windows file monitor installation with custom user account.


0.3.14
------

* Improve ``make-user`` command somewhat.
    
  Allow username etc. to be overridden; add sanity check if running on platform
  other than win32.


0.3.13
------

* Fix ``ChangeRecorder.is_deletable_orphan()`` for SQLAlchemy 0.7.
    
  Apparently ``Mapper.relationships`` is not available until SQLAlchemy 0.8 and
  later...


0.3.12
------

* Add ``deleted`` attribute to ``repr(Change)``.

* Add "deletable orphan" awareness when recording changes.
    
  Turns out there was a long-standing bug where orphans which were deleted from
  the host would be marked as "changed" (instead of deleted), causing the store
  databases to keep the orphan.


0.3.11
------

* Added ``mail.send_message()`` etc.


0.3.10
------

* Altered ``dump`` command to allow easy overriding of data model.


0.3.9
-----

* Add all of ``data`` folder to manifest.

* Replaced ``insserv`` calls with ``update-rc.d`` in Fabric script.

* Fixed bug in ``price_check_digit()``; added tests.

* Fixed bug in ``upce_to_upca()``; added tests.

* Added ``get_employee_by_id()`` convenience function.

* Refactored model imports, etc.
    
  This is in preparation for using database models only from ``rattail``
  (i.e. no ``edbob``).  Mostly the model and enum imports were affected.

* Added remaining values from ``edbob.enum`` to ``rattail.enum``.

* Added ``get_setting()`` and ``save_setting()`` to ``db.api``.


0.3.8
-----

* Overhauled db sync somewhat; made a little more customizable, added tests.


0.3.7
-----

* Fixed db sync to properly handle ``Family`` deletions.


0.3.6
-----

* Fixed bug in ``Product.full_description``.

* Added ``core.Object`` class.

* Made ``enum`` module available from root namespace upon initial import.

* Added ``util`` module, for ``OrderedDict`` convenience.

* Add ``Family`` and ``Product.family``.


0.3.5
-----

* Declare dependencies instead of relying on edbob.

* Added ``db.auth`` module.

* Added ``initdb`` command.

* Added the ``adduser`` command.

* Pretend ``commands.Subcommand`` is defined in ``rattail``.


0.3.4
-----

* Fixed ``Customer._people`` relationship cascading.


0.3.3
-----

* Fixed bugs with ``CustomerGroupAssignment``.
    
  Now orphaned records should no longer be allowed.

* Fixed ``CustomerPerson`` to require customer and person.

* Added ``--do-not-daemonize`` flag to ``dbsync`` command on Linux.

* Overhauled some database stuff; added tests.

* Added some ``CustomerEmailAddress`` tests, removed some unused tests.


0.3.2
-----

* Fixed bug in ``csvutil.DictWriter``; added tests.


0.3.1
-----

* Added ``Product.full_description`` convenience attribute.

* Added ``--do-not-daemonize`` arg to ``filemon`` command on Linux.

* Added ``dump`` command.


0.3a43
------

* Added unicode-aware CSV reader.


0.3a42
------

* Fixed dbsync bug when deleting a ``CustomerGroup``.
    
  Any customer associations which still existed were causing database integrity
  errors.


0.3a41
------

* Added ``get_product_by_code()`` API function.


0.3a40
------

* Added proper ``init.d`` support to Linux dbsync daemon.
    
   * Added ``--pidfile`` argument to ``dbsync`` command.
   * Added ``configure_dbsync`` Fabric command.

* Added ``files.overwriting_move()`` convenience function.

* Added ``--all`` argument to ``purge-batches`` command.

* Added ``ProductCode``, ``Product.codes`` to data model.

* Fixed ``db.cache`` module so as not to require initialization.


0.3a39
------

* Added ``make-user`` command for creating Windows system user account.

* Added avatar image, who knows when that will be useful.
    
  This was created in the hopes it could be used to programmatically set the
  Windows user "tile" image; but that proved unfruitful.

* Changed Linux file monitor to leverage local code instead of ``edbob``.

* Added ``Batch.rows`` property, deprecated ``Batch.iter_rows()``.

* Improved ``sil.Writer.write_rows()``.
    
  This method now allows explicitly specifying the row count, and accepts a
  progress factory.


0.3a38
------

* Changed home folder of system user account to ``/var/lib/rattail``.

* Slight overhaul of Linux file monitor.
    
  This includes the following:
    
  * "More native" Linux file monitor (i.e. less reliant on ``edbob``; current
    code is more or less copied from that project).
  * Addition of ``--pidfile`` command argument on Linux.

* Added (Linux) file monitor configuration to Fabric script.
    
  Also improved ``create_user`` to allow overwriting some settings.

* Fixed file monitor service registration on Windows with ``--auto-start``.

* Fixed "process elevation check" on Windows XP.

* Overhaul of Windows file monitor.
    
  This includes:

  * "More native" Windows file monitor (i.e. less reliant on ``edbob``; current
    code is more or less copied from that project).
  * Improve base class for services, to handle the case where the Windows event
    log is full and can't be written to.  (This prevented the file monitor from
    starting on a machine where the log was full.)


0.3a37
------

* Added ``temp_path()`` function in ``files`` module.


0.3a36
------

* Fixed lingering issues from ``Vendor.contacts`` mapping tweak.


0.3a35
------

* Updated ``repr()`` output for model classes.

* Improved ``find_diffs()`` function.

* Added ``db.model`` module.
    
* Tweaked some ORM mappings.


0.3a34
------

* [feature] Changed some logging instances from ``INFO`` to ``DEBUG``.

  I was just getting tired of the noise.

* [feature] Added ``create_user`` Fabric command.
    
  This creates the ``rattail`` user on a Linux environment.  Probably needs
  some improvement but it's a start.

* [bug] Fixed ``instances_differ()`` function for SQLAlchemy < 0.8.
    
  Presumably the use of ``Mapper.column_attrs`` was not a good idea anyway.
  I'm not quite sure what functionality it adds over ``.columns``.

  (fixes #9)


0.3a33
------

* [general] Tweaked Fabric script to remove egg info before building a
  release.

* [feature] Added ``mail`` module; delegates to ``edbob``.

* [feature] Added ``Session`` to ``db`` module; delegates to ``edbob``.

* [feature] Added ``db.diffs`` module.


0.3a32
------

- Made product cache include *all* costs if so requested.  (Silly oversight.)


0.3a31
------

- [bug] Made change recorder better able to handle new "sets" of related
  objects.  A situation occurred where multiple related objects were being
  introduced to the database within the same session.  Somehow a dependent
  object was being processed first, and its UUID value could not be determined
  since its "upstream" object did yet have one either.  This commit improves
  this situation so that the upstream object will be given an UUID value first,
  if it doesn't yet have one.  The dependent object will then reuse the
  upstream object's UUID as normal.


0.3a30
------

- [feature] Added ``console`` module.  For now this only delegates to
  ``edbob.console``.

- [feature] Added ``get_product_cache()`` function to ``db.cache`` module.
  This is probably the first of many such convenience functions.


0.3a29
------

- [feature] Made Palm conduit unregistration more graceful.  Now this will
  "succeed" even if the conduit isn't actually registered.
  fixes #7

- [feature] Improved Palm conduit (un)registration logic.  Now this can handle
  the case where Hotsync Manager is not installed on the local machine.  The
  code was refactored to make things cleaner also.
  fixes #8

- [feature] Added admin rights check for Palm conduit registration.  Now the
  registration process is checked for an "elevated token" and if none is found,
  a message is displayed and it exits without attempting the registration.
  fixes #3

- [feature] Added admin rights check for Windows file monitor registration.
  Now the registration process is checked for an "elevated token" and if none
  is found, a message is displayed and it exits without attempting the
  registration.
  fixes #5

- [feature] Added ``make-config`` command.  This may need some work yet, to
  better handle the namespace package situation.

- [feature] Added ``Employee.user`` association proxy attribute.

- [feature] Pretend all models and enumerations from ``edbob`` are part of
  ``rattail``.  Some day this will actually be the case.  Client code should be
  able to avoid the ``edbob`` namespace now so that porting will be easier.

- [bug] Fixed issue with recording changes when SQLAlchemy >= 0.8.0.
  Apparently ``RelationshipProperty.remote_side`` is now a ``set`` and doesn't
  support indexing.


0.3a28
------

- [feature] Added ``csvutil`` module.  Currently this only adds some better
  ``DictWriter`` support for Python versions older than 2.7.

- [feature] Added Palm OS app interface.  This adds the Palm HotSync conduit,
  which is used to create CSV files when a handheld running the Rattail app is
  synced with its desktop PC.

- [feature] Added ``files`` module.  This will eventually supercede
  ``edbob.files``, but for now this commit adds only three functions.  These
  just so happened to be ones needed to support some code involving inventory
  count batches.

- [feature] Added ``wince`` module.  This module is used to interface with the
  Rattail app for Windows CE handheld devices.

- [feature] Added new batch system, which will eventually replace the old one.
  Hopefully they can play nicely in parallel, in the meantime.

- [feature] Added `purge-batches` command.  This command will delete forever
  all batches whose purge date has passed.  It is meant to be run on a
  scheduled basis, e.g. nightly.

- [feature] Added "case" value to ``UNIT_OF_MEASURE`` enumeration.

0.3a27
------

- [feature] Added custom `Thread` implementation.  This overrides the default
  behavior of `threading.Thread` by ensuring the system exception hook is
  invoked in case an error occurs within the thread.

0.3a26
------

- [feature] Added `get_product_by_upc()` API function.  This is a convenience
  function which will return a single `Product` instance, or `None`.  It is the
  first of hopefully many API functions.

- [feature] Added SIL columns `F188`, `R71` and `R72`.  These have been added
  to support inventory count batches.

- [bugfix] Fixed `Batch.drop_table()` to handle case where row table doesn't
  exist.  While theoretically this method *shouldn't* encounter a missing
  table, in practice it does happen occasionally.  Now this situation is
  handled gracefully instead of raising an exception.

0.3a25
------

- [bug] Fixed ``Vendor.contacts`` relationship (added 'delete-orphan').

- [feature] Added ``Department.subdepartments`` relationship.

0.3a24
------

- [feature] Added ``__eq__()`` and ``__ne__()`` methods to ``GPC`` class.

- [general] Moved ``GPCType`` SQLAlchemy type class to ``rattail.db`` module.
  This was necessary to make the ``GPC`` class more generally available to
  callers who don't want or need SQLAlchemy to be installed.

- [general] Moved enumerations from database extension to "core" ``enum``
  module.  This is mostly for convenience to callers.

- [bug] Fixed a few bugs with label batches.  These existed mostly because this
  feature hasn't been used in production...

- [feature] Added ``default_format`` attribute to ``LabelFormatter`` class.
  Now when a label profile is edited, this default format is used if no format
  is provided by the user.

- [feature] Changed ``LabelProfile.get_formatter()`` method so that it assigns
  the formatter's ``format`` attribute using the value from the profile.  The
  formatter is free to use or ignore this value, at its discretion.

- [feature] Improved the database synchronizer so that it is *somewhat*
  tolerant of database server restarts.  This likely will need further
  improvement as more testing is done.  The current implementation wraps the
  entire sync loop in a ``try/catch`` block and when a disconnect is detected,
  will wait 5 seconds before re-entering the loop and trying again.

0.3a23
------

- [general] Fixed namespace packages, per ``setuptools`` documentation.

- [feature] Added connection timeout support to ``CommandNetworkPrinter``.

0.3a22
------

- [feature] Added ``LabelProfile.visible`` field.

- [feature] Added generic ``CommandNetworkPrinter`` label printer class.  This
  class sends textual commands directly to a networked printer.

0.3a21
------

- [feature] Refactored database synchronization logic into a proper class,
  which can be overridden based on configuration.

0.3a20
------

- [feature] Tweaked the SIL writer so that it doesn't quote row values when
  they're of data type ``float``.

- [bug] Fixed database sync to properly handle ``Vendor`` deletions.  Now any
  associated ``ProductCost`` records are also deleted, so no more foreign key
  violations.

0.3a19
------

- [bug] Fixed "price toggle" bug in database sync.  It was noticed that
  whenever a product's regular price did not change, yet the product instance
  itself *did* have a change, the regular price association was being removed
  in one sync, then reestablished in the next sync (then removed, etc.).  The
  sync operation now ensures the relationship is removed only when it really
  should be, and that it remains intact when that is appropriate.

0.3a18
------

- [bug] Added special delete logic to the database sync.  Currently, only the
  Department and Subdepartment classes are affected.  When deletions of these
  classes are to be synced between databases, some effort is made to ensure
  that associations with any dependent objects (e.g. Product) are removed
  before the primary instance (e.g. Department) is deleted.

0.3a17
------

- [bug] Added 'delete, delete-orphan' to cascade on ``Product.costs``
  relationship.  This was causing an error when syncing databases.

0.3a16
------

- [bug] Added 'delete, delete-orphan' to cascade on ``Product.prices``
  relationship.  This was causing an error when syncing databases.

0.3a15
------

- [bug] Fixed database sync logic to ensure ``Product`` changes are processed
  before ``ProductPrice`` changes.  Since the underlying tables are mutually
  dependent, the ``dependency_sort()`` call can't *quite* take care of it.  Now
  a lexical sort is applied to the class names before the dependency sort
  happens.  This is somewhat of a hack, merely taking advantage of the fact
  that "Product" comes before "ProductPrice" when lexically sorted.  If other
  mutually-dependent tables come about in the future, this approach may need to
  be revised if their class names don't jive.

0.3a14
------

- [bug] Fixed database synchonization logic to properly handle merging
  ``Product`` instances between database sessions.  Since ``Product`` is so
  interdependent on ``ProductPrice``, a pretty custom merge hack is required.

0.3a13
------

- [bugfix] Fixed ``rattail.db.record_changes()`` so that it also ignores
  ``UserRole`` instance changes if configuration dictates that ``Role`` changes
  are to be ignored.

0.3a12
------

- [bugfix] Fixed foreign key uuid handling in ``rattail.db.record_changes()``.
  Some tables are meant to be used solely as providers of "association proxy"
  fields, the ``uuid`` column is not only a primary key, but also a *foreign
  key* to the "primary" entity table.  In such cases, the uuid value was not
  present at session flush time, so a new one was being generated.
  Unfortunately this meant that the ``Change`` record would point to a
  nonexistent entity record, so the sync would not work.  Now uuid fields are
  inspected to determine if a foreign key is present, in which case the
  relationship is traversed and the true uuid value is used.

- [feature] Added "extra classes" configuration for the ``load-host-data``
  command.  This is necessary when initially populating a "store" (er,
  "non-host") database instance if custom schema extensions are in use (and
  need to be synchronized with the host).

0.3a11
------

- Add R49 SIL column.

- Add ``rattail.pricing`` module.

0.3a10
------

- Ignore batch data when recording changes.

0.3a9
-----

- Bump edbob dependency.

0.3a8
-----

- Tweak database sync.

- Tweak batch processing.

0.3a7
-----

- Add ``Vendor.special_discount``.

0.3a6
-----

- Bump edbob dependency.

0.3a5
-----

- Added ``Store`` and related models.

- Added ``Customer.email_preference`` field.

- Added ``load-host-data`` command.

- Added database changes/synchronization framework.

- Fixed batch table create/drop.

0.3a4r1
-------

- Added ``Product.cost``, ``Product.vendor``.

- Added basic one-up label printing support.

- Added initial batch support, with ``PrintLabels`` provider.

- Added GPC data type.

- Changed internal name of file monitor Windows service.

- Added progress support for label printing.

- Label profiles moved from config to database model.

- Removed ``rattail.db.init_database()`` function.

- Moved some enum values from db extension to core (``rattail.enum`` module).

- Improved SIL support: moved ``rattail.sil`` to subpackage, added ``Writer``
  class etc.

- Fixed file monitor in Linux.

- Added ``delete-orphan`` to ``Vendor.contacts`` relationship cascade.

0.3a4
-----

- Update file monitor per changes in ``edbob``.

0.3a3
-----

- Move database extension to subdir (``rattail.db.extension``).

- Make database extension require ``auth`` extension.

- Fix ``rattail.db.init()``.

- Add lots of classes to database extension model.

- Add ``rattail.labels`` module.

- Add ``rattail.db.cache`` module.

- Add SIL output functions.

- Remove some batch code (for now?).

0.3a2
-----

- Added Windows file monitor service.

0.3a1
-----

-  Refactored to rely on `edbob <http://edbob.org/>`_.  (Most of Rattail's
   "guts" now live there instead.)