Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into bitfields
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasgoergens committed Mar 14, 2023
2 parents dee6b90 + 7bdb331 commit be065d5
Show file tree
Hide file tree
Showing 2,042 changed files with 165,340 additions and 102,985 deletions.
12 changes: 6 additions & 6 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
displayName: Pre-build checks

pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04

steps:
- template: ./prebuild-checks.yml
Expand All @@ -20,7 +20,7 @@ jobs:
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))

pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04

steps:
- template: ./docs-steps.yml
Expand Down Expand Up @@ -52,12 +52,12 @@ jobs:
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04

variables:
testRunTitle: '$(build.sourceBranchName)-linux'
testRunPlatform: linux
openssl_version: 1.1.1q
openssl_version: 1.1.1t

steps:
- template: ./posix-steps.yml
Expand All @@ -78,12 +78,12 @@ jobs:
)
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04

variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.1q
openssl_version: 1.1.1t

steps:
- template: ./posix-steps.yml
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/posix-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ steps:
- ${{ if eq(parameters.patchcheck, 'true') }}:
- script: |
git fetch origin
./python Tools/scripts/patchcheck.py --ci true
./python Tools/patchcheck/patchcheck.py --ci true
displayName: 'Run patchcheck.py'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
Expand Down
12 changes: 6 additions & 6 deletions .azure-pipelines/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
displayName: Pre-build checks

pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04

steps:
- template: ./prebuild-checks.yml
Expand All @@ -20,7 +20,7 @@ jobs:
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))

pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04

steps:
- template: ./docs-steps.yml
Expand Down Expand Up @@ -52,12 +52,12 @@ jobs:
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04

variables:
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
testRunPlatform: linux
openssl_version: 1.1.1q
openssl_version: 1.1.1t

steps:
- template: ./posix-steps.yml
Expand All @@ -78,12 +78,12 @@ jobs:
)
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04

variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.1q
openssl_version: 1.1.1t

steps:
- template: ./posix-steps.yml
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/windows-layout-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
displayName: Show layout info (${{ parameters.kind }})

- ${{ if eq(parameters.fulltest, 'true') }}:
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results-${{ parameters.kind }}.xml" --tempdir "$(Build.BinariesDirectory)\tmp-${{ parameters.kind }}-$(arch)"
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results-${{ parameters.kind }}.xml" --tempdir "$(Build.BinariesDirectory)\tmp-${{ parameters.kind }}-$(arch)" -i test_launcher
workingDirectory: $(Build.BinariesDirectory)\layout-${{ parameters.kind }}-$(arch)
displayName: ${{ parameters.kind }} Tests
env:
Expand Down
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ Doc/library/token-list.inc generated
Include/internal/pycore_ast.h generated
Include/internal/pycore_ast_state.h generated
Include/internal/pycore_opcode.h generated
Include/internal/pycore_runtime_init_generated.h generated
Include/internal/pycore_*_generated.h generated
Include/opcode.h generated
Include/token.h generated
Lib/keyword.py generated
Lib/test/levenshtein_examples.json generated
Lib/test/test_stable_abi_ctypes.py generated
Lib/token.py generated
Objects/typeslots.inc generated
Expand All @@ -81,6 +82,7 @@ Parser/parser.c generated
Parser/token.c generated
Programs/test_frozenmain.h generated
Python/Python-ast.c generated
Python/generated_cases.c.h generated
Python/opcode_targets.h generated
Python/stdlib_module_names.h generated
Tools/peg_generator/pegen/grammar_parser.py generated
Expand Down
27 changes: 19 additions & 8 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
# It uses the same pattern rule for gitignore file
# https://git-scm.com/docs/gitignore#_pattern_format

# GitHub
.github/** @ezio-melotti

# Build system
configure* @erlend-aasland @corona10

# asyncio
**/*asyncio* @1st1 @asvetlov @gvanrossum
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303

# Core
**/*context* @1st1
Expand Down Expand Up @@ -52,15 +58,15 @@ Python/traceback.c @iritkatriel
/Lib/html/ @ezio-melotti
/Lib/_markupbase.py @ezio-melotti
/Lib/test/test_html*.py @ezio-melotti
/Tools/scripts/*html5* @ezio-melotti
/Tools/build/parse_html5_entities.py @ezio-melotti

# Import (including importlib).
# Ignoring importlib.h so as to not get flagged on
# all pull requests that change the emitted
# bytecode.
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
**/*importlib/resources/* @jaraco @warsaw @brettcannon
**/*importlib/resources/* @jaraco @warsaw @FFY00
**/importlib/metadata/* @jaraco @warsaw

# Dates and times
Expand Down Expand Up @@ -132,22 +138,27 @@ Lib/ast.py @isidentical

**/*idlelib* @terryjreedy

**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra @AlexWaygood

**/*asyncore @giampaolo
**/*asynchat @giampaolo
**/*ftplib @giampaolo
**/*shutil @giampaolo

**/*enum* @ethanfurman
**/*cgi* @ethanfurman
**/*tarfile* @ethanfurman

**/*tomllib* @encukou
**/*tomllib* @encukou @hauntsaninja

**/*sysconfig* @FFY00

**/*cjkcodecs* @corona10

# macOS
/Mac/ @python/macos-team
**/*osx_support* @python/macos-team

# pathlib
**/*pathlib* @brettcannon
**/*pathlib* @barneygale

# zipfile.Path
**/*zipfile/*_path.py @jaraco
18 changes: 3 additions & 15 deletions .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,9 @@ Contributing to Python
Build Status
------------

- main
- `Buildbot status overview <https://buildbot.python.org/all/#/release_status>`_

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

- 3.9

+ `Stable buildbots <https://buildbot.python.org/3.9.stable/>`_

- 3.8

+ `Stable buildbots <https://buildbot.python.org/3.8.stable/>`_

- 3.7

+ `Stable buildbots <https://buildbot.python.org/3.7.stable/>`_
- `GitHub Actions status <https://github.com/python/cpython/actions/workflows/build.yml>`_


Thank You
Expand All @@ -38,7 +26,7 @@ also suggestions on how you can most effectively help the project.

Please be aware that our workflow does deviate slightly from the typical GitHub
project. Details on how to properly submit a pull request are covered in
`Lifecycle of a Pull Request <https://devguide.python.org/pullrequest/>`_.
`Lifecycle of a Pull Request <https://devguide.python.org/getting-started/pull-request-lifecycle.html>`_.
We utilize various bots and status checks to help with this, so do follow the
comments they leave and their "Details" links, respectively. The key points of
our workflow that are not covered by a bot or status check are:
Expand Down
2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The Python team applies security fixes according to the table
in [the devguide](
https://devguide.python.org/#status-of-python-branches
https://devguide.python.org/versions/#supported-versions
).

## Reporting a Vulnerability
Expand Down
45 changes: 27 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,23 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
check_source:
name: 'Check for source changes'
runs-on: ubuntu-latest
outputs:
run_tests: ${{ steps.check.outputs.run_tests }}
run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }}
steps:
- uses: actions/checkout@v3
- name: Check for source changes
id: check
run: |
if [ -z "$GITHUB_BASE_REF" ]; then
echo '::set-output name=run_tests::true'
echo '::set-output name=run_ssl_tests::true'
echo "run_tests=true" >> $GITHUB_OUTPUT
else
git fetch origin $GITHUB_BASE_REF --depth=1
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
Expand All @@ -55,8 +57,7 @@ jobs:
# into the PR branch anyway.
#
# https://github.com/python/core-workflow/issues/373
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo '::set-output name=run_ssl_tests::true' || true
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true
fi
check_generated_files:
Expand All @@ -72,7 +73,7 @@ jobs:
- name: Add ccache to PATH
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1
uses: hendrikmuhs/ccache-action@v1.2
- name: Check Autoconf version 2.69 and aclocal 1.16.3
run: |
grep "Generated by GNU Autoconf 2.69" configure
Expand Down Expand Up @@ -153,15 +154,23 @@ jobs:
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHONSTRICTEXTENSIONBUILD: 1
steps:
- uses: actions/checkout@v3
- name: Prepare homebrew environment variables
run: |
echo "LDFLAGS=-L$(brew --prefix tcl-tk)/lib" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$(brew --prefix openssl@1.1)/lib/pkgconfig:$(brew --prefix tcl-tk)/lib/pkgconfig" >> $GITHUB_ENV
- name: Install Homebrew dependencies
run: brew install pkg-config openssl@1.1 xz gdbm tcl-tk
- name: Configure CPython
run: ./configure --with-pydebug --prefix=/opt/python-dev
run: |
CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
./configure \
--with-pydebug \
--prefix=/opt/python-dev \
--with-openssl="$(brew --prefix openssl@1.1)"
- name: Build CPython
run: make -j4
- name: Display build info
Expand All @@ -175,7 +184,7 @@ jobs:
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
env:
OPENSSL_VER: 1.1.1q
OPENSSL_VER: 1.1.1t
PYTHONSTRICTEXTENSIONBUILD: 1
steps:
- uses: actions/checkout@v3
Expand All @@ -201,7 +210,7 @@ jobs:
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1
uses: hendrikmuhs/ccache-action@v1.2
- name: Setup directory envs for out-of-tree builds
run: |
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
Expand Down Expand Up @@ -230,11 +239,11 @@ jobs:
name: 'Ubuntu SSL tests with OpenSSL'
runs-on: ubuntu-20.04
needs: check_source
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true'
if: needs.check_source.outputs.run_tests == 'true'
strategy:
fail-fast: false
matrix:
openssl_ver: [1.1.1q, 3.0.5]
openssl_ver: [1.1.1t, 3.0.8, 3.1.0-beta1]
env:
OPENSSL_VER: ${{ matrix.openssl_ver }}
MULTISSL_DIR: ${{ github.workspace }}/multissl
Expand Down Expand Up @@ -264,7 +273,7 @@ jobs:
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1
uses: hendrikmuhs/ccache-action@v1.2
- name: Configure CPython
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
- name: Build CPython
Expand All @@ -281,7 +290,7 @@ jobs:
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
env:
OPENSSL_VER: 1.1.1q
OPENSSL_VER: 1.1.1t
PYTHONSTRICTEXTENSIONBUILD: 1
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
steps:
Expand All @@ -308,7 +317,7 @@ jobs:
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1
uses: hendrikmuhs/ccache-action@v1.2
- name: Configure CPython
run: ./configure --with-address-sanitizer --without-pymalloc
- name: Build CPython
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_msi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
name: Windows Installer
Expand Down
Loading

0 comments on commit be065d5

Please sign in to comment.