Skip to content

Commit e0a363f

Browse files
carlosromanambvbenjaminpned-deilymiss-islington
authored
Upgrade to 3.8.17 (#26)
* Post 3.8.16 * [3.8] Update copyright years to 2023. (pythongh-100852) * [3.8] Update copyright years to 2023. (pythongh-100848). (cherry picked from commit 11f9932) Co-authored-by: Benjamin Peterson <benjamin@python.org> * Update additional copyright years to 2023. Co-authored-by: Ned Deily <nad@python.org> * [3.8] Update copyright year in README (pythonGH-100863) (pythonGH-100867) (cherry picked from commit 30a6cc4) Co-authored-by: Ned Deily <nad@python.org> Co-authored-by: HARSHA VARDHAN <75431678+Thunder-007@users.noreply.github.com> * [3.8] Correct CVE-2020-10735 documentation (pythonGH-100306) (python#100698) (cherry picked from commit 1cf3d78) (cherry picked from commit 88fe8d7) Co-authored-by: Jeremy Paige <ucodery@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> * [3.8] Bump Azure Pipelines to ubuntu-22.04 (pythonGH-101089) (python#101215) (cherry picked from commit c22a55c) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> * [3.8] pythongh-100180: Update Windows installer to OpenSSL 1.1.1s (pythonGH-100903) (python#101258) * pythongh-101422: (docs) TarFile default errorlevel argument is 1, not 0 (pythonGH-101424) (cherry picked from commit ea23271) Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com> * [3.8] pythongh-95778: add doc missing in some places (pythonGH-100627) (python#101630) (cherry picked from commit 4652182) * [3.8] pythongh-101283: Improved fallback logic for subprocess with shell=True on Windows (pythonGH-101286) (python#101710) Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Steve Dower <steve.dower@microsoft.com> * [3.8] pythongh-101981: Fix Ubuntu SSL tests with OpenSSL (3.1.0-beta1) CI i… (python#102095) [3.8] pythongh-101981: Fix Ubuntu SSL tests with OpenSSL (3.1.0-beta1) CI issue (pythongh-102079) * [3.8] pythonGH-102306 Avoid GHA CI macOS test_posix failure by using the appropriate macOS SDK (pythonGH-102307) [3.8] Avoid GHA CI macOS test_posix failure by using the appropriate macOS SDK. * [3.8] pythongh-101726: Update the OpenSSL version to 1.1.1t (pythonGH-101727) (pythonGH-101752) Fixes CVE-2023-0286 (High) and a couple of Medium security issues. https://www.openssl.org/news/secadv/20230207.txt Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Ned Deily <nad@python.org> * [3.8] pythongh-102627: Replace address pointing toward malicious web page (pythonGH-102630) (pythonGH-102667) (cherry picked from commit 61479d4) Co-authored-by: Blind4Basics <32236948+Blind4Basics@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> * [3.8] pythongh-101997: Update bundled pip version to 23.0.1 (pythonGH-101998). (python#102244) (cherry picked from commit 89d9ff0) * [3.8] pythongh-102950: Implement PEP 706 – Filter for tarfile.extractall (pythonGH-102953) (python#104548) Backport of c8c3956 * [3.8] pythongh-99889: Fix directory traversal security flaw in uu.decode() (pythonGH-104096) (python#104332) (cherry picked from commit 0aeda29) Co-authored-by: Sam Carroll <70000253+samcarroll42@users.noreply.github.com> * [3.8] pythongh-104049: do not expose on-disk location from SimpleHTTPRequestHandler (pythonGH-104067) (python#104121) Do not expose the local server's on-disk location from `SimpleHTTPRequestHandler` when generating a directory index. (unnecessary information disclosure) (cherry picked from commit c7c3a60) Co-authored-by: Ethan Furman <ethan@stoneleaf.us> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> * [3.8] pythongh-103935: Use `io.open_code()` when executing code in trace and profile modules (pythonGH-103947) (python#103954) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com> * [3.8] pythongh-68966: fix versionchanged in docs (pythonGH-105299) * [3.8] Update GitHub CI workflow for macOS. (pythonGH-105302) * [3.8] pythongh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (pythonGH-105185) (python#105222) (cherry picked from commit ee26ca1) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> * [3.8] pythongh-102153: Start stripping C0 control and space chars in `urlsplit` (pythonGH-102508) (pythonGH-104575) (pythonGH-104592) (python#104593) (python#104895) `urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit pythonGH-25595. This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/GH-url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329). I simplified the docs by eliding the state of the world explanatory paragraph in this security release only backport. (people will see that in the mainline /3/ docs) (cherry picked from commit d7f8a5f) (cherry picked from commit 2f630e1) (cherry picked from commit 610cc0a) (cherry picked from commit f48a96a) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Co-authored-by: Illia Volochii <illia.volochii@gmail.com> Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org> * [3.8] pythongh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (pythonGH-105174) (pythonGH-105200) (pythonGH-105205) (python#105370) Upgrade builds to OpenSSL 1.1.1u. Also updates _ssl_data_111.h from OpenSSL 1.1.1u, _ssl_data_300.h from 3.0.9. Manual edits to the _ssl_data_300.h file prevent it from removing any existing definitions in case those exist in some peoples builds and were important (avoiding regressions during backporting). (cherry picked from commit ede89af) (cherry picked from commit e15de14) Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Ned Deily <nad@python.org> * Python 3.8.17 * Post 3.8.17 * Updated CI to build 3.8.17 --------- Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Benjamin Peterson <benjamin@python.org> Co-authored-by: Ned Deily <nad@python.org> Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Co-authored-by: HARSHA VARDHAN <75431678+Thunder-007@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Jeremy Paige <ucodery@gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Steve Dower <steve.dower@python.org> Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com> Co-authored-by: Éric <earaujo@caravan.coop> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Steve Dower <steve.dower@microsoft.com> Co-authored-by: Dong-hee Na <donghee.na@python.org> Co-authored-by: Blind4Basics <32236948+Blind4Basics@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Sam Carroll <70000253+samcarroll42@users.noreply.github.com> Co-authored-by: Ethan Furman <ethan@stoneleaf.us> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com> Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: stratakis <cstratak@redhat.com> Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
1 parent dc2e87f commit e0a363f

Some content is hidden

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

52 files changed

+2377
-150
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: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,24 @@ jobs:
126126
runs-on: macos-latest
127127
needs: check_source
128128
if: needs.check_source.outputs.run_tests == 'true'
129+
env:
130+
HOMEBREW_NO_ANALYTICS: 1
131+
HOMEBREW_NO_AUTO_UPDATE: 1
132+
HOMEBREW_NO_INSTALL_CLEANUP: 1
129133
steps:
130134
- uses: actions/checkout@v2
131135
- name: Configure CPython
132-
run: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-dev
136+
run: |
137+
brew install pkg-config openssl@1.1 xz gdbm tcl-tk
138+
SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk \
139+
CC=clang \
140+
CPPFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
141+
LDFLAGS="-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib" \
142+
./configure --prefix=/opt/python-dev \
143+
--with-pydebug \
144+
--with-openssl="$(brew --prefix openssl@1.1)" \
145+
--with-tcltk-libs="$(pkg-config --libs tk)" \
146+
--with-tcltk-includes="$(pkg-config --cflags tk)"
133147
- name: Build CPython
134148
run: make -j4
135149
- name: Display build info
@@ -143,7 +157,7 @@ jobs:
143157
needs: check_source
144158
if: needs.check_source.outputs.run_tests == 'true'
145159
env:
146-
OPENSSL_VER: 1.1.1n
160+
OPENSSL_VER: 1.1.1u
147161
steps:
148162
- uses: actions/checkout@v2
149163
- name: Install Dependencies
@@ -184,7 +198,7 @@ jobs:
184198
strategy:
185199
fail-fast: false
186200
matrix:
187-
openssl_ver: [1.0.2u, 1.1.0l, 1.1.1l]
201+
openssl_ver: [1.0.2u, 1.1.1u, 3.0.9, 3.1.1]
188202
env:
189203
OPENSSL_VER: ${{ matrix.openssl_ver }}
190204
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -201,7 +215,7 @@ jobs:
201215
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
202216
- name: 'Restore OpenSSL build'
203217
id: cache-openssl
204-
uses: actions/cache@v2.1.4
218+
uses: actions/cache@v3
205219
with:
206220
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
207221
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -212,7 +226,7 @@ jobs:
212226
run: |
213227
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
214228
- name: Configure ccache action
215-
uses: hendrikmuhs/ccache-action@v1
229+
uses: hendrikmuhs/ccache-action@v1.2
216230
- name: Configure CPython
217231
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
218232
- name: Build CPython

.gitlab-ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ stages:
1818
- if (Test-Path build-out) { remove-item -recurse -force build-out }
1919
- docker run --rm -v "$(Get-Location):c:\mnt" -e CI_JOB_ID=${CI_JOB_ID} -e WINDOWS_BUILDER=true -e AWS_NETWORKING=true -e TARGET_ARCH="$ARCH" datadog/agent-buildimages-windows_x64:1809 C:\mnt\build.bat
2020
- get-childitem build-out
21-
- Get-FileHash -Algorithm SHA256 build-out/python-windows-3.8.16-${ARCH}.zip
21+
- Get-FileHash -Algorithm SHA256 build-out/python-windows-3.8.17-${ARCH}.zip
2222
artifacts:
2323
expire_in: 2 weeks
2424
paths:
25-
- build-out/python-windows-3.8.16-${ARCH}.zip
25+
- build-out/python-windows-3.8.17-${ARCH}.zip
2626

2727
build_binaries_x64:
2828
extends: .build_common
@@ -42,8 +42,8 @@ deploy_x64:
4242
!reference [.manual]
4343
script:
4444
- $hash = (git rev-parse --short HEAD 2> $null)
45-
- Write-Host "Uploading zip python-windows-3.8.16-${hash}-x64.zip"
46-
- Invoke-Expression "aws s3 cp --only-show-errors --region us-east-1 --sse AES256 --acl public-read build-out/python-windows-3.8.16-x64.zip s3://dd-agent-omnibus/python-windows-3.8.16-${hash}-x64.zip"
45+
- Write-Host "Uploading zip python-windows-3.8.17-${hash}-x64.zip"
46+
- Invoke-Expression "aws s3 cp --only-show-errors --region us-east-1 --sse AES256 --acl public-read build-out/python-windows-3.8.17-x64.zip s3://dd-agent-omnibus/python-windows-3.8.17-${hash}-x64.zip"
4747

4848
deploy_x86:
4949
stage: deploy
@@ -53,5 +53,5 @@ deploy_x86:
5353
!reference [.manual]
5454
script:
5555
- $hash = (git rev-parse --short HEAD 2> $null)
56-
- Write-Host "Uploading zip python-windows-3.8.16-${hash}-x86.zip"
57-
- Invoke-Expression "aws s3 cp --only-show-errors --region us-east-1 --sse AES256 --acl public-read build-out/python-windows-3.8.16-x86.zip s3://dd-agent-omnibus/python-windows-3.8.16-${hash}-x86.zip"
56+
- Write-Host "Uploading zip python-windows-3.8.17-${hash}-x86.zip"
57+
- Invoke-Expression "aws s3 cp --only-show-errors --region us-east-1 --sse AES256 --acl public-read build-out/python-windows-3.8.17-x86.zip s3://dd-agent-omnibus/python-windows-3.8.17-${hash}-x86.zip"

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
@@ -182,7 +182,7 @@ ThreadPoolExecutor Example
182182
'http://www.cnn.com/',
183183
'http://europe.wsj.com/',
184184
'http://www.bbc.co.uk/',
185-
'http://some-made-up-domain.com/']
185+
'http://nonexistant-subdomain.python.org/']
186186

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

Doc/library/mailcap.rst

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

57-
.. versionchanged:: 3.11
57+
.. versionchanged:: 3.8.16
5858

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

Doc/library/shutil.rst

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

642642

643-
.. function:: unpack_archive(filename[, extract_dir[, format]])
643+
.. function:: unpack_archive(filename[, extract_dir[, format[, filter]]])
644644

645645
Unpack an archive. *filename* is the full path of the archive.
646646

@@ -654,11 +654,29 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
654654
registered for that extension. In case none is found,
655655
a :exc:`ValueError` is raised.
656656

657+
The keyword-only *filter* argument, which was added in Python 3.8.17,
658+
is passed to the underlying unpacking function.
659+
For zip files, *filter* is not accepted.
660+
For tar files, it is recommended to set it to ``'data'``,
661+
unless using features specific to tar and UNIX-like filesystems.
662+
(See :ref:`tarfile-extraction-filter` for details.)
663+
The ``'data'`` filter will become the default for tar files
664+
in Python 3.14.
665+
657666
.. audit-event:: shutil.unpack_archive filename,extract_dir,format shutil.unpack_archive
658667

668+
.. warning::
669+
670+
Never extract archives from untrusted sources without prior inspection.
671+
It is possible that files are created outside of the path specified in
672+
the *extract_dir* argument, e.g. members that have absolute filenames
673+
starting with "/" or filenames with two dots "..".
674+
659675
.. versionchanged:: 3.7
660676
Accepts a :term:`path-like object` for *filename* and *extract_dir*.
661677

678+
.. versionchanged:: 3.8.17
679+
Added the *filter* argument.
662680

663681
.. function:: register_unpack_format(name, extensions, function[, extra_args[, description]])
664682

@@ -667,11 +685,14 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
667685
``.zip`` for Zip files.
668686

669687
*function* is the callable that will be used to unpack archives. The
670-
callable will receive the path of the archive, followed by the directory
671-
the archive must be extracted to.
672-
673-
When provided, *extra_args* is a sequence of ``(name, value)`` tuples that
674-
will be passed as keywords arguments to the callable.
688+
callable will receive:
689+
690+
- the path of the archive, as a positional argument;
691+
- the directory the archive must be extracted to, as a positional argument;
692+
- possibly a *filter* keyword argument, if it was given to
693+
:func:`unpack_archive`;
694+
- additional keyword arguments, specified by *extra_args* as a sequence
695+
of ``(name, value)`` tuples.
675696

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

Doc/library/stdtypes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4880,7 +4880,7 @@ to mitigate denial of service attacks. This limit *only* applies to decimal or
48804880
other non-power-of-two number bases. Hexadecimal, octal, and binary conversions
48814881
are unlimited. The limit can be configured.
48824882

4883-
The :class:`int` type in CPython is an abitrary length number stored in binary
4883+
The :class:`int` type in CPython is an arbitrary length number stored in binary
48844884
form (commonly known as a "bignum"). There exists no algorithm that can convert
48854885
a string to a binary integer or a binary integer to a string in linear time,
48864886
*unless* the base is a power of 2. Even the best known algorithms for base 10
@@ -4944,7 +4944,7 @@ and :class:`str` or :class:`bytes`:
49444944
* ``int(string)`` with default base 10.
49454945
* ``int(string, base)`` for all bases that are not a power of 2.
49464946
* ``str(integer)``.
4947-
* ``repr(integer)``
4947+
* ``repr(integer)``.
49484948
* any other string conversion to base 10, for example ``f"{integer}"``,
49494949
``"{}".format(integer)``, or ``b"%d" % integer``.
49504950

@@ -4972,7 +4972,7 @@ command line flag to configure the limit:
49724972
:envvar:`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`.
49734973
If both the env var and the ``-X`` option are set, the ``-X`` option takes
49744974
precedence. A value of *-1* indicates that both were unset, thus a value of
4975-
:data:`sys.int_info.default_max_str_digits` was used during initilization.
4975+
:data:`sys.int_info.default_max_str_digits` was used during initialization.
49764976

49774977
From code, you can inspect the current limit and set a new one using these
49784978
:mod:`sys` APIs:

0 commit comments

Comments
 (0)