Ubuntu Pastebin

Paste from chuck at Fri, 9 Jan 2015 14:24:22 +0000

Download as text
   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
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
diff -Nru python-oslo.i18n-1.1.0/ChangeLog python-oslo.i18n-1.3.0/ChangeLog
--- python-oslo.i18n-1.1.0/ChangeLog	2014-12-02 10:23:28.000000000 -0500
+++ python-oslo.i18n-1.3.0/ChangeLog	2015-01-08 14:46:33.000000000 -0500
@@ -1,6 +1,20 @@
 CHANGES
 =======
 
+1.3.0
+-----
+
+* Add a fixture to let tests manage the lazy flag
+* Fix the link to the bug tracker in the README
+
+1.2.0
+-----
+
+* Correct the translation domain for loading messages
+* Move out of the oslo namespace package
+* Workflow documentation is now in infra-manual
+* Force code sample to be treated as python
+
 1.1.0
 -----
 
diff -Nru python-oslo.i18n-1.1.0/CONTRIBUTING.rst python-oslo.i18n-1.3.0/CONTRIBUTING.rst
--- python-oslo.i18n-1.1.0/CONTRIBUTING.rst	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/CONTRIBUTING.rst	2015-01-08 14:46:13.000000000 -0500
@@ -1,14 +1,13 @@
 If you would like to contribute to the development of OpenStack,
-you must follow the steps in the "If you're a developer, start here"
-section of this page:
+you must follow the steps in this page:
 
-   http://wiki.openstack.org/HowToContribute
+   http://docs.openstack.org/infra/manual/developers.html
 
 Once those steps have been completed, changes to OpenStack
 should be submitted for review via the Gerrit tool, following
 the workflow documented at:
 
-   http://wiki.openstack.org/GerritWorkflow
+   http://docs.openstack.org/infra/manual/developers.html#development-workflow
 
 Pull requests submitted through GitHub will be ignored.
 
diff -Nru python-oslo.i18n-1.1.0/debian/changelog python-oslo.i18n-1.3.0/debian/changelog
--- python-oslo.i18n-1.1.0/debian/changelog	2014-12-08 09:02:39.000000000 -0500
+++ python-oslo.i18n-1.3.0/debian/changelog	2015-01-09 09:06:52.000000000 -0500
@@ -1,3 +1,10 @@
+python-oslo.i18n (1.3.0-0ubuntu1) vivid; urgency=medium
+
+  * New upstream release
+  * debian/control, debian/rules: Transition to python-oslo-i18n.
+
+ -- Chuck Short <zulcss@ubuntu.com>  Fri, 09 Jan 2015 08:59:24 -0500
+
 python-oslo.i18n (1.1.0-0ubuntu1) vivid; urgency=medium
 
   * New upstream release.
diff -Nru python-oslo.i18n-1.1.0/debian/control python-oslo.i18n-1.3.0/debian/control
--- python-oslo.i18n-1.1.0/debian/control	2014-08-11 11:18:46.000000000 -0400
+++ python-oslo.i18n-1.3.0/debian/control	2015-01-09 09:23:41.000000000 -0500
@@ -32,12 +32,14 @@
                  python-oslo.sphinx,
                  python-oslo.vmware,
                  python3-oslo.config
-Standards-Version: 3.9.5
+Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/python-oslo.i18n.git
 Vcs-Git: git://anonscm.debian.org/openstack/python-oslo.i18n.git
 Homepage: http://launchpad.net/oslo
 
-Package: python-oslo.i18n
+Package: python-oslo-i18n
+Breaks: python-oslo.i18n (<< 1.3.0-0ubuntu1)
+Replaces: python-oslo.i18n ( << 1.3.0-0ubuntu1)
 Architecture: all
 Pre-Depends: dpkg (>= 1.15.6~)
 Depends: python-babel (>= 1.3), ${misc:Depends}, ${python:Depends}
@@ -48,7 +50,9 @@
  .
  This package contains the Python 2.x module.
 
-Package: python3-oslo.i18n
+Package: python3-oslo-i18n
+Breaks: python3-oslo.i18n (<< 1.3.0-0ubuntu1)
+Replaces: python3-oslo.i18n ( << 1.3.0-0ubuntu1)
 Architecture: all
 Pre-Depends: dpkg (>= 1.15.6~)
 Depends: python3-babel (>= 1.3), ${misc:Depends}, ${python3:Depends}
@@ -59,7 +63,7 @@
  .
  This package contains the Python 3.x module.
 
-Package: python-oslo.i18n-doc
+Package: python-oslo-i18n-doc
 Section: doc
 Architecture: all
 Pre-Depends: dpkg (>= 1.15.6~)
@@ -70,3 +74,25 @@
  library.
  .
   This package contains the documentation.
+
+Package: python-oslo.i18n
+Section: oldlibs
+Architecture: all
+Depends: ${misc:Depends}, python-oslo-i18n
+Description: transitional dummy package for python-oslo.i18n
+ This transtional package is safe to remove.
+
+Package: python-oslo.i18n-doc
+Section: oldlibs
+Architecture: all
+Depends: ${misc:Depends}, python-oslo-i18n-doc
+Description: transitional dummy package for python3-oslo.i18n
+ This transtional package is safe to remove.
+
+Package: python3-oslo.i18n
+Section: oldlibs
+Architecture: all
+Depends: ${misc:Depends}, python3-oslo-i18n
+Description: transitional dummy package for python3-oslo.i18n
+ This transtional package is safe to remove.
+
diff -Nru python-oslo.i18n-1.1.0/debian/python-oslo-i18n-doc.doc-base python-oslo.i18n-1.3.0/debian/python-oslo-i18n-doc.doc-base
--- python-oslo.i18n-1.1.0/debian/python-oslo-i18n-doc.doc-base	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/debian/python-oslo-i18n-doc.doc-base	2014-07-12 11:54:31.000000000 -0400
@@ -0,0 +1,9 @@
+Document: oslo.i18n-doc
+Title: oslo.i18n Documentation
+Author: N/A
+Abstract: Sphinx documentation for oslo.i18n
+Section: Programming/Python
+
+Format: HTML
+Index: /usr/share/doc/python-oslo.i18n-doc/html/index.html
+Files: /usr/share/doc/python-oslo.i18n-doc/html/*
diff -Nru python-oslo.i18n-1.1.0/debian/python-oslo.i18n-doc.doc-base python-oslo.i18n-1.3.0/debian/python-oslo.i18n-doc.doc-base
--- python-oslo.i18n-1.1.0/debian/python-oslo.i18n-doc.doc-base	2014-07-12 11:54:31.000000000 -0400
+++ python-oslo.i18n-1.3.0/debian/python-oslo.i18n-doc.doc-base	1969-12-31 19:00:00.000000000 -0500
@@ -1,9 +0,0 @@
-Document: oslo.i18n-doc
-Title: oslo.i18n Documentation
-Author: N/A
-Abstract: Sphinx documentation for oslo.i18n
-Section: Programming/Python
-
-Format: HTML
-Index: /usr/share/doc/python-oslo.i18n-doc/html/index.html
-Files: /usr/share/doc/python-oslo.i18n-doc/html/*
diff -Nru python-oslo.i18n-1.1.0/debian/rules python-oslo.i18n-1.3.0/debian/rules
--- python-oslo.i18n-1.1.0/debian/rules	2014-07-24 08:52:27.000000000 -0400
+++ python-oslo.i18n-1.3.0/debian/rules	2015-01-09 09:06:22.000000000 -0500
@@ -14,11 +14,11 @@
 override_dh_install:
 	set -e && for pyvers in $(PYTHONS); do \
 		python$$pyvers setup.py install --install-layout=deb \
-			--root $(CURDIR)/debian/python-oslo.i18n; \
+			--root $(CURDIR)/debian/python-oslo-i18n; \
 	done
 	set -e && for pyvers in $(PYTHON3S); do \
 		python$$pyvers setup.py install --install-layout=deb \
-			--root $(CURDIR)/debian/python3-oslo.i18n; \
+			--root $(CURDIR)/debian/python3-oslo-i18n; \
 	done
 
 override_dh_auto_test:
@@ -31,7 +31,7 @@
 	rm -rf build
 
 override_dh_sphinxdoc:
-	sphinx-build -b html doc/source debian/python-oslo.i18n-doc/usr/share/doc/python-oslo.i18n-doc/html
+	sphinx-build -b html doc/source debian/python-oslo.i18n-doc/usr/share/doc/python-oslo-i18n-doc/html
 	dh_sphinxdoc -O--buildsystem=python_distutils
 
 # Commands not to run
diff -Nru python-oslo.i18n-1.1.0/doc/source/api.rst python-oslo.i18n-1.3.0/doc/source/api.rst
--- python-oslo.i18n-1.1.0/doc/source/api.rst	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/doc/source/api.rst	2015-01-08 14:46:13.000000000 -0500
@@ -2,12 +2,12 @@
  API
 =====
 
-oslo.i18n
+oslo_i18n
 =========
 
-.. automodule:: oslo.i18n
+.. automodule:: oslo_i18n
 
-.. autoclass:: oslo.i18n.TranslatorFactory
+.. autoclass:: oslo_i18n.TranslatorFactory
    :members:
 
 .. seealso::
@@ -15,24 +15,24 @@
    An example of using a :class:`TranslatorFactory` is provided in
    :ref:`integration-module`.
 
-.. autofunction:: oslo.i18n.enable_lazy
+.. autofunction:: oslo_i18n.enable_lazy
 
 .. seealso::
 
    :ref:`lazy-translation`
 
-.. autofunction:: oslo.i18n.translate
+.. autofunction:: oslo_i18n.translate
 
-.. autofunction:: oslo.i18n.get_available_languages
+.. autofunction:: oslo_i18n.get_available_languages
 
-oslo.i18n.log
+oslo_i18n.log
 =============
 
-.. automodule:: oslo.i18n.log
+.. automodule:: oslo_i18n.log
    :members:
 
-oslo.i18n.fixture
+oslo_i18n.fixture
 =================
 
-.. automodule:: oslo.i18n.fixture
+.. automodule:: oslo_i18n.fixture
    :members:
diff -Nru python-oslo.i18n-1.1.0/doc/source/guidelines.rst python-oslo.i18n-1.3.0/doc/source/guidelines.rst
--- python-oslo.i18n-1.1.0/doc/source/guidelines.rst	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/doc/source/guidelines.rst	2015-01-08 14:46:13.000000000 -0500
@@ -4,7 +4,7 @@
 
 Text messages the user sees via exceptions or API calls should be
 translated using
-:py:attr:`TranslatorFactory.primary <oslo.i18n.TranslatorFactory.primary>`, which should
+:py:attr:`TranslatorFactory.primary <oslo_i18n.TranslatorFactory.primary>`, which should
 be installed as ``_()`` in the integration module.
 
 .. seealso::
diff -Nru python-oslo.i18n-1.1.0/doc/source/usage.rst python-oslo.i18n-1.3.0/doc/source/usage.rst
--- python-oslo.i18n-1.1.0/doc/source/usage.rst	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/doc/source/usage.rst	2015-01-08 14:46:13.000000000 -0500
@@ -16,16 +16,16 @@
 
 To use oslo.i18n in a project, you will need to create a small
 integration module to hold an instance of
-:class:`~oslo.i18n.TranslatorFactory` and references to
+:class:`~oslo_i18n.TranslatorFactory` and references to
 the marker functions the factory creates.
 
 ::
 
     # app/i18n.py
 
-    from oslo import i18n
+    import oslo_i18n
 
-    _translators = i18n.TranslatorFactory(domain='myapp')
+    _translators = oslo_i18n.TranslatorFactory(domain='myapp')
 
     # The primary translation function using the well-known name "_"
     _ = _translators.primary
@@ -43,7 +43,7 @@
 Then, in the rest of your code, use the appropriate marker function
 for each message:
 
-::
+.. code-block:: python
 
     from myapp.i18n import _, _LW
 
@@ -151,14 +151,14 @@
 
 ::
 
-    from oslo import i18n
+    import oslo_i18n
 
-    i18n.enable_lazy()
+    oslo_i18n.enable_lazy()
 
 Translating Messages
 ====================
 
-Use :func:`~oslo.i18n.translate` to translate strings to
+Use :func:`~oslo_i18n.translate` to translate strings to
 a specific locale. :func:`translate` handles delayed translation and
 strings that have already been translated immediately. It should be
 used at the point where the locale to be used is known, which is often
@@ -167,9 +167,9 @@
 
 ::
 
-    from oslo import i18n
+    import oslo_i18n
 
-    trans_msg = i18n.translate(msg, desired_locale=my_locale)
+    trans_msg = oslo_i18n.translate(msg, desired_locale=my_locale)
 
 if desired_locale is not specified then the default locale is used.
 
@@ -178,14 +178,14 @@
 
 Only the languages that have translations provided are available for
 translation. To determine which languages are available the
-:func:`~oslo.i18n.get_available_languages` is provided. Since different languages
+:func:`~oslo_i18n.get_available_languages` is provided. Since different languages
 can be installed for each domain, the domain must be specified.
 
 ::
 
-    from oslo import i18n
+    import oslo_i18n
 
-    avail_lang = i18n.get_available_languages('myapp')
+    avail_lang = oslo_i18n.get_available_languages('myapp')
 
 .. seealso::
 
diff -Nru python-oslo.i18n-1.1.0/oslo/i18n/_factory.py python-oslo.i18n-1.3.0/oslo/i18n/_factory.py
--- python-oslo.i18n-1.1.0/oslo/i18n/_factory.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo/i18n/_factory.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,110 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-"""Translation function factory
-"""
-
-import gettext
-import os
-
-import six
-
-from oslo.i18n import _lazy
-from oslo.i18n import _locale
-from oslo.i18n import _message
-
-
-__all__ = [
-    'TranslatorFactory',
-]
-
-
-class TranslatorFactory(object):
-    "Create translator functions"
-
-    def __init__(self, domain, localedir=None):
-        """Establish a set of translation functions for the domain.
-
-        :param domain: Name of translation domain,
-                       specifying a message catalog.
-        :type domain: str
-        :param localedir: Directory with translation catalogs.
-        :type localedir: str
-        """
-        self.domain = domain
-        if localedir is None:
-            variable_name = _locale.get_locale_dir_variable_name(domain)
-            localedir = os.environ.get(variable_name)
-        self.localedir = localedir
-
-    def _make_translation_func(self, domain=None):
-        """Return a translation function ready for use with messages.
-
-        The returned function takes a single value, the unicode string
-        to be translated.  The return type varies depending on whether
-        lazy translation is being done. When lazy translation is
-        enabled, :class:`Message` objects are returned instead of
-        regular :class:`unicode` strings.
-
-        The domain argument can be specified to override the default
-        from the factory, but the localedir from the factory is always
-        used because we assume the log-level translation catalogs are
-        installed in the same directory as the main application
-        catalog.
-
-        """
-        if domain is None:
-            domain = self.domain
-        t = gettext.translation(domain,
-                                localedir=self.localedir,
-                                fallback=True)
-        # Use the appropriate method of the translation object based
-        # on the python version.
-        m = t.gettext if six.PY3 else t.ugettext
-
-        def f(msg):
-            """oslo.i18n.gettextutils translation function."""
-            if _lazy.USE_LAZY:
-                return _message.Message(msg, domain=domain)
-            return m(msg)
-        return f
-
-    @property
-    def primary(self):
-        "The default translation function."
-        return self._make_translation_func()
-
-    def _make_log_translation_func(self, level):
-        return self._make_translation_func(self.domain + '-log-' + level)
-
-    @property
-    def log_info(self):
-        "Translate info-level log messages."
-        return self._make_log_translation_func('info')
-
-    @property
-    def log_warning(self):
-        "Translate warning-level log messages."
-        return self._make_log_translation_func('warning')
-
-    @property
-    def log_error(self):
-        "Translate error-level log messages."
-        return self._make_log_translation_func('error')
-
-    @property
-    def log_critical(self):
-        "Translate critical-level log messages."
-        return self._make_log_translation_func('critical')
diff -Nru python-oslo.i18n-1.1.0/oslo/i18n/fixture.py python-oslo.i18n-1.3.0/oslo/i18n/fixture.py
--- python-oslo.i18n-1.1.0/oslo/i18n/fixture.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo/i18n/fixture.py	2015-01-08 14:46:13.000000000 -0500
@@ -9,57 +9,5 @@
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #    License for the specific language governing permissions and limitations
 #    under the License.
-"""Test fixtures for working with oslo.i18n.
 
-"""
-
-import fixtures
-import six
-
-from oslo.i18n import _message
-
-
-class Translation(fixtures.Fixture):
-    """Fixture for managing translatable strings.
-
-    This class provides methods for creating translatable strings
-    using both lazy translation and immediate translation. It can be
-    used to generate the different types of messages returned from
-    oslo.i18n to test code that may need to know about the type to
-    handle them differently (for example, error handling in WSGI apps,
-    or logging).
-
-    Use this class to generate messages instead of toggling the global
-    lazy flag and using the regular translation factory.
-
-    """
-
-    def __init__(self, domain='test-domain'):
-        """Initialize the fixture.
-
-        :param domain: The translation domain. This is not expected to
-                       coincide with an actual set of message
-                       catalogs, but it can.
-        :type domain: str
-        """
-        self.domain = domain
-
-    def lazy(self, msg):
-        """Return a lazily translated message.
-
-        :param msg: Input message string. May optionally include
-                    positional or named string interpolation markers.
-        :type msg: str or unicode
-
-        """
-        return _message.Message(msg, domain=self.domain)
-
-    def immediate(self, msg):
-        """Return a string as though it had been translated immediately.
-
-        :param msg: Input message string. May optionally include
-                    positional or named string interpolation markers.
-        :type msg: str or unicode
-
-        """
-        return six.text_type(msg)
+from oslo_i18n.fixture import *  # noqa
diff -Nru python-oslo.i18n-1.1.0/oslo/i18n/_gettextutils.py python-oslo.i18n-1.3.0/oslo/i18n/_gettextutils.py
--- python-oslo.i18n-1.1.0/oslo/i18n/_gettextutils.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo/i18n/_gettextutils.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,90 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-"""gettextutils provides a wrapper around gettext for OpenStack projects
-"""
-
-import copy
-import gettext
-import os
-
-from babel import localedata
-import six
-
-from oslo.i18n import _factory
-from oslo.i18n import _locale
-
-__all__ = [
-    'install',
-    'get_available_languages',
-]
-
-
-def install(domain):
-    """Install a _() function using the given translation domain.
-
-    Given a translation domain, install a _() function using gettext's
-    install() function.
-
-    The main difference from gettext.install() is that we allow
-    overriding the default localedir (e.g. /usr/share/locale) using
-    a translation-domain-specific environment variable (e.g.
-    NOVA_LOCALEDIR).
-
-    :param domain: the translation domain
-    """
-    from six import moves
-    tf = _factory.TranslatorFactory(domain)
-    moves.builtins.__dict__['_'] = tf.primary
-
-
-_AVAILABLE_LANGUAGES = {}
-
-
-def get_available_languages(domain):
-    """Lists the available languages for the given translation domain.
-
-    :param domain: the domain to get languages for
-    """
-    if domain in _AVAILABLE_LANGUAGES:
-        return copy.copy(_AVAILABLE_LANGUAGES[domain])
-
-    localedir = os.environ.get(_locale.get_locale_dir_variable_name(domain))
-    find = lambda x: gettext.find(domain,
-                                  localedir=localedir,
-                                  languages=[x])
-
-    # NOTE(mrodden): en_US should always be available (and first in case
-    # order matters) since our in-line message strings are en_US
-    language_list = ['en_US']
-    locale_identifiers = localedata.locale_identifiers()
-    language_list.extend(language for language in locale_identifiers
-                         if find(language))
-
-    # In Babel 1.3, locale_identifiers() doesn't list some OpenStack supported
-    # locales (e.g. 'zh_CN', and 'zh_TW') so we add the locales explicitly if
-    # necessary so that they are listed as supported.
-    aliases = {'zh': 'zh_CN',
-               'zh_Hant_HK': 'zh_HK',
-               'zh_Hant': 'zh_TW',
-               'fil': 'tl_PH'}
-
-    language_list.extend(alias for locale, alias in six.iteritems(aliases)
-                         if (locale in language_list and
-                             alias not in language_list))
-
-    _AVAILABLE_LANGUAGES[domain] = language_list
-    return copy.copy(language_list)
diff -Nru python-oslo.i18n-1.1.0/oslo/i18n/_i18n.py python-oslo.i18n-1.3.0/oslo/i18n/_i18n.py
--- python-oslo.i18n-1.1.0/oslo/i18n/_i18n.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo/i18n/_i18n.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,25 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-"""Translation support for messages in this library.
-"""
-
-from oslo.i18n import _factory
-
-# Create the global translation functions.
-_translators = _factory.TranslatorFactory('oslo.i18n')
-
-# The primary translation function using the well-known name "_"
-_ = _translators.primary
diff -Nru python-oslo.i18n-1.1.0/oslo/i18n/__init__.py python-oslo.i18n-1.3.0/oslo/i18n/__init__.py
--- python-oslo.i18n-1.1.0/oslo/i18n/__init__.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo/i18n/__init__.py	2015-01-08 14:46:13.000000000 -0500
@@ -10,7 +10,22 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from ._factory import *
-from ._gettextutils import *
-from ._lazy import *
-from ._translate import *
+import warnings
+
+from oslo_i18n._factory import *
+from oslo_i18n._gettextutils import *
+from oslo_i18n._lazy import *
+from oslo_i18n._translate import *
+
+
+def deprecated():
+    new_name = __name__.replace('.', '_')
+    warnings.warn(
+        ('The oslo namespace package is deprecated. Please use %s instead.' %
+         new_name),
+        DeprecationWarning,
+        stacklevel=3,
+    )
+
+
+deprecated()
diff -Nru python-oslo.i18n-1.1.0/oslo/i18n/_lazy.py python-oslo.i18n-1.3.0/oslo/i18n/_lazy.py
--- python-oslo.i18n-1.1.0/oslo/i18n/_lazy.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo/i18n/_lazy.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,38 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-__all__ = [
-    'enable_lazy',
-]
-
-USE_LAZY = False
-
-
-def enable_lazy(enable=True):
-    """Convenience function for configuring _() to use lazy gettext
-
-    Call this at the start of execution to enable the gettextutils._
-    function to use lazy gettext functionality. This is useful if
-    your project is importing _ directly instead of using the
-    gettextutils.install() way of importing the _ function.
-
-    :param enable: Flag indicating whether lazy translation should be
-                   turned on or off.  Defaults to True.
-    :type enable: bool
-
-    """
-    global USE_LAZY
-    USE_LAZY = enable
diff -Nru python-oslo.i18n-1.1.0/oslo/i18n/_locale.py python-oslo.i18n-1.3.0/oslo/i18n/_locale.py
--- python-oslo.i18n-1.1.0/oslo/i18n/_locale.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo/i18n/_locale.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,25 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-
-def get_locale_dir_variable_name(domain):
-    """Build environment variable name for  local dir.
-
-    Convert a translation domain name to a variable for specifying
-    a separate locale dir.
-
-    """
-    return domain.upper().replace('.', '_').replace('-', '_') + '_LOCALEDIR'
diff -Nru python-oslo.i18n-1.1.0/oslo/i18n/log.py python-oslo.i18n-1.3.0/oslo/i18n/log.py
--- python-oslo.i18n-1.1.0/oslo/i18n/log.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo/i18n/log.py	2015-01-08 14:46:13.000000000 -0500
@@ -1,7 +1,3 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
 #    not use this file except in compliance with the License. You may obtain
 #    a copy of the License at
@@ -14,84 +10,4 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-"""logging utilities for translation
-"""
-
-from logging import handlers
-
-from oslo.i18n import _translate
-
-
-class TranslationHandler(handlers.MemoryHandler):
-    """Handler that translates records before logging them.
-
-    When lazy translation is enabled in the application (see
-    :func:`~oslo.i18n.enable_lazy`), the :class:`TranslationHandler`
-    uses its locale configuration setting to determine how to
-    translate LogRecord objects before forwarding them to the
-    logging.Handler.
-
-    When lazy translation is disabled, the message in the LogRecord is
-    converted to unicode without any changes and then forwarded to the
-    logging.Handler.
-
-    The handler can be configured declaratively in the
-    ``logging.conf`` as follows::
-
-        [handlers]
-        keys = translatedlog, translator
-
-        [handler_translatedlog]
-        class = handlers.WatchedFileHandler
-        args = ('/var/log/api-localized.log',)
-        formatter = context
-
-        [handler_translator]
-        class = oslo.i18n.log.TranslationHandler
-        target = translatedlog
-        args = ('zh_CN',)
-
-    If the specified locale is not available in the system, the handler will
-    log in the default locale.
-
-    """
-
-    def __init__(self, locale=None, target=None):
-        """Initialize a TranslationHandler
-
-        :param locale: locale to use for translating messages
-        :param target: logging.Handler object to forward
-                       LogRecord objects to after translation
-        """
-        # NOTE(luisg): In order to allow this handler to be a wrapper for
-        # other handlers, such as a FileHandler, and still be able to
-        # configure it using logging.conf, this handler has to extend
-        # MemoryHandler because only the MemoryHandlers' logging.conf
-        # parsing is implemented such that it accepts a target handler.
-        handlers.MemoryHandler.__init__(self, capacity=0, target=target)
-        self.locale = locale
-
-    def setFormatter(self, fmt):
-        self.target.setFormatter(fmt)
-
-    def emit(self, record):
-        # We save the message from the original record to restore it
-        # after translation, so other handlers are not affected by this
-        original_msg = record.msg
-        original_args = record.args
-
-        try:
-            self._translate_and_log_record(record)
-        finally:
-            record.msg = original_msg
-            record.args = original_args
-
-    def _translate_and_log_record(self, record):
-        record.msg = _translate.translate(record.msg, self.locale)
-
-        # In addition to translating the message, we also need to translate
-        # arguments that were passed to the log method that were not part
-        # of the main message e.g., log.info(_('Some message %s'), this_one))
-        record.args = _translate.translate_args(record.args, self.locale)
-
-        self.target.emit(record)
+from oslo_i18n.log import *  # noqa
diff -Nru python-oslo.i18n-1.1.0/oslo/i18n/_message.py python-oslo.i18n-1.3.0/oslo/i18n/_message.py
--- python-oslo.i18n-1.1.0/oslo/i18n/_message.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo/i18n/_message.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,167 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-"""Private Message class for lazy translation support.
-"""
-
-import copy
-import gettext
-import locale
-import os
-
-import six
-
-from oslo.i18n import _locale
-from oslo.i18n import _translate
-
-
-class Message(six.text_type):
-    """A Message object is a unicode object that can be translated.
-
-    Translation of Message is done explicitly using the translate() method.
-    For all non-translation intents and purposes, a Message is simply unicode,
-    and can be treated as such.
-    """
-
-    def __new__(cls, msgid, msgtext=None, params=None,
-                domain='oslo', *args):
-        """Create a new Message object.
-
-        In order for translation to work gettext requires a message ID, this
-        msgid will be used as the base unicode text. It is also possible
-        for the msgid and the base unicode text to be different by passing
-        the msgtext parameter.
-        """
-        # If the base msgtext is not given, we use the default translation
-        # of the msgid (which is in English) just in case the system locale is
-        # not English, so that the base text will be in that locale by default.
-        if not msgtext:
-            msgtext = Message._translate_msgid(msgid, domain)
-        # We want to initialize the parent unicode with the actual object that
-        # would have been plain unicode if 'Message' was not enabled.
-        msg = super(Message, cls).__new__(cls, msgtext)
-        msg.msgid = msgid
-        msg.domain = domain
-        msg.params = params
-        return msg
-
-    def translate(self, desired_locale=None):
-        """Translate this message to the desired locale.
-
-        :param desired_locale: The desired locale to translate the message to,
-                               if no locale is provided the message will be
-                               translated to the system's default locale.
-
-        :returns: the translated message in unicode
-        """
-
-        translated_message = Message._translate_msgid(self.msgid,
-                                                      self.domain,
-                                                      desired_locale)
-        if self.params is None:
-            # No need for more translation
-            return translated_message
-
-        # This Message object may have been formatted with one or more
-        # Message objects as substitution arguments, given either as a single
-        # argument, part of a tuple, or as one or more values in a dictionary.
-        # When translating this Message we need to translate those Messages too
-        translated_params = _translate.translate_args(self.params,
-                                                      desired_locale)
-
-        translated_message = translated_message % translated_params
-
-        return translated_message
-
-    @staticmethod
-    def _translate_msgid(msgid, domain, desired_locale=None):
-        if not desired_locale:
-            system_locale = locale.getdefaultlocale()
-            # If the system locale is not available to the runtime use English
-            desired_locale = system_locale[0] or 'en_US'
-
-        locale_dir = os.environ.get(
-            _locale.get_locale_dir_variable_name(domain)
-        )
-        lang = gettext.translation(domain,
-                                   localedir=locale_dir,
-                                   languages=[desired_locale],
-                                   fallback=True)
-        translator = lang.gettext if six.PY3 else lang.ugettext
-
-        translated_message = translator(msgid)
-        return translated_message
-
-    def __mod__(self, other):
-        # When we mod a Message we want the actual operation to be performed
-        # by the parent class (i.e. unicode()), the only thing  we do here is
-        # save the original msgid and the parameters in case of a translation
-        params = self._sanitize_mod_params(other)
-        unicode_mod = super(Message, self).__mod__(params)
-        modded = Message(self.msgid,
-                         msgtext=unicode_mod,
-                         params=params,
-                         domain=self.domain)
-        return modded
-
-    def _sanitize_mod_params(self, other):
-        """Sanitize the object being modded with this Message.
-
-        - Add support for modding 'None' so translation supports it
-        - Trim the modded object, which can be a large dictionary, to only
-        those keys that would actually be used in a translation
-        - Snapshot the object being modded, in case the message is
-        translated, it will be used as it was when the Message was created
-        """
-        if other is None:
-            params = (other,)
-        elif isinstance(other, dict):
-            # Merge the dictionaries
-            # Copy each item in case one does not support deep copy.
-            params = {}
-            if isinstance(self.params, dict):
-                params.update((key, self._copy_param(val))
-                              for key, val in self.params.items())
-            params.update((key, self._copy_param(val))
-                          for key, val in other.items())
-        else:
-            params = self._copy_param(other)
-        return params
-
-    def _copy_param(self, param):
-        try:
-            return copy.deepcopy(param)
-        except Exception:
-            # Fallback to casting to unicode this will handle the
-            # python code-like objects that can't be deep-copied
-            return six.text_type(param)
-
-    def __add__(self, other):
-        from oslo.i18n._i18n import _
-        msg = _('Message objects do not support addition.')
-        raise TypeError(msg)
-
-    def __radd__(self, other):
-        return self.__add__(other)
-
-    if six.PY2:
-        def __str__(self):
-            # NOTE(luisg): Logging in python 2.6 tries to str() log records,
-            # and it expects specifically a UnicodeError in order to proceed.
-            from oslo.i18n._i18n import _
-            msg = _('Message objects do not support str() because they may '
-                    'contain non-ascii characters. '
-                    'Please use unicode() or translate() instead.')
-            raise UnicodeError(msg)
diff -Nru python-oslo.i18n-1.1.0/oslo/i18n/_translate.py python-oslo.i18n-1.3.0/oslo/i18n/_translate.py
--- python-oslo.i18n-1.1.0/oslo/i18n/_translate.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo/i18n/_translate.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,73 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import six
-
-__all__ = [
-    'translate',
-]
-
-
-def translate(obj, desired_locale=None):
-    """Gets the translated unicode representation of the given object.
-
-    If the object is not translatable it is returned as-is.
-
-    If the desired_locale argument is None the object is translated to
-    the system locale.
-
-    :param obj: the object to translate
-    :param desired_locale: the locale to translate the message to, if None the
-                           default system locale will be used
-    :returns: the translated object in unicode, or the original object if
-              it could not be translated
-
-    """
-    from oslo.i18n import _message  # avoid circular dependency at module level
-    message = obj
-    if not isinstance(message, _message.Message):
-        # If the object to translate is not already translatable,
-        # let's first get its unicode representation
-        message = six.text_type(obj)
-    if isinstance(message, _message.Message):
-        # Even after unicoding() we still need to check if we are
-        # running with translatable unicode before translating
-        return message.translate(desired_locale)
-    return obj
-
-
-def translate_args(args, desired_locale=None):
-    """Translates all the translatable elements of the given arguments object.
-
-    This method is used for translating the translatable values in method
-    arguments which include values of tuples or dictionaries.
-    If the object is not a tuple or a dictionary the object itself is
-    translated if it is translatable.
-
-    If the locale is None the object is translated to the system locale.
-
-    :param args: the args to translate
-    :param desired_locale: the locale to translate the args to, if None the
-                           default system locale will be used
-    :returns: a new args object with the translated contents of the original
-    """
-    if isinstance(args, tuple):
-        return tuple(translate(v, desired_locale) for v in args)
-    if isinstance(args, dict):
-        translated_dict = dict((key, translate(value, desired_locale))
-                               for key, value in six.iteritems(args))
-        return translated_dict
-    return translate(args, desired_locale)
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/_factory.py python-oslo.i18n-1.3.0/oslo_i18n/_factory.py
--- python-oslo.i18n-1.1.0/oslo_i18n/_factory.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/_factory.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,110 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+"""Translation function factory
+"""
+
+import gettext
+import os
+
+import six
+
+from oslo_i18n import _lazy
+from oslo_i18n import _locale
+from oslo_i18n import _message
+
+
+__all__ = [
+    'TranslatorFactory',
+]
+
+
+class TranslatorFactory(object):
+    "Create translator functions"
+
+    def __init__(self, domain, localedir=None):
+        """Establish a set of translation functions for the domain.
+
+        :param domain: Name of translation domain,
+                       specifying a message catalog.
+        :type domain: str
+        :param localedir: Directory with translation catalogs.
+        :type localedir: str
+        """
+        self.domain = domain
+        if localedir is None:
+            variable_name = _locale.get_locale_dir_variable_name(domain)
+            localedir = os.environ.get(variable_name)
+        self.localedir = localedir
+
+    def _make_translation_func(self, domain=None):
+        """Return a translation function ready for use with messages.
+
+        The returned function takes a single value, the unicode string
+        to be translated.  The return type varies depending on whether
+        lazy translation is being done. When lazy translation is
+        enabled, :class:`Message` objects are returned instead of
+        regular :class:`unicode` strings.
+
+        The domain argument can be specified to override the default
+        from the factory, but the localedir from the factory is always
+        used because we assume the log-level translation catalogs are
+        installed in the same directory as the main application
+        catalog.
+
+        """
+        if domain is None:
+            domain = self.domain
+        t = gettext.translation(domain,
+                                localedir=self.localedir,
+                                fallback=True)
+        # Use the appropriate method of the translation object based
+        # on the python version.
+        m = t.gettext if six.PY3 else t.ugettext
+
+        def f(msg):
+            """oslo_i18n.gettextutils translation function."""
+            if _lazy.USE_LAZY:
+                return _message.Message(msg, domain=domain)
+            return m(msg)
+        return f
+
+    @property
+    def primary(self):
+        "The default translation function."
+        return self._make_translation_func()
+
+    def _make_log_translation_func(self, level):
+        return self._make_translation_func(self.domain + '-log-' + level)
+
+    @property
+    def log_info(self):
+        "Translate info-level log messages."
+        return self._make_log_translation_func('info')
+
+    @property
+    def log_warning(self):
+        "Translate warning-level log messages."
+        return self._make_log_translation_func('warning')
+
+    @property
+    def log_error(self):
+        "Translate error-level log messages."
+        return self._make_log_translation_func('error')
+
+    @property
+    def log_critical(self):
+        "Translate critical-level log messages."
+        return self._make_log_translation_func('critical')
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/fixture.py python-oslo.i18n-1.3.0/oslo_i18n/fixture.py
--- python-oslo.i18n-1.1.0/oslo_i18n/fixture.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/fixture.py	2015-01-08 14:46:14.000000000 -0500
@@ -0,0 +1,89 @@
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+"""Test fixtures for working with oslo_i18n.
+
+"""
+
+import fixtures
+import six
+
+from oslo_i18n import _lazy
+from oslo_i18n import _message
+
+
+class Translation(fixtures.Fixture):
+    """Fixture for managing translatable strings.
+
+    This class provides methods for creating translatable strings
+    using both lazy translation and immediate translation. It can be
+    used to generate the different types of messages returned from
+    oslo_i18n to test code that may need to know about the type to
+    handle them differently (for example, error handling in WSGI apps,
+    or logging).
+
+    Use this class to generate messages instead of toggling the global
+    lazy flag and using the regular translation factory.
+
+    """
+
+    def __init__(self, domain='test-domain'):
+        """Initialize the fixture.
+
+        :param domain: The translation domain. This is not expected to
+                       coincide with an actual set of message
+                       catalogs, but it can.
+        :type domain: str
+        """
+        self.domain = domain
+
+    def lazy(self, msg):
+        """Return a lazily translated message.
+
+        :param msg: Input message string. May optionally include
+                    positional or named string interpolation markers.
+        :type msg: str or unicode
+
+        """
+        return _message.Message(msg, domain=self.domain)
+
+    def immediate(self, msg):
+        """Return a string as though it had been translated immediately.
+
+        :param msg: Input message string. May optionally include
+                    positional or named string interpolation markers.
+        :type msg: str or unicode
+
+        """
+        return six.text_type(msg)
+
+
+class ToggleLazy(fixtures.Fixture):
+    """Fixture to toggle lazy translation on or off for a test."""
+
+    def __init__(self, enabled):
+        """Force lazy translation on or off.
+
+        :param enabled: Flag controlling whether to enable or disable
+            lazy translation, passed to :func:`~oslo_i18n.enable_lazy`.
+        :type enabled: bool
+        """
+        super(ToggleLazy, self).__init__()
+        self._enabled = enabled
+        self._original_value = _lazy.USE_LAZY
+
+    def setUp(self):
+        super(ToggleLazy, self).setUp()
+        self.addCleanup(self._restore_original)
+        _lazy.enable_lazy(self._enabled)
+
+    def _restore_original(self):
+        _lazy.enable_lazy(self._original_value)
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/_gettextutils.py python-oslo.i18n-1.3.0/oslo_i18n/_gettextutils.py
--- python-oslo.i18n-1.1.0/oslo_i18n/_gettextutils.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/_gettextutils.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,90 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+"""gettextutils provides a wrapper around gettext for OpenStack projects
+"""
+
+import copy
+import gettext
+import os
+
+from babel import localedata
+import six
+
+from oslo_i18n import _factory
+from oslo_i18n import _locale
+
+__all__ = [
+    'install',
+    'get_available_languages',
+]
+
+
+def install(domain):
+    """Install a _() function using the given translation domain.
+
+    Given a translation domain, install a _() function using gettext's
+    install() function.
+
+    The main difference from gettext.install() is that we allow
+    overriding the default localedir (e.g. /usr/share/locale) using
+    a translation-domain-specific environment variable (e.g.
+    NOVA_LOCALEDIR).
+
+    :param domain: the translation domain
+    """
+    from six import moves
+    tf = _factory.TranslatorFactory(domain)
+    moves.builtins.__dict__['_'] = tf.primary
+
+
+_AVAILABLE_LANGUAGES = {}
+
+
+def get_available_languages(domain):
+    """Lists the available languages for the given translation domain.
+
+    :param domain: the domain to get languages for
+    """
+    if domain in _AVAILABLE_LANGUAGES:
+        return copy.copy(_AVAILABLE_LANGUAGES[domain])
+
+    localedir = os.environ.get(_locale.get_locale_dir_variable_name(domain))
+    find = lambda x: gettext.find(domain,
+                                  localedir=localedir,
+                                  languages=[x])
+
+    # NOTE(mrodden): en_US should always be available (and first in case
+    # order matters) since our in-line message strings are en_US
+    language_list = ['en_US']
+    locale_identifiers = localedata.locale_identifiers()
+    language_list.extend(language for language in locale_identifiers
+                         if find(language))
+
+    # In Babel 1.3, locale_identifiers() doesn't list some OpenStack supported
+    # locales (e.g. 'zh_CN', and 'zh_TW') so we add the locales explicitly if
+    # necessary so that they are listed as supported.
+    aliases = {'zh': 'zh_CN',
+               'zh_Hant_HK': 'zh_HK',
+               'zh_Hant': 'zh_TW',
+               'fil': 'tl_PH'}
+
+    language_list.extend(alias for locale, alias in six.iteritems(aliases)
+                         if (locale in language_list and
+                             alias not in language_list))
+
+    _AVAILABLE_LANGUAGES[domain] = language_list
+    return copy.copy(language_list)
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/_i18n.py python-oslo.i18n-1.3.0/oslo_i18n/_i18n.py
--- python-oslo.i18n-1.1.0/oslo_i18n/_i18n.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/_i18n.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,25 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+"""Translation support for messages in this library.
+"""
+
+from oslo_i18n import _factory
+
+# Create the global translation functions.
+_translators = _factory.TranslatorFactory('oslo.i18n')
+
+# The primary translation function using the well-known name "_"
+_ = _translators.primary
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/__init__.py python-oslo.i18n-1.3.0/oslo_i18n/__init__.py
--- python-oslo.i18n-1.1.0/oslo_i18n/__init__.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/__init__.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,16 @@
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from ._factory import *
+from ._gettextutils import *
+from ._lazy import *
+from ._translate import *
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/_lazy.py python-oslo.i18n-1.3.0/oslo_i18n/_lazy.py
--- python-oslo.i18n-1.1.0/oslo_i18n/_lazy.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/_lazy.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,38 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+__all__ = [
+    'enable_lazy',
+]
+
+USE_LAZY = False
+
+
+def enable_lazy(enable=True):
+    """Convenience function for configuring _() to use lazy gettext
+
+    Call this at the start of execution to enable the gettextutils._
+    function to use lazy gettext functionality. This is useful if
+    your project is importing _ directly instead of using the
+    gettextutils.install() way of importing the _ function.
+
+    :param enable: Flag indicating whether lazy translation should be
+                   turned on or off.  Defaults to True.
+    :type enable: bool
+
+    """
+    global USE_LAZY
+    USE_LAZY = enable
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/_locale.py python-oslo.i18n-1.3.0/oslo_i18n/_locale.py
--- python-oslo.i18n-1.1.0/oslo_i18n/_locale.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/_locale.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,25 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+
+def get_locale_dir_variable_name(domain):
+    """Build environment variable name for  local dir.
+
+    Convert a translation domain name to a variable for specifying
+    a separate locale dir.
+
+    """
+    return domain.upper().replace('.', '_').replace('-', '_') + '_LOCALEDIR'
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/log.py python-oslo.i18n-1.3.0/oslo_i18n/log.py
--- python-oslo.i18n-1.1.0/oslo_i18n/log.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/log.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,97 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+"""logging utilities for translation
+"""
+
+from logging import handlers
+
+from oslo_i18n import _translate
+
+
+class TranslationHandler(handlers.MemoryHandler):
+    """Handler that translates records before logging them.
+
+    When lazy translation is enabled in the application (see
+    :func:`~oslo_i18n.enable_lazy`), the :class:`TranslationHandler`
+    uses its locale configuration setting to determine how to
+    translate LogRecord objects before forwarding them to the
+    logging.Handler.
+
+    When lazy translation is disabled, the message in the LogRecord is
+    converted to unicode without any changes and then forwarded to the
+    logging.Handler.
+
+    The handler can be configured declaratively in the
+    ``logging.conf`` as follows::
+
+        [handlers]
+        keys = translatedlog, translator
+
+        [handler_translatedlog]
+        class = handlers.WatchedFileHandler
+        args = ('/var/log/api-localized.log',)
+        formatter = context
+
+        [handler_translator]
+        class = oslo_i18n.log.TranslationHandler
+        target = translatedlog
+        args = ('zh_CN',)
+
+    If the specified locale is not available in the system, the handler will
+    log in the default locale.
+
+    """
+
+    def __init__(self, locale=None, target=None):
+        """Initialize a TranslationHandler
+
+        :param locale: locale to use for translating messages
+        :param target: logging.Handler object to forward
+                       LogRecord objects to after translation
+        """
+        # NOTE(luisg): In order to allow this handler to be a wrapper for
+        # other handlers, such as a FileHandler, and still be able to
+        # configure it using logging.conf, this handler has to extend
+        # MemoryHandler because only the MemoryHandlers' logging.conf
+        # parsing is implemented such that it accepts a target handler.
+        handlers.MemoryHandler.__init__(self, capacity=0, target=target)
+        self.locale = locale
+
+    def setFormatter(self, fmt):
+        self.target.setFormatter(fmt)
+
+    def emit(self, record):
+        # We save the message from the original record to restore it
+        # after translation, so other handlers are not affected by this
+        original_msg = record.msg
+        original_args = record.args
+
+        try:
+            self._translate_and_log_record(record)
+        finally:
+            record.msg = original_msg
+            record.args = original_args
+
+    def _translate_and_log_record(self, record):
+        record.msg = _translate.translate(record.msg, self.locale)
+
+        # In addition to translating the message, we also need to translate
+        # arguments that were passed to the log method that were not part
+        # of the main message e.g., log.info(_('Some message %s'), this_one))
+        record.args = _translate.translate_args(record.args, self.locale)
+
+        self.target.emit(record)
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/_message.py python-oslo.i18n-1.3.0/oslo_i18n/_message.py
--- python-oslo.i18n-1.1.0/oslo_i18n/_message.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/_message.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,167 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+"""Private Message class for lazy translation support.
+"""
+
+import copy
+import gettext
+import locale
+import os
+
+import six
+
+from oslo_i18n import _locale
+from oslo_i18n import _translate
+
+
+class Message(six.text_type):
+    """A Message object is a unicode object that can be translated.
+
+    Translation of Message is done explicitly using the translate() method.
+    For all non-translation intents and purposes, a Message is simply unicode,
+    and can be treated as such.
+    """
+
+    def __new__(cls, msgid, msgtext=None, params=None,
+                domain='oslo', *args):
+        """Create a new Message object.
+
+        In order for translation to work gettext requires a message ID, this
+        msgid will be used as the base unicode text. It is also possible
+        for the msgid and the base unicode text to be different by passing
+        the msgtext parameter.
+        """
+        # If the base msgtext is not given, we use the default translation
+        # of the msgid (which is in English) just in case the system locale is
+        # not English, so that the base text will be in that locale by default.
+        if not msgtext:
+            msgtext = Message._translate_msgid(msgid, domain)
+        # We want to initialize the parent unicode with the actual object that
+        # would have been plain unicode if 'Message' was not enabled.
+        msg = super(Message, cls).__new__(cls, msgtext)
+        msg.msgid = msgid
+        msg.domain = domain
+        msg.params = params
+        return msg
+
+    def translate(self, desired_locale=None):
+        """Translate this message to the desired locale.
+
+        :param desired_locale: The desired locale to translate the message to,
+                               if no locale is provided the message will be
+                               translated to the system's default locale.
+
+        :returns: the translated message in unicode
+        """
+
+        translated_message = Message._translate_msgid(self.msgid,
+                                                      self.domain,
+                                                      desired_locale)
+        if self.params is None:
+            # No need for more translation
+            return translated_message
+
+        # This Message object may have been formatted with one or more
+        # Message objects as substitution arguments, given either as a single
+        # argument, part of a tuple, or as one or more values in a dictionary.
+        # When translating this Message we need to translate those Messages too
+        translated_params = _translate.translate_args(self.params,
+                                                      desired_locale)
+
+        translated_message = translated_message % translated_params
+
+        return translated_message
+
+    @staticmethod
+    def _translate_msgid(msgid, domain, desired_locale=None):
+        if not desired_locale:
+            system_locale = locale.getdefaultlocale()
+            # If the system locale is not available to the runtime use English
+            desired_locale = system_locale[0] or 'en_US'
+
+        locale_dir = os.environ.get(
+            _locale.get_locale_dir_variable_name(domain)
+        )
+        lang = gettext.translation(domain,
+                                   localedir=locale_dir,
+                                   languages=[desired_locale],
+                                   fallback=True)
+        translator = lang.gettext if six.PY3 else lang.ugettext
+
+        translated_message = translator(msgid)
+        return translated_message
+
+    def __mod__(self, other):
+        # When we mod a Message we want the actual operation to be performed
+        # by the parent class (i.e. unicode()), the only thing  we do here is
+        # save the original msgid and the parameters in case of a translation
+        params = self._sanitize_mod_params(other)
+        unicode_mod = super(Message, self).__mod__(params)
+        modded = Message(self.msgid,
+                         msgtext=unicode_mod,
+                         params=params,
+                         domain=self.domain)
+        return modded
+
+    def _sanitize_mod_params(self, other):
+        """Sanitize the object being modded with this Message.
+
+        - Add support for modding 'None' so translation supports it
+        - Trim the modded object, which can be a large dictionary, to only
+        those keys that would actually be used in a translation
+        - Snapshot the object being modded, in case the message is
+        translated, it will be used as it was when the Message was created
+        """
+        if other is None:
+            params = (other,)
+        elif isinstance(other, dict):
+            # Merge the dictionaries
+            # Copy each item in case one does not support deep copy.
+            params = {}
+            if isinstance(self.params, dict):
+                params.update((key, self._copy_param(val))
+                              for key, val in self.params.items())
+            params.update((key, self._copy_param(val))
+                          for key, val in other.items())
+        else:
+            params = self._copy_param(other)
+        return params
+
+    def _copy_param(self, param):
+        try:
+            return copy.deepcopy(param)
+        except Exception:
+            # Fallback to casting to unicode this will handle the
+            # python code-like objects that can't be deep-copied
+            return six.text_type(param)
+
+    def __add__(self, other):
+        from oslo_i18n._i18n import _
+        msg = _('Message objects do not support addition.')
+        raise TypeError(msg)
+
+    def __radd__(self, other):
+        return self.__add__(other)
+
+    if six.PY2:
+        def __str__(self):
+            # NOTE(luisg): Logging in python 2.6 tries to str() log records,
+            # and it expects specifically a UnicodeError in order to proceed.
+            from oslo_i18n._i18n import _
+            msg = _('Message objects do not support str() because they may '
+                    'contain non-ascii characters. '
+                    'Please use unicode() or translate() instead.')
+            raise UnicodeError(msg)
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/fakes.py python-oslo.i18n-1.3.0/oslo_i18n/tests/fakes.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/fakes.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/fakes.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,59 @@
+# Copyright 2012 Intel Inc, OpenStack Foundation.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+"""
+Fakes For translation tests.
+"""
+
+import gettext
+
+
+class FakeTranslations(gettext.GNUTranslations):
+    """A test GNUTranslations class that takes a map of msg -> translations."""
+
+    def __init__(self, translations):
+        self.translations = translations
+
+    # used by Python 3
+    def gettext(self, msgid):
+        return self.translations.get(msgid, msgid)
+
+    # used by Python 2
+    def ugettext(self, msgid):
+        return self.translations.get(msgid, msgid)
+
+    @staticmethod
+    def translator(locales_map):
+        """Build mock translator for the given locales.
+
+        Returns a mock gettext.translation function that uses
+        individual TestTranslations to translate in the given locales.
+
+        :param locales_map: A map from locale name to a translations map.
+                            {
+                             'es': {'Hi': 'Hola', 'Bye': 'Adios'},
+                             'zh': {'Hi': 'Ni Hao', 'Bye': 'Zaijian'}
+                            }
+
+
+        """
+        def _translation(domain, localedir=None,
+                         languages=None, fallback=None):
+            if languages:
+                language = languages[0]
+                if language in locales_map:
+                    return FakeTranslations(locales_map[language])
+            return gettext.NullTranslations()
+        return _translation
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/test_factory.py python-oslo.i18n-1.3.0/oslo_i18n/tests/test_factory.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/test_factory.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/test_factory.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,91 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import mock
+from oslotest import base as test_base
+import six
+
+from oslo_i18n import _factory
+from oslo_i18n import _lazy
+from oslo_i18n import _message
+
+
+class TranslatorFactoryTest(test_base.BaseTestCase):
+
+    def setUp(self):
+        super(TranslatorFactoryTest, self).setUp()
+        # remember so we can reset to it later in case it changes
+        self._USE_LAZY = _lazy.USE_LAZY
+
+    def tearDown(self):
+        # reset to value before test
+        _lazy.USE_LAZY = self._USE_LAZY
+        super(TranslatorFactoryTest, self).tearDown()
+
+    def test_lazy(self):
+        _lazy.enable_lazy(True)
+        with mock.patch.object(_message, 'Message') as msg:
+            tf = _factory.TranslatorFactory('domain')
+            tf.primary('some text')
+            msg.assert_called_with('some text', domain='domain')
+
+    def test_not_lazy(self):
+        _lazy.enable_lazy(False)
+        with mock.patch.object(_message, 'Message') as msg:
+            msg.side_effect = AssertionError('should not use Message')
+            tf = _factory.TranslatorFactory('domain')
+            tf.primary('some text')
+
+    def test_change_lazy(self):
+        _lazy.enable_lazy(True)
+        tf = _factory.TranslatorFactory('domain')
+        r = tf.primary('some text')
+        self.assertIsInstance(r, _message.Message)
+        _lazy.enable_lazy(False)
+        r = tf.primary('some text')
+        # Python 2.6 doesn't have assertNotIsInstance().
+        self.assertFalse(isinstance(r, _message.Message))
+
+    def test_py2(self):
+        _lazy.enable_lazy(False)
+        with mock.patch.object(six, 'PY3', False):
+            with mock.patch('gettext.translation') as translation:
+                trans = mock.Mock()
+                translation.return_value = trans
+                trans.gettext.side_effect = AssertionError(
+                    'should have called ugettext')
+                tf = _factory.TranslatorFactory('domain')
+                tf.primary('some text')
+                trans.ugettext.assert_called_with('some text')
+
+    def test_py3(self):
+        _lazy.enable_lazy(False)
+        with mock.patch.object(six, 'PY3', True):
+            with mock.patch('gettext.translation') as translation:
+                trans = mock.Mock()
+                translation.return_value = trans
+                trans.ugettext.side_effect = AssertionError(
+                    'should have called gettext')
+                tf = _factory.TranslatorFactory('domain')
+                tf.primary('some text')
+                trans.gettext.assert_called_with('some text')
+
+    def test_log_level_domain_name(self):
+        with mock.patch.object(_factory.TranslatorFactory,
+                               '_make_translation_func') as mtf:
+            tf = _factory.TranslatorFactory('domain')
+            tf._make_log_translation_func('mylevel')
+            mtf.assert_called_with('domain-log-mylevel')
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/test_fixture.py python-oslo.i18n-1.3.0/oslo_i18n/tests/test_fixture.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/test_fixture.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/test_fixture.py	2015-01-08 14:46:14.000000000 -0500
@@ -0,0 +1,74 @@
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from oslotest import base as test_base
+import six
+
+from oslo_i18n import _lazy
+from oslo_i18n import _message
+from oslo_i18n import fixture
+
+
+class TranslationFixtureTest(test_base.BaseTestCase):
+
+    def setUp(self):
+        super(TranslationFixtureTest, self).setUp()
+        self.trans_fixture = self.useFixture(fixture.Translation())
+
+    def test_lazy(self):
+        msg = self.trans_fixture.lazy('this is a lazy message')
+        self.assertIsInstance(msg, _message.Message)
+        self.assertEqual(msg.msgid, 'this is a lazy message')
+
+    def test_immediate(self):
+        msg = self.trans_fixture.immediate('this is a lazy message')
+        # Python 2.6 does not have assertNotIsInstance
+        self.assertFalse(isinstance(msg, _message.Message))
+        self.assertIsInstance(msg, six.text_type)
+        self.assertEqual(msg, u'this is a lazy message')
+
+
+class ToggleLazyFixtureText(test_base.BaseTestCase):
+
+    def test_on_on(self):
+        _lazy.USE_LAZY = True
+        f = fixture.ToggleLazy(True)
+        f.setUp()
+        self.assertTrue(_lazy.USE_LAZY)
+        f._restore_original()
+        self.assertTrue(_lazy.USE_LAZY)
+
+    def test_on_off(self):
+        _lazy.USE_LAZY = True
+        f = fixture.ToggleLazy(False)
+        f.setUp()
+        self.assertFalse(_lazy.USE_LAZY)
+        f._restore_original()
+        self.assertTrue(_lazy.USE_LAZY)
+
+    def test_off_on(self):
+        _lazy.USE_LAZY = False
+        f = fixture.ToggleLazy(True)
+        f.setUp()
+        self.assertTrue(_lazy.USE_LAZY)
+        f._restore_original()
+        self.assertFalse(_lazy.USE_LAZY)
+
+    def test_off_off(self):
+        _lazy.USE_LAZY = False
+        f = fixture.ToggleLazy(False)
+        f.setUp()
+        self.assertFalse(_lazy.USE_LAZY)
+        f._restore_original()
+        self.assertFalse(_lazy.USE_LAZY)
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/test_gettextutils.py python-oslo.i18n-1.3.0/oslo_i18n/tests/test_gettextutils.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/test_gettextutils.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/test_gettextutils.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,128 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import gettext
+import logging
+
+from babel import localedata
+import mock
+from oslotest import base as test_base
+from oslotest import moxstubout
+import six
+
+from oslo_i18n import _factory
+from oslo_i18n import _gettextutils
+from oslo_i18n import _lazy
+from oslo_i18n import _message
+
+
+LOG = logging.getLogger(__name__)
+
+
+class GettextTest(test_base.BaseTestCase):
+
+    def setUp(self):
+        super(GettextTest, self).setUp()
+        moxfixture = self.useFixture(moxstubout.MoxStubout())
+        self.stubs = moxfixture.stubs
+        self.mox = moxfixture.mox
+        # remember so we can reset to it later in case it changes
+        self._USE_LAZY = _lazy.USE_LAZY
+        self.t = _factory.TranslatorFactory('oslo_i18n.test')
+
+    def tearDown(self):
+        # reset to value before test
+        _lazy.USE_LAZY = self._USE_LAZY
+        super(GettextTest, self).tearDown()
+
+    def test_gettext_does_not_blow_up(self):
+        LOG.info(self.t.primary('test'))
+
+    def test__gettextutils_install(self):
+        _gettextutils.install('blaa')
+        _lazy.enable_lazy(False)
+        self.assertTrue(isinstance(self.t.primary('A String'),
+                                   six.text_type))
+
+        _gettextutils.install('blaa')
+        _lazy.enable_lazy(True)
+        self.assertTrue(isinstance(self.t.primary('A Message'),
+                                   _message.Message))
+
+    def test_gettext_install_looks_up_localedir(self):
+        with mock.patch('os.environ.get') as environ_get:
+            with mock.patch('gettext.install'):
+                environ_get.return_value = '/foo/bar'
+                _gettextutils.install('blaa')
+                environ_get.assert_calls([mock.call('BLAA_LOCALEDIR')])
+
+    def test_gettext_install_updates_builtins(self):
+        with mock.patch('os.environ.get') as environ_get:
+            with mock.patch('gettext.install'):
+                environ_get.return_value = '/foo/bar'
+                if '_' in six.moves.builtins.__dict__:
+                    del six.moves.builtins.__dict__['_']
+                _gettextutils.install('blaa')
+                self.assertIn('_', six.moves.builtins.__dict__)
+
+    def test_get_available_languages(self):
+        # All the available languages for which locale data is available
+        def _mock_locale_identifiers():
+            # 'zh', 'zh_Hant'. 'zh_Hant_HK', 'fil' all have aliases
+            # missing from babel but we add them in _gettextutils, we
+            # test that here too
+            return ['zh', 'es', 'nl', 'fr', 'zh_Hant', 'zh_Hant_HK', 'fil']
+
+        self.stubs.Set(localedata,
+                       'list' if hasattr(localedata, 'list')
+                       else 'locale_identifiers',
+                       _mock_locale_identifiers)
+
+        # Only the languages available for a specific translation domain
+        def _mock_gettext_find(domain, localedir=None, languages=None, all=0):
+            languages = languages or []
+            if domain == 'domain_1':
+                return 'translation-file' if any(x in ['zh', 'es', 'fil']
+                                                 for x in languages) else None
+            elif domain == 'domain_2':
+                return 'translation-file' if any(x in ['fr', 'zh_Hant']
+                                                 for x in languages) else None
+            return None
+        self.stubs.Set(gettext, 'find', _mock_gettext_find)
+
+        # en_US should always be available no matter the domain
+        # and it should also always be the first element since order matters
+        domain_1_languages = _gettextutils.get_available_languages('domain_1')
+        domain_2_languages = _gettextutils.get_available_languages('domain_2')
+        self.assertEqual('en_US', domain_1_languages[0])
+        self.assertEqual('en_US', domain_2_languages[0])
+        # The domain languages should be included after en_US with
+        # with their respective aliases when it applies
+        self.assertEqual(6, len(domain_1_languages))
+        self.assertIn('zh', domain_1_languages)
+        self.assertIn('zh_CN', domain_1_languages)
+        self.assertIn('es', domain_1_languages)
+        self.assertIn('fil', domain_1_languages)
+        self.assertIn('tl_PH', domain_1_languages)
+        self.assertEqual(4, len(domain_2_languages))
+        self.assertIn('fr', domain_2_languages)
+        self.assertIn('zh_Hant', domain_2_languages)
+        self.assertIn('zh_TW', domain_2_languages)
+        self.assertEqual(2, len(_gettextutils._AVAILABLE_LANGUAGES))
+        # Now test an unknown domain, only en_US should be included
+        unknown_domain_languages = _gettextutils.get_available_languages('huh')
+        self.assertEqual(1, len(unknown_domain_languages))
+        self.assertIn('en_US', unknown_domain_languages)
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/test_handler.py python-oslo.i18n-1.3.0/oslo_i18n/tests/test_handler.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/test_handler.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/test_handler.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,106 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import logging
+
+import mock
+from oslotest import base as test_base
+import six
+
+from oslo_i18n import _message
+from oslo_i18n import log as i18n_log
+from oslo_i18n.tests import fakes
+
+LOG = logging.getLogger(__name__)
+
+
+class TranslationHandlerTestCase(test_base.BaseTestCase):
+
+    def setUp(self):
+        super(TranslationHandlerTestCase, self).setUp()
+
+        self.stream = six.StringIO()
+        self.destination_handler = logging.StreamHandler(self.stream)
+        self.translation_handler = i18n_log.TranslationHandler('zh_CN')
+        self.translation_handler.setTarget(self.destination_handler)
+
+        self.logger = logging.getLogger('localehander_logger')
+        self.logger.setLevel(logging.DEBUG)
+        self.logger.addHandler(self.translation_handler)
+
+    def test_set_formatter(self):
+        formatter = 'some formatter'
+        self.translation_handler.setFormatter(formatter)
+        self.assertEqual(formatter, self.translation_handler.target.formatter)
+
+    @mock.patch('gettext.translation')
+    def test_emit_translated_message(self, mock_translation):
+        log_message = 'A message to be logged'
+        log_message_translation = 'A message to be logged in Chinese'
+        translations = {log_message: log_message_translation}
+        translations_map = {'zh_CN': translations}
+        translator = fakes.FakeTranslations.translator(translations_map)
+        mock_translation.side_effect = translator
+
+        msg = _message.Message(log_message)
+
+        self.logger.info(msg)
+        self.assertIn(log_message_translation, self.stream.getvalue())
+
+    @mock.patch('gettext.translation')
+    def test_emit_translated_message_with_args(self, mock_translation):
+        log_message = 'A message to be logged %s'
+        log_message_translation = 'A message to be logged in Chinese %s'
+        log_arg = 'Arg to be logged'
+        log_arg_translation = 'An arg to be logged in Chinese'
+
+        translations = {log_message: log_message_translation,
+                        log_arg: log_arg_translation}
+        translations_map = {'zh_CN': translations}
+        translator = fakes.FakeTranslations.translator(translations_map)
+        mock_translation.side_effect = translator
+
+        msg = _message.Message(log_message)
+        arg = _message.Message(log_arg)
+
+        self.logger.info(msg, arg)
+        self.assertIn(log_message_translation % log_arg_translation,
+                      self.stream.getvalue())
+
+    @mock.patch('gettext.translation')
+    def test_emit_translated_message_with_named_args(self, mock_translation):
+        log_message = 'A message to be logged %(arg1)s $(arg2)s'
+        log_message_translation = 'Chinese msg to be logged %(arg1)s $(arg2)s'
+        log_arg_1 = 'Arg1 to be logged'
+        log_arg_1_translation = 'Arg1 to be logged in Chinese'
+        log_arg_2 = 'Arg2 to be logged'
+        log_arg_2_translation = 'Arg2 to be logged in Chinese'
+
+        translations = {log_message: log_message_translation,
+                        log_arg_1: log_arg_1_translation,
+                        log_arg_2: log_arg_2_translation}
+        translations_map = {'zh_CN': translations}
+        translator = fakes.FakeTranslations.translator(translations_map)
+        mock_translation.side_effect = translator
+
+        msg = _message.Message(log_message)
+        arg_1 = _message.Message(log_arg_1)
+        arg_2 = _message.Message(log_arg_2)
+
+        self.logger.info(msg, {'arg1': arg_1, 'arg2': arg_2})
+        translation = log_message_translation % {'arg1': log_arg_1_translation,
+                                                 'arg2': log_arg_2_translation}
+        self.assertIn(translation, self.stream.getvalue())
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/test_lazy.py python-oslo.i18n-1.3.0/oslo_i18n/tests/test_lazy.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/test_lazy.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/test_lazy.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,40 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from oslotest import base as test_base
+
+from oslo_i18n import _lazy
+
+
+class LazyTest(test_base.BaseTestCase):
+
+    def setUp(self):
+        super(LazyTest, self).setUp()
+        self._USE_LAZY = _lazy.USE_LAZY
+
+    def tearDown(self):
+        _lazy.USE_LAZY = self._USE_LAZY
+        super(LazyTest, self).tearDown()
+
+    def test_enable_lazy(self):
+        _lazy.USE_LAZY = False
+        _lazy.enable_lazy()
+        self.assertTrue(_lazy.USE_LAZY)
+
+    def test_disable_lazy(self):
+        _lazy.USE_LAZY = True
+        _lazy.enable_lazy(False)
+        self.assertFalse(_lazy.USE_LAZY)
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/test_locale_dir_variable.py python-oslo.i18n-1.3.0/oslo_i18n/tests/test_locale_dir_variable.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/test_locale_dir_variable.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/test_locale_dir_variable.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,32 @@
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from oslotest import base as test_base
+import testscenarios.testcase
+
+from oslo_i18n import _locale
+
+
+class LocaleDirVariableTest(testscenarios.testcase.WithScenarios,
+                            test_base.BaseTestCase):
+
+    scenarios = [
+        ('simple', {'domain': 'simple', 'expected': 'SIMPLE_LOCALEDIR'}),
+        ('with_dot', {'domain': 'one.two', 'expected': 'ONE_TWO_LOCALEDIR'}),
+        ('with_dash', {'domain': 'one-two', 'expected': 'ONE_TWO_LOCALEDIR'}),
+    ]
+
+    def test_make_variable_name(self):
+        var = _locale.get_locale_dir_variable_name(self.domain)
+        self.assertEqual(self.expected, var)
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/test_logging.py python-oslo.i18n-1.3.0/oslo_i18n/tests/test_logging.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/test_logging.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/test_logging.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,42 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import mock
+from oslotest import base as test_base
+
+from oslo_i18n import _factory
+
+
+class LogLevelTranslationsTest(test_base.BaseTestCase):
+
+    def test_info(self):
+        self._test('info')
+
+    def test_warning(self):
+        self._test('warning')
+
+    def test_error(self):
+        self._test('error')
+
+    def test_critical(self):
+        self._test('critical')
+
+    def _test(self, level):
+        with mock.patch.object(_factory.TranslatorFactory,
+                               '_make_translation_func') as mtf:
+            tf = _factory.TranslatorFactory('domain')
+            getattr(tf, 'log_%s' % level)
+            mtf.assert_called_with('domain-log-%s' % level)
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/test_message.py python-oslo.i18n-1.3.0/oslo_i18n/tests/test_message.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/test_message.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/test_message.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,518 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from __future__ import unicode_literals
+
+import logging
+
+import mock
+from oslotest import base as test_base
+import six
+import testtools
+
+from oslo_i18n import _message
+from oslo_i18n.tests import fakes
+from oslo_i18n.tests import utils
+
+LOG = logging.getLogger(__name__)
+
+
+class MessageTestCase(test_base.BaseTestCase):
+    """Unit tests for locale Message class."""
+
+    def test_message_id_and_message_text(self):
+        message = _message.Message('1')
+        self.assertEqual('1', message.msgid)
+        self.assertEqual('1', message)
+        message = _message.Message('1', msgtext='A')
+        self.assertEqual('1', message.msgid)
+        self.assertEqual('A', message)
+
+    def test_message_is_unicode(self):
+        message = _message.Message('some %s') % 'message'
+        self.assertIsInstance(message, six.text_type)
+
+    @mock.patch('locale.getdefaultlocale')
+    @mock.patch('gettext.translation')
+    def test_create_message_non_english_default_locale(self,
+                                                       mock_translation,
+                                                       mock_getdefaultlocale):
+        msgid = 'A message in English'
+        es_translation = 'A message in Spanish'
+
+        es_translations = {msgid: es_translation}
+        translations_map = {'es': es_translations}
+        translator = fakes.FakeTranslations.translator(translations_map)
+        mock_translation.side_effect = translator
+        mock_getdefaultlocale.return_value = ('es',)
+
+        message = _message.Message(msgid)
+
+        # The base representation of the message is in Spanish, as well as
+        # the default translation, since the default locale was Spanish.
+        self.assertEqual(es_translation, message)
+        self.assertEqual(es_translation, message.translate())
+
+    def test_translate_returns_unicode(self):
+        message = _message.Message('some %s') % 'message'
+        self.assertIsInstance(message.translate(), six.text_type)
+
+    def test_mod_with_named_parameters(self):
+        msgid = ("%(description)s\nCommand: %(cmd)s\n"
+                 "Exit code: %(exit_code)s\nStdout: %(stdout)r\n"
+                 "Stderr: %(stderr)r %%(something)s")
+        params = {'description': 'test1',
+                  'cmd': 'test2',
+                  'exit_code': 'test3',
+                  'stdout': 'test4',
+                  'stderr': 'test5',
+                  'something': 'trimmed'}
+
+        result = _message.Message(msgid) % params
+
+        expected = msgid % params
+        self.assertEqual(result, expected)
+        self.assertEqual(result.translate(), expected)
+
+    def test_multiple_mod_with_named_parameter(self):
+        msgid = ("%(description)s\nCommand: %(cmd)s\n"
+                 "Exit code: %(exit_code)s\nStdout: %(stdout)r\n"
+                 "Stderr: %(stderr)r")
+        params = {'description': 'test1',
+                  'cmd': 'test2',
+                  'exit_code': 'test3',
+                  'stdout': 'test4',
+                  'stderr': 'test5'}
+
+        # Run string interpolation the first time to make a new Message
+        first = _message.Message(msgid) % params
+
+        # Run string interpolation on the new Message, to replicate
+        # one of the error paths with some Exception classes we've
+        # implemented in OpenStack. We should receive a second Message
+        # object, but the translation results should be the same.
+        #
+        # The production code that triggers this problem does something
+        # like:
+        #
+        #    msg = _('there was a problem %(name)s') % {'name': 'some value'}
+        #    LOG.error(msg)
+        #    raise BadExceptionClass(msg)
+        #
+        # where BadExceptionClass does something like:
+        #
+        #    class BadExceptionClass(Exception):
+        #      def __init__(self, msg, **kwds):
+        #         super(BadExceptionClass, self).__init__(msg % kwds)
+        #
+        expected = first % {}
+
+        # Base message id should be the same
+        self.assertEqual(first.msgid, expected.msgid)
+
+        # Preserved arguments should be the same
+        self.assertEqual(first.params, expected.params)
+
+        # Should have different objects
+        self.assertIsNot(expected, first)
+
+        # Final translations should be the same
+        self.assertEqual(expected.translate(), first.translate())
+
+    def test_mod_with_named_parameters_no_space(self):
+        msgid = ("Request: %(method)s http://%(server)s:"
+                 "%(port)s%(url)s with headers %(headers)s")
+        params = {'method': 'POST',
+                  'server': 'test1',
+                  'port': 1234,
+                  'url': 'test2',
+                  'headers': {'h1': 'val1'}}
+
+        result = _message.Message(msgid) % params
+
+        expected = msgid % params
+        self.assertEqual(result, expected)
+        self.assertEqual(result.translate(), expected)
+
+    def test_mod_with_dict_parameter(self):
+        msgid = "Test that we can inject a dictionary %s"
+        params = {'description': 'test1'}
+
+        result = _message.Message(msgid) % params
+
+        expected = msgid % params
+        self.assertEqual(expected, result)
+        self.assertEqual(expected, result.translate())
+
+    def test_mod_with_integer_parameters(self):
+        msgid = "Some string with params: %d"
+        params = [0, 1, 10, 24124]
+
+        messages = []
+        results = []
+        for param in params:
+            messages.append(msgid % param)
+            results.append(_message.Message(msgid) % param)
+
+        for message, result in zip(messages, results):
+            self.assertEqual(type(result), _message.Message)
+            self.assertEqual(result.translate(), message)
+
+            # simulate writing out as string
+            result_str = '%s' % result.translate()
+            self.assertEqual(result_str, message)
+            self.assertEqual(result, message)
+
+    def test_mod_copies_parameters(self):
+        msgid = "Found object: %(current_value)s"
+        changing_dict = {'current_value': 1}
+        # A message created with some params
+        result = _message.Message(msgid) % changing_dict
+        # The parameters may change
+        changing_dict['current_value'] = 2
+        # Even if the param changes when the message is
+        # translated it should use the original param
+        self.assertEqual(result.translate(), 'Found object: 1')
+
+    def test_mod_deep_copies_parameters(self):
+        msgid = "Found list: %(current_list)s"
+        changing_list = list([1, 2, 3])
+        params = {'current_list': changing_list}
+        # Apply the params
+        result = _message.Message(msgid) % params
+        # Change the list
+        changing_list.append(4)
+        # Even though the list changed the message
+        # translation should use the original list
+        self.assertEqual(result.translate(), "Found list: [1, 2, 3]")
+
+    def test_mod_deep_copies_param_nodeep_param(self):
+        msgid = "Value: %s"
+        params = utils.NoDeepCopyObject(5)
+        # Apply the params
+        result = _message.Message(msgid) % params
+        self.assertEqual(result.translate(), "Value: 5")
+
+    def test_mod_deep_copies_param_nodeep_dict(self):
+        msgid = "Values: %(val1)s %(val2)s"
+        params = {'val1': 1, 'val2': utils.NoDeepCopyObject(2)}
+        # Apply the params
+        result = _message.Message(msgid) % params
+        self.assertEqual(result.translate(), "Values: 1 2")
+
+        # Apply again to make sure other path works as well
+        params = {'val1': 3, 'val2': utils.NoDeepCopyObject(4)}
+        result = _message.Message(msgid) % params
+        self.assertEqual(result.translate(), "Values: 3 4")
+
+    def test_mod_returns_a_copy(self):
+        msgid = "Some msgid string: %(test1)s %(test2)s"
+        message = _message.Message(msgid)
+        m1 = message % {'test1': 'foo', 'test2': 'bar'}
+        m2 = message % {'test1': 'foo2', 'test2': 'bar2'}
+
+        self.assertIsNot(message, m1)
+        self.assertIsNot(message, m2)
+        self.assertEqual(m1.translate(),
+                         msgid % {'test1': 'foo', 'test2': 'bar'})
+        self.assertEqual(m2.translate(),
+                         msgid % {'test1': 'foo2', 'test2': 'bar2'})
+
+    def test_mod_with_none_parameter(self):
+        msgid = "Some string with params: %s"
+        message = _message.Message(msgid) % None
+        self.assertEqual(msgid % None, message)
+        self.assertEqual(msgid % None, message.translate())
+
+    def test_mod_with_missing_parameters(self):
+        msgid = "Some string with params: %s %s"
+        test_me = lambda: _message.Message(msgid) % 'just one'
+        # Just like with strings missing parameters raise TypeError
+        self.assertRaises(TypeError, test_me)
+
+    def test_mod_with_extra_parameters(self):
+        msgid = "Some string with params: %(param1)s %(param2)s"
+        params = {'param1': 'test',
+                  'param2': 'test2',
+                  'param3': 'notinstring'}
+
+        result = _message.Message(msgid) % params
+
+        expected = msgid % params
+        self.assertEqual(result, expected)
+        self.assertEqual(result.translate(), expected)
+
+        # Make sure unused params still there
+        self.assertEqual(result.params.keys(), params.keys())
+
+    def test_mod_with_missing_named_parameters(self):
+        msgid = ("Some string with params: %(param1)s %(param2)s"
+                 " and a missing one %(missing)s")
+        params = {'param1': 'test',
+                  'param2': 'test2'}
+
+        test_me = lambda: _message.Message(msgid) % params
+        # Just like with strings missing named parameters raise KeyError
+        self.assertRaises(KeyError, test_me)
+
+    def test_add_disabled(self):
+        msgid = "A message"
+        test_me = lambda: _message.Message(msgid) + ' some string'
+        self.assertRaises(TypeError, test_me)
+
+    def test_radd_disabled(self):
+        msgid = "A message"
+        test_me = lambda: utils.SomeObject('test') + _message.Message(msgid)
+        self.assertRaises(TypeError, test_me)
+
+    @testtools.skipIf(six.PY3, 'test specific to Python 2')
+    def test_str_disabled(self):
+        msgid = "A message"
+        test_me = lambda: str(_message.Message(msgid))
+        self.assertRaises(UnicodeError, test_me)
+
+    @mock.patch('gettext.translation')
+    def test_translate(self, mock_translation):
+        en_message = 'A message in the default locale'
+        es_translation = 'A message in Spanish'
+        message = _message.Message(en_message)
+
+        es_translations = {en_message: es_translation}
+        translations_map = {'es': es_translations}
+        translator = fakes.FakeTranslations.translator(translations_map)
+        mock_translation.side_effect = translator
+
+        self.assertEqual(es_translation, message.translate('es'))
+
+    @mock.patch('gettext.translation')
+    def test_translate_message_from_unicoded_object(self, mock_translation):
+        en_message = 'A message in the default locale'
+        es_translation = 'A message in Spanish'
+        message = _message.Message(en_message)
+        es_translations = {en_message: es_translation}
+        translations_map = {'es': es_translations}
+        translator = fakes.FakeTranslations.translator(translations_map)
+        mock_translation.side_effect = translator
+
+        # Here we are not testing the Message object directly but the result
+        # of unicoding() an object whose unicode representation is a Message
+        obj = utils.SomeObject(message)
+        unicoded_obj = six.text_type(obj)
+
+        self.assertEqual(es_translation, unicoded_obj.translate('es'))
+
+    @mock.patch('gettext.translation')
+    def test_translate_multiple_languages(self, mock_translation):
+        en_message = 'A message in the default locale'
+        es_translation = 'A message in Spanish'
+        zh_translation = 'A message in Chinese'
+        message = _message.Message(en_message)
+
+        es_translations = {en_message: es_translation}
+        zh_translations = {en_message: zh_translation}
+        translations_map = {'es': es_translations,
+                            'zh': zh_translations}
+        translator = fakes.FakeTranslations.translator(translations_map)
+        mock_translation.side_effect = translator
+
+        self.assertEqual(es_translation, message.translate('es'))
+        self.assertEqual(zh_translation, message.translate('zh'))
+        self.assertEqual(en_message, message.translate(None))
+        self.assertEqual(en_message, message.translate('en'))
+        self.assertEqual(en_message, message.translate('XX'))
+
+    @mock.patch('gettext.translation')
+    def test_translate_message_with_param(self, mock_translation):
+        message_with_params = 'A message: %s'
+        es_translation = 'A message in Spanish: %s'
+        param = 'A Message param'
+
+        translations = {message_with_params: es_translation}
+        translator = fakes.FakeTranslations.translator({'es': translations})
+        mock_translation.side_effect = translator
+
+        msg = _message.Message(message_with_params)
+        msg = msg % param
+
+        default_translation = message_with_params % param
+        expected_translation = es_translation % param
+        self.assertEqual(expected_translation, msg.translate('es'))
+        self.assertEqual(default_translation, msg.translate('XX'))
+
+    @mock.patch('gettext.translation')
+    def test_translate_message_with_object_param(self, mock_translation):
+        message_with_params = 'A message: %s'
+        es_translation = 'A message in Spanish: %s'
+        param = 'A Message param'
+        param_translation = 'A Message param in Spanish'
+
+        translations = {message_with_params: es_translation,
+                        param: param_translation}
+        translator = fakes.FakeTranslations.translator({'es': translations})
+        mock_translation.side_effect = translator
+
+        msg = _message.Message(message_with_params)
+        param_msg = _message.Message(param)
+
+        # Here we are testing translation of a Message with another object
+        # that can be translated via its unicode() representation, this is
+        # very common for instance when modding an Exception with a Message
+        obj = utils.SomeObject(param_msg)
+        msg = msg % obj
+
+        default_translation = message_with_params % param
+        expected_translation = es_translation % param_translation
+
+        self.assertEqual(expected_translation, msg.translate('es'))
+        self.assertEqual(default_translation, msg.translate('XX'))
+
+    @mock.patch('gettext.translation')
+    def test_translate_message_with_param_from_unicoded_obj(self,
+                                                            mock_translation):
+        message_with_params = 'A message: %s'
+        es_translation = 'A message in Spanish: %s'
+        param = 'A Message param'
+
+        translations = {message_with_params: es_translation}
+        translator = fakes.FakeTranslations.translator({'es': translations})
+        mock_translation.side_effect = translator
+
+        msg = _message.Message(message_with_params)
+        msg = msg % param
+
+        default_translation = message_with_params % param
+        expected_translation = es_translation % param
+
+        obj = utils.SomeObject(msg)
+        unicoded_obj = six.text_type(obj)
+
+        self.assertEqual(expected_translation, unicoded_obj.translate('es'))
+        self.assertEqual(default_translation, unicoded_obj.translate('XX'))
+
+    @mock.patch('gettext.translation')
+    def test_translate_message_with_message_parameter(self, mock_translation):
+        message_with_params = 'A message with param: %s'
+        es_translation = 'A message with param in Spanish: %s'
+        message_param = 'A message param'
+        es_param_translation = 'A message param in Spanish'
+
+        translations = {message_with_params: es_translation,
+                        message_param: es_param_translation}
+        translator = fakes.FakeTranslations.translator({'es': translations})
+        mock_translation.side_effect = translator
+
+        msg = _message.Message(message_with_params)
+        msg_param = _message.Message(message_param)
+        msg = msg % msg_param
+
+        default_translation = message_with_params % message_param
+        expected_translation = es_translation % es_param_translation
+        self.assertEqual(expected_translation, msg.translate('es'))
+        self.assertEqual(default_translation, msg.translate('XX'))
+
+    @mock.patch('gettext.translation')
+    def test_translate_message_with_message_parameters(self, mock_translation):
+        message_with_params = 'A message with params: %s %s'
+        es_translation = 'A message with params in Spanish: %s %s'
+        message_param = 'A message param'
+        es_param_translation = 'A message param in Spanish'
+        another_message_param = 'Another message param'
+        another_es_param_translation = 'Another message param in Spanish'
+
+        translations = {message_with_params: es_translation,
+                        message_param: es_param_translation,
+                        another_message_param: another_es_param_translation}
+        translator = fakes.FakeTranslations.translator({'es': translations})
+        mock_translation.side_effect = translator
+
+        msg = _message.Message(message_with_params)
+        param_1 = _message.Message(message_param)
+        param_2 = _message.Message(another_message_param)
+        msg = msg % (param_1, param_2)
+
+        default_translation = message_with_params % (message_param,
+                                                     another_message_param)
+        expected_translation = es_translation % (es_param_translation,
+                                                 another_es_param_translation)
+        self.assertEqual(expected_translation, msg.translate('es'))
+        self.assertEqual(default_translation, msg.translate('XX'))
+
+    @mock.patch('gettext.translation')
+    def test_translate_message_with_named_parameters(self, mock_translation):
+        message_with_params = 'A message with params: %(param)s'
+        es_translation = 'A message with params in Spanish: %(param)s'
+        message_param = 'A Message param'
+        es_param_translation = 'A message param in Spanish'
+
+        translations = {message_with_params: es_translation,
+                        message_param: es_param_translation}
+        translator = fakes.FakeTranslations.translator({'es': translations})
+        mock_translation.side_effect = translator
+
+        msg = _message.Message(message_with_params)
+        msg_param = _message.Message(message_param)
+        msg = msg % {'param': msg_param}
+
+        default_translation = message_with_params % {'param': message_param}
+        expected_translation = es_translation % {'param': es_param_translation}
+        self.assertEqual(expected_translation, msg.translate('es'))
+        self.assertEqual(default_translation, msg.translate('XX'))
+
+    @mock.patch('locale.getdefaultlocale')
+    @mock.patch('gettext.translation')
+    def test_translate_message_non_default_locale(self,
+                                                  mock_translation,
+                                                  mock_getdefaultlocale):
+        message_with_params = 'A message with params: %(param)s'
+        es_translation = 'A message with params in Spanish: %(param)s'
+        zh_translation = 'A message with params in Chinese: %(param)s'
+        fr_translation = 'A message with params in French: %(param)s'
+
+        message_param = 'A Message param'
+        es_param_translation = 'A message param in Spanish'
+        zh_param_translation = 'A message param in Chinese'
+        fr_param_translation = 'A message param in French'
+
+        es_translations = {message_with_params: es_translation,
+                           message_param: es_param_translation}
+        zh_translations = {message_with_params: zh_translation,
+                           message_param: zh_param_translation}
+        fr_translations = {message_with_params: fr_translation,
+                           message_param: fr_param_translation}
+
+        translator = fakes.FakeTranslations.translator({'es': es_translations,
+                                                        'zh': zh_translations,
+                                                        'fr': fr_translations})
+        mock_translation.side_effect = translator
+        mock_getdefaultlocale.return_value = ('es',)
+
+        msg = _message.Message(message_with_params)
+        msg_param = _message.Message(message_param)
+        msg = msg % {'param': msg_param}
+
+        es_translation = es_translation % {'param': es_param_translation}
+        zh_translation = zh_translation % {'param': zh_param_translation}
+        fr_translation = fr_translation % {'param': fr_param_translation}
+
+        # Because sys.getdefaultlocale() was Spanish,
+        # the default translation will be to Spanish
+        self.assertEqual(es_translation, msg)
+        self.assertEqual(es_translation, msg.translate())
+        self.assertEqual(es_translation, msg.translate('es'))
+
+        # Translation into other locales still works
+        self.assertEqual(zh_translation, msg.translate('zh'))
+        self.assertEqual(fr_translation, msg.translate('fr'))
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/test_public_api.py python-oslo.i18n-1.3.0/oslo_i18n/tests/test_public_api.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/test_public_api.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/test_public_api.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,44 @@
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+"""A few tests that use the public API to ensure the imports work.
+"""
+
+import unittest
+
+import mock
+
+import oslo_i18n
+from oslo_i18n import _lazy
+
+
+class PublicAPITest(unittest.TestCase):
+
+    def test_create_factory(self):
+        oslo_i18n.TranslatorFactory('domain')
+
+    def test_install(self):
+        with mock.patch('six.moves.builtins'):
+            oslo_i18n.install('domain')
+
+    def test_get_available_languages(self):
+        oslo_i18n.get_available_languages('domains')
+
+    def test_toggle_lazy(self):
+        original = _lazy.USE_LAZY
+        try:
+            oslo_i18n.enable_lazy(True)
+            oslo_i18n.enable_lazy(False)
+        finally:
+            oslo_i18n.enable_lazy(original)
+
+    def test_translate(self):
+        oslo_i18n.translate(u'string')
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/test_translate.py python-oslo.i18n-1.3.0/oslo_i18n/tests/test_translate.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/test_translate.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/test_translate.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,44 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from __future__ import unicode_literals
+
+import mock
+from oslotest import base as test_base
+
+from oslo_i18n import _message
+from oslo_i18n import _translate
+from oslo_i18n.tests import fakes
+from oslo_i18n.tests import utils
+
+
+class TranslateTest(test_base.BaseTestCase):
+
+    @mock.patch('gettext.translation')
+    def test_translate(self, mock_translation):
+        en_message = 'A message in the default locale'
+        es_translation = 'A message in Spanish'
+        message = _message.Message(en_message)
+
+        es_translations = {en_message: es_translation}
+        translations_map = {'es': es_translations}
+        translator = fakes.FakeTranslations.translator(translations_map)
+        mock_translation.side_effect = translator
+
+        # translate() works on msgs and on objects whose unicode reps are msgs
+        obj = utils.SomeObject(message)
+        self.assertEqual(es_translation, _translate.translate(message, 'es'))
+        self.assertEqual(es_translation, _translate.translate(obj, 'es'))
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/tests/utils.py python-oslo.i18n-1.3.0/oslo_i18n/tests/utils.py
--- python-oslo.i18n-1.1.0/oslo_i18n/tests/utils.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/tests/utils.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,42 @@
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import six
+
+
+class SomeObject(object):
+
+    def __init__(self, message):
+        self.message = message
+
+    def __unicode__(self):
+        return self.message
+    # alias for Python 3
+    __str__ = __unicode__
+
+
+class NoDeepCopyObject(object):
+
+    def __init__(self, value):
+        self.value = value
+
+    if six.PY3:
+        def __str__(self):
+            return str(self.value)
+    else:
+        def __unicode__(self):
+            return unicode(self.value)
+
+    def __deepcopy__(self, memo):
+        raise TypeError('Deep Copy not supported')
diff -Nru python-oslo.i18n-1.1.0/oslo_i18n/_translate.py python-oslo.i18n-1.3.0/oslo_i18n/_translate.py
--- python-oslo.i18n-1.1.0/oslo_i18n/_translate.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo_i18n/_translate.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,73 @@
+# Copyright 2012 Red Hat, Inc.
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import six
+
+__all__ = [
+    'translate',
+]
+
+
+def translate(obj, desired_locale=None):
+    """Gets the translated unicode representation of the given object.
+
+    If the object is not translatable it is returned as-is.
+
+    If the desired_locale argument is None the object is translated to
+    the system locale.
+
+    :param obj: the object to translate
+    :param desired_locale: the locale to translate the message to, if None the
+                           default system locale will be used
+    :returns: the translated object in unicode, or the original object if
+              it could not be translated
+
+    """
+    from oslo_i18n import _message  # avoid circular dependency at module level
+    message = obj
+    if not isinstance(message, _message.Message):
+        # If the object to translate is not already translatable,
+        # let's first get its unicode representation
+        message = six.text_type(obj)
+    if isinstance(message, _message.Message):
+        # Even after unicoding() we still need to check if we are
+        # running with translatable unicode before translating
+        return message.translate(desired_locale)
+    return obj
+
+
+def translate_args(args, desired_locale=None):
+    """Translates all the translatable elements of the given arguments object.
+
+    This method is used for translating the translatable values in method
+    arguments which include values of tuples or dictionaries.
+    If the object is not a tuple or a dictionary the object itself is
+    translated if it is translatable.
+
+    If the locale is None the object is translated to the system locale.
+
+    :param args: the args to translate
+    :param desired_locale: the locale to translate the args to, if None the
+                           default system locale will be used
+    :returns: a new args object with the translated contents of the original
+    """
+    if isinstance(args, tuple):
+        return tuple(translate(v, desired_locale) for v in args)
+    if isinstance(args, dict):
+        translated_dict = dict((key, translate(value, desired_locale))
+                               for key, value in six.iteritems(args))
+        return translated_dict
+    return translate(args, desired_locale)
diff -Nru python-oslo.i18n-1.1.0/oslo.i18n.egg-info/pbr.json python-oslo.i18n-1.3.0/oslo.i18n.egg-info/pbr.json
--- python-oslo.i18n-1.1.0/oslo.i18n.egg-info/pbr.json	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo.i18n.egg-info/pbr.json	2015-01-08 14:46:33.000000000 -0500
@@ -0,0 +1 @@
+{"git_version": "118aeb0", "is_release": true}
\ No newline at end of file
diff -Nru python-oslo.i18n-1.1.0/oslo.i18n.egg-info/PKG-INFO python-oslo.i18n-1.3.0/oslo.i18n.egg-info/PKG-INFO
--- python-oslo.i18n-1.1.0/oslo.i18n.egg-info/PKG-INFO	2014-12-02 10:23:28.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo.i18n.egg-info/PKG-INFO	2015-01-08 14:46:33.000000000 -0500
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: oslo.i18n
-Version: 1.1.0
+Version: 1.3.0
 Summary: oslo.i18n library
 Home-page: http://launchpad.net/oslo
 Author: OpenStack
@@ -17,7 +17,7 @@
         * Free software: Apache license
         * Documentation: http://docs.openstack.org/developer/oslo.i18n
         * Source: http://git.openstack.org/cgit/openstack/oslo.i18n
-        * Bugs: http://bugs.launchpad.net/oslo
+        * Bugs: http://bugs.launchpad.net/oslo.i18n
         
         
 Platform: UNKNOWN
diff -Nru python-oslo.i18n-1.1.0/oslo.i18n.egg-info/requires.txt python-oslo.i18n-1.3.0/oslo.i18n.egg-info/requires.txt
--- python-oslo.i18n-1.1.0/oslo.i18n.egg-info/requires.txt	2014-12-02 10:23:28.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo.i18n.egg-info/requires.txt	2015-01-08 14:46:33.000000000 -0500
@@ -1,3 +1,3 @@
 pbr>=0.6,!=0.7,<1.0
 Babel>=1.3
-six>=1.7.0
\ No newline at end of file
+six>=1.7.0
diff -Nru python-oslo.i18n-1.1.0/oslo.i18n.egg-info/SOURCES.txt python-oslo.i18n-1.3.0/oslo.i18n.egg-info/SOURCES.txt
--- python-oslo.i18n-1.1.0/oslo.i18n.egg-info/SOURCES.txt	2014-12-02 10:23:29.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo.i18n.egg-info/SOURCES.txt	2015-01-08 14:46:33.000000000 -0500
@@ -29,6 +29,7 @@
 oslo.i18n.egg-info/dependency_links.txt
 oslo.i18n.egg-info/namespace_packages.txt
 oslo.i18n.egg-info/not-zip-safe
+oslo.i18n.egg-info/pbr.json
 oslo.i18n.egg-info/requires.txt
 oslo.i18n.egg-info/top_level.txt
 oslo.i18n/locale/oslo.i18n-log-critical.pot
@@ -44,26 +45,34 @@
 oslo.i18n/locale/pl_PL/LC_MESSAGES/oslo.i18n.po
 oslo.i18n/locale/zh_CN/LC_MESSAGES/oslo.i18n.po
 oslo/i18n/__init__.py
-oslo/i18n/_factory.py
-oslo/i18n/_gettextutils.py
-oslo/i18n/_i18n.py
-oslo/i18n/_lazy.py
-oslo/i18n/_locale.py
-oslo/i18n/_message.py
-oslo/i18n/_translate.py
 oslo/i18n/fixture.py
 oslo/i18n/log.py
+oslo_i18n/__init__.py
+oslo_i18n/_factory.py
+oslo_i18n/_gettextutils.py
+oslo_i18n/_i18n.py
+oslo_i18n/_lazy.py
+oslo_i18n/_locale.py
+oslo_i18n/_message.py
+oslo_i18n/_translate.py
+oslo_i18n/fixture.py
+oslo_i18n/log.py
+oslo_i18n/tests/__init__.py
+oslo_i18n/tests/fakes.py
+oslo_i18n/tests/test_factory.py
+oslo_i18n/tests/test_fixture.py
+oslo_i18n/tests/test_gettextutils.py
+oslo_i18n/tests/test_handler.py
+oslo_i18n/tests/test_lazy.py
+oslo_i18n/tests/test_locale_dir_variable.py
+oslo_i18n/tests/test_logging.py
+oslo_i18n/tests/test_message.py
+oslo_i18n/tests/test_public_api.py
+oslo_i18n/tests/test_translate.py
+oslo_i18n/tests/utils.py
 tests/__init__.py
-tests/fakes.py
-tests/test_factory.py
 tests/test_fixture.py
-tests/test_gettextutils.py
 tests/test_handler.py
-tests/test_lazy.py
-tests/test_locale_dir_variable.py
-tests/test_logging.py
-tests/test_message.py
 tests/test_public_api.py
-tests/test_translate.py
-tests/utils.py
+tests/test_warning.py
 tools/run_cross_tests.sh
\ No newline at end of file
diff -Nru python-oslo.i18n-1.1.0/oslo.i18n.egg-info/top_level.txt python-oslo.i18n-1.3.0/oslo.i18n.egg-info/top_level.txt
--- python-oslo.i18n-1.1.0/oslo.i18n.egg-info/top_level.txt	2014-12-02 10:23:28.000000000 -0500
+++ python-oslo.i18n-1.3.0/oslo.i18n.egg-info/top_level.txt	2015-01-08 14:46:33.000000000 -0500
@@ -1 +1,2 @@
 oslo
+oslo_i18n
diff -Nru python-oslo.i18n-1.1.0/PKG-INFO python-oslo.i18n-1.3.0/PKG-INFO
--- python-oslo.i18n-1.1.0/PKG-INFO	2014-12-02 10:23:29.000000000 -0500
+++ python-oslo.i18n-1.3.0/PKG-INFO	2015-01-08 14:46:33.000000000 -0500
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: oslo.i18n
-Version: 1.1.0
+Version: 1.3.0
 Summary: oslo.i18n library
 Home-page: http://launchpad.net/oslo
 Author: OpenStack
@@ -17,7 +17,7 @@
         * Free software: Apache license
         * Documentation: http://docs.openstack.org/developer/oslo.i18n
         * Source: http://git.openstack.org/cgit/openstack/oslo.i18n
-        * Bugs: http://bugs.launchpad.net/oslo
+        * Bugs: http://bugs.launchpad.net/oslo.i18n
         
         
 Platform: UNKNOWN
diff -Nru python-oslo.i18n-1.1.0/README.rst python-oslo.i18n-1.3.0/README.rst
--- python-oslo.i18n-1.1.0/README.rst	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/README.rst	2015-01-08 14:46:13.000000000 -0500
@@ -9,4 +9,4 @@
 * Free software: Apache license
 * Documentation: http://docs.openstack.org/developer/oslo.i18n
 * Source: http://git.openstack.org/cgit/openstack/oslo.i18n
-* Bugs: http://bugs.launchpad.net/oslo
+* Bugs: http://bugs.launchpad.net/oslo.i18n
diff -Nru python-oslo.i18n-1.1.0/setup.cfg python-oslo.i18n-1.3.0/setup.cfg
--- python-oslo.i18n-1.1.0/setup.cfg	2014-12-02 10:23:29.000000000 -0500
+++ python-oslo.i18n-1.3.0/setup.cfg	2015-01-08 14:46:33.000000000 -0500
@@ -22,7 +22,7 @@
 [files]
 packages = 
 	oslo
-	oslo.i18n
+	oslo_i18n
 namespace_packages = 
 	oslo
 
@@ -55,7 +55,7 @@
 universal = 1
 
 [egg_info]
+tag_svn_revision = 0
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff -Nru python-oslo.i18n-1.1.0/tests/fakes.py python-oslo.i18n-1.3.0/tests/fakes.py
--- python-oslo.i18n-1.1.0/tests/fakes.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/fakes.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,59 +0,0 @@
-# Copyright 2012 Intel Inc, OpenStack Foundation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-"""
-Fakes For translation tests.
-"""
-
-import gettext
-
-
-class FakeTranslations(gettext.GNUTranslations):
-    """A test GNUTranslations class that takes a map of msg -> translations."""
-
-    def __init__(self, translations):
-        self.translations = translations
-
-    # used by Python 3
-    def gettext(self, msgid):
-        return self.translations.get(msgid, msgid)
-
-    # used by Python 2
-    def ugettext(self, msgid):
-        return self.translations.get(msgid, msgid)
-
-    @staticmethod
-    def translator(locales_map):
-        """Build mock translator for the given locales.
-
-        Returns a mock gettext.translation function that uses
-        individual TestTranslations to translate in the given locales.
-
-        :param locales_map: A map from locale name to a translations map.
-                            {
-                             'es': {'Hi': 'Hola', 'Bye': 'Adios'},
-                             'zh': {'Hi': 'Ni Hao', 'Bye': 'Zaijian'}
-                            }
-
-
-        """
-        def _translation(domain, localedir=None,
-                         languages=None, fallback=None):
-            if languages:
-                language = languages[0]
-                if language in locales_map:
-                    return FakeTranslations(locales_map[language])
-            return gettext.NullTranslations()
-        return _translation
diff -Nru python-oslo.i18n-1.1.0/tests/test_factory.py python-oslo.i18n-1.3.0/tests/test_factory.py
--- python-oslo.i18n-1.1.0/tests/test_factory.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_factory.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,91 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import mock
-from oslotest import base as test_base
-import six
-
-from oslo.i18n import _factory
-from oslo.i18n import _lazy
-from oslo.i18n import _message
-
-
-class TranslatorFactoryTest(test_base.BaseTestCase):
-
-    def setUp(self):
-        super(TranslatorFactoryTest, self).setUp()
-        # remember so we can reset to it later in case it changes
-        self._USE_LAZY = _lazy.USE_LAZY
-
-    def tearDown(self):
-        # reset to value before test
-        _lazy.USE_LAZY = self._USE_LAZY
-        super(TranslatorFactoryTest, self).tearDown()
-
-    def test_lazy(self):
-        _lazy.enable_lazy(True)
-        with mock.patch.object(_message, 'Message') as msg:
-            tf = _factory.TranslatorFactory('domain')
-            tf.primary('some text')
-            msg.assert_called_with('some text', domain='domain')
-
-    def test_not_lazy(self):
-        _lazy.enable_lazy(False)
-        with mock.patch.object(_message, 'Message') as msg:
-            msg.side_effect = AssertionError('should not use Message')
-            tf = _factory.TranslatorFactory('domain')
-            tf.primary('some text')
-
-    def test_change_lazy(self):
-        _lazy.enable_lazy(True)
-        tf = _factory.TranslatorFactory('domain')
-        r = tf.primary('some text')
-        self.assertIsInstance(r, _message.Message)
-        _lazy.enable_lazy(False)
-        r = tf.primary('some text')
-        # Python 2.6 doesn't have assertNotIsInstance().
-        self.assertFalse(isinstance(r, _message.Message))
-
-    def test_py2(self):
-        _lazy.enable_lazy(False)
-        with mock.patch.object(six, 'PY3', False):
-            with mock.patch('gettext.translation') as translation:
-                trans = mock.Mock()
-                translation.return_value = trans
-                trans.gettext.side_effect = AssertionError(
-                    'should have called ugettext')
-                tf = _factory.TranslatorFactory('domain')
-                tf.primary('some text')
-                trans.ugettext.assert_called_with('some text')
-
-    def test_py3(self):
-        _lazy.enable_lazy(False)
-        with mock.patch.object(six, 'PY3', True):
-            with mock.patch('gettext.translation') as translation:
-                trans = mock.Mock()
-                translation.return_value = trans
-                trans.ugettext.side_effect = AssertionError(
-                    'should have called gettext')
-                tf = _factory.TranslatorFactory('domain')
-                tf.primary('some text')
-                trans.gettext.assert_called_with('some text')
-
-    def test_log_level_domain_name(self):
-        with mock.patch.object(_factory.TranslatorFactory,
-                               '_make_translation_func') as mtf:
-            tf = _factory.TranslatorFactory('domain')
-            tf._make_log_translation_func('mylevel')
-            mtf.assert_called_with('domain-log-mylevel')
diff -Nru python-oslo.i18n-1.1.0/tests/test_fixture.py python-oslo.i18n-1.3.0/tests/test_fixture.py
--- python-oslo.i18n-1.1.0/tests/test_fixture.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_fixture.py	2015-01-08 14:46:13.000000000 -0500
@@ -15,8 +15,8 @@
 from oslotest import base as test_base
 import six
 
-from oslo.i18n import _message
 from oslo.i18n import fixture
+from oslo_i18n import _message
 
 
 class FixtureTest(test_base.BaseTestCase):
diff -Nru python-oslo.i18n-1.1.0/tests/test_gettextutils.py python-oslo.i18n-1.3.0/tests/test_gettextutils.py
--- python-oslo.i18n-1.1.0/tests/test_gettextutils.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_gettextutils.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,128 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import gettext
-import logging
-
-from babel import localedata
-import mock
-from oslotest import base as test_base
-from oslotest import moxstubout
-import six
-
-from oslo.i18n import _factory
-from oslo.i18n import _gettextutils
-from oslo.i18n import _lazy
-from oslo.i18n import _message
-
-
-LOG = logging.getLogger(__name__)
-
-
-class GettextTest(test_base.BaseTestCase):
-
-    def setUp(self):
-        super(GettextTest, self).setUp()
-        moxfixture = self.useFixture(moxstubout.MoxStubout())
-        self.stubs = moxfixture.stubs
-        self.mox = moxfixture.mox
-        # remember so we can reset to it later in case it changes
-        self._USE_LAZY = _lazy.USE_LAZY
-        self.t = _factory.TranslatorFactory('oslo.i18n.test')
-
-    def tearDown(self):
-        # reset to value before test
-        _lazy.USE_LAZY = self._USE_LAZY
-        super(GettextTest, self).tearDown()
-
-    def test_gettext_does_not_blow_up(self):
-        LOG.info(self.t.primary('test'))
-
-    def test__gettextutils_install(self):
-        _gettextutils.install('blaa')
-        _lazy.enable_lazy(False)
-        self.assertTrue(isinstance(self.t.primary('A String'),
-                                   six.text_type))
-
-        _gettextutils.install('blaa')
-        _lazy.enable_lazy(True)
-        self.assertTrue(isinstance(self.t.primary('A Message'),
-                                   _message.Message))
-
-    def test_gettext_install_looks_up_localedir(self):
-        with mock.patch('os.environ.get') as environ_get:
-            with mock.patch('gettext.install'):
-                environ_get.return_value = '/foo/bar'
-                _gettextutils.install('blaa')
-                environ_get.assert_calls([mock.call('BLAA_LOCALEDIR')])
-
-    def test_gettext_install_updates_builtins(self):
-        with mock.patch('os.environ.get') as environ_get:
-            with mock.patch('gettext.install'):
-                environ_get.return_value = '/foo/bar'
-                if '_' in six.moves.builtins.__dict__:
-                    del six.moves.builtins.__dict__['_']
-                _gettextutils.install('blaa')
-                self.assertIn('_', six.moves.builtins.__dict__)
-
-    def test_get_available_languages(self):
-        # All the available languages for which locale data is available
-        def _mock_locale_identifiers():
-            # 'zh', 'zh_Hant'. 'zh_Hant_HK', 'fil' all have aliases
-            # missing from babel but we add them in _gettextutils, we
-            # test that here too
-            return ['zh', 'es', 'nl', 'fr', 'zh_Hant', 'zh_Hant_HK', 'fil']
-
-        self.stubs.Set(localedata,
-                       'list' if hasattr(localedata, 'list')
-                       else 'locale_identifiers',
-                       _mock_locale_identifiers)
-
-        # Only the languages available for a specific translation domain
-        def _mock_gettext_find(domain, localedir=None, languages=None, all=0):
-            languages = languages or []
-            if domain == 'domain_1':
-                return 'translation-file' if any(x in ['zh', 'es', 'fil']
-                                                 for x in languages) else None
-            elif domain == 'domain_2':
-                return 'translation-file' if any(x in ['fr', 'zh_Hant']
-                                                 for x in languages) else None
-            return None
-        self.stubs.Set(gettext, 'find', _mock_gettext_find)
-
-        # en_US should always be available no matter the domain
-        # and it should also always be the first element since order matters
-        domain_1_languages = _gettextutils.get_available_languages('domain_1')
-        domain_2_languages = _gettextutils.get_available_languages('domain_2')
-        self.assertEqual('en_US', domain_1_languages[0])
-        self.assertEqual('en_US', domain_2_languages[0])
-        # The domain languages should be included after en_US with
-        # with their respective aliases when it applies
-        self.assertEqual(6, len(domain_1_languages))
-        self.assertIn('zh', domain_1_languages)
-        self.assertIn('zh_CN', domain_1_languages)
-        self.assertIn('es', domain_1_languages)
-        self.assertIn('fil', domain_1_languages)
-        self.assertIn('tl_PH', domain_1_languages)
-        self.assertEqual(4, len(domain_2_languages))
-        self.assertIn('fr', domain_2_languages)
-        self.assertIn('zh_Hant', domain_2_languages)
-        self.assertIn('zh_TW', domain_2_languages)
-        self.assertEqual(2, len(_gettextutils._AVAILABLE_LANGUAGES))
-        # Now test an unknown domain, only en_US should be included
-        unknown_domain_languages = _gettextutils.get_available_languages('huh')
-        self.assertEqual(1, len(unknown_domain_languages))
-        self.assertIn('en_US', unknown_domain_languages)
diff -Nru python-oslo.i18n-1.1.0/tests/test_handler.py python-oslo.i18n-1.3.0/tests/test_handler.py
--- python-oslo.i18n-1.1.0/tests/test_handler.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_handler.py	2015-01-08 14:46:13.000000000 -0500
@@ -20,9 +20,9 @@
 from oslotest import base as test_base
 import six
 
-from oslo.i18n import _message
 from oslo.i18n import log as i18n_log
-from tests import fakes
+from oslo_i18n import _message
+from oslo_i18n.tests import fakes
 
 LOG = logging.getLogger(__name__)
 
diff -Nru python-oslo.i18n-1.1.0/tests/test_lazy.py python-oslo.i18n-1.3.0/tests/test_lazy.py
--- python-oslo.i18n-1.1.0/tests/test_lazy.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_lazy.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,40 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslotest import base as test_base
-
-from oslo.i18n import _lazy
-
-
-class LazyTest(test_base.BaseTestCase):
-
-    def setUp(self):
-        super(LazyTest, self).setUp()
-        self._USE_LAZY = _lazy.USE_LAZY
-
-    def tearDown(self):
-        _lazy.USE_LAZY = self._USE_LAZY
-        super(LazyTest, self).tearDown()
-
-    def test_enable_lazy(self):
-        _lazy.USE_LAZY = False
-        _lazy.enable_lazy()
-        self.assertTrue(_lazy.USE_LAZY)
-
-    def test_disable_lazy(self):
-        _lazy.USE_LAZY = True
-        _lazy.enable_lazy(False)
-        self.assertFalse(_lazy.USE_LAZY)
diff -Nru python-oslo.i18n-1.1.0/tests/test_locale_dir_variable.py python-oslo.i18n-1.3.0/tests/test_locale_dir_variable.py
--- python-oslo.i18n-1.1.0/tests/test_locale_dir_variable.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_locale_dir_variable.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,32 +0,0 @@
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from oslotest import base as test_base
-import testscenarios.testcase
-
-from oslo.i18n import _locale
-
-
-class LocaleDirVariableTest(testscenarios.testcase.WithScenarios,
-                            test_base.BaseTestCase):
-
-    scenarios = [
-        ('simple', {'domain': 'simple', 'expected': 'SIMPLE_LOCALEDIR'}),
-        ('with_dot', {'domain': 'one.two', 'expected': 'ONE_TWO_LOCALEDIR'}),
-        ('with_dash', {'domain': 'one-two', 'expected': 'ONE_TWO_LOCALEDIR'}),
-    ]
-
-    def test_make_variable_name(self):
-        var = _locale.get_locale_dir_variable_name(self.domain)
-        self.assertEqual(self.expected, var)
diff -Nru python-oslo.i18n-1.1.0/tests/test_logging.py python-oslo.i18n-1.3.0/tests/test_logging.py
--- python-oslo.i18n-1.1.0/tests/test_logging.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_logging.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,42 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import mock
-from oslotest import base as test_base
-
-from oslo.i18n import _factory
-
-
-class LogLevelTranslationsTest(test_base.BaseTestCase):
-
-    def test_info(self):
-        self._test('info')
-
-    def test_warning(self):
-        self._test('warning')
-
-    def test_error(self):
-        self._test('error')
-
-    def test_critical(self):
-        self._test('critical')
-
-    def _test(self, level):
-        with mock.patch.object(_factory.TranslatorFactory,
-                               '_make_translation_func') as mtf:
-            tf = _factory.TranslatorFactory('domain')
-            getattr(tf, 'log_%s' % level)
-            mtf.assert_called_with('domain-log-%s' % level)
diff -Nru python-oslo.i18n-1.1.0/tests/test_message.py python-oslo.i18n-1.3.0/tests/test_message.py
--- python-oslo.i18n-1.1.0/tests/test_message.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_message.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,518 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from __future__ import unicode_literals
-
-import logging
-
-import mock
-from oslotest import base as test_base
-import six
-import testtools
-
-from oslo.i18n import _message
-from tests import fakes
-from tests import utils
-
-LOG = logging.getLogger(__name__)
-
-
-class MessageTestCase(test_base.BaseTestCase):
-    """Unit tests for locale Message class."""
-
-    def test_message_id_and_message_text(self):
-        message = _message.Message('1')
-        self.assertEqual('1', message.msgid)
-        self.assertEqual('1', message)
-        message = _message.Message('1', msgtext='A')
-        self.assertEqual('1', message.msgid)
-        self.assertEqual('A', message)
-
-    def test_message_is_unicode(self):
-        message = _message.Message('some %s') % 'message'
-        self.assertIsInstance(message, six.text_type)
-
-    @mock.patch('locale.getdefaultlocale')
-    @mock.patch('gettext.translation')
-    def test_create_message_non_english_default_locale(self,
-                                                       mock_translation,
-                                                       mock_getdefaultlocale):
-        msgid = 'A message in English'
-        es_translation = 'A message in Spanish'
-
-        es_translations = {msgid: es_translation}
-        translations_map = {'es': es_translations}
-        translator = fakes.FakeTranslations.translator(translations_map)
-        mock_translation.side_effect = translator
-        mock_getdefaultlocale.return_value = ('es',)
-
-        message = _message.Message(msgid)
-
-        # The base representation of the message is in Spanish, as well as
-        # the default translation, since the default locale was Spanish.
-        self.assertEqual(es_translation, message)
-        self.assertEqual(es_translation, message.translate())
-
-    def test_translate_returns_unicode(self):
-        message = _message.Message('some %s') % 'message'
-        self.assertIsInstance(message.translate(), six.text_type)
-
-    def test_mod_with_named_parameters(self):
-        msgid = ("%(description)s\nCommand: %(cmd)s\n"
-                 "Exit code: %(exit_code)s\nStdout: %(stdout)r\n"
-                 "Stderr: %(stderr)r %%(something)s")
-        params = {'description': 'test1',
-                  'cmd': 'test2',
-                  'exit_code': 'test3',
-                  'stdout': 'test4',
-                  'stderr': 'test5',
-                  'something': 'trimmed'}
-
-        result = _message.Message(msgid) % params
-
-        expected = msgid % params
-        self.assertEqual(result, expected)
-        self.assertEqual(result.translate(), expected)
-
-    def test_multiple_mod_with_named_parameter(self):
-        msgid = ("%(description)s\nCommand: %(cmd)s\n"
-                 "Exit code: %(exit_code)s\nStdout: %(stdout)r\n"
-                 "Stderr: %(stderr)r")
-        params = {'description': 'test1',
-                  'cmd': 'test2',
-                  'exit_code': 'test3',
-                  'stdout': 'test4',
-                  'stderr': 'test5'}
-
-        # Run string interpolation the first time to make a new Message
-        first = _message.Message(msgid) % params
-
-        # Run string interpolation on the new Message, to replicate
-        # one of the error paths with some Exception classes we've
-        # implemented in OpenStack. We should receive a second Message
-        # object, but the translation results should be the same.
-        #
-        # The production code that triggers this problem does something
-        # like:
-        #
-        #    msg = _('there was a problem %(name)s') % {'name': 'some value'}
-        #    LOG.error(msg)
-        #    raise BadExceptionClass(msg)
-        #
-        # where BadExceptionClass does something like:
-        #
-        #    class BadExceptionClass(Exception):
-        #      def __init__(self, msg, **kwds):
-        #         super(BadExceptionClass, self).__init__(msg % kwds)
-        #
-        expected = first % {}
-
-        # Base message id should be the same
-        self.assertEqual(first.msgid, expected.msgid)
-
-        # Preserved arguments should be the same
-        self.assertEqual(first.params, expected.params)
-
-        # Should have different objects
-        self.assertIsNot(expected, first)
-
-        # Final translations should be the same
-        self.assertEqual(expected.translate(), first.translate())
-
-    def test_mod_with_named_parameters_no_space(self):
-        msgid = ("Request: %(method)s http://%(server)s:"
-                 "%(port)s%(url)s with headers %(headers)s")
-        params = {'method': 'POST',
-                  'server': 'test1',
-                  'port': 1234,
-                  'url': 'test2',
-                  'headers': {'h1': 'val1'}}
-
-        result = _message.Message(msgid) % params
-
-        expected = msgid % params
-        self.assertEqual(result, expected)
-        self.assertEqual(result.translate(), expected)
-
-    def test_mod_with_dict_parameter(self):
-        msgid = "Test that we can inject a dictionary %s"
-        params = {'description': 'test1'}
-
-        result = _message.Message(msgid) % params
-
-        expected = msgid % params
-        self.assertEqual(expected, result)
-        self.assertEqual(expected, result.translate())
-
-    def test_mod_with_integer_parameters(self):
-        msgid = "Some string with params: %d"
-        params = [0, 1, 10, 24124]
-
-        messages = []
-        results = []
-        for param in params:
-            messages.append(msgid % param)
-            results.append(_message.Message(msgid) % param)
-
-        for message, result in zip(messages, results):
-            self.assertEqual(type(result), _message.Message)
-            self.assertEqual(result.translate(), message)
-
-            # simulate writing out as string
-            result_str = '%s' % result.translate()
-            self.assertEqual(result_str, message)
-            self.assertEqual(result, message)
-
-    def test_mod_copies_parameters(self):
-        msgid = "Found object: %(current_value)s"
-        changing_dict = {'current_value': 1}
-        # A message created with some params
-        result = _message.Message(msgid) % changing_dict
-        # The parameters may change
-        changing_dict['current_value'] = 2
-        # Even if the param changes when the message is
-        # translated it should use the original param
-        self.assertEqual(result.translate(), 'Found object: 1')
-
-    def test_mod_deep_copies_parameters(self):
-        msgid = "Found list: %(current_list)s"
-        changing_list = list([1, 2, 3])
-        params = {'current_list': changing_list}
-        # Apply the params
-        result = _message.Message(msgid) % params
-        # Change the list
-        changing_list.append(4)
-        # Even though the list changed the message
-        # translation should use the original list
-        self.assertEqual(result.translate(), "Found list: [1, 2, 3]")
-
-    def test_mod_deep_copies_param_nodeep_param(self):
-        msgid = "Value: %s"
-        params = utils.NoDeepCopyObject(5)
-        # Apply the params
-        result = _message.Message(msgid) % params
-        self.assertEqual(result.translate(), "Value: 5")
-
-    def test_mod_deep_copies_param_nodeep_dict(self):
-        msgid = "Values: %(val1)s %(val2)s"
-        params = {'val1': 1, 'val2': utils.NoDeepCopyObject(2)}
-        # Apply the params
-        result = _message.Message(msgid) % params
-        self.assertEqual(result.translate(), "Values: 1 2")
-
-        # Apply again to make sure other path works as well
-        params = {'val1': 3, 'val2': utils.NoDeepCopyObject(4)}
-        result = _message.Message(msgid) % params
-        self.assertEqual(result.translate(), "Values: 3 4")
-
-    def test_mod_returns_a_copy(self):
-        msgid = "Some msgid string: %(test1)s %(test2)s"
-        message = _message.Message(msgid)
-        m1 = message % {'test1': 'foo', 'test2': 'bar'}
-        m2 = message % {'test1': 'foo2', 'test2': 'bar2'}
-
-        self.assertIsNot(message, m1)
-        self.assertIsNot(message, m2)
-        self.assertEqual(m1.translate(),
-                         msgid % {'test1': 'foo', 'test2': 'bar'})
-        self.assertEqual(m2.translate(),
-                         msgid % {'test1': 'foo2', 'test2': 'bar2'})
-
-    def test_mod_with_none_parameter(self):
-        msgid = "Some string with params: %s"
-        message = _message.Message(msgid) % None
-        self.assertEqual(msgid % None, message)
-        self.assertEqual(msgid % None, message.translate())
-
-    def test_mod_with_missing_parameters(self):
-        msgid = "Some string with params: %s %s"
-        test_me = lambda: _message.Message(msgid) % 'just one'
-        # Just like with strings missing parameters raise TypeError
-        self.assertRaises(TypeError, test_me)
-
-    def test_mod_with_extra_parameters(self):
-        msgid = "Some string with params: %(param1)s %(param2)s"
-        params = {'param1': 'test',
-                  'param2': 'test2',
-                  'param3': 'notinstring'}
-
-        result = _message.Message(msgid) % params
-
-        expected = msgid % params
-        self.assertEqual(result, expected)
-        self.assertEqual(result.translate(), expected)
-
-        # Make sure unused params still there
-        self.assertEqual(result.params.keys(), params.keys())
-
-    def test_mod_with_missing_named_parameters(self):
-        msgid = ("Some string with params: %(param1)s %(param2)s"
-                 " and a missing one %(missing)s")
-        params = {'param1': 'test',
-                  'param2': 'test2'}
-
-        test_me = lambda: _message.Message(msgid) % params
-        # Just like with strings missing named parameters raise KeyError
-        self.assertRaises(KeyError, test_me)
-
-    def test_add_disabled(self):
-        msgid = "A message"
-        test_me = lambda: _message.Message(msgid) + ' some string'
-        self.assertRaises(TypeError, test_me)
-
-    def test_radd_disabled(self):
-        msgid = "A message"
-        test_me = lambda: utils.SomeObject('test') + _message.Message(msgid)
-        self.assertRaises(TypeError, test_me)
-
-    @testtools.skipIf(six.PY3, 'test specific to Python 2')
-    def test_str_disabled(self):
-        msgid = "A message"
-        test_me = lambda: str(_message.Message(msgid))
-        self.assertRaises(UnicodeError, test_me)
-
-    @mock.patch('gettext.translation')
-    def test_translate(self, mock_translation):
-        en_message = 'A message in the default locale'
-        es_translation = 'A message in Spanish'
-        message = _message.Message(en_message)
-
-        es_translations = {en_message: es_translation}
-        translations_map = {'es': es_translations}
-        translator = fakes.FakeTranslations.translator(translations_map)
-        mock_translation.side_effect = translator
-
-        self.assertEqual(es_translation, message.translate('es'))
-
-    @mock.patch('gettext.translation')
-    def test_translate_message_from_unicoded_object(self, mock_translation):
-        en_message = 'A message in the default locale'
-        es_translation = 'A message in Spanish'
-        message = _message.Message(en_message)
-        es_translations = {en_message: es_translation}
-        translations_map = {'es': es_translations}
-        translator = fakes.FakeTranslations.translator(translations_map)
-        mock_translation.side_effect = translator
-
-        # Here we are not testing the Message object directly but the result
-        # of unicoding() an object whose unicode representation is a Message
-        obj = utils.SomeObject(message)
-        unicoded_obj = six.text_type(obj)
-
-        self.assertEqual(es_translation, unicoded_obj.translate('es'))
-
-    @mock.patch('gettext.translation')
-    def test_translate_multiple_languages(self, mock_translation):
-        en_message = 'A message in the default locale'
-        es_translation = 'A message in Spanish'
-        zh_translation = 'A message in Chinese'
-        message = _message.Message(en_message)
-
-        es_translations = {en_message: es_translation}
-        zh_translations = {en_message: zh_translation}
-        translations_map = {'es': es_translations,
-                            'zh': zh_translations}
-        translator = fakes.FakeTranslations.translator(translations_map)
-        mock_translation.side_effect = translator
-
-        self.assertEqual(es_translation, message.translate('es'))
-        self.assertEqual(zh_translation, message.translate('zh'))
-        self.assertEqual(en_message, message.translate(None))
-        self.assertEqual(en_message, message.translate('en'))
-        self.assertEqual(en_message, message.translate('XX'))
-
-    @mock.patch('gettext.translation')
-    def test_translate_message_with_param(self, mock_translation):
-        message_with_params = 'A message: %s'
-        es_translation = 'A message in Spanish: %s'
-        param = 'A Message param'
-
-        translations = {message_with_params: es_translation}
-        translator = fakes.FakeTranslations.translator({'es': translations})
-        mock_translation.side_effect = translator
-
-        msg = _message.Message(message_with_params)
-        msg = msg % param
-
-        default_translation = message_with_params % param
-        expected_translation = es_translation % param
-        self.assertEqual(expected_translation, msg.translate('es'))
-        self.assertEqual(default_translation, msg.translate('XX'))
-
-    @mock.patch('gettext.translation')
-    def test_translate_message_with_object_param(self, mock_translation):
-        message_with_params = 'A message: %s'
-        es_translation = 'A message in Spanish: %s'
-        param = 'A Message param'
-        param_translation = 'A Message param in Spanish'
-
-        translations = {message_with_params: es_translation,
-                        param: param_translation}
-        translator = fakes.FakeTranslations.translator({'es': translations})
-        mock_translation.side_effect = translator
-
-        msg = _message.Message(message_with_params)
-        param_msg = _message.Message(param)
-
-        # Here we are testing translation of a Message with another object
-        # that can be translated via its unicode() representation, this is
-        # very common for instance when modding an Exception with a Message
-        obj = utils.SomeObject(param_msg)
-        msg = msg % obj
-
-        default_translation = message_with_params % param
-        expected_translation = es_translation % param_translation
-
-        self.assertEqual(expected_translation, msg.translate('es'))
-        self.assertEqual(default_translation, msg.translate('XX'))
-
-    @mock.patch('gettext.translation')
-    def test_translate_message_with_param_from_unicoded_obj(self,
-                                                            mock_translation):
-        message_with_params = 'A message: %s'
-        es_translation = 'A message in Spanish: %s'
-        param = 'A Message param'
-
-        translations = {message_with_params: es_translation}
-        translator = fakes.FakeTranslations.translator({'es': translations})
-        mock_translation.side_effect = translator
-
-        msg = _message.Message(message_with_params)
-        msg = msg % param
-
-        default_translation = message_with_params % param
-        expected_translation = es_translation % param
-
-        obj = utils.SomeObject(msg)
-        unicoded_obj = six.text_type(obj)
-
-        self.assertEqual(expected_translation, unicoded_obj.translate('es'))
-        self.assertEqual(default_translation, unicoded_obj.translate('XX'))
-
-    @mock.patch('gettext.translation')
-    def test_translate_message_with_message_parameter(self, mock_translation):
-        message_with_params = 'A message with param: %s'
-        es_translation = 'A message with param in Spanish: %s'
-        message_param = 'A message param'
-        es_param_translation = 'A message param in Spanish'
-
-        translations = {message_with_params: es_translation,
-                        message_param: es_param_translation}
-        translator = fakes.FakeTranslations.translator({'es': translations})
-        mock_translation.side_effect = translator
-
-        msg = _message.Message(message_with_params)
-        msg_param = _message.Message(message_param)
-        msg = msg % msg_param
-
-        default_translation = message_with_params % message_param
-        expected_translation = es_translation % es_param_translation
-        self.assertEqual(expected_translation, msg.translate('es'))
-        self.assertEqual(default_translation, msg.translate('XX'))
-
-    @mock.patch('gettext.translation')
-    def test_translate_message_with_message_parameters(self, mock_translation):
-        message_with_params = 'A message with params: %s %s'
-        es_translation = 'A message with params in Spanish: %s %s'
-        message_param = 'A message param'
-        es_param_translation = 'A message param in Spanish'
-        another_message_param = 'Another message param'
-        another_es_param_translation = 'Another message param in Spanish'
-
-        translations = {message_with_params: es_translation,
-                        message_param: es_param_translation,
-                        another_message_param: another_es_param_translation}
-        translator = fakes.FakeTranslations.translator({'es': translations})
-        mock_translation.side_effect = translator
-
-        msg = _message.Message(message_with_params)
-        param_1 = _message.Message(message_param)
-        param_2 = _message.Message(another_message_param)
-        msg = msg % (param_1, param_2)
-
-        default_translation = message_with_params % (message_param,
-                                                     another_message_param)
-        expected_translation = es_translation % (es_param_translation,
-                                                 another_es_param_translation)
-        self.assertEqual(expected_translation, msg.translate('es'))
-        self.assertEqual(default_translation, msg.translate('XX'))
-
-    @mock.patch('gettext.translation')
-    def test_translate_message_with_named_parameters(self, mock_translation):
-        message_with_params = 'A message with params: %(param)s'
-        es_translation = 'A message with params in Spanish: %(param)s'
-        message_param = 'A Message param'
-        es_param_translation = 'A message param in Spanish'
-
-        translations = {message_with_params: es_translation,
-                        message_param: es_param_translation}
-        translator = fakes.FakeTranslations.translator({'es': translations})
-        mock_translation.side_effect = translator
-
-        msg = _message.Message(message_with_params)
-        msg_param = _message.Message(message_param)
-        msg = msg % {'param': msg_param}
-
-        default_translation = message_with_params % {'param': message_param}
-        expected_translation = es_translation % {'param': es_param_translation}
-        self.assertEqual(expected_translation, msg.translate('es'))
-        self.assertEqual(default_translation, msg.translate('XX'))
-
-    @mock.patch('locale.getdefaultlocale')
-    @mock.patch('gettext.translation')
-    def test_translate_message_non_default_locale(self,
-                                                  mock_translation,
-                                                  mock_getdefaultlocale):
-        message_with_params = 'A message with params: %(param)s'
-        es_translation = 'A message with params in Spanish: %(param)s'
-        zh_translation = 'A message with params in Chinese: %(param)s'
-        fr_translation = 'A message with params in French: %(param)s'
-
-        message_param = 'A Message param'
-        es_param_translation = 'A message param in Spanish'
-        zh_param_translation = 'A message param in Chinese'
-        fr_param_translation = 'A message param in French'
-
-        es_translations = {message_with_params: es_translation,
-                           message_param: es_param_translation}
-        zh_translations = {message_with_params: zh_translation,
-                           message_param: zh_param_translation}
-        fr_translations = {message_with_params: fr_translation,
-                           message_param: fr_param_translation}
-
-        translator = fakes.FakeTranslations.translator({'es': es_translations,
-                                                        'zh': zh_translations,
-                                                        'fr': fr_translations})
-        mock_translation.side_effect = translator
-        mock_getdefaultlocale.return_value = ('es',)
-
-        msg = _message.Message(message_with_params)
-        msg_param = _message.Message(message_param)
-        msg = msg % {'param': msg_param}
-
-        es_translation = es_translation % {'param': es_param_translation}
-        zh_translation = zh_translation % {'param': zh_param_translation}
-        fr_translation = fr_translation % {'param': fr_param_translation}
-
-        # Because sys.getdefaultlocale() was Spanish,
-        # the default translation will be to Spanish
-        self.assertEqual(es_translation, msg)
-        self.assertEqual(es_translation, msg.translate())
-        self.assertEqual(es_translation, msg.translate('es'))
-
-        # Translation into other locales still works
-        self.assertEqual(zh_translation, msg.translate('zh'))
-        self.assertEqual(fr_translation, msg.translate('fr'))
diff -Nru python-oslo.i18n-1.1.0/tests/test_public_api.py python-oslo.i18n-1.3.0/tests/test_public_api.py
--- python-oslo.i18n-1.1.0/tests/test_public_api.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_public_api.py	2015-01-08 14:46:13.000000000 -0500
@@ -17,7 +17,7 @@
 import mock
 
 from oslo import i18n
-from oslo.i18n import _lazy
+from oslo_i18n import _lazy
 
 
 class PublicAPITest(unittest.TestCase):
diff -Nru python-oslo.i18n-1.1.0/tests/test_translate.py python-oslo.i18n-1.3.0/tests/test_translate.py
--- python-oslo.i18n-1.1.0/tests/test_translate.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_translate.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,44 +0,0 @@
-# Copyright 2012 Red Hat, Inc.
-# Copyright 2013 IBM Corp.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from __future__ import unicode_literals
-
-import mock
-from oslotest import base as test_base
-
-from oslo.i18n import _message
-from oslo.i18n import _translate
-from tests import fakes
-from tests import utils
-
-
-class TranslateTest(test_base.BaseTestCase):
-
-    @mock.patch('gettext.translation')
-    def test_translate(self, mock_translation):
-        en_message = 'A message in the default locale'
-        es_translation = 'A message in Spanish'
-        message = _message.Message(en_message)
-
-        es_translations = {en_message: es_translation}
-        translations_map = {'es': es_translations}
-        translator = fakes.FakeTranslations.translator(translations_map)
-        mock_translation.side_effect = translator
-
-        # translate() works on msgs and on objects whose unicode reps are msgs
-        obj = utils.SomeObject(message)
-        self.assertEqual(es_translation, _translate.translate(message, 'es'))
-        self.assertEqual(es_translation, _translate.translate(obj, 'es'))
diff -Nru python-oslo.i18n-1.1.0/tests/test_warning.py python-oslo.i18n-1.3.0/tests/test_warning.py
--- python-oslo.i18n-1.1.0/tests/test_warning.py	1969-12-31 19:00:00.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/test_warning.py	2015-01-08 14:46:13.000000000 -0500
@@ -0,0 +1,61 @@
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import imp
+import os
+import warnings
+
+import mock
+from oslotest import base as test_base
+import six
+
+
+class DeprecationWarningTest(test_base.BaseTestCase):
+
+    @mock.patch('warnings.warn')
+    def test_warning(self, mock_warn):
+        import oslo.i18n
+        imp.reload(oslo.i18n)
+        self.assertTrue(mock_warn.called)
+        args = mock_warn.call_args
+        self.assertIn('oslo_i18n', args[0][0])
+        self.assertIn('deprecated', args[0][0])
+        self.assertTrue(issubclass(args[0][1], DeprecationWarning))
+
+    def test_real_warning(self):
+        with warnings.catch_warnings(record=True) as warning_msgs:
+            warnings.resetwarnings()
+            warnings.simplefilter('always', DeprecationWarning)
+            import oslo.i18n
+
+            # Use a separate function to get the stack level correct
+            # so we know the message points back to this file. This
+            # corresponds to an import or reload, which isn't working
+            # inside the test under Python 3.3. That may be due to a
+            # difference in the import implementation not triggering
+            # warnings properly when the module is reloaded, or
+            # because the warnings module is mostly implemented in C
+            # and something isn't cleanly resetting the global state
+            # used to track whether a warning needs to be
+            # emitted. Whatever the cause, we definitely see the
+            # warnings.warn() being invoked on a reload (see the test
+            # above) and warnings are reported on the console when we
+            # run the tests. A simpler test script run outside of
+            # testr does correctly report the warnings.
+            def foo():
+                oslo.i18n.deprecated()
+
+            foo()
+            self.assertEqual(1, len(warning_msgs))
+            msg = warning_msgs[0]
+            self.assertIn('oslo_i18n', six.text_type(msg.message))
+            self.assertEqual('test_warning.py', os.path.basename(msg.filename))
diff -Nru python-oslo.i18n-1.1.0/tests/utils.py python-oslo.i18n-1.3.0/tests/utils.py
--- python-oslo.i18n-1.1.0/tests/utils.py	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tests/utils.py	1969-12-31 19:00:00.000000000 -0500
@@ -1,42 +0,0 @@
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import six
-
-
-class SomeObject(object):
-
-    def __init__(self, message):
-        self.message = message
-
-    def __unicode__(self):
-        return self.message
-    # alias for Python 3
-    __str__ = __unicode__
-
-
-class NoDeepCopyObject(object):
-
-    def __init__(self, value):
-        self.value = value
-
-    if six.PY3:
-        def __str__(self):
-            return str(self.value)
-    else:
-        def __unicode__(self):
-            return unicode(self.value)
-
-    def __deepcopy__(self, memo):
-        raise TypeError('Deep Copy not supported')
diff -Nru python-oslo.i18n-1.1.0/tox.ini python-oslo.i18n-1.3.0/tox.ini
--- python-oslo.i18n-1.1.0/tox.ini	2014-12-02 10:23:02.000000000 -0500
+++ python-oslo.i18n-1.3.0/tox.ini	2015-01-08 14:46:13.000000000 -0500
@@ -38,4 +38,4 @@
 
 [hacking]
 import_exceptions =
-    oslo.i18n._i18n._
+    oslo_i18n._i18n._
Download as text