Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked frompython/cpython

Commitb9c39e3

Browse files
committed
Merge branch 'main' into cached_property_docs
* main: (760 commits)pythonGH-104102: Optimize `pathlib.Path.glob()` handling of `../` pattern segments (pythonGH-104103)pythonGH-104104: Optimize `pathlib.Path.glob()` by avoiding repeated calls to `os.path.normcase()` (pythonGH-104105)pythongh-103822: [Calendar] change return value to enum for day and month APIs (pythonGH-103827)pythongh-65022: Fix description of tuple return value in copyreg (python#103892)pythonGH-103525: Improve exception message from `pathlib.PurePath()` (pythonGH-103526)pythongh-84436: Add integration C API tests for immortal objects (pythongh-103962)pythongh-103743: Add PyUnstable_Object_GC_NewWithExtraData (pythonGH-103744)pythongh-102997: Update Windows installer to SQLite 3.41.2. (python#102999)pythonGH-103484: Fix redirected permanently URLs (python#104001) Improve assert_type phrasing (python#104081)pythongh-102997: Update macOS installer to SQLite 3.41.2. (pythonGH-102998)pythonGH-103472: close response in HTTPConnection._tunnel (python#103473)pythongh-88496: IDLE - fix another test on macOS (python#104075)pythongh-94673: Hide Objects in PyTypeObject Behind Accessors (pythongh-104074)pythongh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter (pythongh-104072)pythongh-104016: Skip test for deeply neste f-strings on wasi (python#104071)pythongh-104057: Fix direct invocation of test_super (python#104064)pythongh-87092: Expose assembler to unit tests (python#103988)pythongh-97696: asyncio eager tasks factory (python#102853)pythongh-84436: Immortalize in _PyStructSequence_InitBuiltinWithFlags() (pythongh-104054) ...
2 parents18c99a8 +65a49c6 commitb9c39e3

File tree

1,103 files changed

+63415
-33081
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,103 files changed

+63415
-33081
lines changed

‎.devcontainer/Dockerfile‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM docker.io/library/fedora:37
2+
3+
ENV CC=clang
4+
5+
ENV WASI_SDK_VERSION=19
6+
ENV WASI_SDK_PATH=/opt/wasi-sdk
7+
8+
ENV WASMTIME_HOME=/opt/wasmtime
9+
ENV WASMTIME_VERSION=7.0.0
10+
ENV WASMTIME_CPU_ARCH=x86_64
11+
12+
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz}'dnf-command(builddep)' && \
13+
dnf -y --nodocs --setopt=install_weak_deps=False builddep python3 && \
14+
dnf -y clean all
15+
16+
RUN mkdir ${WASI_SDK_PATH} && \
17+
curl --location https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-linux.tar.gz | \
18+
tar --strip-components 1 --directory ${WASI_SDK_PATH} --extract --gunzip
19+
20+
RUN mkdir --parents ${WASMTIME_HOME} && \
21+
curl --location"https://github.com/bytecodealliance/wasmtime/releases/download/v${WASMTIME_VERSION}/wasmtime-v${WASMTIME_VERSION}-${WASMTIME_CPU_ARCH}-linux.tar.xz" | \
22+
xz --decompress | \
23+
tar --strip-components 1 --directory ${WASMTIME_HOME} -x && \
24+
ln -s ${WASMTIME_HOME}/wasmtime /usr/local/bin

‎.devcontainer/devcontainer.json‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"build": {
3+
"dockerfile":"Dockerfile"
4+
},
5+
"onCreateCommand": [
6+
// Install common tooling.
7+
"dnf",
8+
"install",
9+
"-y",
10+
"which",
11+
"zsh",
12+
"fish"
13+
],
14+
"updateContentCommand": {
15+
// Using the shell for `nproc` usage.
16+
"python":"./configure --config-cache --with-pydebug && make -s -j `nproc`",
17+
"docs": [
18+
"make",
19+
"--directory",
20+
"Doc",
21+
"venv",
22+
"html"
23+
]
24+
},
25+
"customizations": {
26+
"vscode": {
27+
"extensions": [
28+
// Highlighting for Parser/Python.asdl.
29+
"brettcannon.zephyr-asdl",
30+
// Highlighting for configure.ac.
31+
"maelvalais.autoconf",
32+
// C auto-complete.
33+
"ms-vscode.cpptools",
34+
// To view built docs.
35+
"ms-vscode.live-server"
36+
// https://github.com/microsoft/vscode-python/issues/18073
37+
// "ms-python.python"
38+
],
39+
"settings": {
40+
"C_Cpp.default.compilerPath":"/usr/bin/clang",
41+
"C_Cpp.default.cStandard":"c11",
42+
"C_Cpp.default.defines": [
43+
"CONFIG_64",
44+
"Py_BUILD_CORE"
45+
],
46+
"C_Cpp.default.includePath": [
47+
"${workspaceFolder}/*",
48+
"${workspaceFolder}/Include/**"
49+
],
50+
// https://github.com/microsoft/vscode-cpptools/issues/10732
51+
"C_Cpp.errorSquiggles":"disabled",
52+
"editor.insertSpaces":true,
53+
"editor.rulers": [
54+
80
55+
],
56+
"editor.tabSize":4,
57+
"editor.trimAutoWhitespace":true,
58+
"files.associations": {
59+
"*.h":"c"
60+
},
61+
"files.encoding":"utf8",
62+
"files.eol":"\n",
63+
"files.insertFinalNewline":true,
64+
"files.trimTrailingWhitespace":true,
65+
"python.analysis.diagnosticSeverityOverrides": {
66+
// Complains about shadowing the stdlib w/ the stdlib.
67+
"reportShadowedImports":"none",
68+
// Doesn't like _frozen_importlib.
69+
"reportMissingImports":"none"
70+
},
71+
"python.analysis.extraPaths": [
72+
"Lib"
73+
],
74+
"python.defaultInterpreterPath":"./python",
75+
"[restructuredtext]": {
76+
"editor.tabSize":3
77+
}
78+
}
79+
}
80+
}
81+
}

‎.gitattributes‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ Lib/test/test_importlib/resources/data01/* noeol
3232
Lib/test/test_importlib/resources/namespacedata01/*noeol
3333
Lib/test/xmltestdata/*noeol
3434

35+
# Shell scripts should have LF even on Windows because of Cygwin
36+
Lib/venv/scripts/common/activatetexteol=lf
37+
Lib/venv/scripts/posix/*texteol=lf
38+
3539
# CRLF files
3640
[attr]dostexteol=crlf
3741

‎.github/CODEOWNERS‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
# https://git-scm.com/docs/gitignore#_pattern_format
66

77
# GitHub
8-
.github/**@ezio-melotti
8+
.github/**@ezio-melotti@hugovk
99

1010
# Build system
1111
configure*@erlend-aasland@corona10
1212

1313
# asyncio
14-
**/*asyncio*@1st1@asvetlov@gvanrossum@kumaraditya303
14+
**/*asyncio*@1st1@asvetlov@gvanrossum@kumaraditya303@willingc
1515

1616
# Core
1717
**/*context*@1st1
@@ -25,6 +25,8 @@ Objects/frameobject.c @markshannon
2525
Objects/call.c@markshannon
2626
Python/ceval.c@markshannon
2727
Python/compile.c@markshannon@iritkatriel
28+
Python/assemble.c@markshannon@iritkatriel
29+
Python/flowgraph.c@markshannon@iritkatriel
2830
Python/ast_opt.c@isidentical
2931
Lib/test/test_patma.py@brandtbucher
3032
Lib/test/test_peepholer.py@brandtbucher
@@ -61,11 +63,7 @@ Python/traceback.c @iritkatriel
6163
/Tools/build/parse_html5_entities.py@ezio-melotti
6264

6365
# Import (including importlib).
64-
# Ignoring importlib.h so as to not get flagged on
65-
# all pull requests that change the emitted
66-
# bytecode.
67-
**/*import*.c@brettcannon@encukou@ericsnowcurrently@ncoghlan@warsaw
68-
**/*import*.py@brettcannon@encukou@ericsnowcurrently@ncoghlan@warsaw
66+
**/*import*@brettcannon@encukou@ericsnowcurrently@ncoghlan@warsaw
6967
**/*importlib/resources/*@jaraco@warsaw@FFY00
7068
**/importlib/metadata/*@jaraco@warsaw
7169

‎.github/workflows/build.yml‎

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
check_source:
3434
name:'Check for source changes'
3535
runs-on:ubuntu-latest
36+
timeout-minutes:10
3637
outputs:
3738
run_tests:${{ steps.check.outputs.run_tests }}
3839
steps:
@@ -63,6 +64,7 @@ jobs:
6364
check_generated_files:
6465
name:'Check if generated files are up to date'
6566
runs-on:ubuntu-latest
67+
timeout-minutes:60
6668
needs:check_source
6769
if:needs.check_source.outputs.run_tests == 'true'
6870
steps:
@@ -111,10 +113,14 @@ jobs:
111113
run:make smelly
112114
-name:Check limited ABI symbols
113115
run:make check-limited-abi
116+
-name:Check for unsupported C global variables
117+
if:github.event_name == 'pull_request'# $GITHUB_EVENT_NAME
118+
run:make check-c-globals
114119

115120
build_win32:
116121
name:'Windows (x86)'
117122
runs-on:windows-latest
123+
timeout-minutes:60
118124
needs:check_source
119125
if:needs.check_source.outputs.run_tests == 'true'
120126
env:
@@ -123,7 +129,6 @@ jobs:
123129
-uses:actions/checkout@v3
124130
-name:Build CPython
125131
run:.\PCbuild\build.bat -e -d -p Win32
126-
timeout-minutes:30
127132
-name:Display build info
128133
run:.\python.bat -m test.pythoninfo
129134
-name:Tests
@@ -132,6 +137,7 @@ jobs:
132137
build_win_amd64:
133138
name:'Windows (x64)'
134139
runs-on:windows-latest
140+
timeout-minutes:60
135141
needs:check_source
136142
if:needs.check_source.outputs.run_tests == 'true'
137143
env:
@@ -142,7 +148,6 @@ jobs:
142148
run:echo "::add-matcher::.github/problem-matchers/msvc.json"
143149
-name:Build CPython
144150
run:.\PCbuild\build.bat -e -d -p x64
145-
timeout-minutes:30
146151
-name:Display build info
147152
run:.\python.bat -m test.pythoninfo
148153
-name:Tests
@@ -151,18 +156,27 @@ jobs:
151156
build_macos:
152157
name:'macOS'
153158
runs-on:macos-latest
159+
timeout-minutes:60
154160
needs:check_source
155161
if:needs.check_source.outputs.run_tests == 'true'
156162
env:
163+
HOMEBREW_NO_ANALYTICS:1
164+
HOMEBREW_NO_AUTO_UPDATE:1
165+
HOMEBREW_NO_INSTALL_CLEANUP:1
157166
PYTHONSTRICTEXTENSIONBUILD:1
158167
steps:
159168
-uses:actions/checkout@v3
160-
-name:Prepare homebrew environment variables
161-
run:|
162-
echo "LDFLAGS=-L$(brew --prefix tcl-tk)/lib" >> $GITHUB_ENV
163-
echo "PKG_CONFIG_PATH=$(brew --prefix openssl@1.1)/lib/pkgconfig:$(brew --prefix tcl-tk)/lib/pkgconfig" >> $GITHUB_ENV
169+
-name:Install Homebrew dependencies
170+
run:brew install pkg-config openssl@1.1 xz gdbm tcl-tk
164171
-name:Configure CPython
165-
run:./configure --with-pydebug --prefix=/opt/python-dev
172+
run:|
173+
CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
174+
LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \
175+
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
176+
./configure \
177+
--with-pydebug \
178+
--prefix=/opt/python-dev \
179+
--with-openssl="$(brew --prefix openssl@1.1)"
166180
-name:Build CPython
167181
run:make -j4
168182
-name:Display build info
@@ -173,6 +187,7 @@ jobs:
173187
build_ubuntu:
174188
name:'Ubuntu'
175189
runs-on:ubuntu-20.04
190+
timeout-minutes:60
176191
needs:check_source
177192
if:needs.check_source.outputs.run_tests == 'true'
178193
env:
@@ -230,6 +245,7 @@ jobs:
230245
build_ubuntu_ssltests:
231246
name:'Ubuntu SSL tests with OpenSSL'
232247
runs-on:ubuntu-20.04
248+
timeout-minutes:60
233249
needs:check_source
234250
if:needs.check_source.outputs.run_tests == 'true'
235251
strategy:
@@ -279,6 +295,7 @@ jobs:
279295
build_asan:
280296
name:'Address sanitizer'
281297
runs-on:ubuntu-20.04
298+
timeout-minutes:60
282299
needs:check_source
283300
if:needs.check_source.outputs.run_tests == 'true'
284301
env:
@@ -291,6 +308,10 @@ jobs:
291308
run:echo "::add-matcher::.github/problem-matchers/gcc.json"
292309
-name:Install Dependencies
293310
run:sudo ./.github/workflows/posix-deps-apt.sh
311+
-name:Set up GCC-10 for ASAN
312+
uses:egor-tensin/setup-gcc@v1
313+
with:
314+
version:10
294315
-name:Configure OpenSSL env vars
295316
run:|
296317
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV

‎.github/workflows/build_msi.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
build:
2727
name:Windows Installer
2828
runs-on:windows-latest
29+
timeout-minutes:60
2930
strategy:
3031
matrix:
3132
type:[x86, x64, arm64]

‎.github/workflows/doc.yml‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
build_doc:
3737
name:'Docs'
3838
runs-on:ubuntu-latest
39+
timeout-minutes:60
3940
steps:
4041
-uses:actions/checkout@v3
4142
-name:Register Sphinx problem matcher
@@ -53,10 +54,56 @@ jobs:
5354
-name:'Build HTML documentation'
5455
run:make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
5556

57+
# Add pull request annotations for Sphinx nitpicks (missing references)
58+
-name:'Get list of changed files'
59+
if:github.event_name == 'pull_request'
60+
id:changed_files
61+
uses:Ana06/get-changed-files@v2.2.0
62+
with:
63+
filter:"Doc/**"
64+
-name:'Build changed files in nit-picky mode'
65+
if:github.event_name == 'pull_request'
66+
continue-on-error:true
67+
run:|
68+
# Mark files the pull request modified
69+
touch ${{ steps.changed_files.outputs.added_modified }}
70+
# Build docs with the '-n' (nit-picky) option; convert warnings to annotations
71+
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n --keep-going" html 2>&1 |
72+
python Doc/tools/warnings-to-gh-actions.py
73+
74+
# Ensure some files always pass Sphinx nit-picky mode (no missing references)
75+
-name:'Build known-good files in nit-picky mode'
76+
run:|
77+
# Mark files that must pass nit-picky
78+
python Doc/tools/touch-clean-files.py
79+
# Build docs with the '-n' (nit-picky) option, convert warnings to errors (-W)
80+
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going" html 2>&1
81+
82+
# This build doesn't use problem matchers or check annotations
83+
# It also does not run 'make check', as sphinx-lint is not installed into the
84+
# environment.
85+
build_doc_oldest_supported_sphinx:
86+
name:'Docs (Oldest Sphinx)'
87+
runs-on:ubuntu-latest
88+
timeout-minutes:60
89+
steps:
90+
-uses:actions/checkout@v3
91+
-name:'Set up Python'
92+
uses:actions/setup-python@v4
93+
with:
94+
python-version:'3.11'# known to work with Sphinx 3.2
95+
cache:'pip'
96+
cache-dependency-path:'Doc/requirements-oldest-sphinx.txt'
97+
-name:'Install build dependencies'
98+
run:make -C Doc/ venv REQUIREMENTS="requirements-oldest-sphinx.txt"
99+
-name:'Build HTML documentation'
100+
run:make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
101+
56102
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
57103
doctest:
58104
name:'Doctest'
59105
runs-on:ubuntu-latest
106+
timeout-minutes:60
60107
steps:
61108
-uses:actions/checkout@v3
62109
-name:Register Sphinx problem matcher
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name:Read the Docs PR preview
2+
# Automatically edits a pull request's descriptions with a link
3+
# to the documentation's preview on Read the Docs.
4+
5+
on:
6+
pull_request_target:
7+
types:
8+
-opened
9+
paths:
10+
-'Doc/**'
11+
-'.github/workflows/doc.yml'
12+
13+
permissions:
14+
pull-requests:write
15+
16+
concurrency:
17+
group:${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress:true
19+
20+
jobs:
21+
documentation-links:
22+
runs-on:ubuntu-latest
23+
steps:
24+
-uses:readthedocs/actions/preview@v1
25+
with:
26+
project-slug:"cpython-previews"
27+
single-version:"true"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp