]> git.ipfire.org Git - thirdparty/Python/cpython.git/blame - README
Issue #27445: Don't pass str(_charset) to MIMEText.set_payload()
[thirdparty/Python/cpython.git] / README
CommitLineData
1b329e79 1This is Python version 3.5.3 release candidate 1
904465f6 2================================================
9144763a 3
f606e682 4Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
75e3630c 52012, 2013, 2014, 2015, 2016 Python Software Foundation. All rights reserved.
4405cf3c 6
f92f6c8e
LH
7Python 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.
50e9fb9e 12
64773800 13
1da43e5e
BP
14Build Instructions
15------------------
71dcc3e9 16
1da43e5e 17On Unix, Linux, BSD, OSX, and Cygwin:
8d90f9d5 18
1da43e5e
BP
19 ./configure
20 make
21 make test
22 sudo make install
f501b4e5 23
1da43e5e 24This will install Python as python3.
91cb9d2f 25
a02607ea
GB
26You 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.
477c8d5e 29
a02607ea 30On Mac OS X, if you have configured Python with --enable-framework, you should
f92f6c8e
LH
31use "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.
dabed752 34
1da43e5e
BP
35On Windows, see PCbuild/readme.txt.
36
f92f6c8e
LH
37If you wish, you can create a subdirectory and invoke configure from there.
38For example:
1da43e5e
BP
39
40 mkdir debug
41 cd debug
42 ../configure --with-pydebug
43 make
44 make test
45
f92f6c8e
LH
46(This will fail if you *also* built at the top-level directory.
47You should do a "make clean" at the toplevel first.)
2a691a81 48
7188a3ef
BC
49If you need an optimized version of Python, you type "make profile-opt" in the
50top level directory. This will rebuild the interpreter executable using Profile
51Guided Optimization (PGO). For more details, see the section bellow.
52
53
54Profile Guided Optimization
55---------------------------
56
57PGO takes advantage of recent versions of the GCC or Clang compilers.
58If ran, the "profile-opt" rule will do several steps.
59
60First, the entire Python directory is cleaned of temporary files that
8d56c026 61may have resulted in a previous compilation.
7188a3ef
BC
62
63Then, an instrumented version of the interpreter is built, using suitable
64compiler flags for each flavour. Note that this is just an intermediary
65step and the binary resulted after this step is not good for real life
66workloads, as it has profiling instructions embedded inside.
67
68After this instrumented version of the interpreter is built, the Makefile
69will automatically run a training workload. This is necessary in order to
70profile the interpreter execution. Note also that any output, both stdout
0be894b2 71and stderr, that may appear at this step is suppressed.
7188a3ef
BC
72
73Finally, the last step is to rebuild the interpreter, using the information
cc71a795 74collected in the previous one. The end result will be a Python binary
7188a3ef
BC
75that is optimized and suitable for distribution or production installation.
76
1c4523f0 77
1c896e3f 78What's New
91cb9d2f
GR
79----------
80
f92f6c8e 81We have a comprehensive overview of the changes in the "What's New in
7aa53411 82Python 3.5" document, found at
f3f67f2d 83
7aa53411 84 http://docs.python.org/3.5/whatsnew/3.5.html
f3f67f2d 85
f92f6c8e
LH
86For a more detailed change log, read Misc/NEWS (though this file, too,
87is incomplete, and also doesn't list anything merged in from the 2.7
88release under development).
99533a95 89
160b9a3c
BW
90If you want to install multiple versions of Python see the section below
91entitled "Installing multiple versions".
92
93
1da43e5e
BP
94Documentation
95-------------
2a691a81 96
7aa53411 97Documentation for Python 3.5 is online, updated daily:
1da43e5e 98
7aa53411 99 http://docs.python.org/3.5/
1da43e5e 100
62069d3c
GB
101It can also be downloaded in many formats for faster access. The documentation
102is downloadable in HTML, PDF, and reStructuredText formats; the latter version
103is primarily for documentation authors, translators, and people with special
104formatting requirements.
99533a95 105
802bf8ae
EM
106If you would like to contribute to the development of Python, relevant
107documentation is available at:
108
109 http://docs.python.org/devguide/
110
111For information about building Python's documentation, refer to Doc/README.txt.
112
160b9a3c 113
97f005d1 114Converting From Python 2.x to 3.x
1c896e3f 115---------------------------------
91cb9d2f 116
a02607ea
GB
117Python starting with 2.6 contains features to help locating code that needs to
118be changed, such as optional warnings when deprecated features are used, and
119backported versions of certain key Python 3.x features.
91cb9d2f 120
1da43e5e
BP
121A source-to-source translation tool, "2to3", can take care of the mundane task
122of converting large amounts of source code. It is not a complete solution but
123is complemented by the deprecation warnings in 2.6. See
7aa53411 124http://docs.python.org/3.5/library/2to3.html for more information.
1da43e5e 125
dd15f6c3 126
ad3d5c22
BP
127Testing
128-------
129
f92f6c8e
LH
130To test the interpreter, type "make test" in the top-level directory.
131The test set produces some output. You can generally ignore the messages
132about skipped tests due to optional features which can't be imported.
133If a message is printed about a failed test or a traceback or core dump
134is produced, something is wrong.
ad3d5c22
BP
135
136By default, tests are prevented from overusing resources like disk space and
137memory. To enable these tests, run "make testall".
138
a02607ea
GB
139IMPORTANT: If the tests fail and you decide to mail a bug report, *don't*
140include the output of "make test". It is useless. Run the failing test
141manually, as follows:
ad3d5c22 142
e7fed672 143 ./python -m test -v test_whatever
ad3d5c22 144
a02607ea
GB
145(substituting the top of the source tree for '.' if you built in a different
146directory). This runs the test in verbose mode.
ad3d5c22
BP
147
148
dd15f6c3
CH
149Installing multiple versions
150----------------------------
151
152On Unix and Mac systems if you intend to install multiple versions of Python
a02607ea 153using the same installation prefix (--prefix argument to the configure script)
f92f6c8e
LH
154you must take care that your primary python executable is not overwritten by
155the installation of a different version. All files and directories installed
156using "make altinstall" contain the major and minor version and can thus live
157side-by-side. "make install" also creates ${prefix}/bin/python3 which refers
158to ${prefix}/bin/pythonX.Y. If you intend to install multiple versions using
159the same prefix you must decide which version (if any) is your "primary"
160version. Install that version using "make install". Install all other
161versions using "make altinstall".
dd15f6c3 162
7aa53411 163For example, if you want to install Python 2.6, 2.7 and 3.5 with 2.7 being the
fa2c61a2 164primary version, you would execute "make install" in your 2.7 build directory
a02607ea 165and "make altinstall" in the others.
dd15f6c3
CH
166
167
1c896e3f
GR
168Issue Tracker and Mailing List
169------------------------------
91cb9d2f 170
a02607ea 171We're soliciting bug reports about all aspects of the language. Fixes are also
f92f6c8e 172welcome, preferably in unified diff format. Please use the issue tracker:
91cb9d2f 173
1c896e3f 174 http://bugs.python.org/
64773800 175
a02607ea
GB
176If you're not sure whether you're dealing with a bug or a feature, use the
177mailing list:
c0be2f5d 178
b9ebd04b 179 python-dev@python.org
91cb9d2f 180
1c896e3f 181To subscribe to the list, use the mailman form:
84c8c7f9 182
b9ebd04b 183 http://mail.python.org/mailman/listinfo/python-dev/
91cb9d2f 184
433c8ade 185
1da43e5e
BP
186Proposals for enhancement
187-------------------------
03d8f745 188
1da43e5e 189If you have a proposal to change Python, you may want to send an email to the
260a7887
GB
190comp.lang.python or python-ideas mailing lists for inital feedback. A Python
191Enhancement Proposal (PEP) may be submitted if your idea gains ground. All
1da43e5e
BP
192current PEPs, as well as guidelines for submitting a new PEP, are listed at
193http://www.python.org/dev/peps/.
0c3842fe 194
433c8ade 195
1da43e5e
BP
196Release Schedule
197----------------
91cb9d2f 198
51a4a2b9 199See PEP 478 for release details: http://www.python.org/dev/peps/pep-0478/
ef0f1291
GR
200
201
202Copyright and License Information
203---------------------------------
204
a7d2f006 205Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
f1dcdd9a 2062012, 2013, 2014, 2015, 2016 Python Software Foundation. All rights reserved.
ef0f1291 207
260a7887 208Copyright (c) 2000 BeOpen.com. All rights reserved.
ef0f1291 209
260a7887
GB
210Copyright (c) 1995-2001 Corporation for National Research Initiatives. All
211rights reserved.
ef0f1291 212
260a7887 213Copyright (c) 1991-1995 Stichting Mathematisch Centrum. All rights reserved.
ef0f1291 214
f92f6c8e
LH
215See the file "LICENSE" for information on the history of this software,
216terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
ef0f1291 217
f92f6c8e
LH
218This Python distribution contains *no* GNU General Public License (GPL) code,
219so it may be used in proprietary projects. There are interfaces to some GNU
220code but these are entirely optional.
ef0f1291 221
260a7887 222All trademarks referenced herein are property of their respective holders.