Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec1722e

Browse files
committed
Various minor additions and clarifications, mostly suggested by Jeremy
1 parent 7486c6b commit ec1722e

1 file changed

Lines changed: 58 additions & 30 deletions

File tree

Doc/whatsnew/whatsnew20.tex

Lines changed: 58 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ \section{Introduction}
2929
A host of minor fixes, a few optimizations, additional docstrings, and
3030
better error messages went into 2.0; to list them all would be
3131
impossible, but they're certainly significant. Consult the
32-
publicly-available CVS logs if you want to see the full list.
32+
publicly-available CVS logs if you want to see the full list. This
33+
progress is due to the five developers working for
34+
PythonLabs are now getting paid to spend their days fixing bugs,
35+
and also due to the improved communication resulting
36+
from moving to SourceForge.
3337

3438
% ======================================================================
3539
\section{What About Python 1.6?}
@@ -88,12 +92,14 @@ \section{New Development Process}
8892
increase in the speed of development. Patches now get submitted,
8993
commented on, revised by people other than the original submitter, and
9094
bounced back and forth between people until the patch is deemed worth
91-
checking in. This didn't come without a cost: developers now have
92-
more e-mail to deal with, more mailing lists to follow, and special
93-
tools had to be written for the new environment. For example,
94-
SourceForge sends default patch and bug notification e-mail messages
95-
that are completely unhelpful, so Ka-Ping Yee wrote an HTML
96-
screen-scraper that sends more useful messages.
95+
checking in. Bugs are tracked in one central location and can be
96+
assigned to a specific person for fixing, and we can count the number
97+
of open bugs to measure progress. This didn't come without a cost:
98+
developers now have more e-mail to deal with, more mailing lists to
99+
follow, and special tools had to be written for the new environment.
100+
For example, SourceForge sends default patch and bug notification
101+
e-mail messages that are completely unhelpful, so Ka-Ping Yee wrote an
102+
HTML screen-scraper that sends more useful messages.
97103

98104
The ease of adding code caused a few initial growing pains, such as
99105
code was checked in before it was ready or without getting clear
@@ -102,10 +108,11 @@ \section{New Development Process}
102108
Developers can vote +1, +0, -0, or -1 on a patch; +1 and -1 denote
103109
acceptance or rejection, while +0 and -0 mean the developer is mostly
104110
indifferent to the change, though with a slight positive or negative
105-
slant. The most significant change from the Apache model is that
106-
Guido van Rossum, who has Benevolent Dictator For Life status, can
107-
ignore the votes of the other developers and approve or reject a
108-
change, effectively giving him a +Infinity / -Infinity vote.
111+
slant. The most significant change from the Apache model is that the
112+
voting is essentially advisory, letting Guido van Rossum, who has
113+
Benevolent Dictator For Life status, know what the general opinion is.
114+
He can still ignore the result of a vote, and approve or
115+
reject a change even if the community disagrees with him.
109116

110117
Producing an actual patch is the last step in adding a new feature,
111118
and is usually easy compared to the earlier task of coming up with a
@@ -474,7 +481,7 @@ \section{String Methods}
474481
\code{string.join(seq, s)}.
475482

476483
% ======================================================================
477-
\section{Optional Collection of Cycles}
484+
\section{Garbage Collection of Cycles}
478485

479486
The C implementation of Python uses reference counting to implement
480487
garbage collection. Every Python object maintains a count of the
@@ -513,18 +520,23 @@ \section{Optional Collection of Cycles}
513520
cycle if they have references to each other, causing all of the
514521
objects to be leaked.
515522

516-
An experimental step has been made toward fixing this problem. When
517-
compiling Python, the \verb|--with-cycle-gc| option can be specified.
518-
This causes a cycle detection algorithm to be periodically executed,
519-
which looks for inaccessible cycles and deletes the objects involved.
520-
A new \module{gc} module provides functions to perform a garbage
521-
collection, obtain debugging statistics, and tuning the collector's parameters.
522-
523-
Why isn't cycle detection enabled by default? Running the cycle detection
524-
algorithm takes some time, and some tuning will be required to
525-
minimize the overhead cost. It's not yet obvious how much performance
526-
is lost, because benchmarking this is tricky and depends crucially
527-
on how often the program creates and destroys objects.
523+
Python 2.0 fixes this problem by periodically executing a cycle
524+
detection algorithm which looks for inaccessible cycles and deletes
525+
the objects involved. A new \module{gc} module provides functions to
526+
perform a garbage collection, obtain debugging statistics, and tuning
527+
the collector's parameters.
528+
529+
Running the cycle detection algorithm takes some time, and therefore
530+
will result in some additional overhead. It is hoped that after we've
531+
gotten experience with the cycle collection from using 2.0, Python 2.1
532+
will be able to minimize the overhead with careful tuning. It's not
533+
yet obvious how much performance is lost, because benchmarking this is
534+
tricky and depends crucially on how often the program creates and
535+
destroys objects. The detection of cycles can be disabled when Python
536+
is compiled, if you can't afford even a tiny speed penalty or suspect
537+
that the cycle collection is buggy, by specifying the
538+
\samp{--without-cycle-gc} switch when running the \file{configure}
539+
script.
528540

529541
Several people tackled this problem and contributed to a solution. An
530542
early implementation of the cycle detection approach was written by
@@ -618,10 +630,16 @@ \subsection{Minor Language Changes}
618630
data structures are isomorphic. See the thread ``trashcan
619631
and PR\#7'' in the April 2000 archives of the python-dev mailing list
620632
for the discussion leading up to this implementation, and some useful
621-
relevant links.
633+
relevant links.
622634
% Starting URL:
623635
% http://www.python.org/pipermail/python-dev/2000-April/004834.html
624636

637+
Note that comparisons can now also raise exceptions. In earlier
638+
versions of Python, a comparison operation such as \code{cmp(a,b)}
639+
would always produce an answer, even if a user-defined
640+
\method{__cmp__} method encountered an error, since the resulting
641+
exception would simply be silently swallowed.
642+
625643
Work has been done on porting Python to 64-bit Windows on the Itanium
626644
processor, mostly by Trent Mick of ActiveState. (Confusingly,
627645
\code{sys.platform} is still \code{'win32'} on Win64 because it seems
@@ -630,6 +648,11 @@ \subsection{Minor Language Changes}
630648
\url{http://starship.python.net/crew/mhammond/ce/} for more
631649
information.
632650

651+
Another new platform is Darwin/MacOS X; inital support for it is in
652+
Python 2.0. Dynamic loading works, if you specify ``configure
653+
--with-dyld --with-suffix=.x''. Consult the README in the Python
654+
source distribution for more instructions.
655+
633656
An attempt has been made to alleviate one of Python's warts, the
634657
often-confusing \exception{NameError} exception when code refers to a
635658
local variable before the variable has been assigned a value. For
@@ -1136,8 +1159,6 @@ \section{Module changes}
11361159
and \module{nntplib}. Consult the CVS logs for the exact
11371160
patch-by-patch details.
11381161
1139-
% XXX gettext support
1140-
11411162
Brian Gallew contributed OpenSSL support for the \module{socket}
11421163
module. OpenSSL is an implementation of the Secure Socket Layer,
11431164
which encrypts the data being sent over a socket. When compiling
@@ -1201,9 +1222,15 @@ \section{New modules}
12011222
\module{dircmp} modules, which have now become deprecated.
12021223
(Contributed by Gordon MacMillan and Moshe Zadka.)
12031224
1225+
\item{\module{gettext}:} This module provides internationalization
1226+
(I18N) and localization (L10N) support for Python programs by
1227+
providing an interface to the GNU gettext message catalog library.
1228+
(Integrated by Barry Warsaw, from separate contributions by Martin von
1229+
Loewis, Peter Funk, and James Henstridge.)
1230+
12041231
\item{\module{linuxaudiodev}:} Support for the \file{/dev/audio}
12051232
device on Linux, a twin to the existing \module{sunaudiodev} module.
1206-
(Contributed by Peter Bosch.)
1233+
(Contributed by Peter Bosch, with fixes by Jeremy Hylton.)
12071234
12081235
\item{\module{mmap}:} An interface to memory-mapped files on both
12091236
Windows and Unix. A file's contents can be mapped directly into
@@ -1314,7 +1341,8 @@ \section{Acknowledgements}
13141341
13151342
The authors would like to thank the following people for offering
13161343
suggestions on drafts of this article: Mark Hammond, Gregg Hauser,
1317-
Fredrik Lundh, Detlef Lannert, Aahz Maruch, Skip Montanaro, Vladimir
1318-
Marangozov, Guido van Rossum, Neil Schemenauer, and Russ Schmidt.
1344+
Jeremy Hylton, Fredrik Lundh, Detlef Lannert, Aahz Maruch, Skip
1345+
Montanaro, Vladimir Marangozov, Guido van Rossum, Neil Schemenauer,
1346+
and Russ Schmidt.
13191347
13201348
\end{document}

0 commit comments

Comments
 (0)