8000 Merge tag v2.7.17 into branch 2.7-slp · stackless-dev/stackless@df052f3 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit df052f3

Browse files
Anselm KruisAnselm Kruis
Anselm Kruis
authored and
Anselm Kruis
committed
Merge tag v2.7.17 into branch 2.7-slp
2 parents 2256d1b + c2f86d8 commit df052f3

File tree

18 files changed

+221
-274
lines changed

18 files changed

+221
-274
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
*.profraw
1717
*.dyn
1818
Doc/build/
19-
Doc/tools/docutils/
20-
Doc/tools/jinja2/
21-
Doc/tools/pygments/
22-
Doc/tools/sphinx/
19+
Doc/venv/
20+
Doc/.venv/
21+
Doc/env/
22+
Doc/.env/
2323
Lib/lib2to3/*.pickle
2424
Lib/test/data/*
2525
Makefile

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ matrix:
3636
- xvfb
3737
- os: linux
3838
language: python
39-
python: 2.7
39+
# Build the docs against a stable version of Python so code bugs don't hold up doc-related PRs.
40+
python: 3.6
4041
env: TESTING=docs
4142
before_script:
4243
- cd Doc
4344
# Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
4445
# (Updating the version is fine as long as no warnings are raised by doing so.)
45-
- python -m pip install sphinx~=1.6.1
46+
- python3 -m pip install sphinx~=2.0.1
4647
script:
4748
- make check suspicious html SPHINXOPTS="-q -W -j4"
4849

Doc/Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
# You can set these variables from the command line.
77
PYTHON = python
8-
SPHINXBUILD = sphinx-build
8+
VENVDIR = ./venv
9+
SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build
10+
BLURB = PATH=$(VENVDIR)/bin:$$PATH blurb
911
PAPER =
1012
SOURCES =
1113
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
@@ -102,7 +104,12 @@ htmlview: html
102104
$(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
103105

104106
clean:
105-
-rm -rf build/*
107+
-rm -rf build/* $(VENVDIR)/*
108+
109+
venv:
110+
$(PYTHON) -m venv $(VENVDIR)
111+
$(VENVDIR)/bin/python3 -m pip install -U Sphinx blurb
112+
@echo "The venv has been created in the $(VENVDIR) directory"
106113

107114
dist:
108115
rm -rf dist
@@ -148,7 +155,7 @@ dist:
148155
cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
149156

150157
check:
151-
$(PYTHON) tools/rstlint.py -i tools
158+
$(PYTHON)2 tools/rstlint.py -i tools -i $(VENVDIR)
152159

153160
serve:
154161
../Tools/scripts/serve.py build/html

Doc/conf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,10 @@
100100
# Options for LaTeX output
101101
# ------------------------
102102

103+
latex_engine = 'xelatex'
104+
103105
# Get LaTeX to handle Unicode correctly
104106
latex_elements = {
105-
'inputenc': r'\usepackage[utf8x]{inputenc}',
106-
'utf8extra': '',
107-
'fontenc': r'\usepackage[T1,T2A]{fontenc}',
108107
}
109108

110109
# Additional stuff for the LaTeX preamble.

Doc/library/ast.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ and classes for traversing abstract syntax trees:
129129
Parse the source into an AST node. Equivalent to ``compile(source,
130130
filename, mode, ast.PyCF_ONLY_AST)``.
131131

132+
.. warning::
133+
It is possible to crash the Python interpreter with a
134+
sufficiently large/complex string due to stack depth limitations
135+
in Python's AST compiler.
136+
132137

133138
.. function:: literal_eval(node_or_string)
134139

@@ -142,6 +147,11 @@ and classes for traversing abstract syntax trees:
142147
capable of evaluating arbitrarily complex expressions, for example involving
143148
operators or indexing.
144149

150+
.. warning::
151+
It is possible to crash the Python interpreter with a
152+
sufficiently large/complex string due to stack depth limitations
153+
in Python's AST compiler.
154+
145155

146156
.. function:: get_docstring(node, clean=True)
147157

Doc/library/functions.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ section.
248248
character. This is to facilitate detection of incomplete and complete
249249
statements in the :mod:`code` module.
250250

251+
.. warning::
252+
253+
It is possible to crash the Python interpreter with a
254+
sufficiently large/complex string when compiling to an AST
255+
object due to stack depth limitations in Python's AST compiler.
256+
251257
.. versionchanged:: 2.3
252258
The *flags* and *dont_inherit* arguments were added.
253259

Doc/tools/extensions/suspicious.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848

4949
from docutils import nodes
5050
from sphinx.builders import Builder
51+
import sphinx.util
5152

5253
detect_all = re.compile(r'''
5354
::(?=[^=])| # two :: (but NOT ::=)
@@ -85,6 +86,7 @@ class CheckSuspiciousMarkupBuilder(Builder):
8586
Checks for possibly invalid markup that may leak into the output.
8687
"""
8788
name = 'suspicious'
89+
logger = sphinx.util.logging.getLogger("CheckSuspiciousMarkupBuilder")
8890

8991
def init(self):
9092
# create output file
@@ -116,7 +118,7 @@ def finish(self):
116118
self.warn('Found %s/%s unused rules:' %
117119
(len(unused_rules), len(self.rules)))
118120
for rule in unused_rules:
119-
self.info(repr(rule))
121+
self.logger.info(repr(rule))
120122
return
121123

122124
def check_issue(self, line, lineno, issue):
@@ -146,7 +148,6 @@ def is_ignored(self, line, lineno, issue):
146148
return False
147149

148150
def report_issue(self, text, lineno, issue):
149-
if not self.any_issue: self.info()
150151
self.any_issue = True
151152
self.write_log_entry(lineno, issue, text)
152153
if py3:
@@ -181,7 +182,7 @@ def load_rules(self, filename):
181182
A csv file, with exactly the same format as suspicious.csv
182183
Fields: document name (normalized), line number, issue, surrounding text
183184
"""
184-
self.info("loading ignore rules... ", nonl=1)
185+
self.logger.info("loading ignore rules... ", nonl=1)
185186
self.rules = rules = []
186187
try:
187188
if py3:
@@ -206,7 +207,7 @@ def load_rules(self, filename):
206207
rule = Rule(docname, lineno, issue, text)
207208
rules.append(rule)
208209
f.close()
209-
self.info('done, %d rules loaded' % len(self.rules))
210+
self.logger.info('done, %d rules loaded' % len(self.rules))
210211

211212

212213
def get_lineno(node):

Doc/tools/static/switchers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
var all_versions = {
1313
'3.9': 'dev (3.9)',
14-
'3.8': 'pre (3.8)',
14+
'3.8': '3.8',
1515
'3.7': '3.7',
1616
'3.6': '3.6',
1717
'3.5': '3.5',

Doc/tools/templates/indexsidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ <h3>{% trans %}Download{% endtrans %}</h3>
33
<h3>{% trans %}Docs by version{% endtrans %}</h3>
44
<ul>
55
<li><a href="https://docs.python.org/3.9/">{% trans %}Python 3.9 (in development){% endtrans %}</a></li>
6-
<li><a href="https://docs.python.org/3.8/">{% trans %}Python 3.8 (pre-release){% endtrans %}</a></li>
6+
<li><a href="https://docs.python.org/3.8/">{% trans %}Python 3.8 (stable){% endtrans %}</a></li>
77
<li><a href="https://docs.python.org/3.7/">{% trans %}Python 3.7 (stable){% endtrans %}</a></li>
88
<li><a href="https://docs.python.org/3.6/">{% trans %}Python 3.6 (security-fixes){% endtrans %}</a></li>
99
<li><a href="https://docs.python.org/3.5/">{% trans %}Python 3.5 (security-fixes){% endtrans %}</a></li>

Include/patchlevel.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
#define PY_MAJOR_VERSION 2
2424
#define PY_MINOR_VERSION 7
2525
#define PY_MICRO_VERSION 17
26-
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA
27-
#define PY_RELEASE_SERIAL 1
26+
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
27+
#define PY_RELEASE_SERIAL 0
2828

2929
/* Version as a string */
30-
#define PY_VERSION "2.7.17rc1"
30+
#define PY_VERSION "2.7.17"
3131
/*--end constants--*/
3232

3333
/* Subversion Revision number of this file (not of the repository). Empty
File renamed without changes.

Mac/BuildScript/resources/License.rtf

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
{\rtf1\ansi\ansicpg1252\cocoartf1343\cocoasubrtf160
2-
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 CourierNewPS-BoldMT;\f2\fmodern\fcharset0 CourierNewPSMT;
3-
}
1+
{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600
2+
{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;\f2\fmodern\fcharset0 CourierNewPS-BoldMT;
3+
\f3\fmodern\fcharset0 CourierNewPSMT;}
44
{\colortbl;\red255\green255\blue255;}
5+
{\*\expandedcolortbl;;}
56
\margl1440\margr1440\vieww14620\viewh13380\viewkind0
6-
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
7+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
78

89
\f0\b\fs36 \cf0 \ul \ulc0 HISTORY AND LICENSE\
910
1011
\fs24 \
1112
HISTORY OF THE SOFTWARE\
1213
13-
\b0 \ulnone \
14+
\f1\b0 \ulnone \
1415
Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands as a successor of a language called ABC. Guido remains Python's principal author, although it includes many contributions from others.\
1516
\
1617
In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) in Reston, Virginia where he released several versions of the software.\
@@ -20,10 +21,10 @@ In May 2000, Guido and the Python core development team moved to BeOpen.com to f
2021
All Python releases are Open Source (see http://www.opensource.org for the Open Source Definition). Historically, most, but not all, Python releases have also been GPL-compatible; the table below summarizes the various releases.\
2122
\
2223

23-
\f1\b Release Derived Year Owner GPL-\
24+
\f2\b Release Derived Year Owner GPL-\
2425
from compatible?\
2526
26-
\f2\b0 \
27+
\f3\b0 \
2728
0.9.0 thru 1.2 n/a 1991-1995 CWI yes\
2829
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes\
2930
1.6 1.5.2 2000 CNRI no\
@@ -36,25 +37,25 @@ All Python releases are Open Source (see http://www.opensource.org for the Open
3637
2.1.3 2.1.2 2002 PSF yes\
3738
2.2 and above 2.1.1 2001-now PSF yes\
3839

39-
\f0 \
40+
\f1 \
4041

41-
\b Note:
42-
\b0 GPL-compatible doesn't mean that we're distributing Python under the GPL. All Python licenses, unlike the GPL, let you distribute a modified version without making your changes open source. The GPL-compatible licenses make it possible to combine Python with other software that is released under the GPL; the others don't.\
42+
\f0\b Note:
43+
\f1\b0 GPL-compatible doesn't mean that we're distributing Python under the GPL. All Python licenses, unlike the GPL, let you distribute a modified version without making your changes open source. The GPL-compatible licenses make it possible to combine Python with other software that is released under the GPL; the others don't.\
4344
\
4445
Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible.\
4546
\
4647
\
4748

48-
\b \ul TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON\
49+
\f0\b \ul TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON\
4950
50-
\b0 \ulnone \
51+
\f1\b0 \ulnone \
5152

52-
\b PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2\
53+
\f0\b PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2\
5354
54-
\b0 \
55+
\f1\b0 \
5556
1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation.\
5657
\
57-
2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee.\
58+
2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee.\
5859
\
5960
3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python.\
6061
\
@@ -70,9 +71,9 @@ Thanks to the many outside volunteers who have worked under Guido's direction to
7071
\
7172
\
7273

73-
\b BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0\
74+
\f0\b BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0\
7475
75-
\b0 \
76+
\f1\b0 \
7677
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1\
7778
\
7879
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization ("Licensee") accessing and otherwise using this software in source or binary form and its associated documentation ("the Software").\
@@ -91,9 +92,9 @@ BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1\
9192
\
9293
\
9394

94-
\b CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1\
95+
\f0\b CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1\
9596
96-
\b0 \
97+
\f1\b0 \
9798
1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation.\
9899
\
99100
2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 1995-2001 Corporation for National Research Initiatives; All Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): "Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: http://hdl.handle.net/1895.22/1013".\
@@ -114,9 +115,9 @@ BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1\
114115
\
115116
\
116117

117-
\b CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\
118+
\f0\b CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\
118119
119-
\b0 \
120+
\f1\b0 \
120121
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved.\
121122
\
122123
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.\
@@ -125,18 +126,18 @@ STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFT
125126
\
126127
\
127128

128-
\b \ul LICENSES AND ACKNOWLEDGEMENTS FOR INCORPORATED SOFTWARE\
129+
\f0\b \ul LICENSES AND ACKNOWLEDGEMENTS FOR INCORPORATED SOFTWARE\
129130
130-
\b0 \ulnone \
131+
\f1\b0 \ulnone \
131132
This installer incorporates portions of the following third-party software:\
132133
\
133134

134-
\f2 $THIRD_PARTY_LIBS\
135+
\f3 $THIRD_PARTY_LIBS\
135136
\
136137

137-
\f0 For licenses and acknowledgements for these and other third-party software incorporated in this Python distribution, please refer to the on-line documentation {\field{\*\fldinst{HYPERLINK "https://docs.python.org/$VERSION/license.html#licenses-and-acknowledgements-for-incorporated-software"}}{\fldrslt here}}.\
138+
\f1 For licenses and acknowledgements for these and other third-party software incorporated in this Python distribution, please refer to the on-line documentation {\field{\*\fldinst{HYPERLINK "https://docs.python.org/$VERSION/license.html#licenses-and-acknowledgements-for-incorporated-software"}}{\fldrslt here}}.\
138139
\
139140
\
140141
\
141142
\
142-
}
143+
}

0 commit comments

Comments
 (0)
0