Skip to content

bpo-45859: fix test_field_descriptor in test_collections for pypy #29691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

cfbolz
Copy link
Contributor

@cfbolz cfbolz commented Nov 21, 2021

that test tries to pickle the descriptors of a namedtuple's fields,
which is _collections._itemgetter on CPython. However, on PyPy that
class doesn't exist. The code in collections deals fine with that fact,
but the above-mentioned test does not make sense in that situation,
since you can't pickle properties.

https://bugs.python.org/issue45859

that test tries to pickle the descriptors of a namedtuple's fields,
which is _collections._itemgetter on CPython. However, on PyPy that
class doesn't exist. The code in collections deals fine with that fact,
but the above-mentioned test does not make sense in that situation,
since you can't pickle properties.
@rhettinger
Copy link
Contributor

Perhaps just mark this test as CPython only.

@rhettinger rhettinger self-assigned this Nov 21, 2021
@cfbolz
Copy link
Contributor Author

cfbolz commented Nov 22, 2021

works for me too, done!

@rhettinger rhettinger added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Nov 22, 2021
@rhettinger rhettinger merged commit 4fad314 into python:main Nov 22, 2021
@miss-islington
Copy link
Contributor

Thanks @cfbolz for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 22, 2021
…only (pythonGH-29691)

(cherry picked from commit 4fad314)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
@bedevere-bot
Copy link

GH-29708 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Nov 22, 2021
@bedevere-bot
Copy link

GH-29709 is a backport of this pull request to the 3.9 branch.

@miss-islington
Copy link
Contributor

Thanks @cfbolz for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @cfbolz for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 22, 2021
…only (pythonGH-29691)

(cherry picked from commit 4fad314)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
@bedevere-bot
Copy link

GH-29710 is a backport of this pull request to the 3.8 branch.

rhettinger pushed a commit that referenced this pull request Nov 22, 2021
…only (GH-29691) (GH-29708)

(cherry picked from commit 4fad314)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
remykarem pushed a commit to remykarem/cpython that referenced this pull request Dec 7, 2021
ambv pushed a commit that referenced this pull request Dec 11, 2021
…only (GH-29691) (GH-29710)

(cherry picked from commit 4fad314)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
@bedevere-bot
Copy link

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

Hi! The buildbot x86 Gentoo Installed with X 3.8 has failed when building commit 7c5b01b.

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/all/#builders/291/builds/55) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c5b01b) 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/all/#builders/291/builds/55

Failed tests:

  • test_nntplib

Failed subtests:

  • test_xover - test.test_nntplib.NetworkedNNTPTests
  • test_xhdr - test.test_nntplib.NetworkedNNTPTests
  • test_zzquit - test.test_nntplib.NetworkedNNTPTests
  • test_zlogin - test.test_nntplib.NetworkedNNTPTests

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

== Tests result: FAILURE then FAILURE ==

410 tests OK.

1 test failed:
test_nntplib

12 tests skipped:
test_asdl_parser test_clinic test_devpoll test_gdb test_ioctl
test_kqueue test_msilib test_startfile test_winconsoleio
test_winreg test_winsound test_zipfile64

1 re-run test:
test_nntplib

Total duration: 37 min 36 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_nntplib.py", line 250, in wrapped
    meth(self)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_nntplib.py", line 132, in test_xover
    resp, count, first, last, name = self.server.group(self.GROUP_NAME)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 663, in group
    resp = self._shortcmd('GROUP ' + name)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 513, in _shortcmd
    return self._getresp()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 451, in _getresp
    resp = self._getline()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 439, in _getline
    if not line: raise EOFError
EOFError


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_nntplib.py", line 250, in wrapped
    meth(self)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_nntplib.py", line 227, in test_zlogin
    self.assertRaises(nntplib.NNTPError, self.server.login,
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/unittest/case.py", line 816, in assertRaises
    return context.handle('assertRaises', args, kwargs)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/unittest/case.py", line 202, in handle
    callable_obj(*args, **kwargs)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 964, in login
    resp = self._shortcmd('authinfo user ' + user)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 513, in _shortcmd
    return self._getresp()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 451, in _getresp
    resp = self._getline()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 439, in _getline
    if not line: raise EOFError
EOFError


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_nntplib.py", line 250, in wrapped
    meth(self)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_nntplib.py", line 162, in test_xhdr
    resp, count, first, last, name = self.server.group(self.GROUP_NAME)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 663, in group
    resp = self._shortcmd('GROUP ' + name)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 513, in _shortcmd
    return self._getresp()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 451, in _getresp
    resp = self._getline()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 439, in _getline
    if not line: raise EOFError
EOFError


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_nntplib.py", line 250, in wrapped
    meth(self)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_nntplib.py", line 238, in test_zzquit
    self.server.quit()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 937, in quit
    resp = self._shortcmd('QUIT')
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 513, in _shortcmd
    return self._getresp()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 451, in _getresp
    resp = self._getline()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/nntplib.py", line 439, in _getline
    if not line: raise EOFError
EOFError

@bedevere-bot
Copy link

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

Hi! The buildbot x86 Gentoo Non-Debug with X 3.8 has failed when building commit 7c5b01b.

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/all/#builders/324/builds/55) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c5b01b) 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/all/#builders/324/builds/55

Failed tests:

  • test_nntplib

Failed subtests:

  • test_subinterpreter - test.test__xxsubinterpreters.IsRunningTests
  • test_xover - test.test_nntplib.NetworkedNNTPTests
  • test_zlogin - test.test_nntplib.NetworkedNNTPTests
  • test_xhdr - test.test_nntplib.NetworkedNNTPTests
  • test_zzquit - test.test_nntplib.NetworkedNNTPTests

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

== Tests result: FAILURE then FAILURE ==

413 tests OK.

10 slowest tests:

  • test_multiprocessing_spawn: 5 min 13 sec
  • test_concurrent_futures: 4 min 25 sec
  • test_smtpnet: 3 min 3 sec
  • test_lib2to3: 3 min
  • test_gdb: 2 min 54 sec
  • test_tokenize: 2 min 33 sec
  • test_tools: 2 min 31 sec
  • test_nntplib: 2 min 8 sec
  • test_asyncio: 2 min 1 sec
  • test_multiprocessing_forkserver: 1 min 42 sec

1 test failed:
test_nntplib

9 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_startfile
test_winconsoleio test_winreg test_winsound test_zipfile64

2 re-run tests:
test__xxsubinterpreters test_nntplib

Total duration: 35 min 42 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test__xxsubinterpreters.py", line 495, in test_subinterpreter
    self.assertTrue(interpreters.is_running(interp))
AssertionError: False is not true


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py", line 250, in wrapped
    meth(self)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py", line 162, in test_xhdr
    resp, count, first, last, name = self.server.group(self.GROUP_NAME)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 663, in group
    resp = self._shortcmd('GROUP ' + name)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 513, in _shortcmd
    return self._getresp()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 451, in _getresp
    resp = self._getline()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 439, in _getline
    if not line: raise EOFError
EOFError


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py", line 250, in wrapped
    meth(self)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py", line 227, in test_zlogin
    self.assertRaises(nntplib.NNTPError, self.server.login,
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/unittest/case.py", line 816, in assertRaises
    return context.handle('assertRaises', args, kwargs)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/unittest/case.py", line 202, in handle
    callable_obj(*args, **kwargs)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 964, in login
    resp = self._shortcmd('authinfo user ' + user)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 513, in _shortcmd
    return self._getresp()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 451, in _getresp
    resp = self._getline()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 439, in _getline
    if not line: raise EOFError
EOFError


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py", line 250, in wrapped
    meth(self)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py", line 132, in test_xover
    resp, count, first, last, name = self.server.group(self.GROUP_NAME)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 663, in group
    resp = self._shortcmd('GROUP ' + name)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 513, in _shortcmd
    return self._getresp()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 451, in _getresp
    resp = self._getline()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 439, in _getline
    if not line: raise EOFError
EOFError


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test__xxsubinterpreters.py", line 51, in run
    interpreters.run_string(interp, dedent(f"""
RuntimeError: unrecognized interpreter ID 46


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py", line 250, in wrapped
    meth(self)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_nntplib.py", line 238, in test_zzquit
    self.server.quit()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 937, in quit
    resp = self._shortcmd('QUIT')
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 513, in _shortcmd
    return self._getresp()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 451, in _getresp
    resp = self._getline()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/nntplib.py", line 439, in _getline
    if not line: raise EOFError
EOFError

@terryjreedy terryjreedy removed the needs backport to 3.9 only security fixes label Feb 18, 2025
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.

6 participants