Skip to content

Commit 8236689

Browse files
authored
Merge pull request #23 from DataDog/slavek.kabrda/upgrade-3.9.17
Upgrade 3.9.x to 3.9.17
2 parents b7f54e0 + 18093c4 commit 8236689

Some content is hidden

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

57 files changed

+2464
-171
lines changed

.azure-pipelines/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-20.04
11+
vmImage: ubuntu-22.04
1212

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

2222
pool:
23-
vmImage: ubuntu-20.04
23+
vmImage: ubuntu-22.04
2424

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

5454
pool:
55-
vmImage: ubuntu-20.04
55+
vmImage: ubuntu-22.04
5656

5757
variables:
5858
testRunTitle: '$(build.sourceBranchName)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1n
60+
openssl_version: 1.1.1u
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -78,12 +78,12 @@ jobs:
7878
)
7979
8080
pool:
81-
vmImage: ubuntu-20.04
81+
vmImage: ubuntu-22.04
8282

8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1n
86+
openssl_version: 1.1.1u
8787

8888
steps:
8989
- template: ./posix-steps.yml

.azure-pipelines/pr.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-20.04
11+
vmImage: ubuntu-22.04
1212

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

2222
pool:
23-
vmImage: ubuntu-20.04
23+
vmImage: ubuntu-22.04
2424

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

5454
pool:
55-
vmImage: ubuntu-20.04
55+
vmImage: ubuntu-22.04
5656

5757
variables:
5858
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1n
60+
openssl_version: 1.1.1u
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -78,12 +78,12 @@ jobs:
7878
)
7979
8080
pool:
81-
vmImage: ubuntu-20.04
81+
vmImage: ubuntu-22.04
8282

8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1n
86+
openssl_version: 1.1.1u
8787

8888
steps:
8989
- template: ./posix-steps.yml

.github/workflows/build.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,23 @@ jobs:
147147
needs: check_source
148148
if: needs.check_source.outputs.run_tests == 'true'
149149
env:
150+
HOMEBREW_NO_ANALYTICS: 1
151+
HOMEBREW_NO_AUTO_UPDATE: 1
152+
HOMEBREW_NO_INSTALL_CLEANUP: 1
150153
PYTHONSTRICTEXTENSIONBUILD: 1
151154
steps:
152155
- uses: actions/checkout@v3
153156
- name: Configure CPython
154-
run: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-dev --with-tcltk-includes=-I$(brew --prefix tcl-tk)/include --with-tcltk-libs="-L$(brew --prefix tcl-tk)/lib -ltcl8.6 -ltk8.6"
157+
run: |
158+
brew install pkg-config [email protected] xz gdbm tcl-tk
159+
CC=clang \
160+
CPPFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
161+
LDFLAGS="-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib" \
162+
./configure --prefix=/opt/python-dev \
163+
--with-pydebug \
164+
--with-openssl="$(brew --prefix [email protected])" \
165+
--with-tcltk-libs="$(pkg-config --libs tk)" \
166+
--with-tcltk-includes="$(pkg-config --cflags tk)"
155167
- name: Build CPython
156168
run: make -j4
157169
- name: Display build info
@@ -165,7 +177,7 @@ jobs:
165177
needs: check_source
166178
if: needs.check_source.outputs.run_tests == 'true'
167179
env:
168-
OPENSSL_VER: 1.1.1n
180+
OPENSSL_VER: 1.1.1u
169181
PYTHONSTRICTEXTENSIONBUILD: 1
170182
steps:
171183
- uses: actions/checkout@v3
@@ -207,7 +219,7 @@ jobs:
207219
strategy:
208220
fail-fast: false
209221
matrix:
210-
openssl_ver: [1.0.2u, 1.1.0l, 1.1.1n, 3.0.2]
222+
openssl_ver: [1.0.2u, 1.1.0l, 1.1.1u, 3.0.9, 3.1.1]
211223
env:
212224
OPENSSL_VER: ${{ matrix.openssl_ver }}
213225
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -224,7 +236,7 @@ jobs:
224236
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
225237
- name: 'Restore OpenSSL build'
226238
id: cache-openssl
227-
uses: actions/cache@v3.0.2
239+
uses: actions/cache@v3
228240
with:
229241
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
230242
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -235,7 +247,7 @@ jobs:
235247
run: |
236248
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
237249
- name: Configure ccache action
238-
uses: hendrikmuhs/ccache-action@v1
250+
uses: hendrikmuhs/ccache-action@v1.2
239251
- name: Configure CPython
240252
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
241253
- name: Build CPython

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ stages:
33
- deploy
44

55
variables:
6-
PYTHON_VERSION: "3.9.16"
6+
PYTHON_VERSION: "3.9.17"
77

88
.manual:
99
- when: manual

Doc/c-api/marshal.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,16 @@ unmarshalling. Version 2 uses a binary format for floating point numbers.
2525
the least-significant 32 bits of *value*; regardless of the size of the
2626
native :c:type:`long` type. *version* indicates the file format.
2727
28+
This function can fail, in which case it sets the error indicator.
29+
Use :c:func:`PyErr_Occurred` to check for that.
2830
2931
.. c:function:: void PyMarshal_WriteObjectToFile(PyObject *value, FILE *file, int version)
3032
3133
Marshal a Python object, *value*, to *file*.
3234
*version* indicates the file format.
3335
36+
This function can fail, in which case it sets the error indicator.
37+
Use :c:func:`PyErr_Occurred` to check for that.
3438
3539
.. c:function:: PyObject* PyMarshal_WriteObjectToString(PyObject *value, int version)
3640

Doc/copyright.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright
44

55
Python and this documentation is:
66

7-
Copyright © 2001-2022 Python Software Foundation. All rights reserved.
7+
Copyright © 2001-2023 Python Software Foundation. All rights reserved.
88

99
Copyright © 2000 BeOpen.com. All rights reserved.
1010

Doc/library/concurrent.futures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ ThreadPoolExecutor Example
194194
'http://www.cnn.com/',
195195
'http://europe.wsj.com/',
196196
'http://www.bbc.co.uk/',
197-
'http://some-made-up-domain.com/']
197+
'http://nonexistant-subdomain.python.org/']
198198

199199
# Retrieve a single page and report the URL and contents
200200
def load_url(url, timeout):

Doc/library/contextvars.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ Manual Context Management
144144
To get a copy of the current context use the
145145
:func:`~contextvars.copy_context` function.
146146

147+
Every thread will have a different top-level :class:`~contextvars.Context`
148+
object. This means that a :class:`ContextVar` object behaves in a similar
149+
fashion to :func:`threading.local()` when values are assigned in different
150+
threads.
151+
147152
Context implements the :class:`collections.abc.Mapping` interface.
148153

149154
.. method:: run(callable, *args, **kwargs)

Doc/library/mailcap.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ standard. However, mailcap files are supported on most Unix systems.
6060
use) to determine whether or not the mailcap line applies. :func:`findmatch`
6161
will automatically check such conditions and skip the entry if the check fails.
6262

63-
.. versionchanged:: 3.11
63+
.. versionchanged:: 3.9.16
6464

6565
To prevent security issues with shell metacharacters (symbols that have
6666
special effects in a shell command line), ``findmatch`` will refuse

Doc/library/shutil.rst

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
614614
Remove the archive format *name* from the list of supported formats.
615615

616616

617-
.. function:: unpack_archive(filename[, extract_dir[, format]])
617+
.. function:: unpack_archive(filename[, extract_dir[, format[, filter]]])
618618

619619
Unpack an archive. *filename* is the full path of the archive.
620620

@@ -628,6 +628,15 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
628628
registered for that extension. In case none is found,
629629
a :exc:`ValueError` is raised.
630630

631+
The keyword-only *filter* argument, which was added in Python 3.9.17,
632+
is passed to the underlying unpacking function.
633+
For zip files, *filter* is not accepted.
634+
For tar files, it is recommended to set it to ``'data'``,
635+
unless using features specific to tar and UNIX-like filesystems.
636+
(See :ref:`tarfile-extraction-filter` for details.)
637+
The ``'data'`` filter will become the default for tar files
638+
in Python 3.14.
639+
631640
.. audit-event:: shutil.unpack_archive filename,extract_dir,format shutil.unpack_archive
632641

633642
.. warning::
@@ -640,18 +649,24 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
640649
.. versionchanged:: 3.7
641650
Accepts a :term:`path-like object` for *filename* and *extract_dir*.
642651

652+
.. versionchanged:: 3.9.17
653+
Added the *filter* argument.
654+
643655
.. function:: register_unpack_format(name, extensions, function[, extra_args[, description]])
644656

645657
Registers an unpack format. *name* is the name of the format and
646658
*extensions* is a list of extensions corresponding to the format, like
647659
``.zip`` for Zip files.
648660

649661
*function* is the callable that will be used to unpack archives. The
650-
callable will receive the path of the archive, followed by the directory
651-
the archive must be extracted to.
652-
653-
When provided, *extra_args* is a sequence of ``(name, value)`` tuples that
654-
will be passed as keywords arguments to the callable.
662+
callable will receive:
663+
664+
- the path of the archive, as a positional argument;
665+
- the directory the archive must be extracted to, as a positional argument;
666+
- possibly a *filter* keyword argument, if it was given to
667+
:func:`unpack_archive`;
668+
- additional keyword arguments, specified by *extra_args* as a sequence
669+
of ``(name, value)`` tuples.
655670

656671
*description* can be provided to describe the format, and will be returned
657672
by the :func:`get_unpack_formats` function.

0 commit comments

Comments
 (0)