Skip to content

Commit d3d7100

Browse files
Merge branch 'master' of github.com:python/cpython into bpo-26543
* 'master' of github.com:python/cpython: (497 commits) bpo-40061: Fix a possible refleak in _asynciomodule.c (pythonGH-19748) bpo-40798: Generate a different message for already removed elements (pythonGH-20483) closes bpo-29017: Update the bindings for Qt information with PySide2 (pythonGH-20149) bpo-39885: Make IDLE context menu cut and copy work again (pythonGH-18951) bpo-29882: Add an efficient popcount method for integers (python#771) Further de-linting of zoneinfo module (python#20499) bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (pythonGH-20435) Indicate that abs() method accept argument that implement __abs__(), just like call() method in the docs (pythonGH-20509) bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (pythongh-17620) bpo-40784: Fix sqlite3 deterministic test (pythonGH-20448) bpo-30064: Properly skip unstable loop.sock_connect() racing test (pythonGH-20494) Note the output ordering of combinatoric functions (pythonGH-19732) bpo-40474: Updated coverage.yml to better report coverage stats (python#19851) bpo-40806: Clarify that itertools.product immediately consumes its inpt (pythonGH-20492) bpo-1294959: Try to clarify the meaning of platlibdir (pythonGH-20332) bpo-37878: PyThreadState_DeleteCurrent() was not removed (pythonGH-20489) bpo-40777: Initialize PyDateTime_IsoCalendarDateType.tp_base at run-time (pythonGH-20493) bpo-40755: Add missing multiset operations to Counter() (pythonGH-20339) bpo-25920: Remove socket.getaddrinfo() lock on macOS (pythonGH-20177) bpo-40275: Fix test.support.threading_helper (pythonGH-20488) ...
2 parents acf6dab + 7b78e7f commit d3d7100

872 files changed

Lines changed: 132649 additions & 12057 deletions

File tree

Some content is hidden

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

‎.github/CODEOWNERS‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ Include/pytime.h @pganssle @abalkin
7474

7575
# Parser/Pgen
7676
/Parser/pgen/ @pablogsal
77+
/Parser/pegen/ @pablogsal
78+
/Tools/peg_generator/ @pablogsal
7779

7880
# SQLite 3
7981
**/*sqlite* @berkerpeksag

‎.github/CONTRIBUTING.rst‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ Build Status
88

99
+ `Stable buildbots <http://buildbot.python.org/3.x.stable/>`_
1010

11-
- 3.7
11+
- 3.9
1212

13-
+ `Stable buildbots <http://buildbot.python.org/3.7.stable/>`_
13+
+ `Stable buildbots <http://buildbot.python.org/3.9.stable/>`_
1414

15-
- 3.6
15+
- 3.8
1616

17-
+ `Stable buildbots <http://buildbot.python.org/3.6.stable/>`_
17+
+ `Stable buildbots <http://buildbot.python.org/3.8.stable/>`_
1818

19-
- 2.7
19+
- 3.7
2020

21-
+ `Stable buildbots <http://buildbot.python.org/2.7.stable/>`_
21+
+ `Stable buildbots <http://buildbot.python.org/3.7.stable/>`_
2222

2323

2424
Thank You
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "sphinx-problem-matcher",
5+
"pattern": [
6+
{
7+
"regexp": "^(.*):(\\d+):\\s+(\\w*):\\s+(.*)$",
8+
"file": 1,
9+
"line": 2,
10+
"severity": 3,
11+
"message": 4
12+
}
13+
]
14+
},
15+
{
16+
"owner": "sphinx-problem-matcher-loose",
17+
"pattern": [
18+
{
19+
"_comment": "A bit of a looser pattern, doesn't look for line numbers, just looks for file names relying on them to start with / and end with .rst",
20+
"regexp": "(\/.*\\.rst):\\s+(\\w*):\\s+(.*)$",
21+
"file": 1,
22+
"severity": 2,
23+
"message": 3
24+
}
25+
]
26+
},
27+
{
28+
"owner": "sphinx-problem-matcher-loose-no-severity",
29+
"pattern": [
30+
{
31+
"_comment": "Looks for file names ending with .rst and line numbers but without severity",
32+
"regexp": "^(.*\\.rst):(\\d+):(.*)$",
33+
"file": 1,
34+
"line": 2,
35+
"message": 3
36+
}
37+
]
38+
}
39+
]
40+
}

‎.github/workflows/build.yml‎

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,46 @@
11
name: Tests
22

3+
# bpo-40548: "paths-ignore" is not used to skip documentation-only PRs, because
4+
# it prevents to mark a job as mandatory. A PR cannot be merged if a job is
5+
# mandatory but not scheduled because of "paths-ignore".
36
on:
47
push:
58
branches:
69
- master
10+
- 3.9
711
- 3.8
812
- 3.7
9-
paths-ignore:
10-
- 'Doc/**'
11-
- 'Misc/**'
12-
- '**/*.md'
13-
- '**/*.rst'
1413
pull_request:
1514
branches:
1615
- master
16+
- 3.9
1717
- 3.8
1818
- 3.7
19-
paths-ignore:
20-
- 'Doc/**'
21-
- 'Misc/**'
22-
- '**/*.md'
23-
- '**/*.rst'
2419

2520
jobs:
21+
check_source:
22+
name: 'Check for source changes'
23+
runs-on: ubuntu-latest
24+
outputs:
25+
run_tests: ${{ steps.check.outputs.run_tests }}
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Check for source changes
29+
id: check
30+
run: |
31+
if [ -z "GITHUB_BASE_REF" ]; then
32+
echo '::set-output name=run_tests::true'
33+
else
34+
git fetch origin $GITHUB_BASE_REF --depth=1
35+
git diff --name-only origin/$GITHUB_BASE_REF... | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
36+
fi
2637
build_win32:
2738
name: 'Windows (x86)'
2839
runs-on: windows-latest
40+
needs: check_source
41+
if: needs.check_source.outputs.run_tests == 'true'
2942
steps:
30-
- uses: actions/checkout@v1
43+
- uses: actions/checkout@v2
3144
- name: Build CPython
3245
run: .\PCbuild\build.bat -e -p Win32
3346
- name: Display build info
@@ -38,8 +51,10 @@ jobs:
3851
build_win_amd64:
3952
name: 'Windows (x64)'
4053
runs-on: windows-latest
54+
needs: check_source
55+
if: needs.check_source.outputs.run_tests == 'true'
4156
steps:
42-
- uses: actions/checkout@v1
57+
- uses: actions/checkout@v2
4358
- name: Build CPython
4459
run: .\PCbuild\build.bat -e -p x64
4560
- name: Display build info
@@ -50,8 +65,10 @@ jobs:
5065
build_macos:
5166
name: 'macOS'
5267
runs-on: macos-latest
68+
needs: check_source
69+
if: needs.check_source.outputs.run_tests == 'true'
5370
steps:
54-
- uses: actions/checkout@v1
71+
- uses: actions/checkout@v2
5572
- name: Configure CPython
5673
run: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-dev
5774
- name: Build CPython
@@ -64,10 +81,12 @@ jobs:
6481
build_ubuntu:
6582
name: 'Ubuntu'
6683
runs-on: ubuntu-latest
84+
needs: check_source
85+
if: needs.check_source.outputs.run_tests == 'true'
6786
env:
6887
OPENSSL_VER: 1.1.1f
6988
steps:
70-
- uses: actions/checkout@v1
89+
- uses: actions/checkout@v2
7190
- name: Install Dependencies
7291
run: sudo ./.github/workflows/posix-deps-apt.sh
7392
- name: 'Restore OpenSSL build'

‎.github/workflows/build_msi.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ on:
44
push:
55
branches:
66
- master
7+
- 3.9
78
- 3.8
89
- 3.7
910
paths:
1011
- 'Tools/msi/**'
1112
pull_request:
1213
branches:
1314
- master
15+
- 3.9
1416
- 3.8
1517
- 3.7
1618
paths:
@@ -21,14 +23,14 @@ jobs:
2123
name: 'Windows (x86) Installer'
2224
runs-on: windows-latest
2325
steps:
24-
- uses: actions/checkout@v1
26+
- uses: actions/checkout@v2
2527
- name: Build CPython installer
2628
run: .\Tools\msi\build.bat -x86
2729

2830
build_win_amd64:
2931
name: 'Windows (x64) Installer'
3032
runs-on: windows-latest
3133
steps:
32-
- uses: actions/checkout@v1
34+
- uses: actions/checkout@v2
3335
- name: Build CPython installer
3436
run: .\Tools\msi\build.bat -x64

‎.github/workflows/coverage.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- 3.9
78
- 3.8
89
- 3.7
910
paths-ignore:
@@ -12,6 +13,7 @@ on:
1213
#pull_request:
1314
# branches:
1415
# - master
16+
# - 3.9
1517
# - 3.8
1618
# - 3.7
1719
# paths-ignore:
@@ -25,7 +27,7 @@ jobs:
2527
env:
2628
OPENSSL_VER: 1.1.1f
2729
steps:
28-
- uses: actions/checkout@v1
30+
- uses: actions/checkout@v2
2931
- name: Install Dependencies
3032
run: sudo ./.github/workflows/posix-deps-apt.sh
3133
- name: 'Restore OpenSSL build'
@@ -48,7 +50,9 @@ jobs:
4850
./python -m venv .venv
4951
source ./.venv/bin/activate
5052
python -m pip install -U coverage
53+
python -m pip install -r Misc/requirements-test.txt
5154
python -m test.pythoninfo
55+
export PYTHONPATH=`find .venv -name fullcoverage`
5256
- name: 'Tests with coverage'
5357
run: >
5458
source ./.venv/bin/activate &&
@@ -64,6 +68,7 @@ jobs:
6468
|| true
6569
- name: 'Publish code coverage results'
6670
run: |
71+
export PYTHONPATH=
6772
source ./.venv/bin/activate
6873
bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
6974
env:
@@ -73,7 +78,7 @@ jobs:
7378
name: 'Ubuntu (C Coverage)'
7479
runs-on: ubuntu-latest
7580
steps:
76-
- uses: actions/checkout@v1
81+
- uses: actions/checkout@v2
7782
- name: Install Dependencies
7883
run: sudo ./.github/workflows/posix-deps-apt.sh
7984
- name: Configure CPython

‎.github/workflows/doc.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ on:
44
#push:
55
# branches:
66
# - master
7+
# - 3.9
78
# - 3.8
89
# - 3.7
910
# paths:
1011
# - 'Doc/**'
1112
pull_request:
1213
branches:
1314
- master
15+
- 3.9
1416
- 3.8
1517
- 3.7
1618
paths:
@@ -22,7 +24,9 @@ jobs:
2224
name: 'Docs'
2325
runs-on: ubuntu-latest
2426
steps:
25-
- uses: actions/checkout@v1
27+
- uses: actions/checkout@v2
28+
- name: Register Sphinx problem matcher
29+
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
2630
- name: 'Install Dependencies'
2731
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
2832
- name: 'Configure CPython'
@@ -32,7 +36,7 @@ jobs:
3236
- name: 'Install build dependencies'
3337
run: make -C Doc/ PYTHON=../python venv
3438
- name: 'Build documentation'
35-
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W -j4" doctest suspicious html
39+
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest suspicious html
3640
- name: 'Upload'
3741
uses: actions/upload-artifact@v1
3842
with:

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Programs/_freeze_importlib
7171
Programs/_testembed
7272
PC/python_nt*.h
7373
PC/pythonnt_rc*.h
74+
Modules/python.exp
7475
PC/*/*.exp
7576
PC/*/*.lib
7677
PC/*/*.bsc

‎.travis.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: c
2-
dist: xenial
2+
dist: bionic
33

44
# To cache doc-building dependencies and C compiler output.
55
cache:
@@ -87,12 +87,15 @@ matrix:
8787
# Need a venv that can parse covered code.
8888
- ./python -m venv venv
8989
- ./venv/bin/python -m pip install -U coverage
90+
- ./venv/bin/python -m pip install -r Misc/requirements-test.txt
9091
- ./venv/bin/python -m test.pythoninfo
92+
- export PYTHONPATH=`find venv -name fullcoverage`
9193
script:
9294
# Skip tests that re-run the entire test suite.
9395
- xvfb-run ./venv/bin/python -m coverage run --branch --pylib -m test --fail-env-changed -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn -x test_concurrent_futures || true
9496
after_script: # Probably should be after_success once test suite updated to run under coverage.py.
9597
# Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
98+
- export PYTHONPATH=
9699
- source ./venv/bin/activate
97100
- bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
98101
- name: "Test code coverage (C)"
@@ -157,7 +160,9 @@ install:
157160
before_script:
158161
# -Og is much faster than -O0
159162
- CFLAGS="${CFLAGS} -Og" ./configure --with-pydebug
160-
- make -j4 regen-all
163+
- eval "$(pyenv init -)"
164+
- pyenv global 3.8
165+
- PYTHON_FOR_REGEN=python3.8 make -j4 regen-all
161166
- changes=`git status --porcelain`
162167
- |
163168
# Check for changes in regenerated files

0 commit comments

Comments
 (0)