blob: 6dfbd8c30249f39bf7b9576114ace4b32e37a567 [file] [log] [blame]
Larry Hastings1b329e72016-06-26 19:53:18 -07001This is Python version 3.5.3 release candidate 1
Larry Hastings904465f2016-06-11 20:55:08 -07002================================================
Guido van Rossum91447632000-04-11 17:11:09 +00003
Benjamin Petersonf606e682011-12-31 22:42:26 -06004Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
Benjamin Peterson75e36302016-01-01 10:23:45 -060052012, 2013, 2014, 2015, 2016 Python Software Foundation. All rights reserved.
Guido van Rossum4405cf32007-08-30 17:16:55 +00006
Larry Hastingsf92f6c82015-09-12 17:28:39 +01007Python 3.x is a new version of the language, which is incompatible with the
82.x line of releases. The language is mostly the same, but many details,
9especially how built-in objects like dictionaries and strings work,
10have changed considerably, and a lot of deprecated features have finally
11been removed.
Guido van Rossum1c896e32007-08-29 23:03:30 +000012
Guido van Rossum50e9fb92006-08-17 05:42:55 +000013
Benjamin Peterson1da43e52009-06-26 13:21:52 +000014Build Instructions
15------------------
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000016
Benjamin Peterson1da43e52009-06-26 13:21:52 +000017On Unix, Linux, BSD, OSX, and Cygwin:
18
19 ./configure
20 make
21 make test
22 sudo make install
23
24This will install Python as python3.
25
Georg Brandla02607e2010-07-31 11:00:47 +000026You can pass many options to the configure script; run "./configure --help" to
27find out more. On OSX and Cygwin, the executable is called python.exe;
28elsewhere it's just python.
Benjamin Peterson1da43e52009-06-26 13:21:52 +000029
Georg Brandla02607e2010-07-31 11:00:47 +000030On Mac OS X, if you have configured Python with --enable-framework, you should
Larry Hastingsf92f6c82015-09-12 17:28:39 +010031use "make frameworkinstall" to do the installation. Note that this installs
32the Python executable in a place that is not normally on your PATH, you may
33want to set up a symlink in /usr/local/bin.
Benjamin Peterson1da43e52009-06-26 13:21:52 +000034
35On Windows, see PCbuild/readme.txt.
36
Larry Hastingsf92f6c82015-09-12 17:28:39 +010037If you wish, you can create a subdirectory and invoke configure from there.
38For example:
Benjamin Peterson1da43e52009-06-26 13:21:52 +000039
40 mkdir debug
41 cd debug
42 ../configure --with-pydebug
43 make
44 make test
45
Larry Hastingsf92f6c82015-09-12 17:28:39 +010046(This will fail if you *also* built at the top-level directory.
47You should do a "make clean" at the toplevel first.)
Benjamin Peterson1da43e52009-06-26 13:21:52 +000048
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)014d52f2016-09-08 18:33:00 +000049To get an optimized build of Python, "configure --with-optimizations" before
50you run make. This sets the default make targets up to enable Profile Guided
51Optimization (PGO) and Link Time Optimization (LTO) on most platforms.
52For more details, see the sections bellow.
Brett Cannon7188a3e2015-09-18 15:13:44 -070053
54
55Profile Guided Optimization
56---------------------------
57
58PGO takes advantage of recent versions of the GCC or Clang compilers.
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)014d52f2016-09-08 18:33:00 +000059If ran, "make profile-opt" will do several steps.
Brett Cannon7188a3e2015-09-18 15:13:44 -070060
61First, the entire Python directory is cleaned of temporary files that
Martin Panter8d56c022016-05-29 04:13:35 +000062may have resulted in a previous compilation.
Brett Cannon7188a3e2015-09-18 15:13:44 -070063
64Then, an instrumented version of the interpreter is built, using suitable
65compiler flags for each flavour. Note that this is just an intermediary
66step and the binary resulted after this step is not good for real life
67workloads, as it has profiling instructions embedded inside.
68
69After this instrumented version of the interpreter is built, the Makefile
70will automatically run a training workload. This is necessary in order to
71profile the interpreter execution. Note also that any output, both stdout
Martin Panter0be894b2016-09-07 12:03:06 +000072and stderr, that may appear at this step is suppressed.
Brett Cannon7188a3e2015-09-18 15:13:44 -070073
74Finally, the last step is to rebuild the interpreter, using the information
Martin Pantercc71a792016-04-05 06:19:42 +000075collected in the previous one. The end result will be a Python binary
Brett Cannon7188a3e2015-09-18 15:13:44 -070076that is optimized and suitable for distribution or production installation.
77
Benjamin Peterson1da43e52009-06-26 13:21:52 +000078
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)014d52f2016-09-08 18:33:00 +000079Link Time Optimization
80----------------------
81
82LTO takes advantages of recent compiler toolchains ability to optimize across
83the otherwise arbitrary .o file boundary when building final executables or
84shared libraries for additional performance gains.
85
86
Benjamin Peterson1da43e52009-06-26 13:21:52 +000087What's New
88----------
89
Larry Hastingsf92f6c82015-09-12 17:28:39 +010090We have a comprehensive overview of the changes in the "What's New in
Yury Selivanov7aa53412015-05-30 10:57:56 -040091Python 3.5" document, found at
Benjamin Peterson1da43e52009-06-26 13:21:52 +000092
Yury Selivanov7aa53412015-05-30 10:57:56 -040093 http://docs.python.org/3.5/whatsnew/3.5.html
Benjamin Peterson1da43e52009-06-26 13:21:52 +000094
Larry Hastingsf92f6c82015-09-12 17:28:39 +010095For a more detailed change log, read Misc/NEWS (though this file, too,
96is incomplete, and also doesn't list anything merged in from the 2.7
97release under development).
Benjamin Peterson1da43e52009-06-26 13:21:52 +000098
99If you want to install multiple versions of Python see the section below
100entitled "Installing multiple versions".
Guido van Rossum8d90f9d1997-05-22 20:13:25 +0000101
Guido van Rossumf501b4e1996-10-25 14:32:48 +0000102
Guido van Rossumc07d5fa2000-09-01 22:50:02 +0000103Documentation
104-------------
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000105
Yury Selivanov7aa53412015-05-30 10:57:56 -0400106Documentation for Python 3.5 is online, updated daily:
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000107
Yury Selivanov7aa53412015-05-30 10:57:56 -0400108 http://docs.python.org/3.5/
Guido van Rossumc07d5fa2000-09-01 22:50:02 +0000109
Georg Brandl62069d32010-07-31 08:56:11 +0000110It can also be downloaded in many formats for faster access. The documentation
111is downloadable in HTML, PDF, and reStructuredText formats; the latter version
112is primarily for documentation authors, translators, and people with special
113formatting requirements.
Benjamin Peterson2a691a82008-03-31 01:51:45 +0000114
Ezio Melotti802bf8a2013-08-16 21:32:25 +0300115If you would like to contribute to the development of Python, relevant
116documentation is available at:
117
118 http://docs.python.org/devguide/
119
120For information about building Python's documentation, refer to Doc/README.txt.
121
Guido van Rossumc07d5fa2000-09-01 22:50:02 +0000122
Barry Warsaw97f005d2008-12-03 16:46:14 +0000123Converting From Python 2.x to 3.x
Guido van Rossum1c896e32007-08-29 23:03:30 +0000124---------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000125
Georg Brandla02607e2010-07-31 11:00:47 +0000126Python starting with 2.6 contains features to help locating code that needs to
127be changed, such as optional warnings when deprecated features are used, and
128backported versions of certain key Python 3.x features.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000129
Benjamin Peterson1da43e52009-06-26 13:21:52 +0000130A source-to-source translation tool, "2to3", can take care of the mundane task
131of converting large amounts of source code. It is not a complete solution but
132is complemented by the deprecation warnings in 2.6. See
Yury Selivanov7aa53412015-05-30 10:57:56 -0400133http://docs.python.org/3.5/library/2to3.html for more information.
Benjamin Peterson1da43e52009-06-26 13:21:52 +0000134
Christian Heimesdd15f6c2008-03-16 00:07:10 +0000135
Benjamin Petersonad3d5c22009-02-26 03:38:59 +0000136Testing
137-------
138
Larry Hastingsf92f6c82015-09-12 17:28:39 +0100139To test the interpreter, type "make test" in the top-level directory.
140The test set produces some output. You can generally ignore the messages
141about skipped tests due to optional features which can't be imported.
142If a message is printed about a failed test or a traceback or core dump
143is produced, something is wrong.
Benjamin Petersonad3d5c22009-02-26 03:38:59 +0000144
145By default, tests are prevented from overusing resources like disk space and
146memory. To enable these tests, run "make testall".
147
Georg Brandla02607e2010-07-31 11:00:47 +0000148IMPORTANT: If the tests fail and you decide to mail a bug report, *don't*
149include the output of "make test". It is useless. Run the failing test
150manually, as follows:
Benjamin Petersonad3d5c22009-02-26 03:38:59 +0000151
Antoine Pitroue7fed672010-12-14 22:06:10 +0000152 ./python -m test -v test_whatever
Benjamin Petersonad3d5c22009-02-26 03:38:59 +0000153
Georg Brandla02607e2010-07-31 11:00:47 +0000154(substituting the top of the source tree for '.' if you built in a different
155directory). This runs the test in verbose mode.
Benjamin Petersonad3d5c22009-02-26 03:38:59 +0000156
157
Christian Heimesdd15f6c2008-03-16 00:07:10 +0000158Installing multiple versions
159----------------------------
160
161On Unix and Mac systems if you intend to install multiple versions of Python
Georg Brandla02607e2010-07-31 11:00:47 +0000162using the same installation prefix (--prefix argument to the configure script)
Larry Hastingsf92f6c82015-09-12 17:28:39 +0100163you must take care that your primary python executable is not overwritten by
164the installation of a different version. All files and directories installed
165using "make altinstall" contain the major and minor version and can thus live
166side-by-side. "make install" also creates ${prefix}/bin/python3 which refers
167to ${prefix}/bin/pythonX.Y. If you intend to install multiple versions using
168the same prefix you must decide which version (if any) is your "primary"
169version. Install that version using "make install". Install all other
170versions using "make altinstall".
Christian Heimesdd15f6c2008-03-16 00:07:10 +0000171
Yury Selivanov7aa53412015-05-30 10:57:56 -0400172For example, if you want to install Python 2.6, 2.7 and 3.5 with 2.7 being the
Georg Brandlfa2c61a2011-02-20 10:41:31 +0000173primary version, you would execute "make install" in your 2.7 build directory
Georg Brandla02607e2010-07-31 11:00:47 +0000174and "make altinstall" in the others.
Christian Heimesdd15f6c2008-03-16 00:07:10 +0000175
176
Guido van Rossum1c896e32007-08-29 23:03:30 +0000177Issue Tracker and Mailing List
178------------------------------
Michael W. Hudson71dcc3e2005-02-22 15:33:26 +0000179
Georg Brandla02607e2010-07-31 11:00:47 +0000180We're soliciting bug reports about all aspects of the language. Fixes are also
Larry Hastingsf92f6c82015-09-12 17:28:39 +0100181welcome, preferably in unified diff format. Please use the issue tracker:
Fred Drake6caae142000-10-25 17:51:02 +0000182
Guido van Rossum1c896e32007-08-29 23:03:30 +0000183 http://bugs.python.org/
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000184
Georg Brandla02607e2010-07-31 11:00:47 +0000185If you're not sure whether you're dealing with a bug or a feature, use the
186mailing list:
Guido van Rossum1c896e32007-08-29 23:03:30 +0000187
Mark Dickinsonb9ebd042009-02-06 16:39:11 +0000188 python-dev@python.org
Guido van Rossum1c896e32007-08-29 23:03:30 +0000189
190To subscribe to the list, use the mailman form:
191
Mark Dickinsonb9ebd042009-02-06 16:39:11 +0000192 http://mail.python.org/mailman/listinfo/python-dev/
Georg Brandl81299ad2006-02-20 10:24:06 +0000193
Michael W. Hudson71dcc3e2005-02-22 15:33:26 +0000194
Benjamin Peterson1da43e52009-06-26 13:21:52 +0000195Proposals for enhancement
196-------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000197
Benjamin Peterson1da43e52009-06-26 13:21:52 +0000198If you have a proposal to change Python, you may want to send an email to the
Georg Brandl260a7882011-02-20 10:29:04 +0000199comp.lang.python or python-ideas mailing lists for inital feedback. A Python
200Enhancement Proposal (PEP) may be submitted if your idea gains ground. All
Benjamin Peterson1da43e52009-06-26 13:21:52 +0000201current PEPs, as well as guidelines for submitting a new PEP, are listed at
202http://www.python.org/dev/peps/.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000203
Guido van Rossum1c896e32007-08-29 23:03:30 +0000204
Benjamin Peterson1da43e52009-06-26 13:21:52 +0000205Release Schedule
206----------------
Guido van Rossum1c896e32007-08-29 23:03:30 +0000207
Berker Peksag51a4a2b2014-10-12 06:59:14 +0300208See PEP 478 for release details: http://www.python.org/dev/peps/pep-0478/
Guido van Rossumef0f1292007-08-30 14:51:05 +0000209
210
211Copyright and License Information
212---------------------------------
213
Georg Brandla7d2f002013-03-23 16:06:13 +0100214Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
Benjamin Petersonf1dcdd92016-01-01 11:53:14 -06002152012, 2013, 2014, 2015, 2016 Python Software Foundation. All rights reserved.
Guido van Rossumef0f1292007-08-30 14:51:05 +0000216
Georg Brandl260a7882011-02-20 10:29:04 +0000217Copyright (c) 2000 BeOpen.com. All rights reserved.
Guido van Rossumef0f1292007-08-30 14:51:05 +0000218
Georg Brandl260a7882011-02-20 10:29:04 +0000219Copyright (c) 1995-2001 Corporation for National Research Initiatives. All
220rights reserved.
Guido van Rossumef0f1292007-08-30 14:51:05 +0000221
Georg Brandl260a7882011-02-20 10:29:04 +0000222Copyright (c) 1991-1995 Stichting Mathematisch Centrum. All rights reserved.
Guido van Rossumef0f1292007-08-30 14:51:05 +0000223
Larry Hastingsf92f6c82015-09-12 17:28:39 +0100224See the file "LICENSE" for information on the history of this software,
225terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
Guido van Rossumef0f1292007-08-30 14:51:05 +0000226
Larry Hastingsf92f6c82015-09-12 17:28:39 +0100227This Python distribution contains *no* GNU General Public License (GPL) code,
228so it may be used in proprietary projects. There are interfaces to some GNU
229code but these are entirely optional.
Guido van Rossumef0f1292007-08-30 14:51:05 +0000230
Georg Brandl260a7882011-02-20 10:29:04 +0000231All trademarks referenced herein are property of their respective holders.