blob: 5f81ba9c5edcd709512f461392188b5651a2d758 [file] [log] [blame]
Benjamin Peterson39285162009-06-26 13:11:28 +00001This is Python version 3.1
2==========================
Guido van Rossum91447632000-04-11 17:11:09 +00003
Georg Brandlb1441c72009-01-03 22:33:39 +00004Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Christian Heimesb558a2e2008-03-02 22:46:37 +00005Python Software Foundation.
6All rights reserved.
Guido van Rossum4405cf32007-08-30 17:16:55 +00007
Barry Warsaw97f005d2008-12-03 16:46:14 +00008Python 3.x is a new version of the language, which is incompatible with the
92.x line of releases. The language is mostly the same, but many details,
10especially how built-in objects like dictionaries and strings work, have
11changed considerably, and a lot of deprecated features have finally been
12removed.
Guido van Rossum1c896e32007-08-29 23:03:30 +000013
Guido van Rossum50e9fb92006-08-17 05:42:55 +000014
Guido van Rossum1c896e32007-08-29 23:03:30 +000015Release Schedule
16----------------
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000017
Benjamin Petersona58a6262009-03-07 16:34:40 +000018See PEP 375 for release details: http://www.python.org/dev/peps/pep-0375/
Guido van Rossum8d90f9d1997-05-22 20:13:25 +000019
Guido van Rossumf501b4e1996-10-25 14:32:48 +000020
Guido van Rossumc07d5fa2000-09-01 22:50:02 +000021Documentation
22-------------
Guido van Rossum91cb9d21995-04-10 11:47:38 +000023
Barry Warsaw97f005d2008-12-03 16:46:14 +000024Documentation for Python 3.1 is online, updated twice a day:
Guido van Rossum91cb9d21995-04-10 11:47:38 +000025
Barry Warsaw97f005d2008-12-03 16:46:14 +000026 http://docs.python.org/dev/3.1/
Guido van Rossumc07d5fa2000-09-01 22:50:02 +000027
Benjamin Peterson2a691a82008-03-31 01:51:45 +000028All documentation is also available online at the Python web site
Barry Warsawbb5cd082008-04-02 23:33:27 +000029(http://docs.python.org/, see below). It is available online for
30occasional reference, or can be downloaded in many formats for faster
31access. The documentation is downloadable in HTML, PostScript, PDF,
32LaTeX (through 2.5), and reStructuredText (2.6+) formats; the LaTeX and
33reStructuredText versions are primarily for documentation authors,
34translators, and people with special formatting requirements.
Benjamin Peterson2a691a82008-03-31 01:51:45 +000035
Guido van Rossumc07d5fa2000-09-01 22:50:02 +000036
Guido van Rossum1c896e32007-08-29 23:03:30 +000037What's New
Guido van Rossum91cb9d21995-04-10 11:47:38 +000038----------
39
Benjamin Peterson52915df2009-06-13 13:16:45 +000040We try to have a comprehensive overview of the changes in the "What's New in
41Python 3.1" document, found at
Guido van Rossum64773801997-11-26 17:07:02 +000042
Benjamin Peterson52915df2009-06-13 13:16:45 +000043 http://docs.python.org/dev/3.1/whatsnew/3.1.html
Georg Brandlf3f67f22008-02-22 14:22:51 +000044
45Please help write it!
Jack Jansena39ef862001-08-19 21:17:03 +000046
Guido van Rossum99533a92007-12-06 05:07:41 +000047For a more detailed change log, read Misc/NEWS (though this file, too,
Benjamin Peterson52915df2009-06-13 13:16:45 +000048is incomplete, and also doesn't list anything merged in from the 2.7
Guido van Rossum99533a92007-12-06 05:07:41 +000049release under development).
50
Barry Warsaw160b9a32008-05-08 11:54:13 +000051If you want to install multiple versions of Python see the section below
52entitled "Installing multiple versions".
53
54
Benjamin Peterson2a691a82008-03-31 01:51:45 +000055Proposals for enhancement
Barry Warsawbb5cd082008-04-02 23:33:27 +000056-------------------------
Benjamin Peterson2a691a82008-03-31 01:51:45 +000057
Benjamin Petersonad9d48d2008-04-02 21:49:44 +000058If you have a proposal to change Python, you may want to send an email to the
59comp.lang.python or python-ideas mailing lists for inital feedback. A Python
60Enhancement Proposal (PEP) may be submitted if your idea gains ground. All
61current PEPs, as well as guidelines for submitting a new PEP, are listed at
62http://www.python.org/dev/peps/.
Guido van Rossum99533a92007-12-06 05:07:41 +000063
Barry Warsaw160b9a32008-05-08 11:54:13 +000064
Barry Warsaw97f005d2008-12-03 16:46:14 +000065Converting From Python 2.x to 3.x
Guido van Rossum1c896e32007-08-29 23:03:30 +000066---------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +000067
Barry Warsaw97f005d2008-12-03 16:46:14 +000068Python starting with 2.6 will contain features to help locating code that
69needs to be changed, such as optional warnings when deprecated features are
70used, and backported versions of certain key Python 3.x features.
Guido van Rossum433c8ad1994-08-01 12:07:07 +000071
Christian Heimesdd15f6c2008-03-16 00:07:10 +000072
Benjamin Petersonad3d5c22009-02-26 03:38:59 +000073Testing
74-------
75
76To test the interpreter, type "make test" in the top-level directory.
77This runs the test set twice (once with no compiled files, once with
78the compiled files left by the previous test run). The test set
79produces some output. You can generally ignore the messages about
80skipped tests due to optional features which can't be imported.
81If a message is printed about a failed test or a traceback or core
82dump is produced, something is wrong. On some Linux systems (those
83that are not yet using glibc 6), test_strftime fails due to a
84non-standard implementation of strftime() in the C library. Please
85ignore this, or upgrade to glibc version 6.
86
87By default, tests are prevented from overusing resources like disk space and
88memory. To enable these tests, run "make testall".
89
90IMPORTANT: If the tests fail and you decide to mail a bug report,
91*don't* include the output of "make test". It is useless. Run the
92failing test manually, as follows:
93
94 ./python Lib/test/regrtest.py -v test_whatever
95
96(substituting the top of the source tree for '.' if you built in a
97different directory). This runs the test in verbose mode.
98
99
Christian Heimesdd15f6c2008-03-16 00:07:10 +0000100Installing multiple versions
101----------------------------
102
103On Unix and Mac systems if you intend to install multiple versions of Python
104using the same installation prefix (--prefix argument to the configure
105script) you must take care that your primary python executable is not
106overwritten by the installation of a different versio. All files and
107directories installed using "make altinstall" contain the major and minor
108version and can thus live side-by-side. "make install" also creates
Benjamin Peterson932073a2009-05-23 16:14:33 +0000109${prefix}/bin/python3 which refers to ${prefix}/bin/pythonX.Y. If you intend
Christian Heimesdd15f6c2008-03-16 00:07:10 +0000110to install multiple versions using the same prefix you must decide which
111version (if any) is your "primary" version. Install that version using
112"make install". Install all other versions using "make altinstall".
113
114For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being
115the primary version, you would execute "make install" in your 2.6 build
116directory and "make altinstall" in the others.
117
118
119Configuration options and variables
120-----------------------------------
121
Guido van Rossum1c896e32007-08-29 23:03:30 +0000122A source-to-source translation tool, "2to3", can take care of the
123mundane task of converting large amounts of source code. It is not a
124complete solution but is complemented by the deprecation warnings in
1252.6. This tool is currently available via the Subversion sandbox:
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000126
Guido van Rossum1c896e32007-08-29 23:03:30 +0000127 http://svn.python.org/view/sandbox/trunk/2to3/
Martin v. Löwis2df66942000-12-13 14:14:32 +0000128
129
Guido van Rossum1c896e32007-08-29 23:03:30 +0000130Issue Tracker and Mailing List
131------------------------------
Michael W. Hudson71dcc3e2005-02-22 15:33:26 +0000132
Guido van Rossum1c896e32007-08-29 23:03:30 +0000133We're soliciting bug reports about all aspects of the language. Fixes
134are also welcome, preferable in unified diff format. Please use the
135issue tracker:
Fred Drake6caae142000-10-25 17:51:02 +0000136
Guido van Rossum1c896e32007-08-29 23:03:30 +0000137 http://bugs.python.org/
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000138
Guido van Rossum1c896e32007-08-29 23:03:30 +0000139If you're not sure whether you're dealing with a bug or a feature, use
140the mailing list:
141
Mark Dickinsonb9ebd042009-02-06 16:39:11 +0000142 python-dev@python.org
Guido van Rossum1c896e32007-08-29 23:03:30 +0000143
144To subscribe to the list, use the mailman form:
145
Mark Dickinsonb9ebd042009-02-06 16:39:11 +0000146 http://mail.python.org/mailman/listinfo/python-dev/
Georg Brandl81299ad2006-02-20 10:24:06 +0000147
Michael W. Hudson71dcc3e2005-02-22 15:33:26 +0000148
Guido van Rossum1c896e32007-08-29 23:03:30 +0000149Build Instructions
Guido van Rossumc07d5fa2000-09-01 22:50:02 +0000150------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000151
Neal Norwitzbf2604c2007-08-30 17:22:44 +0000152On Unix, Linux, BSD, OSX, and Cygwin:
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000153
Guido van Rossum1c896e32007-08-29 23:03:30 +0000154 ./configure
155 make
156 make test
Benjamin Peterson932073a2009-05-23 16:14:33 +0000157 sudo make install
Guido van Rossum1c896e32007-08-29 23:03:30 +0000158
159You can pass many options to the configure script; run "./configure
160--help" to find out more. On OSX and Cygwin, the executable is called
161python.exe; elsewhere it's just python.
162
163On Mac OS X, if you have configured Python with --enable-framework,
164you should use "make frameworkinstall" to do the installation. Note
165that this installs the Python executable in a place that is not
166normally on your PATH, you may want to set up a symlink in
167/usr/local/bin.
168
Martin v. Löwis0c3842f2007-08-30 05:34:10 +0000169On Windows, see PCbuild/readme.txt.
170
Guido van Rossum1c896e32007-08-29 23:03:30 +0000171If you wish, you can create a subdirectory and invoke configure from
172there. For example:
173
174 mkdir debug
175 cd debug
176 ../configure --with-pydebug
177 make
178 make test
179
180(This will fail if you *also* built at the top-level directory. You
181should do a "make clean" at the toplevel first.)
Guido van Rossumef0f1292007-08-30 14:51:05 +0000182
183
184Copyright and License Information
185---------------------------------
186
Barry Warsaw659fc422008-03-01 17:45:23 +0000187Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Guido van Rossumef0f1292007-08-30 14:51:05 +0000188Python Software Foundation.
189All rights reserved.
190
191Copyright (c) 2000 BeOpen.com.
192All rights reserved.
193
194Copyright (c) 1995-2001 Corporation for National Research Initiatives.
195All rights reserved.
196
197Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
198All rights reserved.
199
200See the file "LICENSE" for information on the history of this
201software, terms & conditions for usage, and a DISCLAIMER OF ALL
202WARRANTIES.
203
204This Python distribution contains *no* GNU General Public License
205(GPL) code, so it may be used in proprietary projects. There are
206interfaces to some GNU code but these are entirely optional.
207
208All trademarks referenced herein are property of their respective
209holders.