Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Doc/deprecations/pending-removal-in-future.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ although there is currently no date scheduled for their removal.

* :mod:`builtins`:

* ``bool(NotImplemented)``.
* Generators: ``throw(type, exc, tb)`` and ``athrow(type, exc, tb)``
signature is deprecated: use ``throw(exc)`` and ``athrow(exc)`` instead,
the single argument signature.
Expand Down
10 changes: 10 additions & 0 deletions Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,16 @@ def requires(resource, msg=None):
if resource == 'gui' and not _is_gui_available():
raise ResourceDenied(_is_gui_available.reason)

def _get_kernel_version(sysname="Linux"):
import platform
if platform.system() != sysname:
return None
version_txt = platform.release().split('-', 1)[0]
try:
return tuple(map(int, version_txt.split('.')))
except ValueError:
return None

def _requires_unix_version(sysname, min_version):
"""Decorator raising SkipTest if the OS is `sysname` and the version is less
than `min_version`.
Expand Down
41 changes: 0 additions & 41 deletions Lib/test/test_pydoc/test_pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,47 +1334,6 @@ def test_url_search_package_error(self):
finally:
sys.path[:] = saved_paths

@unittest.skip('causes undesirable side-effects (#20128)')
def test_modules(self):
# See Helper.listmodules().
num_header_lines = 2
num_module_lines_min = 5 # Playing it safe.
num_footer_lines = 3
expected = num_header_lines + num_module_lines_min + num_footer_lines

output = StringIO()
helper = pydoc.Helper(output=output)
helper('modules')
result = output.getvalue().strip()
num_lines = len(result.splitlines())

self.assertGreaterEqual(num_lines, expected)

@unittest.skip('causes undesirable side-effects (#20128)')
def test_modules_search(self):
# See Helper.listmodules().
expected = 'pydoc - '

output = StringIO()
helper = pydoc.Helper(output=output)
with captured_stdout() as help_io:
helper('modules pydoc')
result = help_io.getvalue()

self.assertIn(expected, result)

@unittest.skip('some buildbots are not cooperating (#20128)')
def test_modules_search_builtin(self):
expected = 'gc - '

output = StringIO()
helper = pydoc.Helper(output=output)
with captured_stdout() as help_io:
helper('modules garbage')
result = help_io.getvalue()

self.assertStartsWith(result, expected)

def test_importfile(self):
try:
loaded_pydoc = pydoc.importfile(pydoc.__file__)
Expand Down
8 changes: 7 additions & 1 deletion Lib/test/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -7139,8 +7139,14 @@ def test_aes_cbc(self):
self.assertEqual(len(dec), msglen * multiplier)
self.assertEqual(dec, msg * multiplier)

@support.requires_linux_version(4, 9) # see issue29324
@support.requires_linux_version(4, 9) # see gh-73510
def test_aead_aes_gcm(self):
kernel_version = support._get_kernel_version("Linux")
if kernel_version is not None:
if kernel_version >= (6, 16) and kernel_version < (6, 18):
# See https://github.com/python/cpython/issues/139310.
self.skipTest("upstream Linux kernel issue")

key = bytes.fromhex('c939cc13397c1d37de6ae0e1cb7c423c')
iv = bytes.fromhex('b3d8cc017cbb89b39e0f67e2')
plain = bytes.fromhex('c3b3c41f113a31b73d9a5cd432103069')
Expand Down
Loading