Skip to content

Commit 1113472

Browse files
Merge branch 'master' into fix-issue-30688
2 parents 4db797b + c5a2071 commit 1113472

File tree

1,258 files changed

+113777
-91194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,258 files changed

+113777
-91194
lines changed

.gitattributes

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ Lib/test/test_email/data/*.txt -text
2727
Lib/test/xmltestdata/* -text
2828
Lib/test/coding20731.py -text
2929

30-
# Special files in third party code
31-
Modules/zlib/zlib.map -text
32-
3330
# CRLF files
3431
*.bat text eol=crlf
3532
*.ps1 text eol=crlf

.github/CODEOWNERS

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# See https://help.github.com/articles/about-codeowners/
2+
# for more info about CODEOWNERS file
3+
4+
# It uses the same pattern rule for gitignore file
5+
# https://git-scm.com/docs/gitignore#_pattern_format
6+
7+
# asyncio
8+
**/*asyncio* @1st1
9+
10+
# Core
11+
**/*genobject* @1st1
12+
13+
# Hashing
14+
**/*hashlib* @python/crypto-team
15+
**/*pyhash* @python/crypto-team
16+
17+
# Import (including importlib)
18+
**/*import* @python/import-team
19+
20+
# SSL
21+
**/*ssl* @python/crypto-team
22+
23+
# CSPRNG
24+
Python/bootstrap_hash.c @python/crypto-team
25+
26+
# Email and related
27+
**/*mail* @python/email-team
28+
**/*smtp* @python/email-team
29+
**/*mime* @python/email-team
30+
**/*imap* @python/email-team
31+
**/*poplib* @python/email-team
32+
33+
# subprocess
34+
**/*subprocess* @gpshead
35+
36+
# Windows
37+
/PC/ @python/windows-team
38+
/PCbuild/ @python/windows-team
39+
40+
# Windows installer packages
41+
/Tools/msi/ @python/windows-team
42+
/Tools/nuget/ @python/windows-team
43+
44+
**/*itertools* @rhettinger
45+
**/*collections* @rhettinger
46+
**/*random* @rhettinger
47+
**/*queue* @rhettinger
48+
**/*bisect* @rhettinger
49+
**/*heapq* @rhettinger
50+
**/*functools* @ncoghlan @rhettinger
51+
**/*decimal* @rhettinger @skrah
52+
53+
**/*idlelib* @terryjreedy

.github/CODE_OF_CONDUCT.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Code of Conduct
2+
===============
3+
4+
Please note that all interactions on
5+
`Python Software Foundation <https://www.python.org/psf-landing/>`__-supported
6+
infrastructure is `covered
7+
<https://www.python.org/psf/records/board/minutes/2014-01-06/#management-of-the-psfs-web-properties>`__
8+
by the `PSF Code of Conduct <https://www.python.org/psf/codeofconduct/>`__,
9+
which includes all infrastructure used in the development of Python itself
10+
(e.g. mailing lists, issue trackers, GitHub, etc.).
11+
12+
In general this means everyone is expected to be open, considerate, and
13+
respectful of others no matter what their position is within the project.
14+

.github/CONTRIBUTING.rst

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,47 @@ Build Status
1212

1313
+ `Stable buildbots <http://buildbot.python.org/3.6.stable/>`_
1414

15-
- 3.5
16-
17-
+ `Stable buildbots <http://buildbot.python.org/3.5.stable/>`_
18-
1915
- 2.7
2016

2117
+ `Stable buildbots <http://buildbot.python.org/2.7.stable/>`_
2218

2319

20+
Thank You
21+
---------
22+
First off, thanks for contributing to the maintenance of the Python programming
23+
language and the CPython interpreter! Even if your contribution is not
24+
ultimately accepted, the fact you put time and effort into helping out is
25+
greatly appreciated.
26+
27+
2428
Contribution Guidelines
2529
-----------------------
26-
Please read the `devguide <https://cpython-devguide.readthedocs.io/>`_ for
30+
Please read the `devguide <https://devguide.python.org/>`_ for
2731
guidance on how to contribute to this project. The documentation covers
2832
everything from how to build the code to submitting a pull request. There are
2933
also suggestions on how you can most effectively help the project.
3034

3135
Please be aware that our workflow does deviate slightly from the typical GitHub
3236
project. Details on how to properly submit a pull request are covered in
33-
`Lifecycle of a Pull Request <https://cpython-devguide.readthedocs.io/pullrequest.html>`_.
34-
One key point is to keep comments on GitHub to only those related to the reviewing
35-
the code in the pull request. All other discussions -- e.g. about the issue being
36-
fixed -- should happen on bugs.python.org.
37-
38-
If you are making a code contribution or large documentation contribution,
39-
please feel free to add yourself to the ``Misc/ACKS`` file alphabetically.
37+
`Lifecycle of a Pull Request <https://devguide.python.org/pullrequest/>`_.
38+
We utilize various bots and status checks to help with this, so do follow the
39+
comments they leave and their "Details" links, respectively. The key points of
40+
our workflow that are not covered by a bot or status check are:
41+
42+
- All discussions that are not directly related to the code in the pull request
43+
should happen on bugs.python.org
44+
- Upon your first non-trivial pull request (which includes documentation changes),
45+
feel free to add yourself to ``Misc/ACKS``
46+
47+
48+
Setting Expectations
49+
--------------------
50+
Due to the fact that this project is entirely volunteer-run (i.e. no one is paid
51+
to work on Python full-time), we unfortunately can make no guarantees as to if
52+
or when a core developer will get around to reviewing your pull request.
53+
If no core developer has done a review or responded to changes made because of a
54+
"changes requested" review, please feel free to email python-dev to ask if
55+
someone could take a look at your pull request.
4056

4157

4258
Code of Conduct

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
!!! If this is a backport PR (PR made against branches other than `master`),
2+
please ensure that the PR title is in the following format:
3+
```
4+
[X.Y] <title from the original PR> (GH-NNNN)
5+
```
6+
Where: [X.Y] is the branch name, e.g. [3.6].
7+
8+
GH-NNNN refers to the PR number from `master`.
9+
10+
PLEASE: Remove this headline!!!

.github/appveyor.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ branches:
55
- master
66
- /\d\.\d/
77
- buildbot-custom
8+
cache:
9+
- externals -> PCbuild\*
810
build_script:
911
- cmd: PCbuild\build.bat -e
12+
- cmd: PCbuild\win32\python.exe -m test.pythoninfo
1013
test_script:
11-
- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
14+
- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 --fail-env-changed -j0
15+
environment:
16+
HOST_PYTHON: C:\Python36\python.exe
17+
image:
18+
- Visual Studio 2017
1219

1320
# Only trigger AppVeyor if actual code or its configuration changes
1421
only_commits:
@@ -21,7 +28,7 @@ only_commits:
2128
- Modules/
2229
- Objects/
2330
- PC/
24-
- PCBuild/
31+
- PCbuild/
2532
- Parser/
2633
- Programs/
2734
- Python/

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
.gdb_history
2020
Doc/build/
2121
Doc/venv/
22+
Doc/.venv/
23+
Doc/env/
24+
Doc/.env/
2225
Include/pydtrace_probes.h
2326
Lib/distutils/command/*.pdb
2427
Lib/lib2to3/*.pickle
@@ -60,7 +63,7 @@ PCbuild/*.VC.opendb
6063
PCbuild/.vs/
6164
PCbuild/amd64/
6265
PCbuild/obj/
63-
PCBuild/win32/
66+
PCbuild/win32/
6467
.purify
6568
Parser/pgen
6669
Parser/pgen.exe

.mention-bot

Lines changed: 0 additions & 20 deletions
This file was deleted.

.travis.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ dist: trusty
33
sudo: false
44
group: beta
55

6-
# To cache doc-building dependencies.
7-
cache: pip
6+
# To cache doc-building dependencies and C compiler output.
7+
cache:
8+
- pip
9+
- ccache
810

911
branches:
1012
only:
@@ -23,15 +25,6 @@ matrix:
2325
# compiler here and the other to run the coverage build. Clang is preferred
2426
# in this instance for its better error messages.
2527
env: TESTING=cpython
26-
- os: osx
27-
language: c
28-
compiler: clang
29-
# Testing under macOS is optional until testing stability has been demonstrated.
30-
env: OPTIONAL=true
31-
before_install:
32-
- brew install openssl xz
33-
- export CPPFLAGS="-I$(brew --prefix openssl)/include"
34-
- export LDFLAGS="-L$(brew --prefix openssl)/lib"
3528
- os: linux
3629
language: python
3730
# Build the docs against a stable version of Python so code bugs don't hold up doc-related PRs.
@@ -41,7 +34,7 @@ matrix:
4134
- cd Doc
4235
# Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
4336
# (Updating the version is fine as long as no warnings are raised by doing so.)
44-
- python -m pip install sphinx~=1.6.1
37+
- python -m pip install sphinx~=1.6.1 blurb
4538
script:
4639
- make check suspicious html SPHINXOPTS="-q -W -j4"
4740
- os: linux
@@ -60,9 +53,10 @@ matrix:
6053
# Need a venv that can parse covered code.
6154
./python -m venv venv
6255
./venv/bin/python -m pip install -U coverage
56+
./venv/bin/python -m test.pythoninfo
6357
script:
6458
# Skip tests that re-run the entire test suite.
65-
- ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu,-tzdata -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
59+
- ./venv/bin/python -m coverage run --pylib -m test --fail-env-changed -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn -x test_concurrent_futures
6660
after_script: # Probably should be after_success once test suite updated to run under coverage.py.
6761
# Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
6862
- source ./venv/bin/activate
@@ -87,10 +81,18 @@ before_script:
8781
echo "$changes"
8882
exit 1
8983
fi
84+
make pythoninfo
9085
9186
script:
87+
# Using the built Python as patchcheck.py is built around the idea of using
88+
# a checkout-build of CPython to know things like what base branch the changes
89+
# should be compared against.
90+
# Only run on Linux as the check only needs to be run once.
91+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi
9292
# `-r -w` implicitly provided through `make buildbottest`.
93-
- make buildbottest TESTOPTS="-j4 -uall,-cpu,-tzdata"
93+
- make buildbottest TESTOPTS="-j4 -uall,-cpu"
94+
# Check that all symbols exported by libpython start with "Py" or "_Py"
95+
- make smelly
9496

9597
notifications:
9698
email: false

Doc/Makefile

Lines changed: 24 additions & 7 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 = python3
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)
@@ -38,6 +40,20 @@ help:
3840
@echo " serve to serve the documentation on the localhost (8000)"
3941

4042
build:
43+
-mkdir -p build
44+
# Look first for a Misc/NEWS file (building from a source release tarball
45+
# or old repo) and use that, otherwise look for a Misc/NEWS.d directory
46+
# (building from a newer repo) and use blurb to generate the NEWS file.
47+
@if [ -f ../Misc/NEWS ] ; then \
48+
echo "Using existing Misc/NEWS file"; \
49+
cp ../Misc/NEWS build/NEWS; \
50+
elif [ -d ../Misc/NEWS.d ]; then \
51+
echo "Building NEWS from Misc/NEWS.d with blurb"; \
52+
$(BLURB) merge -f build/NEWS; \
53+
else \
54+
echo "Neither Misc/NEWS.d nor Misc/NEWS found; cannot build docs"; \
55+
exit 1; \
56+
fi
4157
$(SPHINXBUILD) $(ALLSPHINXOPTS)
4258
@echo
4359

@@ -103,11 +119,12 @@ htmlview: html
103119
$(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
104120

105121
clean:
106-
-rm -rf build/* venv/*
122+
-rm -rf build/* $(VENVDIR)/*
107123

108124
venv:
109-
$(PYTHON) -m venv venv
110-
./venv/bin/python3 -m pip install -U Sphinx
125+
$(PYTHON) -m venv $(VENVDIR)
126+
$(VENVDIR)/bin/python3 -m pip install -U Sphinx blurb
127+
@echo "The venv has been created in the $(VENVDIR) directory"
111128

112129
dist:
113130
rm -rf dist
@@ -153,7 +170,7 @@ dist:
153170
cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
154171

155172
check:
156-
$(PYTHON) tools/rstlint.py -i tools -i venv -i README.rst
173+
$(PYTHON) tools/rstlint.py -i tools -i $(VENVDIR) -i README.rst
157174

158175
serve:
159176
../Tools/scripts/serve.py build/html
@@ -167,12 +184,12 @@ serve:
167184

168185
# for development releases: always build
169186
autobuild-dev:
170-
make dist SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A versionswitcher=1'
187+
make dist SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A switchers=1'
171188
-make suspicious
172189

173190
# for quick rebuilds (HTML only)
174191
autobuild-dev-html:
175-
make html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A versionswitcher=1'
192+
make html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A switchers=1'
176193

177194
# for stable releases: only build if not in pre-release stage (alpha, beta)
178195
# release candidate downloads are okay, since the stable tree can be in that stage

0 commit comments

Comments
 (0)