Skip to content

gh-156676: Fix test for non-CPython implementations - #156684

Merged
ZeroIntensity merged 1 commit into
python:mainfrom
saioffl:fix-156676
Aug 30, 2026
Merged

gh-156676: Fix test for non-CPython implementations#156684
ZeroIntensity merged 1 commit into
python:mainfrom
saioffl:fix-156676

Conversation

@saioffl

@saioffl saioffl commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

gh-156676

Mark test_pyinit_function_raises_exception as CPython-specific.

This test uses the CPython-specific _testsinglephase module, so
the test should be skipped on non-CPython implementations.

Tests:

  • python3 -m test test_import

@python-cla-bot

python-cla-bot Bot commented Aug 30, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Aug 30, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@ZeroIntensity ZeroIntensity added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 30, 2026
@ZeroIntensity
ZeroIntensity enabled auto-merge (squash) August 30, 2026 21:23
@ZeroIntensity
ZeroIntensity merged commit 03503dc into python:main Aug 30, 2026
64 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @saioffl for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 30, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 30, 2026
@bedevere-app

bedevere-app Bot commented Aug 30, 2026

Copy link
Copy Markdown

GH-156687 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 Aug 30, 2026
@bedevere-app

bedevere-app Bot commented Aug 30, 2026

Copy link
Copy Markdown

GH-156688 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 30, 2026
ZeroIntensity pushed a commit that referenced this pull request Aug 30, 2026
…her implementations (GH-156684) (GH-156688)

See also RustPython/RustPython#8605

(cherry picked from commit 03503dc)

Co-authored-by: sai <internoffl@gmail.com>
ZeroIntensity pushed a commit that referenced this pull request Aug 30, 2026
…her implementations (GH-156684) (GH-156687)

See also RustPython/RustPython#8605

(cherry picked from commit 03503dc)

Co-authored-by: sai <internoffl@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot x86 Debian Non-Debug with X 3.13 (tierless) has failed when building commit 58a7ff9.

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/1389/builds/2405) and take a look at the build logs.
  4. Check if the failure is related to this commit (58a7ff9) 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/1389/builds/2405

Failed tests:

  • test_urllib2net

Failed subtests:

  • 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 "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/socket.py", line 794, in close
    self._sock = None
ResourceWarning: unclosed <socket.socket fd=3, family=2, type=1, proto=6, laddr=('10.0.0.231', 50476)>
k


Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py", line 181, in test_ftp_no_leak
    with check_no_resource_warning(self):
         ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/contextlib.py", line 148, in __exit__
    next(self.gen)
    ~~~~^^^^^^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/test/support/warnings_helper.py", line 148, in check_no_resource_warning
    with check_no_warnings(testcase, category=ResourceWarning, force_gc=True):
         ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/contextlib.py", line 148, in __exit__
    next(self.gen)
    ~~~~^^^^^^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/test/support/warnings_helper.py", line 131, in check_no_warnings
    testcase.assertEqual(warns, [])
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
AssertionError: Lists differ: [<warnings.WarningMessage object at 0xb6047538>] != []


Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/urllib/request.py", line 2461, in retrfile
    conn, retrlen = self.ftp.ntransfercmd(cmd)
                    ~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/ftplib.py", line 353, in ntransfercmd
    host, port = self.makepasv()
                 ~~~~~~~~~~~~~^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/ftplib.py", line 327, in makepasv
    untrusted_host, port = parse227(self.sendcmd('PASV'))
                                    ~~~~~~~~~~~~^^^^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/ftplib.py", line 281, in sendcmd
    return self.getresp()
           ~~~~~~~~~~~~^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/ftplib.py", line 254, in getresp
    raise error_perm(resp)
ftplib.error_perm: 500 OOPS: vsf_sysutil_bind


Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py", line 185, in test_ftp_no_leak
    with check_no_resource_warning(self):
         ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/contextlib.py", line 148, in __exit__
    next(self.gen)
    ~~~~^^^^^^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/test/support/warnings_helper.py", line 148, in check_no_resource_warning
    with check_no_warnings(testcase, category=ResourceWarning, force_gc=True):
         ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/contextlib.py", line 148, in __exit__
    next(self.gen)
    ~~~~^^^^^^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/test/support/warnings_helper.py", line 131, in check_no_warnings
    testcase.assertEqual(warns, [])
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
AssertionError: Lists differ: [<warnings.WarningMessage object at 0xb6197bb0>] != []


Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/urllib/request.py", line 1561, in ftp_open
    fp, retrlen = fw.retrfile(file, type)
                  ~~~~~~~~~~~^^^^^^^^^^^^
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/urllib/request.py", line 2464, in retrfile
    raise URLError(f'ftp error: {reason}') from reason
urllib.error.URLError: <urlopen error ftp error: 500 OOPS: vsf_sysutil_bind>


Traceback (most recent call last):
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/test/test_urllib2net.py", line 308, in _test_urls
    f = urlopen(url, req, support.INTERNET_TIMEOUT)
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/urllib/request.py", line 489, in open
    response = self._open(req, data)
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/urllib/request.py", line 506, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
                              '_open', req)
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/urllib/request.py", line 466, in _call_chain
    result = func(*args)
  File "/buildbot/buildarea/3.13.ware-debian-x86.nondebug/build/Lib/urllib/request.py", line 1574, in ftp_open
    raise URLError(exp) from exp
urllib.error.URLError: <urlopen error <urlopen error ftp error: 500 OOPS: vsf_sysutil_bind>>

hugovk pushed a commit that referenced this pull request Aug 31, 2026
…her implementations (GH-156684) (#156686)

gh-156676: Skip `test_pyinit_function_raises_exception` for other implementations (GH-156684)

See also RustPython/RustPython#8605
(cherry picked from commit 03503dc)

Co-authored-by: sai <internoffl@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants