Skip to content

Commit d914928

Browse files
committed
* 'master' of https://github.com/python/cpython: (550 commits) bpo-31867: Remove duplicates in default mimetypes. (python#4388) tokenizer: Remove unused tabs options (python#4422) bpo-31691: Specify where to find build instructions for the Windows installer (python#4426) Fix typo in atexit documentation. (pythonGH-4419) bpo-31702: Allow to specify rounds for SHA-2 hashing in crypt.mksalt(). (python#4110) bpo-32043: New "developer mode": "-X dev" option (python#4413) bpo-30349: Raise FutureWarning for nested sets and set operations (python#1553) bpo-32037: Use the INT opcode for 32-bit integers in protocol 0 pickles. (python#4407) bpo-30143: 2to3 now generates a code that uses abstract collection classes (python#1262) bpo-32030: Enhance Py_Main() (python#4412) bpo-32030: Split Py_Main() into subfunctions (python#4399) bpo-32034: Make IncompleteReadError & LimitOverrunError pickleable python#4409 bpo-32025: Add time.thread_time() (python#4410) bpo-32018: Fix inspect.signature repr to follow PEP 8 (python#4408) bpo-30399: Get rid of trailing comma in the repr of BaseException. (python#1650) bpo-30950: Convert round() to Argument Clinic. (python#2740) bpo-32011: Revert "Issue python#15480: Remove the deprecated and unused TYPE_INT64 code from marshal." (python#4381) bpo-32023: Disallow genexprs without parenthesis in class definitions. (python#4400) bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (python#4289) bpo-32032: Test both implementations of module-level pickle API. (python#4401) ...
2 parents 58deb49 + f02f5e5 commit d914928

File tree

1,125 files changed

+63500
-49331
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,125 files changed

+63500
-49331
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: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,30 @@
2424
Python/bootstrap_hash.c @python/crypto-team
2525

2626
# Email and related
27-
**/*mail* @bitdancer
28-
**/*smtp* @bitdancer
29-
**/*mime* @bitdancer
30-
**/*imap* @bitdancer
31-
**/*poplib* @bitdancer
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
3232

3333
# subprocess
3434
**/*subprocess* @gpshead
3535

3636
# Windows
3737
/PC/ @python/windows-team
38-
/PCBuild/ @python/windows-team
38+
/PCbuild/ @python/windows-team
3939

4040
# Windows installer packages
4141
/Tools/msi/ @python/windows-team
4242
/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/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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +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
1012
- cmd: PCbuild\win32\python.exe -m test.pythoninfo
1113
test_script:
1214
- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 --fail-env-changed -j0
1315
environment:
1416
HOST_PYTHON: C:\Python36\python.exe
17+
image:
18+
- Visual Studio 2017
1519

1620
# Only trigger AppVeyor if actual code or its configuration changes
1721
only_commits:
@@ -24,7 +28,7 @@ only_commits:
2428
- Modules/
2529
- Objects/
2630
- PC/
27-
- PCBuild/
31+
- PCbuild/
2832
- Parser/
2933
- Programs/
3034
- Python/

.gitignore

Lines changed: 3 additions & 0 deletions
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

.travis.yml

Lines changed: 8 additions & 13 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
@@ -63,7 +56,7 @@ matrix:
6356
./venv/bin/python -m test.pythoninfo
6457
script:
6558
# Skip tests that re-run the entire test suite.
66-
- ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu -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
6760
after_script: # Probably should be after_success once test suite updated to run under coverage.py.
6861
# Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
6962
- source ./venv/bin/activate
@@ -98,6 +91,8 @@ script:
9891
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi
9992
# `-r -w` implicitly provided through `make buildbottest`.
10093
- make buildbottest TESTOPTS="-j4 -uall,-cpu"
94+
# Check that all symbols exported by libpython start with "Py" or "_Py"
95+
- make smelly
10196

10297
notifications:
10398
email: false

Doc/Makefile

Lines changed: 22 additions & 5 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

Doc/README.rst

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,46 @@ developers guide.
1414
Building the docs
1515
=================
1616

17-
You need to have `Sphinx <http://sphinx-doc.org/>`_ installed; it is the toolset
18-
used to build the docs. It is not included in this tree, but maintained
19-
separately and `available from PyPI <https://pypi.python.org/pypi/Sphinx>`_.
17+
The documentation is built with several tools which are not included in this
18+
tree but are maintained separately and are available from
19+
`PyPI <https://pypi.org/>`_.
20+
21+
* `Sphinx <https://pypi.org/project/Sphinx/>`_
22+
* `blurb <https://pypi.org/project/blurb/>`_
23+
24+
The easiest way to install these tools is to create a virtual environment and
25+
install the tools into there.
2026

2127

2228
Using make
2329
----------
2430

25-
A Makefile has been prepared so that on Unix, provided you have installed
26-
Sphinx, you can just run ::
31+
To get started on UNIX, you can create a virtual environment with the command ::
2732

28-
make html
33+
make venv
2934

30-
to build the HTML output files.
31-
32-
On Windows, we try to emulate the Makefile as closely as possible with a
33-
``make.bat`` file.
35+
That will install all the tools necessary to build the documentation. Assuming
36+
the virtual environment was created in the ``env`` directory (the default;
37+
configurable with the VENVDIR variable), you can run the following command to
38+
build the HTML output files::
3439

35-
To use a Python interpreter that's not called ``python``, use the standard
36-
way to set Makefile variables, using e.g. ::
40+
make html
3741

38-
make html PYTHON=python3
42+
By default, if the virtual environment is not created, the Makefile will
43+
look for instances of sphinxbuild and blurb installed on your process PATH
44+
(configurable with the SPHINXBUILD and BLURB variables).
3945

40-
On Windows, set the PYTHON environment variable instead.
41-
42-
To use a specific sphinx-build (something other than ``sphinx-build``), set
43-
the SPHINXBUILD variable.
46+
On Windows, we try to emulate the Makefile as closely as possible with a
47+
``make.bat`` file. If you need to specify the Python interpreter to use,
48+
set the PYTHON environment variable instead.
4449

4550
Available make targets are:
4651

4752
* "clean", which removes all build files.
4853

54+
* "venv", which creates a virtual environment with all necessary tools
55+
installed.
56+
4957
* "html", which builds standalone HTML files for offline viewing.
5058

5159
* "htmlview", which re-uses the "html" builder, but then opens the main page
@@ -96,7 +104,7 @@ Available make targets are:
96104
Without make
97105
------------
98106

99-
Install the Sphinx package and its dependencies from PyPI.
107+
First, install the tool dependencies from PyPI.
100108

101109
Then, from the ``Doc`` directory, run ::
102110

@@ -112,8 +120,7 @@ Contributing
112120
Bugs in the content should be reported to the
113121
`Python bug tracker <https://bugs.python.org>`_.
114122

115-
Bugs in the toolset should be reported in the
116-
`Sphinx bug tracker <https://github.com/sphinx-doc/sphinx/issues>`_.
123+
Bugs in the toolset should be reported to the tools themselves.
117124

118125
You can also send a mail to the Python Documentation Team at docs@python.org,
119126
and we will process your request as soon as possible.

Doc/c-api/buffer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ Buffer-related functions
473473
(*order* is ``'A'``). Return ``0`` otherwise.
474474
475475
476-
.. c:function:: void PyBuffer_FillContiguousStrides(int ndim, Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t itemsize, char order)
476+
.. c:function:: void PyBuffer_FillContiguousStrides(int ndims, Py_ssize_t *shape, Py_ssize_t *strides, int itemsize, char order)
477477
478478
Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style if
479479
*order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the

0 commit comments

Comments
 (0)