Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

Docs: correct built-in exception, function, and dictionary descriptions - #160979

Merged
methane merged 1 commit into
python:mainfrom
methane:fix-doc2
Oct 31, 2026
Merged

methane merged 1 commit into
python:mainfrom
methane:fix-doc2

Conversation

@methane

@methane methane commented Oct 30, 2026

Copy link
Copy Markdown
Member

Fix several inaccuracies found during translation review:

  • Replace perror() with strerror() / strerror_r() in the description of OSError.strerror.
  • Remove the outdated description of f-string error messages and offsets, which changed with PEP 701 in Python 3.12.
  • Fix the branch connector for ImportCycleError in the exception hierarchy.
  • Match the documented argument names in exec() and super() to their signatures.
  • Clarify that relative import level 1 refers to the current package and level 2 to its parent.
  • Remove {} from the examples of dictionary comprehensions.
  • Clarify that distinct dict.values() views compare unequal, even when they belong to the same dictionary.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35528809 | 📁 Comparing 971bf69 against main (4a9b981)

  🔍 Preview build  

3 files changed
± builtins/exceptions.html
± builtins/functions.html
± builtins/stdtypes.html

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for these documentation corrections.

No open issues 🎉

What changed in this PR

This documentation-only PR corrects descriptions of Python’s built-in exceptions, functions, and dictionaries without changing runtime behavior.

Changes:

  • Corrects OSError.strerror details and removes outdated f-string syntax-error documentation.
  • Aligns function argument names with signatures and clarifies relative import levels.
  • Clarifies dictionary construction and values-view equality, and fixes an exception hierarchy connector.
File Description
Lib/​test/​exception_hierarchy.txt Fixes the branch connector for ImportCycleError.
Doc/​builtins/​stdtypes.rst Corrects comprehension examples and clarifies values-view comparisons.
Doc/​builtins/​functions.rst Corrects argument names and explains relative import levels.
Doc/​builtins/​exceptions.rst Corrects error-message sources and removes obsolete f-string error details.

Review effort: Balanced

@methane
methane merged commit 3fb88e9 into python:main Oct 31, 2026
65 checks passed
@methane
methane deleted the fix-doc2 branch October 31, 2026 05:18
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Oct 31, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @methane, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker 3fb88e94db547e9dbed97de68da87bcf9335a53a 3.14

@bedevere-app

bedevere-app Bot commented Oct 31, 2026

Copy link
Copy Markdown

GH-160993 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 31, 2026
@bedevere-app

bedevere-app Bot commented Oct 31, 2026

Copy link
Copy Markdown

GH-160994 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 31, 2026
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Debian Non-Debug with X 3.x (tierless) has failed when building commit 3fb88e9.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1245/builds/9967) and take a look at the build logs.
  4. Check if the failure is related to this commit (3fb88e9) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1245/builds/9967

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m390�[0m, in �[35mtest_ftp_timeout�[0m
    u = _urlopen_with_retry(self.FTP_HOST, timeout=60)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m32�[0m, in �[35mwrapped�[0m
    return _retry_thrice(func, exc, *args, **kwargs)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m28�[0m, in �[35m_retry_thrice�[0m
    raise last_exc
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m24�[0m, in �[35m_retry_thrice�[0m
    return func(*args, **kwargs)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m187�[0m, in �[35murlopen�[0m
    return �[31mopener.open�[0m�[1;31m(url, data, timeout)�[0m
           �[31m~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m489�[0m, in �[35mopen�[0m
    response = self._open(req, data)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m506�[0m, in �[35m_open�[0m
    result = self._call_chain(self.handle_open, protocol, protocol +
                              '_open', req)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m466�[0m, in �[35m_call_chain�[0m
    result = func(*args)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1584�[0m, in �[35mftp_open�[0m
    raise URLError(f"ftp error: {exp}") from exp
�[1;35murllib.error.URLError�[0m: �[35m<urlopen error ftp error: 425 Security: Bad IP connecting.>�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1571�[0m, in �[35mftp_open�[0m
    fp, retrlen = �[31mfw.retrfile�[0m�[1;31m(file, type)�[0m
                  �[31m~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1861�[0m, in �[35mretrfile�[0m
    conn, retrlen = �[31mself.ftp.ntransfercmd�[0m�[1;31m(cmd)�[0m
                    �[31m~~~~~~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m359�[0m, in �[35mntransfercmd�[0m
    resp = self.sendcmd(cmd)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m281�[0m, in �[35msendcmd�[0m
    return �[31mself.getresp�[0m�[1;31m()�[0m
           �[31m~~~~~~~~~~~~�[0m�[1;31m^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m252�[0m, in �[35mgetresp�[0m
    raise error_temp(resp)
�[1;35mftplib.error_temp�[0m: �[35m425 Security: Bad IP connecting.�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1571�[0m, in �[35mftp_open�[0m
    fp, retrlen = �[31mfw.retrfile�[0m�[1;31m(file, type)�[0m
                  �[31m~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1841�[0m, in �[35mretrfile�[0m
    conn, retrlen = �[31mself.ftp.ntransfercmd�[0m�[1;31m(cmd)�[0m
                    �[31m~~~~~~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m359�[0m, in �[35mntransfercmd�[0m
    resp = self.sendcmd(cmd)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m281�[0m, in �[35msendcmd�[0m
    return �[31mself.getresp�[0m�[1;31m()�[0m
           �[31m~~~~~~~~~~~~�[0m�[1;31m^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m252�[0m, in �[35mgetresp�[0m
    raise error_temp(resp)
�[1;35mftplib.error_temp�[0m: �[35m425 Security: Bad IP connecting.�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m286�[0m, in �[35m_test_urls�[0m
    f = urlopen(url, req, support.INTERNET_TIMEOUT)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m489�[0m, in �[35mopen�[0m
    response = self._open(req, data)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m506�[0m, in �[35m_open�[0m
    result = self._call_chain(self.handle_open, protocol, protocol +
                              '_open', req)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m466�[0m, in �[35m_call_chain�[0m
    result = func(*args)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1584�[0m, in �[35mftp_open�[0m
    raise URLError(f"ftp error: {exp}") from exp
�[1;35murllib.error.URLError�[0m: �[35m<urlopen error ftp error: 425 Security: Bad IP connecting.>�[0m

methane added a commit that referenced this pull request Oct 31, 2026
methane added a commit that referenced this pull request Oct 31, 2026
…ns (GH-160979)

(cherry picked from commit 3fb88e9)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Debian Non-Debug with X 3.15 (tierless) has failed when building commit 848e717.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/2112/builds/835) and take a look at the build logs.
  4. Check if the failure is related to this commit (848e717) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/2112/builds/835

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.15.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1571�[0m, in �[35mftp_open�[0m
    fp, retrlen = �[31mfw.retrfile�[0m�[1;31m(file, type)�[0m
                  �[31m~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.15.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1841�[0m, in �[35mretrfile�[0m
    conn, retrlen = �[31mself.ftp.ntransfercmd�[0m�[1;31m(cmd)�[0m
                    �[31m~~~~~~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.15.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m359�[0m, in �[35mntransfercmd�[0m
    resp = self.sendcmd(cmd)
  File �[35m"/buildbot/buildarea/3.15.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m281�[0m, in �[35msendcmd�[0m
    return �[31mself.getresp�[0m�[1;31m()�[0m
           �[31m~~~~~~~~~~~~�[0m�[1;31m^^�[0m
  File �[35m"/buildbot/buildarea/3.15.ware-debian-x86.nondebug/build/Lib/ftplib.py"�[0m, line �[35m252�[0m, in �[35mgetresp�[0m
    raise error_temp(resp)
�[1;35mftplib.error_temp�[0m: �[35m425 Security: Bad IP connecting.�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.15.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py"�[0m, line �[35m286�[0m, in �[35m_test_urls�[0m
    f = urlopen(url, req, support.INTERNET_TIMEOUT)
  File �[35m"/buildbot/buildarea/3.15.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m489�[0m, in �[35mopen�[0m
    response = self._open(req, data)
  File �[35m"/buildbot/buildarea/3.15.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m506�[0m, in �[35m_open�[0m
    result = self._call_chain(self.handle_open, protocol, protocol +
                              '_open', req)
  File �[35m"/buildbot/buildarea/3.15.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m466�[0m, in �[35m_call_chain�[0m
    result = func(*args)
  File �[35m"/buildbot/buildarea/3.15.ware-debian-x86.nondebug/build/Lib/urllib/request.py"�[0m, line �[35m1584�[0m, in �[35mftp_open�[0m
    raise URLError(f"ftp error: {exp}") from exp
�[1;35murllib.error.URLError�[0m: �[35m<urlopen error ftp error: 425 Security: Bad IP connecting.>�[0m

@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows Server 2025 Refleaks 3.15 (tier-1) has failed when building commit 848e717.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/2271/builds/194) and take a look at the build logs.
  4. Check if the failure is related to this commit (848e717) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/2271/builds/194

Failed tests:

  • test_urllib2net

Failed subtests:

  • test_ftp_basic - test.test_urllib2net.TimeoutTest.test_ftp_basic
  • test_ftp_no_leak - test.test_urllib2net.OtherNetworkTests.test_ftp_no_leak

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 1571, in ftp_open
    fp, retrlen = fw.retrfile(file, type)
                  ~~~~~~~~~~~^^^^^^^^^^^^
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 1861, in retrfile
    conn, retrlen = self.ftp.ntransfercmd(cmd)
                    ~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\ftplib.py", line 359, in ntransfercmd
    resp = self.sendcmd(cmd)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\ftplib.py", line 281, in sendcmd
    return self.getresp()
           ~~~~~~~~~~~~^^
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\ftplib.py", line 252, in getresp
    raise error_temp(resp)
ftplib.error_temp: 425 Security: Bad IP connecting.


Traceback (most recent call last):
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 1571, in ftp_open
    fp, retrlen = fw.retrfile(file, type)
                  ~~~~~~~~~~~^^^^^^^^^^^^
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 1841, in retrfile
    conn, retrlen = self.ftp.ntransfercmd(cmd)
                    ~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\ftplib.py", line 359, in ntransfercmd
    resp = self.sendcmd(cmd)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\ftplib.py", line 281, in sendcmd
    return self.getresp()
           ~~~~~~~~~~~~^^
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\ftplib.py", line 252, in getresp
    raise error_temp(resp)
ftplib.error_temp: 425 Security: Bad IP connecting.


Traceback (most recent call last):
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\test\test_urllib2net.py", line 360, in test_ftp_basic
    u = _urlopen_with_retry(self.FTP_HOST)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\test\test_urllib2net.py", line 32, in wrapped
    return _retry_thrice(func, exc, *args, **kwargs)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\test\test_urllib2net.py", line 28, in _retry_thrice
    raise last_exc
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\test\test_urllib2net.py", line 24, in _retry_thrice
    return func(*args, **kwargs)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 187, in urlopen
    return opener.open(url, data, timeout)
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 489, in open
    response = self._open(req, data)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 506, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
                              '_open', req)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 466, in _call_chain
    result = func(*args)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 1584, in ftp_open
    raise URLError(f"ftp error: {exp}") from exp
urllib.error.URLError: <urlopen error ftp error: 425 Security: Bad IP connecting.>


Traceback (most recent call last):
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\test\test_urllib2net.py", line 286, in _test_urls
    f = urlopen(url, req, support.INTERNET_TIMEOUT)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 489, in open
    response = self._open(req, data)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 506, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
                              '_open', req)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 466, in _call_chain
    result = func(*args)
  File "B:\uildarea\3.15.ware-ws2025.refleak\build\Lib\urllib\request.py", line 1584, in ftp_open
    raise URLError(f"ftp error: {exp}") from exp
urllib.error.URLError: <urlopen error ftp error: 425 Security: Bad IP connecting.>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants