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
|
What's new in this release?
===========================
Below is a list of all relevant changes since release 1.5.1. Older
changes are in the file HISTORY. The most recent changes are listed
first.
A note on attributions: while I have sprinkled some names throughout
here, I'm grateful to many more people who remain unnamed. You may
find your name in the ACKS file. If you believe you deserve more
credit, let me know and I'll add you to the list!
(In the sake of steramlining the release process, I'm now using output
from rcs2log. This gives complete disclosure but is more verbose and
requires more effort to read. Let me know if this is acceptable.
--Guido.)
======================================================================
From 1.5.2c1 to 1.5.2 (final)
=============================
Tue Apr 13 15:44:49 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* PCbuild/python15.wse: Bump version to 1.5.2 (final)
* PCbuild/python15.dsp: Added shamodule.c
* PC/config.c: Added sha module!
* README, Include/patchlevel.h: Prepare for final release.
* Misc/ACKS:
More (Cameron Laird is honorary; the others are 1.5.2c1 testers).
* Python/thread_solaris.h:
While I can't really test this thoroughly, Pat Knight and the Solaris
man pages suggest that the proper thing to do is to add THR_NEW_LWP to
the flags on thr_create(), and that there really isn't a downside, so
I'll do that.
* Misc/ACKS:
Bunch of new names who helped iron out the last wrinkles of 1.5.2.
* PC/python_nt.rc:
Bump the myusterious M$ version number from 1,5,2,1 to 1,5,2,3.
(I can't even display this on NT, maybe Win/98 can?)
* Lib/pstats.py:
Fix mysterious references to jprofile that were in the source since
its creation. I'm assuming these were once valid references to "Jim
Roskind's profile"...
* Lib/Attic/threading_api.py:
Removed; since long subsumed in Doc/lib/libthreading.tex
* Modules/socketmodule.c:
Put back __osf__ support for gethostbyname_r(); the real bug was that
it was being used even without threads. This of course might be an
all-platform problem so now we only use the _r variant when we are
using threads.
Mon Apr 12 22:51:20 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Modules/cPickle.c:
Fix accidentally reversed NULL test in load_mark(). Suggested by
Tamito Kajiyama. (This caused a bug only on platforms where malloc(0)
returns NULL.)
* README:
Add note about popen2 problem on Linux noticed by Pablo Bleyer.
* README: Add note about -D_REENTRANT for HP-UX 10.20.
* Modules/Makefile.pre.in: 'clean' target should remove hassignal.
* PC/Attic/vc40.mak, PC/readme.txt:
Remove all VC++ info (except VC 1.5) from readme.txt;
remove the VC++ 4.0 project file; remove the unused _tkinter extern defs.
* README: Clarify PC build instructions (point to PCbuild).
* Modules/zlibmodule.c: Cast added by Jack Jansen (for Mac port).
* Lib/plat-sunos5/CDIO.py, Lib/plat-linux2/CDROM.py:
Forgot to add this file. CDROM device parameters.
* Lib/gzip.py: Two different changes.
1. Jack Jansen reports that on the Mac, the time may be negative, and
solves this by adding a write32u() function that writes an unsigned
long.
2. On 64-bit platforms the CRC comparison fails; I've fixed this by
casting both values to be compared to "unsigned long" i.e. modulo
0x100000000L.
Sat Apr 10 18:42:02 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* PC/Attic/_tkinter.def: No longer needed.
* Misc/ACKS: Correct missed character in Andrew Dalke's name.
* README: Add DEC Ultrix notes (from Donn Cave's email).
* configure: The usual
* configure.in:
Quote a bunch of shell variables used in test, related to long-long.
* Objects/fileobject.c, Modules/shamodule.c, Modules/regexpr.c:
casts for picky compilers.
* Modules/socketmodule.c:
3-arg gethostbyname_r doesn't really work on OSF/1.
* PC/vc15_w31/_.c, PC/vc15_lib/_.c, Tools/pynche/__init__.py:
Avoid totally empty files.
Fri Apr 9 14:56:35 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Tools/scripts/fixps.py: Use re instead of regex.
Don't rewrite the file in place.
(Reported by Andy Dustman.)
* Lib/netrc.py, Lib/shlex.py: Get rid of #! line
Thu Apr 8 23:13:37 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* PCbuild/python15.wse: Use the Tcl 8.0.5 installer.
Add a variable %_TCL_% that makes it easier to switch to a different version.
======================================================================
From 1.5.2b2 to 1.5.2c1
=======================
Thu Apr 8 23:13:37 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* PCbuild/python15.wse:
Release 1.5.2c1. Add IDLE and Uninstall to program group.
Don't distribute zlib.dll. Tweak some comments.
* PCbuild/zlib.dsp: Now using static zlib 1.1.3
* Lib/dos-8x3/userdict.py, Lib/dos-8x3/userlist.py, Lib/dos-8x3/test_zli.py, Lib/dos-8x3/test_use.py, Lib/dos-8x3/test_pop.py, Lib/dos-8x3/test_pic.py, Lib/dos-8x3/test_ntp.py, Lib/dos-8x3/test_gzi.py, Lib/dos-8x3/test_fcn.py, Lib/dos-8x3/test_cpi.py, Lib/dos-8x3/test_bsd.py, Lib/dos-8x3/posixfil.py, Lib/dos-8x3/mimetype.py, Lib/dos-8x3/nturl2pa.py, Lib/dos-8x3/compilea.py, Lib/dos-8x3/exceptio.py, Lib/dos-8x3/basehttp.py:
The usual
* Include/patchlevel.h: Release 1.5.2c1
* README: Release 1.5.2c1.
* Misc/NEWS: News for the 1.5.2c1 release.
* Lib/test/test_strftime.py:
On Windows, we suddenly find, strftime() may return "" for an
unsupported format string. (I guess this is because the logic for
deciding whether to reallocate the buffer or not has been improved.)
This caused the test code to crash on result[0]. Fix this by assuming
an empty result also means the format is not supported.
* Demo/tkinter/matt/window-creation-w-location.py:
This demo imported some private code from Matt. Make it cripple along.
* Lib/lib-tk/Tkinter.py:
Delete an accidentally checked-in feature that actually broke more
than was worth it: when deleting a canvas item, it would try to
automatically delete the bindings for that item. Since there's
nothing that says you can't reuse the tag and still have the bindings,
this is not correct. Also, it broke at least one demo
(Demo/tkinter/matt/rubber-band-box-demo-1.py).
* Python/thread_wince.h: Win/CE thread support by Mark Hammond.
Wed Apr 7 20:23:17 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Modules/zlibmodule.c:
Patch by Andrew Kuchling to unflush() (flush() for deflating).
Without this, if inflate() returned Z_BUF_ERROR asking for more output
space, we would report the error; now, we increase the buffer size and
try again, just as for Z_OK.
* Lib/test/test_gzip.py: Use binary mode for all gzip files we open.
* Tools/idle/ChangeLog: New change log.
* Tools/idle/README.txt, Tools/idle/NEWS.txt: New version.
* Python/pythonrun.c:
Alas, get rid of the Win specific hack to ask the user to press Return
before exiting when an error happened. This didn't work right when
Python is invoked from a daemon.
* Tools/idle/idlever.py: Version bump awaiting impending new release.
(Not much has changed :-( )
* Lib/lib-tk/Tkinter.py:
lower, tkraise/lift hide Misc.lower, Misc.tkraise/lift,
so the preferred name for them is tag_lower, tag_raise
(similar to tag_bind, and similar to the Text widget);
unfortunately can't delete the old ones yet (maybe in 1.6)
* Python/thread.c, Python/strtod.c, Python/mystrtoul.c, Python/import.c, Python/ceval.c:
Changes by Mark Hammond for Windows CE. Mostly of the form
#ifdef DONT_HAVE_header_H ... #endif around #include <header.h>.
* Python/bltinmodule.c:
Remove unused variable from complex_from_string() code.
* Include/patchlevel.h:
Add the possibility of a gamma release (release candidate).
Add '+' to string version number to indicate we're beyond b2 now.
* Modules/posixmodule.c: Add extern decl for fsync() for SunOS 4.x.
* Lib/smtplib.py: Changes by Per Cederquist and The Dragon.
Per writes:
"""
The application where Signum Support uses smtplib needs to be able to
report good error messages to the user when sending email fails. To
help in diagnosing problems it is useful to be able to report the
entire message sent by the server, not only the SMTP error code of the
offending command.
A lot of the functions in sendmail.py unfortunately discards the
message, leaving only the code. The enclosed patch fixes that
problem.
The enclosed patch also introduces a base class for exceptions that
include an SMTP error code and error message, and make the code and
message available on separate attributes, so that surrounding code can
deal with them in whatever way it sees fit. I've also added some
documentation to the exception classes.
The constructor will now raise an exception if it cannot connect to
the SMTP server.
The data() method will raise an SMTPDataError if it doesn't receive
the expected 354 code in the middle of the exchange.
According to section 5.2.10 of RFC 1123 a smtp client must accept "any
text, including no text at all" after the error code. If the response
of a HELO command contains no text self.helo_resp will be set to the
empty string (""). The patch fixes the test in the sendmail() method
so that helo_resp is tested against None; if it has the empty string
as value the sendmail() method would invoke the helo() method again.
The code no longer accepts a -1 reply from the ehlo() method in
sendmail().
[Text about removing SMTPRecipientsRefused deleted --GvR]
"""
and also:
"""
smtplib.py appends an extra blank line to the outgoing mail if the
`msg' argument to the sendmail method already contains a trailing
newline. This patch should fix the problem.
"""
The Dragon writes:
"""
Mostly I just re-added the SMTPRecipientsRefused exception
(the exeption object now has the appropriate info in it ) [Per had
removed this in his patch --GvR] and tweaked the behavior of the
sendmail method whence it throws the newly added SMTPHeloException (it
was closing the connection, which it shouldn't. whatever catches the
exception should do that. )
I pondered the change of the return values to tuples all around,
and after some thinking I decided that regularizing the return values was
too much of the Right Thing (tm) to not do.
My one concern is that code expecting an integer & getting a tuple
may fail silently.
(i.e. if it's doing :
x.somemethod() >= 400:
expecting an integer, the expression will always be true if it gets a
tuple instead. )
However, most smtplib code I've seen only really uses the
sendmail() method, so this wouldn't bother it. Usually code I've seen
that calls the other methods usually only calls helo() and ehlo() for
doing ESMTP, a feature which was not in the smtplib included with 1.5.1,
and thus I would think not much code uses it yet.
"""
Tue Apr 6 19:38:18 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/test/test_ntpath.py:
Fix the tests now that splitdrive() no longer treats UNC paths special.
(Some tests converted to splitunc() tests.)
* Lib/ntpath.py:
Withdraw the UNC support from splitdrive(). Instead, a new function
splitunc() parses UNC paths. The contributor of the UNC parsing in
splitdrive() doesn't like it, but I haven't heard a good reason to
keep it, and it causes some problems. (I think there's a
philosophical problem -- to me, the split*() functions are purely
syntactical, and the fact that \\foo is not a valid path doesn't mean
that it shouldn't be considered an absolute path.)
Also (quite separately, but strangely related to the philosophical
issue above) fix abspath() so that if win32api exists, it doesn't fail
when the path doesn't actually exist -- if GetFullPathName() fails,
fall back on the old strategy (join with getcwd() if neccessary, and
then use normpath()).
* configure.in, configure, config.h.in, acconfig.h:
For BeOS PowerPC. Chris Herborth.
Mon Apr 5 21:54:14 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Modules/timemodule.c:
Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on
#else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
* Misc/ACKS:
Bunch of new contributors, including 9 who contributed to the Docs,
reported by Fred.
Mon Apr 5 18:37:59 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
* Lib/gzip.py:
Oops, missed mode parameter to open().
* Lib/gzip.py:
Made the default mode 'rb' instead of 'r', for better cross-platform
support. (Based on comment on the documentation by Bernhard Reiter
<bernhard@csd.uwm.edu>).
Fri Apr 2 22:18:25 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Tools/scripts/dutree.py:
For reasons I dare not explain, this script should always execute
main() when imported (in other words, it is not usable as a module).
Thu Apr 1 15:32:30 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/test/test_cpickle.py: Jonathan Giddy write:
In test_cpickle.py, the module os got imported, but the line to remove
the temp file has gone missing.
Tue Mar 30 20:17:31 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/BaseHTTPServer.py: Per Cederqvist writes:
If you send something like "PUT / HTTP/1.0" to something derived from
BaseHTTPServer that doesn't define do_PUT, you will get a response
that begins like this:
HTTP/1.0 501 Unsupported method ('do_PUT')
Server: SimpleHTTP/0.3 Python/1.5
Date: Tue, 30 Mar 1999 18:53:53 GMT
The server should complain about 'PUT' instead of 'do_PUT'. This
patch should fix the problem.
Mon Mar 29 20:33:21 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/smtplib.py: Patch by Per Cederqvist, who writes:
"""
- It needlessly used the makefile() method for each response that is
read from the SMTP server.
- If the remote SMTP server closes the connection unexpectedly the
code raised an IndexError. It now raises an SMTPServerDisconnected
exception instead.
- The code now checks that all lines in a multiline response actually
contains an error code.
"""
The Dragon approves.
Mon Mar 29 20:25:40 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
* Lib/compileall.py:
When run as a script, report failures in the exit code as well.
Patch largely based on changes by Andrew Dalke, as discussed in the
distutils-sig.
Mon Mar 29 20:23:41 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/urllib.py:
Hack so that if a 302 or 301 redirect contains a relative URL, the
right thing "just happens" (basejoin() with old URL).
* Modules/cPickle.c:
Protection against picling to/from closed (real) file.
The problem was reported by Moshe Zadka.
* Lib/test/test_cpickle.py:
Test protection against picling to/from closed (real) file.
* Modules/timemodule.c: Chris Lawrence writes:
"""
The GNU folks, in their infinite wisdom, have decided not to implement
altzone in libc6; this would not be horrible, except that timezone
(which is implemented) includes the current DST setting (i.e. timezone
for Central is 18000 in summer and 21600 in winter). So Python's
timezone and altzone variables aren't set correctly during DST.
Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone
show the "right" thing on Linux (by using the tm_gmtoff stuff
available in BSD, which is how the GLIBC manual claims things should
be done) and (b) should cope with the southern hemisphere. In pursuit
of (b), I also took the liberty of renaming the "summer" and "winter"
variables to "july" and "jan". This patch should also make certain
time calculations on Linux actually work right (like the tz-aware
functions in the rfc822 module).
(It's hard to find DST that's currently being used in the southern
hemisphere; I tested using Africa/Windhoek.)
"""
* Lib/test/output/test_gzip:
Jonathan Giddy discovered this file was missing.
* Modules/shamodule.c:
Avoid warnings from AIX compiler. Reported by Vladimir (AIX is my
middlename) Marangozov, patch coded by Greg Stein.
* Tools/idle/ScriptBinding.py, Tools/idle/PyShell.py:
At Tim Peters' recommendation, add a dummy flush() method to PseudoFile.
Sun Mar 28 17:55:32 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Tools/scripts/ndiff.py: Tim Peters writes:
I should have waited overnight <wink/sigh>. Nothing wrong with the one I
sent, but I couldn't resist going on to add new -r1 / -r2 cmdline options
for recreating the original files from ndiff's output. That's attached, if
you're game! Us Windows guys don't usually have a sed sitting around
<wink>.
Sat Mar 27 13:34:01 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Tools/scripts/ndiff.py: Tim Peters writes:
Attached is a cleaned-up version of ndiff (added useful module
docstring, now echo'ed in case of cmd line mistake); added -q option
to suppress initial file identification lines; + other minor cleanups,
& a slightly faster match engine.
Fri Mar 26 22:36:00 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
* Tools/scripts/dutree.py:
During display, if EPIPE is raised, it's probably because a pager was
killed. Discard the error in that case, but propogate it otherwise.
Fri Mar 26 16:20:45 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/test/output/test_userlist, Lib/test/test_userlist.py:
Test suite for UserList.
* Lib/UserList.py: Use isinstance() where appropriate.
Reformatted with 4-space indent.
Fri Mar 26 16:11:40 1999 Barry Warsaw <bwarsaw@eric.cnri.reston.va.us>
* Tools/pynche/PyncheWidget.py:
Helpwin.__init__(): The text widget should get focus.
* Tools/pynche/pyColorChooser.py:
Removed unnecessary import `from PyncheWidget import PyncheWidget'
Fri Mar 26 15:32:05 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/test/output/test_userdict, Lib/test/test_userdict.py:
Test suite for UserDict
* Lib/UserDict.py: Improved a bunch of things.
The constructor now takes an optional dictionary.
Use isinstance() where appropriate.
Thu Mar 25 22:38:49 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/test/output/test_pickle, Lib/test/output/test_cpickle, Lib/test/test_pickle.py, Lib/test/test_cpickle.py:
Basic regr tests for pickle/cPickle
* Lib/pickle.py:
Don't use "exec" in find_class(). It's slow, unnecessary, and (as AMK
points out) it doesn't work in JPython Applets.
Thu Mar 25 21:50:27 1999 Andrew Kuchling <akuchlin@eric.cnri.reston.va.us>
* Lib/test/test_gzip.py:
Added a simple test suite for gzip. It simply opens a temp file,
writes a chunk of compressed data, closes it, writes another chunk, and
reads the contents back to verify that they are the same.
* Lib/gzip.py:
Based on a suggestion from bruce@hams.com, make a trivial change to
allow using the 'a' flag as a mode for opening a GzipFile. gzip
files, surprisingly enough, can be concatenated and then decompressed;
the effect is to concatenate the two chunks of data.
If we support it on writing, it should also be supported on reading.
This *wasn't* trivial, and required rearranging the code in the
reading path, particularly the _read() method.
Raise IOError instead of RuntimeError in two cases, 'Not a gzipped file'
and 'Unknown compression method'
Thu Mar 25 21:25:01 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/test/test_b1.py:
Add tests for float() and complex() with string args (Nick/Stephanie
Lockwood).
Thu Mar 25 21:21:08 1999 Andrew Kuchling <akuchlin@eric.cnri.reston.va.us>
* Modules/zlibmodule.c:
Add an .unused_data attribute to decompressor objects. If .unused_data
is not an empty string, this means that you have arrived at the
end of the stream of compressed data, and the contents of .unused_data are
whatever follows the compressed stream.
Thu Mar 25 21:16:07 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Python/bltinmodule.c:
Patch by Nick and Stephanie Lockwood to implement complex() with a string
argument. This closes TODO item 2.19.
Wed Mar 24 19:09:00 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Tools/webchecker/wcnew.py: Added Samuel Bayer's new webchecker.
Unfortunately his code breaks wcgui.py in a way that's not easy
to fix. I expect that this is a temporary situation --
eventually Sam's changes will be merged back in.
(The changes add a -t option to specify exceptions to the -x
option, and explicit checking for #foo style fragment ids.)
* Objects/dictobject.c:
Vladimir Marangozov contributed updated comments.
* Objects/bufferobject.c: Folded long lines.
* Lib/test/output/test_sha, Lib/test/test_sha.py:
Added Jeremy's test code for the sha module.
* Modules/shamodule.c, Modules/Setup.in:
Added Greg Stein and Andrew Kuchling's sha module.
Fix comments about zlib version and URL.
* Lib/test/test_bsddb.py: Remove the temp file when we're done.
* Include/pythread.h: Conform to standard boilerplate.
* configure.in, configure, BeOS/linkmodule, BeOS/ar-fake:
Chris Herborth: the new compiler in R4.1 needs some new options to work...
* Modules/socketmodule.c:
Implement two suggestions by Jonathan Giddy: (1) in AIX, clear the
data struct before calling gethostby{name,addr}_r(); (2) ignore the
3/5/6 args determinations made by the configure script and switch on
platform identifiers instead:
AIX, OSF have 3 args
Sun, SGI have 5 args
Linux has 6 args
On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether.
* Modules/socketmodule.c:
Vladimir Marangozov implements the AIX 3-arg gethostbyname_r code.
* Lib/mailbox.py:
Add readlines() to _Subfile class. Not clear who would need it, but
Chris Lawrence sent me a broken version; this one is a tad simpler and
more conforming to the standard.
Tue Mar 23 23:05:34 1999 Jeremy Hylton <jhylton@eric.cnri.reston.va.us>
* Lib/gzip.py: use struct instead of bit-manipulate in Python
Tue Mar 23 19:00:55 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Modules/Makefile.pre.in:
Add $(EXE) to various occurrences of python so it will work on Cygwin
with egcs (after setting EXE=.exe). Patch by Norman Vine.
* configure, configure.in:
Ack! It never defined HAVE_GETHOSTBYNAME_R so that code was never tested!
Mon Mar 22 22:25:39 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Include/thread.h:
Adding thread.h -- unused but for b/w compatibility.
As requested by Bill Janssen.
* configure.in, configure:
Add code to test for all sorts of gethostbyname_r variants,
donated by David Arnold.
* config.h.in, acconfig.h:
Add symbols for gethostbyname_r variants (sigh).
* Modules/socketmodule.c: Clean up pass for the previous patches.
- Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
glibc2.
- If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
don't know what code should be used.
- New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.
- Modify the gethostbyaddr() code to also hold on to the lock until
after it is safe to release, overlapping with the Python lock.
(Note: I think that it could in theory be possible that Python code
executed while gethostbyname_lock is held could attempt to reacquire
the lock -- e.g. in a signal handler or destructor. I will simply say
"don't do that then.")
* Modules/socketmodule.c: Jonathan Giddy writes:
Here's a patch to fix the race condition, which wasn't fixed by Rob's
patch. It holds the gethostbyname lock until the results are copied out,
which means that this lock and the Python global lock are held at the same
time. This shouldn't be a problem as long as the gethostbyname lock is
always acquired when the global lock is not held.
Mon Mar 22 19:25:30 1999 Andrew Kuchling <akuchlin@eric.cnri.reston.va.us>
* Modules/zlibmodule.c:
Fixed the flush() method of compression objects; the test for
the end of loop was incorrect, and failed when the flushmode != Z_FINISH.
Logic cleaned up and commented.
* Lib/test/test_zlib.py:
Added simple test for the flush() method of compression objects, trying the
different flush values Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH.
Mon Mar 22 15:28:08 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/shlex.py:
Bug reported by Tobias Thelen: missing "self." in assignment target.
Fri Mar 19 21:50:11 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Modules/arraymodule.c:
Use an unsigned cast to avoid a warning in VC++.
* Lib/dospath.py, Lib/ntpath.py:
New code for split() by Tim Peters, behaves more like posixpath.split().
* Objects/floatobject.c:
Fix a problem with Vladimir's PyFloat_Fini code: clear the free list; if
a block cannot be freed, add its free items back to the free list.
This is necessary to avoid leaking when Python is reinitialized later.
* Objects/intobject.c:
Fix a problem with Vladimir's PyInt_Fini code: clear the free list; if
a block cannot be freed, add its free items back to the free list, and
add its valid ints back to the small_ints array if they are in range.
This is necessary to avoid leaking when Python is reinitialized later.
* Lib/types.py:
Added BufferType, the type returned by the new builtin buffer(). Greg Stein.
* Python/bltinmodule.c:
New builtin buffer() creates a derived read-only buffer from any
object that supports the buffer interface (e.g. strings, arrays).
* Objects/bufferobject.c:
Added check for negative offset for PyBuffer_FromObject and check for
negative size for PyBuffer_FromMemory. Greg Stein.
Thu Mar 18 15:10:44 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/urlparse.py: Sjoerd Mullender writes:
If a filename on Windows starts with \\, it is converted to a URL
which starts with ////. If this URL is passed to urlparse.urlparse
you get a path that starts with // (and an empty netloc). If you pass
the result back to urlparse.urlunparse, you get a URL that starts with
//, which is parsed differently by urlparse.urlparse. The fix is to
add the (empty) netloc with accompanying slashes if the path in
urlunparse starts with //. Do this for all schemes that use a netloc.
* Lib/nturl2path.py: Sjoerd Mullender writes:
Pathnames of files on other hosts in the same domain
(\\host\path\to\file) are not translated correctly to URLs and back.
The URL should be something like file:////host/path/to/file.
Note that a combination of drive letter and remote host is not
possible.
Wed Mar 17 22:30:10 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/urlparse.py:
Delete non-standard-conforming code in urljoin() that would use the
netloc from the base url as the default netloc for the resulting url
even if the schemes differ.
Once upon a time, when the web was wild, this was a valuable hack
because some people had a URL referencing an ftp server colocated with
an http server without having the host in the ftp URL (so they could
replicate it or change the hostname easily).
More recently, after the file: scheme got added back to the list of
schemes that accept a netloc, it turns out that this caused weirdness
when joining an http: URL with a file: URL -- the resulting file: URL
would always inherit the host from the http: URL because the file:
scheme supports a netloc but in practice never has one.
There are two reasons to get rid of the old, once-valuable hack,
instead of removing the file: scheme from the uses_netloc list. One,
the RFC says that file: uses the netloc syntax, and does not endorse
the old hack. Two, neither netscape 4.5 nor IE 4.0 support the old
hack.
* Include/ceval.h, Include/abstract.h:
Add DLL level b/w compat for PySequence_In and PyEval_CallObject
Tue Mar 16 21:54:50 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/lib-tk/Tkinter.py: Bug reported by Jim Robinson:
An attempt to execute grid_slaves with arguments (0,0) results in
*all* of the slaves being returned, not just the slave associated with
row 0, column 0. This is because the test for arguments in the method
does not test to see if row (and column) does not equal None, but
rather just whether is evaluates to non-false. A value of 0 fails
this test.
Tue Mar 16 14:17:48 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
* Modules/cmathmodule.c:
Docstring fix: acosh() returns the hyperbolic arccosine, not the
hyperbolic cosine. Problem report via David Ascher by one of his
students.
Mon Mar 15 21:40:59 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* configure.in:
Should test for gethost*by*name_r, not for gethostname_r (which
doesn't exist and doesn't make sense).
* Modules/socketmodule.c:
Patch by Rob Riggs for Linux -- glibc2 has a different argument
converntion for gethostbyname_r() etc. than Solaris!
* Python/thread_pthread.h: Rob Riggs wrote:
"""
Spec says that on success pthread_create returns 0. It does not say
that an error code will be < 0. Linux glibc2 pthread_create() returns
ENOMEM (12) when one exceed process limits. (It looks like it should
return EAGAIN, but that's another story.)
For reference, see:
http://www.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html
"""
[I have a feeling that similar bugs were fixed before; perhaps someone
could check that all error checks no check for != 0?]
* Tools/bgen/bgen/bgenObjectDefinition.py:
New mixin class that defines cmp and hash that use
the ob_itself pointer. This allows (when using the mixin)
different Python objects pointing to the same C object and
behaving well as dictionary keys.
Or so sez Jack Jansen...
* Lib/urllib.py: Yet another patch by Sjoerd Mullender:
Don't convert URLs to URLs using pathname2url.
Fri Mar 12 22:15:43 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/cmd.py: Patch by Michael Scharf. He writes:
The module cmd requires for each do_xxx command a help_xxx
function. I think this is a little old fashioned.
Here is a patch: use the docstring as help if no help_xxx
function can be found.
[I'm tempted to rip out all the help_* functions from pdb, but I'll
resist it. Any takers? --Guido]
* Tools/freeze/freeze.py: Bug submitted by Wayne Knowles, who writes:
Under Windows, python freeze.py -o hello hello.py
creates all the correct files in the hello subdirectory, but the
Makefile has the directory prefix in it for frozen_extensions.c
nmake fails because it tries to locate hello/frozen_extensions.c
(His fix adds a call to os.path.basename() in the appropriate place.)
* Objects/floatobject.c, Objects/intobject.c:
Vladimir has restructured his code somewhat so that the blocks are now
represented by an explicit structure. (There are still too many casts
in the code, but that may be unavoidable.)
Also added code so that with -vv it is very chatty about what it does.
* Demo/zlib/zlibdemo.py, Demo/zlib/minigzip.py:
Change #! line to modern usage; also chmod +x
* Demo/pdist/rrcs, Demo/pdist/rcvs, Demo/pdist/rcsbump:
Change #! line to modern usage
* Lib/nturl2path.py, Lib/urllib.py: From: Sjoerd Mullender
The filename to URL conversion didn't properly quote special
characters.
The URL to filename didn't properly unquote special chatacters.
* Objects/floatobject.c:
OK, try again. Vladimir gave me a fix for the alignment bus error,
so here's his patch again. This time it works (at least on Solaris,
Linux and Irix).
Thu Mar 11 23:21:23 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Tools/idle/PathBrowser.py:
Don't crash when sys.path contains an empty string.
* Tools/idle/PathBrowser.py:
- Don't crash in the case where a superclass is a string instead of a
pyclbr.Class object; this can happen when the superclass is
unrecognizable (to pyclbr), e.g. when module renaming is used.
- Show a watch cursor when calling pyclbr (since it may take a while
recursively parsing imported modules!).
Thu Mar 11 16:04:04 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
* Lib/mimetypes.py:
Added .rdf and .xsl as application/xml types. (.rdf is for the
Resource Description Framework, a metadata encoding, and .xsl is for
the Extensible Stylesheet Language.)
Thu Mar 11 13:26:23 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/test/output/test_popen2, Lib/test/test_popen2.py:
Test for popen2 module, by Chris Tismer.
* Objects/floatobject.c:
Alas, Vladimir's patch caused a bus error (probably double
alignment?), and I didn't test it. Withdrawing it for now.
Wed Mar 10 22:55:47 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Objects/floatobject.c:
Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
floats on finalization.
* Objects/intobject.c:
Patch by Vladimir Marangoz to allow freeing of the allocated blocks of
integers on finalization.
* Tools/idle/EditorWindow.py, Tools/idle/Bindings.py:
Add PathBrowser to File module
* Tools/idle/PathBrowser.py:
"Path browser" - 4 scrolled lists displaying:
directories on sys.path
modules in selected directory
classes in selected module
methods of selected class
Sinlge clicking in a directory, module or class item updates the next
column with info about the selected item. Double clicking in a
module, class or method item opens the file (and selects the clicked
item if it is a class or method).
I guess eventually I should be using a tree widget for this, but the
ones I've seen don't work well enough, so for now I use the old
Smalltalk or NeXT style multi-column hierarchical browser.
* Tools/idle/MultiScrolledLists.py:
New utility: multiple scrolled lists in parallel
* Tools/idle/ScrolledList.py: - White background.
- Display "(None)" (or text of your choosing) when empty.
- Don't set the focus.
Tue Mar 9 19:31:21 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/urllib.py:
open_http also had the 'data is None' test backwards. don't call with the
extra argument if data is None.
* Demo/embed/demo.c:
Call Py_SetProgramName() instead of redefining getprogramname(),
reflecting changes in the runtime around 1.5 or earlier.
* Python/ceval.c:
Always test for an error return (usually NULL or -1) without setting
an exception.
* Modules/timemodule.c: Patch by Chris Herborth for BeOS code.
He writes:
I had an off-by-1000 error in floatsleep(),
and the problem with time.clock() is that it's not implemented properly
on QNX... ANSI says it's supposed to return _CPU_ time used by the
process, but on QNX it returns the amount of real time used... so I was
confused.
* Tools/bgen/bgen/macsupport.py: Small change by Jack Jansen.
Test for self.returntype behaving like OSErr rather than being it.
Thu Feb 25 16:14:58 1999 Jeremy Hylton <jhylton@eric.cnri.reston.va.us>
* Lib/urllib.py:
http_error had the 'data is None' test backwards. don't call with the
extra argument if data is None.
* Lib/urllib.py: change indentation from 8 spaces to 4 spaces
* Lib/urllib.py: pleasing the tabnanny
Thu Feb 25 14:26:02 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
* Lib/colorsys.py:
Oops, one more "x, y, z" to convert...
* Lib/colorsys.py:
Adjusted comment at the top to be less confusing, following Fredrik
Lundh's example.
Converted comment to docstring.
Wed Feb 24 18:49:15 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
* Lib/toaiff.py:
Use sndhdr instead of the obsolete whatsound module.
Wed Feb 24 18:42:38 1999 Jeremy Hylton <jhylton@eric.cnri.reston.va.us>
* Lib/urllib.py:
When performing a POST request, i.e. when the second argument to
urlopen is used to specify form data, make sure the second argument is
threaded through all of the http_error_NNN calls. This allows error
handlers like the redirect and authorization handlers to properly
re-start the connection.
Wed Feb 24 16:25:17 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/mhlib.py: Patch by Lars Wirzenius:
o the initial comment is wrong: creating messages is already
implemented
o Message.getbodytext: if the mail or it's part contains an
empty content-transfer-encoding header, the code used to
break; the change below treats an empty encoding value the same
as the other types that do not need decoding
o SubMessage.getbodytext was missing the decode argument; the
change below adds it; I also made it unconditionally return
the raw text if decoding was not desired, because my own
routines needed that (and it was easier than rewriting my
own routines ;-)
Wed Feb 24 00:35:43 1999 Barry Warsaw <bwarsaw@eric.cnri.reston.va.us>
* Python/bltinmodule.c (initerrors):
Make sure that the exception tuples ("base-classes" when
string-based exceptions are used) reflect the real class hierarchy,
i.e. that SystemExit derives from Exception not StandardError.
* Lib/exceptions.py:
Document the correct class hierarchy for SystemExit. It is not an
error and so it derives from Exception and not SystemError. The
docstring was incorrect but the implementation was fine.
Tue Feb 23 23:07:51 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/shutil.py:
Add import sys, needed by reference to sys.exc_info() in rmtree().
Discovered by Mitch Chapman.
* config.h.in:
Now that we don't have AC_CHECK_LIB(m, pow), the HAVE_LIBM symbol
disappears. It wasn't used anywhere anyway...
* Modules/arraymodule.c:
Carefully check for overflow when allocating the memory for fromfile
-- someone tried to pass in sys.maxint and got bitten by the bogus
calculations.
* configure.in:
Get rid of AC_CHECK_LIB(m, pow) since this is taken care of later with
LIBM (from --with-libm=...); this actually broke the customizability
offered by the latter option. Thanks go to Clay Spence for reporting
this.
* Lib/test/test_dl.py:
1. Print the error message (carefully) when a dl.open() fails in verbose mode.
2. When no test case worked, raise ImportError instead of failing.
* Python/bltinmodule.c:
Patch by Tim Peters to improve the range checks for range() and
xrange(), especially for platforms where int and long are different
sizes (so sys.maxint isn't actually the theoretical limit for the
length of a list, but the largest C int is -- sys.maxint is the
largest Python int, which is actually a C long).
* Makefile.in:
1. Augment the DG/UX rule so it doesn't break the BeOS build.
2. Add $(EXE) to various occurrences of python so it will work on
Cygwin with egcs (after setting EXE=.exe). These patches by
Norman Vine.
* Lib/posixfile.py:
According to Jeffrey Honig, bsd/os 2.0 - 4.0 should be added to the
list (of bsd variants that have a different lock structure).
* Lib/test/test_fcntl.py:
According to Jeffrey Honig, bsd/os 4.0 should be added to the list.
* Modules/timemodule.c:
Patch by Tadayoshi Funaba (with some changes) to be smarter about
guessing what happened when strftime() returns 0. Is it buffer
overflow or was the result simply 0 bytes long? (This happens for an
empty format string, or when the format string is a single %Z and the
timezone is unknown.) if the buffer is at least 256 times as long as
the format, assume the latter.
Mon Feb 22 19:01:42 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/urllib.py:
As Des Barry points out, we need to call pathname2url(file) in two
calls to addinfourl() in open_file().
* Modules/Setup.in: Document *static* -- in two places!
* Modules/timemodule.c:
We don't support leap seconds, so the seconds field of a time 9-tuple
should be in the range [0-59]. Noted by Tadayoshi Funaba.
* Modules/stropmodule.c:
In atoi(), don't use isxdigit() to test whether the last character
converted was a "digit" -- use isalnum(). This test is there only to
guard against "+" or "-" being interpreted as a valid int literal.
Reported by Takahiro Nakayama.
* Lib/os.py:
As Finn Bock points out, _P_WAIT etc. don't have a leading underscore
so they don't need to be treated specially here.
Mon Feb 22 15:38:58 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
* Misc/NEWS:
Typo: "apparentlt" --> "apparently"
Mon Feb 22 15:38:46 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
* Lib/urlparse.py: Steve Clift pointed out that 'file' allows a netloc.
* Modules/posixmodule.c:
The docstring for ttyname(..) claims a second "mode" argument. The
actual code does not allow such an argument. (Finn Bock.)
* Lib/lib-old/poly.py:
Dang. Even though this is obsolete code, somebody found a bug, and I
fix it. Oh well.
Thu Feb 18 20:51:50 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
* Lib/pyclbr.py:
Bow to font-lock at the end of the docstring, since it throws stuff
off.
Make sure the path paramter to readmodule() is a list before adding it
with sys.path, or the addition could fail.
======================================================================
From 1.5.2b1 to 1.5.2b2
=======================
General
-------
- Many memory leaks fixed.
- Many small bugs fixed.
- Command line option -OO (or -O -O) suppresses inclusion of doc
strings in resulting bytecode.
Windows-specific changes
------------------------
- New built-in module winsound provides an interface to the Win32
PlaySound() call.
- Re-enable the audioop module in the config.c file.
- On Windows, support spawnv() and associated P_* symbols.
- Fixed the conversion of times() return values on Windows.
- Removed freeze from the installer -- it doesn't work without the
source tree. (See FAQ 8.11.)
- On Windows 95/98, the Tkinter module now is smart enough to find
Tcl/Tk even when the PATH environment variable hasn't been set -- when
the import of _tkinter fails, it searches in a standard locations,
patches os.environ["PATH"], and tries again. When it still fails, a
clearer error message is produced. This should avoid most
installation problems with Tkinter use (e.g. in IDLE).
- The -i option doesn't make any calls to set[v]buf() for stdin --
this apparently screwed up _kbhit() and the _tkinter main loop.
- The ntpath module (and hence, os.path on Windows) now parses out UNC
paths (e.g. \\host\mountpoint\dir\file) as "drive letters", so that
splitdrive() will \\host\mountpoint as the drive and \dir\file as the
path. ** EXPERIMENTAL **
- Added a hack to the exit code so that if (1) the exit status is
nonzero and (2) we think we have our own DOS box (i.e. we're not
started from a command line shell), we print a message and wait for
the user to hit a key before the DOS box is closed.
- Updated the installer to WISE 5.0g. Added a dialog warning about
the imminent Tcl installation. Added a dialog to specify the program
group name in the start menu. Upgraded the Tcl installer to Tcl
8.0.4.
Changes to intrinsics
---------------------
- The repr() or str() of a module object now shows the __file__
attribute (i.e., the file which it was loaded), or the string
"(built-in)" if there is no __file__ attribute.
- The range() function now avoids overflow during its calculations (if
at all possible).
- New info string sys.hexversion, which is an integer encoding the
version in hexadecimal. In other words, hex(sys.hexversion) ==
0x010502b2 for Python 1.5.2b2.
New or improved ports
---------------------
- Support for Nextstep descendants (future Mac systems).
- Improved BeOS support.
- Support dynamic loading of shared libraries on NetBSD platforms that
use ELF (i.e., MIPS and Alpha systems).
Configuration/build changes
---------------------------
- The Lib/test directory is no longer included in the default module
search path (sys.path) -- "test" has been a package ever since 1.5.
- Now using autoconf 2.13.
New library modules
-------------------
- New library modules asyncore and asynchat: these form Sam Rushing's
famous asynchronous socket library. Sam has gracefully allowed me to
incorporate these in the standard Python library.
- New module statvfs contains indexing constants for [f]statvfs()
return tuple.
Changes to the library
----------------------
- The wave module (platform-independent support for Windows sound
files) has been fixed to actually make it work.
- The sunau module (platform-independent support for Sun/NeXT sound
files) has been fixed to work across platforms. Also, a weird
encoding bug in the header of the audio test data file has been
corrected.
- Fix a bug in the urllib module that occasionally tripped up
webchecker and other ftp retrieves.
- ConfigParser's get() method now accepts an optional keyword argument
(vars) that is substituted on top of the defaults that were setup in
__init__. You can now also have recusive references in your
configuration file.
- Some improvements to the Queue module, including a put_nowait()
module and an optional "block" second argument, to get() and put(),
defaulting to 1.
- The updated xmllib module is once again compatible with the version
present in Python 1.5.1 (this was accidentally broken in 1.5.2b1).
- The bdb module (base class for the debugger) now supports
canonicalizing pathnames used in breakpoints. The derived class must
override the new canonical() method for this to work. Also changed
clear_break() to the backwards compatible old signature, and added
clear_bpbynumber() for the new functionality.
- In sgmllib (and hence htmllib), recognize attributes even if they
don't have space in front of them. I.e. '<a
name="foo"href="bar.html">' will now have two attributes recognized.
- In the debugger (pdb), change clear syntax to support three
alternatives: clear; clear file:line; clear bpno bpno ...
- The os.path module now pretends to be a submodule within the os
"package", so you can do things like "from os.path import exists".
- The standard exceptions now have doc strings.
- In the smtplib module, exceptions are now classes. Also avoid
inserting a non-standard space after "TO" in rcpt() command.
- The rfc822 module's getaddrlist() method now uses all occurrences of
the specified header instead of just the first. Some other bugfixes
too (to handle more weird addresses found in a very large test set,
and to avoid crashes on certain invalid dates), and a small test
module has been added.
- Fixed bug in urlparse in the common-case code for HTTP URLs; it
would lose the query, fragment, and/or parameter information.
- The sndhdr module no longer supports whatraw() -- it depended on a
rare extenral program.
- The UserList module/class now supports the extend() method, like
real list objects.
- The uu module now deals better with trailing garbage generated by
some broke uuencoders.
- The telnet module now has an my_interact() method which uses threads
instead of select. The interact() method uses this by default on
Windows (where the single-threaded version doesn't work).
- Add a class to mailbox.py for dealing with qmail directory
mailboxes. The test code was extended to notice these being used as
well.
Changes to extension modules
----------------------------
- Support for the [f]statvfs() system call, where it exists.
- Fixed some bugs in cPickle where bad input could cause it to dump
core.
- Fixed cStringIO to make the writelines() function actually work.
- Added strop.expandtabs() so string.expandtabs() is now much faster.
- Added fsync() and fdatasync(), if they appear to exist.
- Support for "long files" (64-bit seek pointers).
- Fixed a bug in the zlib module's flush() function.
- Added access() system call. It returns 1 if access granted, 0 if
not.
- The curses module implements an optional nlines argument to
w.scroll(). (It then calls wscrl(win, nlines) instead of scoll(win).)
Changes to tools
----------------
- Some changes to IDLE; see Tools/idle/NEWS.txt.
- Latest version of Misc/python-mode.el included.
Changes to Tkinter
------------------
- Avoid tracebacks when an image is deleted after its root has been
destroyed.
Changes to the Python/C API
---------------------------
- When parentheses are used in a PyArg_Parse[Tuple]() call, any
sequence is now accepted, instead of requiring a tuple. This is in
line with the general trend towards accepting arbitrary sequences.
- Added PyModule_GetFilename().
- In PyNumber_Power(), remove unneeded and even harmful test for float
to the negative power (which is already and better done in
floatobject.c).
- New version identification symbols; read patchlevel.h for info. The
version numbers are now exported by Python.h.
- Rolled back the API version change -- it's back to 1007!
- The frozenmain.c function calls PyInitFrozenExtensions().
- Added 'N' format character to Py_BuildValue -- like 'O' but doesn't
INCREF.
======================================================================
From 1.5.2a2 to 1.5.2b1
=======================
Changes to intrinsics
---------------------
- New extension NotImplementedError, derived from RuntimeError. Not
used, but recommended use is for "abstract" methods to raise this.
- The parser will now spit out a warning or error when -t or -tt is
used for parser input coming from a string, too.
- The code generator now inserts extra SET_LINENO opcodes when
compiling multi-line argument lists.
- When comparing bound methods, use identity test on the objects, not
equality test.
New or improved ports
---------------------
- Chris Herborth has redone his BeOS port; it now works on PowerPC
(R3/R4) and x86 (R4 only). Threads work too in this port.
Renaming
--------
- Thanks to Chris Herborth, the thread primitives now have proper Py*
names in the source code (they already had those for the linker,
through some smart macros; but the source still had the old, un-Py
names).
Configuration/build changes
---------------------------
- Improved support for FreeBSD/3.
- Check for pthread_detach instead of pthread_create in libc.
- The makesetup script now searches EXECINCLUDEPY before INCLUDEPY.
- Misc/Makefile.pre.in now also looks at Setup.thread and Setup.local.
Otherwise modules such as thread didn't get incorporated in extensions.
New library modules
-------------------
- shlex.py by Eric Raymond provides a lexical analyzer class for
simple shell-like syntaxes.
- netrc.py by Eric Raymond provides a parser for .netrc files. (The
undocumented Netrc class in ftplib.py is now obsolete.)
- codeop.py is a new module that contains the compile_command()
function that was previously in code.py. This is so that JPython can
provide its own version of this function, while still sharing the
higher-level classes in code.py.
- turtle.py is a new module for simple turtle graphics. I'm still
working on it; let me know if you use this to teach Python to children
or other novices without prior programming experience.
Obsoleted library modules
-------------------------
- poly.py and zmod.py have been moved to Lib/lib-old to emphasize
their status of obsoleteness. They don't do a particularly good job
and don't seem particularly relevant to the Python core.
New tools
---------
- I've added IDLE: my Integrated DeveLopment Environment for Python.
Requires Tcl/Tk (and Tkinter). Works on Windows and Unix (and should
work on Macintosh, but I haven't been able to test it there; it does
depend on new features in 1.5.2 and perhaps even new features in
1.5.2b1, especially the new code module). This is very much a work in
progress. I'd like to hear how people like it compared to PTUI (or
any other IDE they are familiar with).
- New tools by Barry Warsaw:
= audiopy: controls the Solaris Audio device
= pynche: The PYthonically Natural Color and Hue Editor
= world: Print mappings between country names and DNS country codes
New demos
---------
- Demo/scripts/beer.py prints the lyrics to an arithmetic drinking
song.
- Demo/tkinter/guido/optionmenu.py shows how to do an option menu in
Tkinter. (By Fredrik Lundh -- not by me!)
Changes to the library
----------------------
- compileall.py now avoids recompiling .py files that haven't changed;
it adds a -f option to force recompilation.
- New version of xmllib.py by Sjoerd Mullender (0.2 with latest
patches).
- nntplib.py: statparse() no longer lowercases the message-id.
- types.py: use type(__stdin__) for FileType.
- urllib.py: fix translations for filenames with "funny" characters.
Patch by Sjoerd Mullender. Note that if you subclass one of the
URLopener classes, and you have copied code from the old urllib.py,
your subclass may stop working. A long-term solution is to provide
more methods so that you don't have to copy code.
- cgi.py: In read_multi, allow a subclass to override the class we
instantiate when we create a recursive instance, by setting the class
variable 'FieldStorageClass' to the desired class. By default, this
is set to None, in which case we use self.__class__ (as before).
Also, a patch by Jim Fulton to pass additional arguments to recursive
calls to the FieldStorage constructor from its read_multi method.
- UserList.py: In __getslice__, use self.__class__ instead of
UserList.
- In SimpleHTTPServer.py, the server specified in test() should be
BaseHTTPServer.HTTPServer, in case the request handler should want to
reference the two attributes added by BaseHTTPServer.server_bind. (By
Jeff Rush, for Bobo). Also open the file in binary mode, so serving
images from a Windows box might actually work.
- In CGIHTTPServer.py, the list of acceptable formats is -split-
on spaces but -joined- on commas, resulting in double commas
in the joined text. (By Jeff Rush.)
- SocketServer.py, patch by Jeff Bauer: a minor change to declare two
new threaded versions of Unix Server classes, using the ThreadingMixIn
class: ThreadingUnixStreamServer, ThreadingUnixDatagramServer.
- bdb.py: fix bomb on deleting a temporary breakpoint: there's no
method do_delete(); do_clear() was meant. By Greg Ward.
- getopt.py: accept a non-list sequence for the long options (request
by Jack Jansen). Because it might be a common mistake to pass a
single string, this situation is treated separately. Also added
docstrings (copied from the library manual) and removed the (now
redundant) module comments.
- tempfile.py: improvements to avoid security leaks.
- code.py: moved compile_command() to new module codeop.py.
- pickle.py: support pickle format 1.3 (binary float added). By Jim
Fulton. Also get rid of the undocumented obsolete Pickler dump_special
method.
- uu.py: Move 'import sys' to top of module, as noted by Tim Peters.
- imaplib.py: fix problem with some versions of IMAP4 servers that
choose to mix the case in their CAPABILITIES response.
- cmp.py: use (f1, f2) as cache key instead of f1 + ' ' + f2. Noted
by Fredrik Lundh.
Changes to extension modules
----------------------------
- More doc strings for several modules were contributed by Chris
Petrilli: math, cmath, fcntl.
- Fixed a bug in zlibmodule.c that could cause core dumps on
decompression of rarely occurring input.
- cPickle.c: new version from Jim Fulton, with Open Source copyright
notice. Also, initialize self->safe_constructors early on to prevent
crash in early dealloc.
- cStringIO.c: new version from Jim Fulton, with Open Source copyright
notice. Also fixed a core dump in cStringIO.c when doing seeks.
- mpzmodule.c: fix signed character usage in mpz.mpz(stringobjecty).
- readline.c: Bernard Herzog pointed out that rl_parse_and_bind
modifies its argument string (bad function!), so we make a temporary
copy.
- sunaudiodev.c: Barry Warsaw added more smarts to get the device and
control pseudo-device, per audio(7I).
Changes to tools
----------------
- New, improved version of Barry Warsaw's Misc/python-mode.el (editing
support for Emacs).
- tabnanny.py: added a -q ('quiet') option to tabnanny, which causes
only the names of offending files to be printed.
- freeze: when printing missing modules, also print the module they
were imported from.
- untabify.py: patch by Detlef Lannert to implement -t option
(set tab size).
Changes to Tkinter
------------------
- grid_bbox(): support new Tk API: grid bbox ?column row? ?column2
row2?
- _tkinter.c: RajGopal Srinivasan noted that the latest code (1.5.2a2)
doesn't work when running in a non-threaded environment. He added
some #ifdefs that fix this.
Changes to the Python/C API
---------------------------
- Bumped API version number to 1008 -- enough things have changed!
- There's a new macro, PyThreadState_GET(), which does the same work
as PyThreadState_Get() without the overhead of a function call (it
also avoids the error check). The two top calling locations of
PyThreadState_Get() have been changed to use this macro.
- All symbols intended for export from a DLL or shared library are now
marked as such (with the DL_IMPORT() macro) in the header file that
declares them. This was needed for the BeOS port, and should also
make some other ports easier. The PC port no longer needs the file
with exported symbols (PC/python_nt.def). There's also a DL_EXPORT
macro which is only used for init methods in extension modules, and
for Py_Main().
Invisible changes to internals
------------------------------
- Fixed a bug in new_buffersize() in fileobject.c which could
return a buffer size that was way too large.
- Use PySys_WriteStderr instead of fprintf in most places.
- dictobject.c: remove dead code discovered by Vladimir Marangozov.
- tupleobject.c: make tuples less hungry -- an extra item was
allocated but never used. Tip by Vladimir Marangozov.
- mymath.h: Metrowerks PRO4 finally fixes the hypot snafu. (Jack
Jansen)
- import.c: Jim Fulton fixes a reference count bug in
PyEval_GetGlobals.
- glmodule.c: check in the changed version after running the stubber
again -- this solves the conflict with curses over the 'clear' entry
point much nicer. (Jack Jansen had checked in the changes to cstubs
eons ago, but I never regenrated glmodule.c :-( )
- frameobject.c: fix reference count bug in PyFrame_New. Vladimir
Marangozov.
- stropmodule.c: add a missing DECREF in an error exit. Submitted by
Jonathan Giddy.
======================================================================
From 1.5.2a1 to 1.5.2a2
=======================
General
-------
- It is now a syntax error to have a function argument without a
default following one with a default.
- __file__ is now set to the .py file if it was parsed (it used to
always be the .pyc/.pyo file).
- Don't exit with a fatal error during initialization when there's a
problem with the exceptions.py module.
- New environment variable PYTHONOPTIMIZE can be used to set -O.
- New version of python-mode.el for Emacs.
Miscellaneous fixed bugs
------------------------
- No longer print the (confusing) error message about stack underflow
while compiling.
- Some threading and locking bugs fixed.
- When errno is zero, report "Error", not "Success".
Documentation
-------------
- Documentation will be released separately.
- Doc strings added to array and md5 modules by Chris Petrilli.
Ports and build procedure
-------------------------
- Stop installing when a move or copy fails.
- New version of the OS/2 port code by Jeff Rush.
- The makesetup script handles absolute filenames better.
- The 'new' module is now enabled by default in the Setup file.
- I *think* I've solved the problem with the Linux build blowing up
sometimes due to a conflict between sigcheck/intrcheck and
signalmodule.
Built-in functions
------------------
- The second argument to apply() can now be any sequence, not just a
tuple.
Built-in types
--------------
- Lists have a new method: L1.extend(L2) is equivalent to the common
idiom L1[len(L1):] = L2.
- Better error messages when a sequence is indexed with a non-integer.
- Bettter error message when calling a non-callable object (include
the type in the message).
Python services
---------------
- New version of cPickle.c fixes some bugs.
- pickle.py: improved instantiation error handling.
- code.py: reworked quite a bit. New base class
InteractiveInterpreter and derived class InteractiveConsole. Fixed
several problems in compile_command().
- py_compile.py: print error message and continue on syntax errors.
Also fixed an old bug with the fstat code (it was never used).
- pyclbr.py: support submodules of packages.
String Services
---------------
- StringIO.py: raise the right exception (ValueError) for attempted
I/O on closed StringIO objects.
- re.py: fixed a bug in subn(), which caused .groups() to fail inside
the replacement function called by sub().
- The struct module has a new format 'P': void * in native mode.
Generic OS Services
-------------------
- Module time: Y2K robustness. 2-digit year acceptance depends on
value of time.accept2dyear, initialized from env var PYTHONY2K,
default 0. Years 00-68 mean 2000-2068, while 69-99 mean 1969-1999
(POSIX or X/Open recommendation).
- os.path: normpath(".//x") should return "x", not "/x".
- getpass.py: fall back on default_getpass() when sys.stdin.fileno()
doesn't work.
- tempfile.py: regenerate the template after a fork() call.
Optional OS Services
--------------------
- In the signal module, disable restarting interrupted system calls
when we have siginterrupt().
Debugger
--------
- No longer set __args__; this feature is no longer supported and can
affect the debugged code.
- cmd.py, pdb.py and bdb.py have been overhauled by Richard Wolff, who
added aliases and some other useful new features, e.g. much better
breakpoint support: temporary breakpoint, disabled breakpoints,
breakpoints with ignore counts, and conditions; breakpoints can be set
on a file before it is loaded.
Profiler
--------
- Changes so that JPython can use it. Also fix the calibration code
so it actually works again
.
Internet Protocols and Support
------------------------------
- imaplib.py: new version from Piers Lauder.
- smtplib.py: change sendmail() method to accept a single string or a
list or strings as the destination (commom newbie mistake).
- poplib.py: LIST with a msg argument fixed.
- urlparse.py: some optimizations for common case (http).
- urllib.py: support content-length in info() for ftp protocol;
support for a progress meter through a third argument to
urlretrieve(); commented out gopher test (the test site is dead).
Internet Data handling
----------------------
- sgmllib.py: support tags with - or . in their name.
- mimetypes.py: guess_type() understands 'data' URLs.
Restricted Execution
--------------------
- The classes rexec.RModuleLoader and rexec.RModuleImporter no
longer exist.
Tkinter
-------
- When reporting an exception, store its info in sys.last_*. Also,
write all of it to stderr.
- Added NS, EW, and NSEW constants, for grid's sticky option.
- Fixed last-minute bug in 1.5.2a1 release: need to include "mytime.h".
- Make bind variants without a sequence return a tuple of sequences
(formerly it returned a string, which wasn't very convenient).
- Add image commands to the Text widget (these are new in Tk 8.0).
- Added new listbox and canvas methods: {xview,yview}_{scroll,moveto}.)
- Improved the thread code (but you still can't call update() from
another thread on Windows).
- Fixed unnecessary references to _default_root in the new dialog
modules.
- Miscellaneous problems fixed.
Windows General
---------------
- Call LoadLibraryEx(..., ..., LOAD_WITH_ALTERED_SEARCH_PATH) to
search for dependent dlls in the directory containing the .pyd.
- In debugging mode, call DebugBreak() in Py_FatalError().
Windows Installer
-----------------
- Install zlib.dll in the DLLs directory instead of in the win32
system directory, to avoid conflicts with other applications that have
their own zlib.dll.
Test Suite
----------
- test_long.py: new test for long integers, by Tim Peters.
- regrtest.py: improved so it can be used for other test suites as
well.
- test_strftime.py: use re to compare test results, to support legal
variants (e.g. on Linux).
Tools and Demos
---------------
- Four new scripts in Tools/scripts: crlf.py and lfcr.py (to
remove/add Windows style '\r\n' line endings), untabify.py (to remove
tabs), and rgrep.yp (reverse grep).
- Improvements to Tools/freeze/. Each Python module is now written to
its own C file. This prevents some compilers or assemblers from
blowing up on large frozen programs, and saves recompilation time if
only a few modules are changed. Other changes too, e.g. new command
line options -x and -i.
- Much improved (and smaller!) version of Tools/scripts/mailerdaemon.py.
Python/C API
------------
- New mechanism to support extensions of the type object while
remaining backward compatible with extensions compiled for previous
versions of Python 1.5. A flags field indicates presence of certain
fields.
- Addition to the buffer API to differentiate access to bytes and
8-bit characters (in anticipation of Unicode characters).
- New argument parsing format t# ("text") to indicate 8-bit
characters; s# simply means 8-bit bytes, for backwards compatibility.
- New object type, bufferobject.c is an example and can be used to
create buffers from memory.
- Some support for 64-bit longs, including some MS platforms.
- Many calls to fprintf(stderr, ...) have been replaced with calls to
PySys_WriteStderr(...).
- The calling context for PyOS_Readline() has changed: it must now be
called with the interpreter lock held! It releases the lock around
the call to the function pointed to by PyOS_ReadlineFunctionPointer
(default PyOS_StdioReadline()).
- New APIs PyLong_FromVoidPtr() and PyLong_AsVoidPtr().
- Renamed header file "thread.h" to "pythread.h".
- The code string of code objects may now be anything that supports the
buffer API.
======================================================================
From 1.5.1 to 1.5.2a1
=====================
General
-------
- When searching for the library, a landmark that is a compiled module
(string.pyc or string.pyo) is also accepted.
- When following symbolic links to the python executable, use a loop
so that a symlink to a symlink can work.
- Added a hack so that when you type 'quit' or 'exit' at the
interpreter, you get a friendly explanation of how to press Ctrl-D (or
Ctrl-Z) to exit.
- New and improved Misc/python-mode.el (Python mode for Emacs).
- Revert a new feature in Unix dynamic loading: for one or two
revisions, modules were loaded using the RTLD_GLOBAL flag. It turned
out to be a bad idea.
Miscellaneous fixed bugs
------------------------
- All patches on the patch page have been integrated. (But much more
has been done!)
- Several memory leaks plugged (e.g. the one for classes with a
__getattr__ method).
- Removed the only use of calloc(). This triggered an obscure bug on
multiprocessor Sparc Solaris 2.6.
- Fix a peculiar bug that would allow "import sys.time" to succeed
(believing the built-in time module to be a part of the sys package).
- Fix a bug in the overflow checking when converting a Python long to
a C long (failed to convert -2147483648L, and some other cases).
Documentation
-------------
- Doc strings have been added to many extension modules: __builtin__,
errno, select, signal, socket, sys, thread, time. Also to methods of
list objects (try [].append.__doc__). A doc string on a type will now
automatically be propagated to an instance if the instance has methods
that are accessed in the usual way.
- The documentation has been expanded and the formatting improved.
(Remember that the documentation is now unbundled and has its own
release cycle though; see http://www.python.org/doc/.)
- Added Misc/Porting -- a mini-FAQ on porting to a new platform.
Ports and build procedure
-------------------------
- The BeOS port is now integrated. Courtesy Chris Herborth.
- Symbol files for FreeBSD 2.x and 3.x have been contributed
(Lib/plat-freebsd[23]/*).
- Support HPUX 10.20 DCE threads.
- Finally fixed the configure script so that (on SGI) if -OPT:Olimit=0
works, it won't also use -Olimit 1500 (which gives a warning for every
file). Also support the SGI_ABI environment variable better.
- The makesetup script now understands absolute pathnames ending in .o
in the module -- it assumes it's a file for which we have no source.
- Other miscellaneous improvements to the configure script and
Makefiles.
- The test suite now uses a different sound sample.
Built-in functions
------------------
- Better checks for invalid input to int(), long(), string.atoi(),
string.atol(). (Formerly, a sign without digits would be accepted as
a legal ways to spell zero.)
- Changes to map() and filter() to use the length of a sequence only
as a hint -- if an IndexError happens earlier, take that. (Formerly,
this was considered an error.)
- Experimental feature in getattr(): a third argument can specify a
default (instead of raising AttributeError).
- Implement round() slightly different, so that for negative ndigits
no additional errors happen in the last step.
- The open() function now adds the filename to the exception when it
fails.
Built-in exceptions
-------------------
- New standard exceptions EnvironmentError and PosixError.
EnvironmentError is the base class for IOError and PosixError;
PosixError is the same as os.error. All this so that either exception
class can be instantiated with a third argument indicating a filename.
The built-in function open() and most os/posix functions that take a
filename argument now use this.
Built-in types
--------------
- List objects now have an experimental pop() method; l.pop() returns
and removes the last item; l.pop(i) returns and removes the item at
i. Also, the sort() method is faster again. Sorting is now also
safer: it is impossible for the sorting function to modify the list
while the sort is going on (which could cause core dumps).
- Changes to comparisons: numbers are now smaller than any other type.
This is done to prevent the circularity where [] < 0L < 1 < [] is
true. As a side effect, cmp(None, 0) is now positive instead of
negative. This *shouldn't* affect any working code, but I've found
that the change caused several "sleeping" bugs to become active, so
beware!
- Instance methods may now have other callable objects than just
Python functions as their im_func. Use new.instancemethod() or write
your own C code to create them; new.instancemethod() may be called
with None for the instance to create an unbound method.
- Assignment to __name__, __dict__ or __bases__ of a class object is
now allowed (with stringent type checks); also allow assignment to
__getattr__ etc. The cached values for __getattr__ etc. are
recomputed after such assignments (but not for derived classes :-( ).
- Allow assignment to some attributes of function objects: func_code,
func_defaults and func_doc / __doc__. (With type checks except for
__doc__ / func_doc .)
Python services
---------------
- New tests (in Lib/test): reperf.py (regular expression benchmark),
sortperf.py (list sorting benchmark), test_MimeWriter.py (test case
for the MimeWriter module).
- Generalized test/regrtest.py so that it is useful for testing other
packages.
- The ihooks.py module now understands package imports.
- In code.py, add a class that subsumes Fredrik Lundh's
PythonInterpreter class. The interact() function now uses this.
- In rlcompleter.py, in completer(), return None instead of raising an
IndexError when there are no more completions left.
- Fixed the marshal module to test for certain common kinds of invalid
input. (It's still not foolproof!)
- In the operator module, add an alias (now the preferred name)
"contains" for "sequenceincludes".
String Services
---------------
- In the string and strop modules, in the replace() function, treat an
empty pattern as an error (since it's not clear what was meant!).
- Some speedups to re.py, especially the string substitution and split
functions. Also added new function/method findall(), to find all
occurrences of a given substring.
- In cStringIO, add better argument type checking and support the
readonly 'closed' attribute (like regular files).
- In the struct module, unsigned 1-2 byte sized formats no longer
result in long integer values.
Miscellaneous services
----------------------
- In whrandom.py, added new method and function randrange(), same as
choice(range(start, stop, step)) but faster. This addresses the
problem that randint() was accidentally defined as taking an inclusive
range. Also, randint(a, b) is now redefined as randrange(a, b+1),
adding extra range and type checking to its arguments!
- Add some semi-thread-safety to random.gauss() (it used to be able to
crash when invoked from separate threads; now the worst it can do is
give a duplicate result occasionally).
- Some restructuring and generalization done to cmd.py.
- Major upgrade to ConfigParser.py; converted to using 're', added new
exceptions, support underscore in section header and option name. No
longer add 'name' option to every section; instead, add '__name__'.
- In getpass.py, don't use raw_input() to ask for the password -- we
don't want it to show up in the readline history! Also don't catch
interrupts (the try-finally already does all necessary cleanup).
Generic OS Services
-------------------
- New functions in os.py: makedirs(), removedirs(), renames(). New
variable: linesep (the line separator as found in binary files,
i.e. '\n' on Unix, '\r\n' on DOS/Windows, '\r' on Mac. Do *not* use
this with files opened in (default) text mode; the line separator used
will always be '\n'!
- Changes to the 'os.path' submodule of os.py: added getsize(),
getmtime(), getatime() -- these fetch the most popular items from the
stat return tuple.
- In the time module, add strptime(), if it exists. (This parses a
time according to a format -- the inverse of strftime().) Also,
remove the call to mktime() from strftime() -- it messed up the
formatting of some non-local times.
- In the socket module, added a new function gethostbyname_ex().
Also, don't use #ifdef to test for some symbols that are enums on some
platforms (and should exist everywhere).
Optional OS Services
--------------------
- Some fixes to gzip.py. In particular, the readlines() method now
returns the lines *with* trailing newline characters, like readlines()
of regular file objects. Also, it didn't work together with cPickle;
fixed that.
- In whichdb.py, support byte-swapped dbhash (bsddb) files.
- In anydbm.py, look at the type of an existing database to determine
which module to use to open it. (The anydbm.error exception is now a
tuple.)
Unix Services
-------------
- In the termios module, in tcsetattr(), initialize the structure vy
calling tcgetattr().
- Added some of the "wait status inspection" macros as functions to
the posix module (and thus to the os module): WEXITSTATUS(),
WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG().
- In the syslog module, make the default facility more intuitive
(matching the docs).
Debugger
--------
- In pdb.py, support for setting breaks on files/modules that haven't
been loaded yet.
Internet Protocols and Support
------------------------------
- Changes in urllib.py; sped up unquote() and quote(). Fixed an
obscure bug in quote_plus(). Added urlencode(dict) -- convenience
function for sending a POST request with urlopen(). Use the getpass
module to ask for a password. Rewrote the (test) main program so that
when used as a script, it can retrieve one or more URLs to stdout.
Use -t to run the self-test. Made the proxy code work again.
- In cgi.py, treat "HEAD" the same as "GET", so that CGI scripts don't
fail when someone asks for their HEAD. Also, for POST, set the
default content-type to application/x-www-form-urlencoded. Also, in
FieldStorage.__init__(), when method='GET', always get the query
string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an
explicitly passed in fp.
- The smtplib.py module now supports ESMTP and has improved standard
compliance, for picky servers.
- Improved imaplib.py.
- Fixed UDP support in SocketServer.py (it never worked).
- Fixed a small bug in CGIHTTPServer.py.
Internet Data handling
----------------------
- In rfc822.py, add a new class AddressList. Also support a new
overridable method, isheader(). Also add a get() method similar to
dictionaries (and make getheader() an alias for it). Also, be smarter
about seekable (test whether fp.tell() works) and test for presence of
unread() method before trying seeks.
- In sgmllib.py, restore the call to report_unbalanced() that was lost
long ago. Also some other improvements: handle <? processing
instructions >, allow . and - in entity names, and allow \r\n as line
separator.
- Some restructuring and generalization done to multifile.py; support
a 'seekable' flag.
Restricted Execution
--------------------
- Improvements to rexec.py: package support; support a (minimal)
sys.exc_info(). Also made the (test) main program a bit fancier (you
can now use it to run arbitrary Python scripts in restricted mode).
Tkinter
-------
- On Unix, Tkinter can now safely be used from a multi-threaded
application. (Formerly, no threads would make progress while
Tkinter's mainloop() was active, because it didn't release the Python
interpreter lock.) Unfortunately, on Windows, threads other than the
main thread should not call update() or update_idletasks() because
this will deadlock the application.
- An interactive interpreter that uses readline and Tkinter no longer
uses up all available CPU time.
- Even if readline is not used, Tk windows created in an interactive
interpreter now get continuously updated. (This even works in Windows
as long as you don't hit a key.)
- New demos in Demo/tkinter/guido/: brownian.py, redemo.py, switch.py.
- No longer register Tcl_finalize() as a low-level exit handler. It
may call back into Python, and that's a bad idea.
- Allow binding of Tcl commands (given as a string).
- Some minor speedups; replace explicitly coded getint() with int() in
most places.
- In FileDialog.py, remember the directory of the selected file, if
given.
- Change the names of all methods in the Wm class: they are now
wm_title(), etc. The old names (title() etc.) are still defined as
aliases.
- Add a new method of interpreter objects, interpaddr(). This returns
the address of the Tcl interpreter object, as an integer. Not very
useful for the Python programmer, but this can be called by another C
extension that needs to make calls into the Tcl/Tk C API and needs to
get the address of the Tcl interpreter object. A simple cast of the
return value to (Tcl_Interp *) will do the trick.
Windows General
---------------
- Don't insist on proper case for module source files if the filename
is all uppercase (e.g. FOO.PY now matches foo; but FOO.py still
doesn't). This should address problems with this feature on
oldfashioned filesystems (Novell servers?).
Windows Library
---------------
- os.environ is now all uppercase, but accesses are case insensitive,
and the putenv() calls made as a side effect of changing os.environ
are case preserving.
- Removed samefile(), sameopenfile(), samestat() from os.path (aka
ntpath.py) -- these cannot be made to work reliably (at least I
wouldn't know how).
- Fixed os.pipe() so that it returns file descriptors acceptable to
os.read() and os.write() (like it does on Unix), rather than Windows
file handles.
- Added a table of WSA error codes to socket.py.
- In the select module, put the (huge) file descriptor arrays on the
heap.
- The getpass module now raises KeyboardInterrupt when it sees ^C.
- In mailbox.py, fix tell/seek when using files opened in text mode.
- In rfc822.py, fix tell/seek when using files opened in text mode.
- In the msvcrt extension module, release the interpreter lock for
calls that may block: _locking(), _getch(), _getche(). Also fix a
bogus error return when open_osfhandle() doesn't have the right
argument list.
Windows Installer
-----------------
- The registry key used is now "1.5" instead of "1.5.x" -- so future
versions of 1.5 and Mark Hammond's win32all installer don't need to be
resynchronized.
Windows Tools
-------------
- Several improvements to freeze specifically for Windows.
Windows Build Procedure
-----------------------
- The VC++ project files and the WISE installer have been moved to the
PCbuild subdirectory, so they are distributed in the same subdirectory
where they must be used. This avoids confusion.
- New project files for Windows 3.1 port by Jim Ahlstrom.
- Got rid of the obsolete subdirectory PC/setup_nt/.
- The projects now use distinct filenames for the .exe, .dll, .lib and
.pyd files built in debug mode (by appending "_d" to the base name,
before the extension). This makes it easier to switch between the two
and get the right versions. There's a pragma in config.h that directs
the linker to include the appropriate .lib file (so python15.lib no
longer needs to be explicit in your project).
- The installer now installs more files (e.g. config.h). The idea is
that you shouldn't need the source distribution if you want build your
own extensions in C or C++.
Tools and Demos
---------------
- New script nm2def.py by Marc-Andre Lemburg, to construct
PC/python_nt.def automatically (some hand editing still required).
- New tool ndiff.py: Tim Peters' text diffing tool.
- Various and sundry improvements to the freeze script.
- The script texi2html.py (which was part of the Doc tree but is no
longer used there) has been moved to the Tools/scripts subdirectory.
- Some generalizations in the webchecker code. There's now a
primnitive gui for websucker.py: wsgui.py. (In Tools/webchecker/.)
- The ftpmirror.py script now handles symbolic links properly, and
also files with multiple spaces in their names.
- The 1.5.1 tabnanny.py suffers an assert error if fed a script whose
last line is both indented and lacks a newline. This is now fixed.
Python/C API
------------
- Added missing prototypes for PyEval_CallFunction() and
PyEval_CallMethod().
- New macro PyList_SET_ITEM().
- New macros to access object members for PyFunction, PyCFunction
objects.
- New APIs PyImport_AppendInittab() an PyImport_ExtendInittab() to
dynamically add one or many entries to the table of built-in modules.
- New macro Py_InitModule3(name, methods, doc) which calls
Py_InitModule4() with appropriate arguments. (The -4 variant requires
you to pass an obscure version number constant which is always the same.)
- New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to
sys.stdout or sys.stderr using a printf-like interface. (Used in
_tkinter.c, for example.)
- New APIs for conversion between Python longs and C 'long long' if
your compiler supports it.
- PySequence_In() is now called PySequence_Contains().
(PySequence_In() is still supported for b/w compatibility; it is
declared obsolete because its argument order is confusing.)
- PyDict_GetItem() and PyDict_GetItemString() are changed so that they
*never* raise an exception -- (even if the hash() fails, simply clear
the error). This was necessary because there is lots of code out
there that already assumes this.
- Changes to PySequence_Tuple() and PySequence_List() to use the
length of a sequence only as a hint -- if an IndexError happens
earlier, take that. (Formerly, this was considered an error.)
- Reformatted abstract.c to give it a more familiar "look" and fixed
many error checking bugs.
- Add NULL pointer checks to all calls of a C function through a type
object and extensions (e.g. nb_add).
- The code that initializes sys.path now calls Py_GetPythonHome()
instead of getenv("PYTHONHOME"). This, together with the new API
Py_SetPythonHome(), makes it easier for embedding applications to
change the notion of Python's "home" directory (where the libraries
etc. are sought).
- Fixed a very old bug in the parsing of "O?" format specifiers.
======================================================================
|