Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into pythongh-105223-app…
Browse files Browse the repository at this point in the history
…le-readline
  • Loading branch information
corona10 committed Sep 22, 2023
2 parents dfcbae0 + 3cce6be commit 501f1a4
Show file tree
Hide file tree
Showing 268 changed files with 23,320 additions and 19,894 deletions.
21 changes: 1 addition & 20 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
trigger: ['main', '3.11', '3.10', '3.9', '3.8', '3.7']
trigger: ['main', '3.12', '3.11', '3.10', '3.9', '3.8', '3.7']

jobs:
- job: Prebuild
Expand All @@ -11,25 +11,6 @@ jobs:
- template: ./prebuild-checks.yml


- job: Ubuntu_CI_Tests
displayName: Ubuntu CI Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: ubuntu-22.04

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

steps:
- template: ./posix-steps.yml
parameters:
dependencies: apt


- job: Windows_CI_Tests
displayName: Windows CI Tests
dependsOn: Prebuild
Expand Down
37 changes: 6 additions & 31 deletions .azure-pipelines/posix-steps.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
parameters:
sudo_dependencies: sudo
dependencies: apt
patchcheck: true
xvfb: true

steps:
- checkout: self
clean: true
Expand All @@ -13,7 +7,7 @@ steps:
- script: sudo setfacl -Rb /home/vsts
displayName: 'Workaround ACL issue'

- script: ${{ parameters.sudo_dependencies }} ./.azure-pipelines/posix-deps-${{ parameters.dependencies }}.sh $(openssl_version)
- script: sudo ./.azure-pipelines/posix-deps-apt.sh $(openssl_version)
displayName: 'Install dependencies'

- script: ./configure --with-pydebug
Expand All @@ -25,27 +19,8 @@ steps:
- script: make pythoninfo
displayName: 'Display build info'

- script: $COMMAND buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
displayName: 'Tests'
env:
${{ if eq(parameters.xvfb, 'true') }}:
COMMAND: xvfb-run make
${{ if ne(parameters.xvfb, 'true') }}:
COMMAND: make

- ${{ if eq(parameters.patchcheck, 'true') }}:
- script: |
git fetch origin
./python Tools/patchcheck/patchcheck.py --ci true
displayName: 'Run patchcheck.py'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
mergeTestResults: true
testRunTitle: $(testRunTitle)
platform: $(testRunPlatform)
condition: succeededOrFailed()
- script: |
git fetch origin
./python Tools/patchcheck/patchcheck.py --ci true
displayName: 'Run patchcheck.py'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
39 changes: 3 additions & 36 deletions .azure-pipelines/pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pr: ['main', '3.11', '3.10', '3.9', '3.8', '3.7']
pr: ['main', '3.12', '3.11', '3.10', '3.9', '3.8', '3.7']

jobs:
- job: Prebuild
Expand All @@ -11,8 +11,8 @@ jobs:
- template: ./prebuild-checks.yml


- job: Ubuntu_PR_Tests
displayName: Ubuntu PR Tests
- job: Ubuntu_Patchcheck
displayName: Ubuntu patchcheck
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

Expand All @@ -26,36 +26,3 @@ jobs:

steps:
- template: ./posix-steps.yml
parameters:
dependencies: apt


- job: Windows_PR_Tests
displayName: Windows PR Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: windows-2022

strategy:
matrix:
win32:
arch: win32
buildOpt: '-p Win32'
testRunTitle: '$(System.PullRequest.TargetBranch)-win32'
testRunPlatform: win32
win64:
arch: amd64
buildOpt: '-p x64'
testRunTitle: '$(System.PullRequest.TargetBranch)-win64'
testRunPlatform: win64
winarm64:
arch: arm64
buildOpt: '-p arm64'
maxParallel: 4

steps:
- template: ./windows-steps.yml
parameters:
targetBranch: $(System.PullRequest.TargetBranch)
3 changes: 3 additions & 0 deletions .cirrus.yml → .cirrus-DISABLED.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# gh-91960: Job disabled since Python is out of free credit (September 2023):
# https://discuss.python.org/t/freebsd-gets-a-new-cirrus-ci-github-action-job-and-a-new-buildbot/33122/26

freebsd_task:
freebsd_instance:
matrix:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ jobs:
path: config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: Add ccache to PATH
Expand Down Expand Up @@ -201,6 +203,21 @@ jobs:
- name: Tests
run: .\PCbuild\rt.bat -p x64 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0

build_win_arm64:
name: 'Windows (arm64)'
runs-on: windows-latest
timeout-minutes: 60
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
env:
IncludeUwp: 'true'
steps:
- uses: actions/checkout@v4
- name: Register MSVC problem matcher
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Build CPython
run: .\PCbuild\build.bat -e -d -p arm64

build_macos:
name: 'macOS'
runs-on: macos-latest
Expand Down Expand Up @@ -530,6 +547,7 @@ jobs:
- check_generated_files
- build_win32
- build_win_amd64
- build_win_arm64
- build_macos
- build_ubuntu
- build_ubuntu_ssltests
Expand All @@ -546,6 +564,7 @@ jobs:
build_macos,
build_ubuntu_ssltests,
build_win32,
build_win_arm64,
test_hypothesis,
allowed-skips: >-
${{
Expand All @@ -561,6 +580,7 @@ jobs:
check_generated_files,
build_win32,
build_win_amd64,
build_win_arm64,
build_macos,
build_ubuntu,
build_ubuntu_ssltests,
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ on:
- main
pull_request:
paths:
- "Tools/clinic/**"
- ".github/workflows/mypy.yml"
- "Tools/cases_generator/**"
- "Tools/clinic/**"
- "Tools/peg_generator/**"
- "Tools/requirements-dev.txt"
- ".github/workflows/mypy.yml"
- "Tools/wasm/**"
workflow_dispatch:

permissions:
Expand All @@ -34,6 +35,7 @@ jobs:
"Tools/cases_generator",
"Tools/clinic",
"Tools/peg_generator",
"Tools/wasm",
]
name: Run mypy on ${{ matrix.target }}
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: 'Set up Python'
uses: actions/setup-python@v4
with:
python-version: '3.11' # known to work with Sphinx 3.2
python-version: '3.11' # known to work with Sphinx 4.2
cache: 'pip'
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
- name: 'Install build dependencies'
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ Exception Objects
Implement part of the interpreter's implementation of :keyword:`!except*`.
*orig* is the original exception that was caught, and *excs* is the list of
the exceptions that need to be raised. This list contains the the unhandled
the exceptions that need to be raised. This list contains the unhandled
part of *orig*, if any, as well as the exceptions that were raised from the
:keyword:`!except*` clauses (so they have a different traceback from *orig*) and
those that were reraised (and have the same traceback as *orig*).
Expand Down
25 changes: 22 additions & 3 deletions Doc/c-api/mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
rather than a :c:expr:`PyObject*`.
.. c:function:: int PyMapping_HasKeyWithError(PyObject *o, PyObject *key)
Return ``1`` if the mapping object has the key *key* and ``0`` otherwise.
This is equivalent to the Python expression ``key in o``.
On failure, return ``-1``.
.. versionadded:: 3.13
.. c:function:: int PyMapping_HasKeyStringWithError(PyObject *o, const char *key)
This is the same as :c:func:`PyMapping_HasKeyWithError`, but *key* is
specified as a :c:expr:`const char*` UTF-8 encoded bytes string,
rather than a :c:expr:`PyObject*`.
.. versionadded:: 3.13
.. c:function:: int PyMapping_HasKey(PyObject *o, PyObject *key)
Return ``1`` if the mapping object has the key *key* and ``0`` otherwise.
Expand All @@ -86,8 +104,8 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
Exceptions which occur when this calls :meth:`~object.__getitem__`
method are silently ignored.
For proper error handling, use :c:func:`PyMapping_GetOptionalItem` or
:c:func:`PyObject_GetItem()` instead.
For proper error handling, use :c:func:`PyMapping_HasKeyWithError`,
:c:func:`PyMapping_GetOptionalItem` or :c:func:`PyObject_GetItem()` instead.
.. c:function:: int PyMapping_HasKeyString(PyObject *o, const char *key)
Expand All @@ -101,7 +119,8 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
Exceptions that occur when this calls :meth:`~object.__getitem__`
method or while creating the temporary :class:`str`
object are silently ignored.
For proper error handling, use :c:func:`PyMapping_GetOptionalItemString` or
For proper error handling, use :c:func:`PyMapping_HasKeyStringWithError`,
:c:func:`PyMapping_GetOptionalItemString` or
:c:func:`PyMapping_GetItemString` instead.
Expand Down
25 changes: 22 additions & 3 deletions Doc/c-api/object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ Object Protocol
instead of the :func:`repr`.
.. c:function:: int PyObject_HasAttrWithError(PyObject *o, const char *attr_name)
Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise.
This is equivalent to the Python expression ``hasattr(o, attr_name)``.
On failure, return ``-1``.
.. versionadded:: 3.13
.. c:function:: int PyObject_HasAttrStringWithError(PyObject *o, const char *attr_name)
This is the same as :c:func:`PyObject_HasAttrWithError`, but *attr_name* is
specified as a :c:expr:`const char*` UTF-8 encoded bytes string,
rather than a :c:expr:`PyObject*`.
.. versionadded:: 3.13
.. c:function:: int PyObject_HasAttr(PyObject *o, PyObject *attr_name)
Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. This
Expand All @@ -37,8 +55,8 @@ Object Protocol
Exceptions that occur when this calls :meth:`~object.__getattr__` and
:meth:`~object.__getattribute__` methods are silently ignored.
For proper error handling, use :c:func:`PyObject_GetOptionalAttr` or
:c:func:`PyObject_GetAttr` instead.
For proper error handling, use :c:func:`PyObject_HasAttrWithError`,
:c:func:`PyObject_GetOptionalAttr` or :c:func:`PyObject_GetAttr` instead.
.. c:function:: int PyObject_HasAttrString(PyObject *o, const char *attr_name)
Expand All @@ -52,7 +70,8 @@ Object Protocol
Exceptions that occur when this calls :meth:`~object.__getattr__` and
:meth:`~object.__getattribute__` methods or while creating the temporary
:class:`str` object are silently ignored.
For proper error handling, use :c:func:`PyObject_GetOptionalAttrString`
For proper error handling, use :c:func:`PyObject_HasAttrStringWithError`,
:c:func:`PyObject_GetOptionalAttrString`
or :c:func:`PyObject_GetAttrString` instead.
Expand Down
2 changes: 1 addition & 1 deletion Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
highlight_language = 'python3'

# Minimum version of sphinx required
needs_sphinx = '3.2'
needs_sphinx = '4.2'

# Ignore any .rst files in the includes/ directory;
# they're embedded in pages but not rendered individually.
Expand Down
4 changes: 4 additions & 0 deletions Doc/data/stable_abi.dat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Doc/library/asyncio-llapi-index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -484,19 +484,19 @@ Protocol classes can implement the following **callback methods**:
:widths: 50 50
:class: full-width-table

* - ``callback`` :meth:`pipe_data_received()
<SubprocessProtocol.pipe_data_received>`
* - ``callback`` :meth:`~SubprocessProtocol.pipe_data_received`
- Called when the child process writes data into its
*stdout* or *stderr* pipe.

* - ``callback`` :meth:`pipe_connection_lost()
<SubprocessProtocol.pipe_connection_lost>`
* - ``callback`` :meth:`~SubprocessProtocol.pipe_connection_lost`
- Called when one of the pipes communicating with
the child process is closed.

* - ``callback`` :meth:`process_exited()
<SubprocessProtocol.process_exited>`
- Called when the child process has exited.
- Called when the child process has exited. It can be called before
:meth:`~SubprocessProtocol.pipe_data_received` and
:meth:`~SubprocessProtocol.pipe_connection_lost` methods.


Event Loop Policies
Expand Down
Loading

0 comments on commit 501f1a4

Please sign in to comment.