Larry Hastings | 1b329e7 | 2016-06-26 19:53:18 -0700 | [diff] [blame] | 1 | This is Python version 3.5.3 release candidate 1 |
Larry Hastings | 904465f | 2016-06-11 20:55:08 -0700 | [diff] [blame] | 2 | ================================================ |
Guido van Rossum | 9144763 | 2000-04-11 17:11:09 +0000 | [diff] [blame] | 3 | |
Benjamin Peterson | f606e68 | 2011-12-31 22:42:26 -0600 | [diff] [blame] | 4 | Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, |
Benjamin Peterson | 75e3630 | 2016-01-01 10:23:45 -0600 | [diff] [blame] | 5 | 2012, 2013, 2014, 2015, 2016 Python Software Foundation. All rights reserved. |
Guido van Rossum | 4405cf3 | 2007-08-30 17:16:55 +0000 | [diff] [blame] | 6 | |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 7 | Python 3.x is a new version of the language, which is incompatible with the |
| 8 | 2.x line of releases. The language is mostly the same, but many details, |
| 9 | especially how built-in objects like dictionaries and strings work, |
| 10 | have changed considerably, and a lot of deprecated features have finally |
| 11 | been removed. |
Guido van Rossum | 1c896e3 | 2007-08-29 23:03:30 +0000 | [diff] [blame] | 12 | |
Guido van Rossum | 50e9fb9 | 2006-08-17 05:42:55 +0000 | [diff] [blame] | 13 | |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 14 | Build Instructions |
| 15 | ------------------ |
Guido van Rossum | 3ff96dd | 1996-07-30 18:05:04 +0000 | [diff] [blame] | 16 | |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 17 | On Unix, Linux, BSD, OSX, and Cygwin: |
| 18 | |
| 19 | ./configure |
| 20 | make |
| 21 | make test |
| 22 | sudo make install |
| 23 | |
| 24 | This will install Python as python3. |
| 25 | |
Georg Brandl | a02607e | 2010-07-31 11:00:47 +0000 | [diff] [blame] | 26 | You can pass many options to the configure script; run "./configure --help" to |
| 27 | find out more. On OSX and Cygwin, the executable is called python.exe; |
| 28 | elsewhere it's just python. |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 29 | |
Georg Brandl | a02607e | 2010-07-31 11:00:47 +0000 | [diff] [blame] | 30 | On Mac OS X, if you have configured Python with --enable-framework, you should |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 31 | use "make frameworkinstall" to do the installation. Note that this installs |
| 32 | the Python executable in a place that is not normally on your PATH, you may |
| 33 | want to set up a symlink in /usr/local/bin. |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 34 | |
| 35 | On Windows, see PCbuild/readme.txt. |
| 36 | |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 37 | If you wish, you can create a subdirectory and invoke configure from there. |
| 38 | For example: |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 39 | |
| 40 | mkdir debug |
| 41 | cd debug |
| 42 | ../configure --with-pydebug |
| 43 | make |
| 44 | make test |
| 45 | |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 46 | (This will fail if you *also* built at the top-level directory. |
| 47 | You should do a "make clean" at the toplevel first.) |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 48 | |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 014d52f | 2016-09-08 18:33:00 +0000 | [diff] [blame^] | 49 | To get an optimized build of Python, "configure --with-optimizations" before |
| 50 | you run make. This sets the default make targets up to enable Profile Guided |
| 51 | Optimization (PGO) and Link Time Optimization (LTO) on most platforms. |
| 52 | For more details, see the sections bellow. |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 53 | |
| 54 | |
| 55 | Profile Guided Optimization |
| 56 | --------------------------- |
| 57 | |
| 58 | PGO takes advantage of recent versions of the GCC or Clang compilers. |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 014d52f | 2016-09-08 18:33:00 +0000 | [diff] [blame^] | 59 | If ran, "make profile-opt" will do several steps. |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 60 | |
| 61 | First, the entire Python directory is cleaned of temporary files that |
Martin Panter | 8d56c02 | 2016-05-29 04:13:35 +0000 | [diff] [blame] | 62 | may have resulted in a previous compilation. |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 63 | |
| 64 | Then, an instrumented version of the interpreter is built, using suitable |
| 65 | compiler flags for each flavour. Note that this is just an intermediary |
| 66 | step and the binary resulted after this step is not good for real life |
| 67 | workloads, as it has profiling instructions embedded inside. |
| 68 | |
| 69 | After this instrumented version of the interpreter is built, the Makefile |
| 70 | will automatically run a training workload. This is necessary in order to |
| 71 | profile the interpreter execution. Note also that any output, both stdout |
Martin Panter | 0be894b | 2016-09-07 12:03:06 +0000 | [diff] [blame] | 72 | and stderr, that may appear at this step is suppressed. |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 73 | |
| 74 | Finally, the last step is to rebuild the interpreter, using the information |
Martin Panter | cc71a79 | 2016-04-05 06:19:42 +0000 | [diff] [blame] | 75 | collected in the previous one. The end result will be a Python binary |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 76 | that is optimized and suitable for distribution or production installation. |
| 77 | |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 78 | |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 014d52f | 2016-09-08 18:33:00 +0000 | [diff] [blame^] | 79 | Link Time Optimization |
| 80 | ---------------------- |
| 81 | |
| 82 | LTO takes advantages of recent compiler toolchains ability to optimize across |
| 83 | the otherwise arbitrary .o file boundary when building final executables or |
| 84 | shared libraries for additional performance gains. |
| 85 | |
| 86 | |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 87 | What's New |
| 88 | ---------- |
| 89 | |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 90 | We have a comprehensive overview of the changes in the "What's New in |
Yury Selivanov | 7aa5341 | 2015-05-30 10:57:56 -0400 | [diff] [blame] | 91 | Python 3.5" document, found at |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 92 | |
Yury Selivanov | 7aa5341 | 2015-05-30 10:57:56 -0400 | [diff] [blame] | 93 | http://docs.python.org/3.5/whatsnew/3.5.html |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 94 | |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 95 | For a more detailed change log, read Misc/NEWS (though this file, too, |
| 96 | is incomplete, and also doesn't list anything merged in from the 2.7 |
| 97 | release under development). |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 98 | |
| 99 | If you want to install multiple versions of Python see the section below |
| 100 | entitled "Installing multiple versions". |
Guido van Rossum | 8d90f9d | 1997-05-22 20:13:25 +0000 | [diff] [blame] | 101 | |
Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 102 | |
Guido van Rossum | c07d5fa | 2000-09-01 22:50:02 +0000 | [diff] [blame] | 103 | Documentation |
| 104 | ------------- |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 105 | |
Yury Selivanov | 7aa5341 | 2015-05-30 10:57:56 -0400 | [diff] [blame] | 106 | Documentation for Python 3.5 is online, updated daily: |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 107 | |
Yury Selivanov | 7aa5341 | 2015-05-30 10:57:56 -0400 | [diff] [blame] | 108 | http://docs.python.org/3.5/ |
Guido van Rossum | c07d5fa | 2000-09-01 22:50:02 +0000 | [diff] [blame] | 109 | |
Georg Brandl | 62069d3 | 2010-07-31 08:56:11 +0000 | [diff] [blame] | 110 | It can also be downloaded in many formats for faster access. The documentation |
| 111 | is downloadable in HTML, PDF, and reStructuredText formats; the latter version |
| 112 | is primarily for documentation authors, translators, and people with special |
| 113 | formatting requirements. |
Benjamin Peterson | 2a691a8 | 2008-03-31 01:51:45 +0000 | [diff] [blame] | 114 | |
Ezio Melotti | 802bf8a | 2013-08-16 21:32:25 +0300 | [diff] [blame] | 115 | If you would like to contribute to the development of Python, relevant |
| 116 | documentation is available at: |
| 117 | |
| 118 | http://docs.python.org/devguide/ |
| 119 | |
| 120 | For information about building Python's documentation, refer to Doc/README.txt. |
| 121 | |
Guido van Rossum | c07d5fa | 2000-09-01 22:50:02 +0000 | [diff] [blame] | 122 | |
Barry Warsaw | 97f005d | 2008-12-03 16:46:14 +0000 | [diff] [blame] | 123 | Converting From Python 2.x to 3.x |
Guido van Rossum | 1c896e3 | 2007-08-29 23:03:30 +0000 | [diff] [blame] | 124 | --------------------------------- |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 125 | |
Georg Brandl | a02607e | 2010-07-31 11:00:47 +0000 | [diff] [blame] | 126 | Python starting with 2.6 contains features to help locating code that needs to |
| 127 | be changed, such as optional warnings when deprecated features are used, and |
| 128 | backported versions of certain key Python 3.x features. |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 129 | |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 130 | A source-to-source translation tool, "2to3", can take care of the mundane task |
| 131 | of converting large amounts of source code. It is not a complete solution but |
| 132 | is complemented by the deprecation warnings in 2.6. See |
Yury Selivanov | 7aa5341 | 2015-05-30 10:57:56 -0400 | [diff] [blame] | 133 | http://docs.python.org/3.5/library/2to3.html for more information. |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 134 | |
Christian Heimes | dd15f6c | 2008-03-16 00:07:10 +0000 | [diff] [blame] | 135 | |
Benjamin Peterson | ad3d5c2 | 2009-02-26 03:38:59 +0000 | [diff] [blame] | 136 | Testing |
| 137 | ------- |
| 138 | |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 139 | To test the interpreter, type "make test" in the top-level directory. |
| 140 | The test set produces some output. You can generally ignore the messages |
| 141 | about skipped tests due to optional features which can't be imported. |
| 142 | If a message is printed about a failed test or a traceback or core dump |
| 143 | is produced, something is wrong. |
Benjamin Peterson | ad3d5c2 | 2009-02-26 03:38:59 +0000 | [diff] [blame] | 144 | |
| 145 | By default, tests are prevented from overusing resources like disk space and |
| 146 | memory. To enable these tests, run "make testall". |
| 147 | |
Georg Brandl | a02607e | 2010-07-31 11:00:47 +0000 | [diff] [blame] | 148 | IMPORTANT: If the tests fail and you decide to mail a bug report, *don't* |
| 149 | include the output of "make test". It is useless. Run the failing test |
| 150 | manually, as follows: |
Benjamin Peterson | ad3d5c2 | 2009-02-26 03:38:59 +0000 | [diff] [blame] | 151 | |
Antoine Pitrou | e7fed67 | 2010-12-14 22:06:10 +0000 | [diff] [blame] | 152 | ./python -m test -v test_whatever |
Benjamin Peterson | ad3d5c2 | 2009-02-26 03:38:59 +0000 | [diff] [blame] | 153 | |
Georg Brandl | a02607e | 2010-07-31 11:00:47 +0000 | [diff] [blame] | 154 | (substituting the top of the source tree for '.' if you built in a different |
| 155 | directory). This runs the test in verbose mode. |
Benjamin Peterson | ad3d5c2 | 2009-02-26 03:38:59 +0000 | [diff] [blame] | 156 | |
| 157 | |
Christian Heimes | dd15f6c | 2008-03-16 00:07:10 +0000 | [diff] [blame] | 158 | Installing multiple versions |
| 159 | ---------------------------- |
| 160 | |
| 161 | On Unix and Mac systems if you intend to install multiple versions of Python |
Georg Brandl | a02607e | 2010-07-31 11:00:47 +0000 | [diff] [blame] | 162 | using the same installation prefix (--prefix argument to the configure script) |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 163 | you must take care that your primary python executable is not overwritten by |
| 164 | the installation of a different version. All files and directories installed |
| 165 | using "make altinstall" contain the major and minor version and can thus live |
| 166 | side-by-side. "make install" also creates ${prefix}/bin/python3 which refers |
| 167 | to ${prefix}/bin/pythonX.Y. If you intend to install multiple versions using |
| 168 | the same prefix you must decide which version (if any) is your "primary" |
| 169 | version. Install that version using "make install". Install all other |
| 170 | versions using "make altinstall". |
Christian Heimes | dd15f6c | 2008-03-16 00:07:10 +0000 | [diff] [blame] | 171 | |
Yury Selivanov | 7aa5341 | 2015-05-30 10:57:56 -0400 | [diff] [blame] | 172 | For example, if you want to install Python 2.6, 2.7 and 3.5 with 2.7 being the |
Georg Brandl | fa2c61a | 2011-02-20 10:41:31 +0000 | [diff] [blame] | 173 | primary version, you would execute "make install" in your 2.7 build directory |
Georg Brandl | a02607e | 2010-07-31 11:00:47 +0000 | [diff] [blame] | 174 | and "make altinstall" in the others. |
Christian Heimes | dd15f6c | 2008-03-16 00:07:10 +0000 | [diff] [blame] | 175 | |
| 176 | |
Guido van Rossum | 1c896e3 | 2007-08-29 23:03:30 +0000 | [diff] [blame] | 177 | Issue Tracker and Mailing List |
| 178 | ------------------------------ |
Michael W. Hudson | 71dcc3e | 2005-02-22 15:33:26 +0000 | [diff] [blame] | 179 | |
Georg Brandl | a02607e | 2010-07-31 11:00:47 +0000 | [diff] [blame] | 180 | We're soliciting bug reports about all aspects of the language. Fixes are also |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 181 | welcome, preferably in unified diff format. Please use the issue tracker: |
Fred Drake | 6caae14 | 2000-10-25 17:51:02 +0000 | [diff] [blame] | 182 | |
Guido van Rossum | 1c896e3 | 2007-08-29 23:03:30 +0000 | [diff] [blame] | 183 | http://bugs.python.org/ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 184 | |
Georg Brandl | a02607e | 2010-07-31 11:00:47 +0000 | [diff] [blame] | 185 | If you're not sure whether you're dealing with a bug or a feature, use the |
| 186 | mailing list: |
Guido van Rossum | 1c896e3 | 2007-08-29 23:03:30 +0000 | [diff] [blame] | 187 | |
Mark Dickinson | b9ebd04 | 2009-02-06 16:39:11 +0000 | [diff] [blame] | 188 | python-dev@python.org |
Guido van Rossum | 1c896e3 | 2007-08-29 23:03:30 +0000 | [diff] [blame] | 189 | |
| 190 | To subscribe to the list, use the mailman form: |
| 191 | |
Mark Dickinson | b9ebd04 | 2009-02-06 16:39:11 +0000 | [diff] [blame] | 192 | http://mail.python.org/mailman/listinfo/python-dev/ |
Georg Brandl | 81299ad | 2006-02-20 10:24:06 +0000 | [diff] [blame] | 193 | |
Michael W. Hudson | 71dcc3e | 2005-02-22 15:33:26 +0000 | [diff] [blame] | 194 | |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 195 | Proposals for enhancement |
| 196 | ------------------------- |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 197 | |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 198 | If you have a proposal to change Python, you may want to send an email to the |
Georg Brandl | 260a788 | 2011-02-20 10:29:04 +0000 | [diff] [blame] | 199 | comp.lang.python or python-ideas mailing lists for inital feedback. A Python |
| 200 | Enhancement Proposal (PEP) may be submitted if your idea gains ground. All |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 201 | current PEPs, as well as guidelines for submitting a new PEP, are listed at |
| 202 | http://www.python.org/dev/peps/. |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 203 | |
Guido van Rossum | 1c896e3 | 2007-08-29 23:03:30 +0000 | [diff] [blame] | 204 | |
Benjamin Peterson | 1da43e5 | 2009-06-26 13:21:52 +0000 | [diff] [blame] | 205 | Release Schedule |
| 206 | ---------------- |
Guido van Rossum | 1c896e3 | 2007-08-29 23:03:30 +0000 | [diff] [blame] | 207 | |
Berker Peksag | 51a4a2b | 2014-10-12 06:59:14 +0300 | [diff] [blame] | 208 | See PEP 478 for release details: http://www.python.org/dev/peps/pep-0478/ |
Guido van Rossum | ef0f129 | 2007-08-30 14:51:05 +0000 | [diff] [blame] | 209 | |
| 210 | |
| 211 | Copyright and License Information |
| 212 | --------------------------------- |
| 213 | |
Georg Brandl | a7d2f00 | 2013-03-23 16:06:13 +0100 | [diff] [blame] | 214 | Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, |
Benjamin Peterson | f1dcdd9 | 2016-01-01 11:53:14 -0600 | [diff] [blame] | 215 | 2012, 2013, 2014, 2015, 2016 Python Software Foundation. All rights reserved. |
Guido van Rossum | ef0f129 | 2007-08-30 14:51:05 +0000 | [diff] [blame] | 216 | |
Georg Brandl | 260a788 | 2011-02-20 10:29:04 +0000 | [diff] [blame] | 217 | Copyright (c) 2000 BeOpen.com. All rights reserved. |
Guido van Rossum | ef0f129 | 2007-08-30 14:51:05 +0000 | [diff] [blame] | 218 | |
Georg Brandl | 260a788 | 2011-02-20 10:29:04 +0000 | [diff] [blame] | 219 | Copyright (c) 1995-2001 Corporation for National Research Initiatives. All |
| 220 | rights reserved. |
Guido van Rossum | ef0f129 | 2007-08-30 14:51:05 +0000 | [diff] [blame] | 221 | |
Georg Brandl | 260a788 | 2011-02-20 10:29:04 +0000 | [diff] [blame] | 222 | Copyright (c) 1991-1995 Stichting Mathematisch Centrum. All rights reserved. |
Guido van Rossum | ef0f129 | 2007-08-30 14:51:05 +0000 | [diff] [blame] | 223 | |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 224 | See the file "LICENSE" for information on the history of this software, |
| 225 | terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES. |
Guido van Rossum | ef0f129 | 2007-08-30 14:51:05 +0000 | [diff] [blame] | 226 | |
Larry Hastings | f92f6c8 | 2015-09-12 17:28:39 +0100 | [diff] [blame] | 227 | This Python distribution contains *no* GNU General Public License (GPL) code, |
| 228 | so it may be used in proprietary projects. There are interfaces to some GNU |
| 229 | code but these are entirely optional. |
Guido van Rossum | ef0f129 | 2007-08-30 14:51:05 +0000 | [diff] [blame] | 230 | |
Georg Brandl | 260a788 | 2011-02-20 10:29:04 +0000 | [diff] [blame] | 231 | All trademarks referenced herein are property of their respective holders. |