boltons
boltons copied to clipboard
Build fails with Python 3.13
python-boltons fails to build with Python 3.13.03.
=================================== FAILURES ===================================
_____________________________ test_exception_info ______________________________
def test_exception_info():
# test ExceptionInfo and TracebackInfo and hooks, via StringIOs
builtin_exc_hook = sys.excepthook
fix_print_exception()
tbi_str = ''
def test():
raise ValueError('yay fun')
fake_stderr1 = StringIO()
fake_stderr2 = StringIO()
sys.stderr = fake_stderr1
try:
test()
except:
_, _, exc_traceback = sys.exc_info()
tbi = TracebackInfo.from_traceback(exc_traceback)
exc_info = ExceptionInfo.from_exc_info(*sys.exc_info())
exc_info2 = ExceptionInfo.from_current()
tbi_str = str(tbi)
print_exception(*sys.exc_info(), file=fake_stderr2)
new_exc_hook_res = fake_stderr2.getvalue()
builtin_exc_hook(*sys.exc_info())
builtin_exc_hook_res = fake_stderr1.getvalue()
finally:
sys.stderr = sys.__stderr__
# Single frame
single_frame_str = tbi.frames[-1].tb_frame_str()
assert 'in test' in single_frame_str
assert 'yay fun' in single_frame_str
# Traceback info
assert len(tbi_str.splitlines()) == 5
assert 'yay fun' in tbi_str
# Full except hook output
assert 'ValueError: yay fun' in new_exc_hook_res
assert "ValueError('yay fun')" in new_exc_hook_res
assert len(new_exc_hook_res) > len(tbi_str)
> assert new_exc_hook_res == builtin_exc_hook_res
E assert 'Traceback (m...or: yay fun\n' == 'Traceback (m...or: yay fun\n'
E Traceback (most recent call last):
E File "/builddir/build/BUILD/boltons-23.1.1/tests/test_tbutils.py", line 33, in test_exception_info
E test()
E - ~~~~^^
E File "/builddir/build/BUILD/boltons-23.1.1/tests/test_tbutils.py", line 26, in test
E raise ValueError('yay fun')
E ValueError: yay fun
tests/test_tbutils.py:61: AssertionError
https://docs.python.org/3.13/whatsnew/3.13.html
Downstream Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=2259631
Good to know. 3.13 is currently in prerelease but should be out in the fall of 2024. Thanks!
Just hit this given we've started testing python3.13 in Gentoo (beta1 is out, so it's no longer changing things and is a good time to start testing with it before final release).
Note that fedora's build (like ours) had a second failing test:
FAILED tests/test_funcutils_fb_py3.py::test_update_wrapper_partial[boltons.funcutils]
Not too concerned about the exception_info one and we could skip that test for now, but not sure how much that one matters.
test output with python3.13.0b1
===================================================== FAILURES =====================================================
__________________________________ test_update_wrapper_partial[boltons.funcutils] __________________________________
func = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
def getfullargspec(func):
"""Get the names and default values of a callable object's parameters.
A tuple of seven things is returned:
(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations).
'args' is a list of the parameter names.
'varargs' and 'varkw' are the names of the * and ** parameters or None.
'defaults' is an n-tuple of the default values of the last n parameters.
'kwonlyargs' is a list of keyword-only parameter names.
'kwonlydefaults' is a dictionary mapping names from kwonlyargs to defaults.
'annotations' is a dictionary mapping parameter names to annotations.
Notable differences from inspect.signature():
- the "self" parameter is always reported, even for bound methods
- wrapper chains defined by __wrapped__ *not* unwrapped automatically
"""
try:
# Re: `skip_bound_arg=False`
#
# There is a notable difference in behaviour between getfullargspec
# and Signature: the former always returns 'self' parameter for bound
# methods, whereas the Signature always shows the actual calling
# signature of the passed object.
#
# To simulate this behaviour, we "unbind" bound methods, to trick
# inspect.signature to always return their first parameter ("self",
# usually)
# Re: `follow_wrapper_chains=False`
#
# getfullargspec() historically ignored __wrapped__ attributes,
# so we ensure that remains the case in 3.3+
> sig = _signature_from_callable(func,
follow_wrapper_chains=False,
skip_bound_arg=False,
sigcls=Signature,
eval_str=False)
func = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
/usr/lib/python3.13/inspect.py:1346:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.13/inspect.py:2558: in _signature_from_callable
return _signature_from_builtin(sigcls, obj,
_get_signature_of = functools.partial(<function _signature_from_callable at 0x7ffff6cfbb00>, follow_wrapper_chains=False, skip_bound_arg=False, globals=None, locals=None, sigcls=<class 'inspect.Signature'>, eval_str=False)
eval_str = False
follow_wrapper_chains = False
globals = None
locals = None
obj = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
sigcls = <class 'inspect.Signature'>
skip_bound_arg = False
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'inspect.Signature'>
func = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
skip_bound_arg = False
def _signature_from_builtin(cls, func, skip_bound_arg=True):
"""Private helper function to get signature for
builtin callables.
"""
if not _signature_is_builtin(func):
raise TypeError("{!r} is not a Python builtin "
"function".format(func))
s = getattr(func, "__text_signature__", None)
if not s:
> raise ValueError("no signature found for builtin {!r}".format(func))
E ValueError: no signature found for builtin boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
cls = <class 'inspect.Signature'>
func = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
s = None
skip_bound_arg = False
/usr/lib/python3.13/inspect.py:2348: ValueError
The above exception was the direct cause of the following exception:
partial_kind = <module 'boltons.funcutils' from '/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/boltons/funcutils.py'>
@pytest.mark.parametrize('partial_kind', (functools, funcutils))
def test_update_wrapper_partial(partial_kind):
wrapper = partial_kind.partial(wrappable_varkw_func, b=1)
> fully_wrapped = update_wrapper(wrapper, wrappable_varkw_func)
partial_kind = <module 'boltons.funcutils' from '/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/boltons/funcutils.py'>
wrapper = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
tests/test_funcutils_fb_py3.py:71:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
boltons/funcutils.py:580: in update_wrapper
fb = FunctionBuilder.from_func(build_from or func)
build_from = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
expected = None
expected_items = []
func = <function wrappable_varkw_func at 0x7ffff5f46fc0>
hide_wrapped = False
inject_to_varkw = True
injected = []
kw = {}
update_dict = True
wrapper = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
boltons/funcutils.py:823: in from_func
kwargs.update(cls._argspec_to_dict(func))
cls = <class 'boltons.funcutils.FunctionBuilder'>
func = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
kwargs = {'annotations': {},
'dict': {},
'doc': None,
'module': 'tests.test_funcutils_fb_py3',
'name': 'wrappable_varkw_func'}
boltons/funcutils.py:723: in _argspec_to_dict
argspec = inspect.getfullargspec(f)
cls = <class 'boltons.funcutils.FunctionBuilder'>
f = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
func = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
def getfullargspec(func):
"""Get the names and default values of a callable object's parameters.
A tuple of seven things is returned:
(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations).
'args' is a list of the parameter names.
'varargs' and 'varkw' are the names of the * and ** parameters or None.
'defaults' is an n-tuple of the default values of the last n parameters.
'kwonlyargs' is a list of keyword-only parameter names.
'kwonlydefaults' is a dictionary mapping names from kwonlyargs to defaults.
'annotations' is a dictionary mapping parameter names to annotations.
Notable differences from inspect.signature():
- the "self" parameter is always reported, even for bound methods
- wrapper chains defined by __wrapped__ *not* unwrapped automatically
"""
try:
# Re: `skip_bound_arg=False`
#
# There is a notable difference in behaviour between getfullargspec
# and Signature: the former always returns 'self' parameter for bound
# methods, whereas the Signature always shows the actual calling
# signature of the passed object.
#
# To simulate this behaviour, we "unbind" bound methods, to trick
# inspect.signature to always return their first parameter ("self",
# usually)
# Re: `follow_wrapper_chains=False`
#
# getfullargspec() historically ignored __wrapped__ attributes,
# so we ensure that remains the case in 3.3+
sig = _signature_from_callable(func,
follow_wrapper_chains=False,
skip_bound_arg=False,
sigcls=Signature,
eval_str=False)
except Exception as ex:
# Most of the times 'signature' will raise ValueError.
# But, it can also raise AttributeError, and, maybe something
# else. So to be fully backwards compatible, we catch all
# possible exceptions here, and reraise a TypeError.
> raise TypeError('unsupported callable') from ex
E TypeError: unsupported callable
func = boltons.funcutils.CachedInstancePartial(<function wrappable_varkw_func at 0x7ffff5f46fc0>, b=1)
/usr/lib/python3.13/inspect.py:1356: TypeError
_______________________________________________ test_exception_info ________________________________________________
def test_exception_info():
# test ExceptionInfo and TracebackInfo and hooks, via StringIOs
builtin_exc_hook = sys.excepthook
fix_print_exception()
tbi_str = ''
def test():
raise ValueError('yay fun')
fake_stderr1 = StringIO()
fake_stderr2 = StringIO()
sys.stderr = fake_stderr1
try:
test()
except:
_, _, exc_traceback = sys.exc_info()
tbi = TracebackInfo.from_traceback(exc_traceback)
exc_info = ExceptionInfo.from_exc_info(*sys.exc_info())
exc_info2 = ExceptionInfo.from_current()
tbi_str = str(tbi)
print_exception(*sys.exc_info(), file=fake_stderr2)
new_exc_hook_res = fake_stderr2.getvalue()
builtin_exc_hook(*sys.exc_info())
builtin_exc_hook_res = fake_stderr1.getvalue()
finally:
sys.stderr = sys.__stderr__
# Single frame
single_frame_str = tbi.frames[-1].tb_frame_str()
assert 'in test' in single_frame_str
assert 'yay fun' in single_frame_str
# Traceback info
assert len(tbi_str.splitlines()) == 5
assert 'yay fun' in tbi_str
# Full except hook output
assert 'ValueError: yay fun' in new_exc_hook_res
assert "ValueError('yay fun')" in new_exc_hook_res
assert len(new_exc_hook_res) > len(tbi_str)
> assert new_exc_hook_res == builtin_exc_hook_res
E assert 'Traceback (most recent call last):\n File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 28, in test_exception_info\n test()\n File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 21, in test\n raise ValueError(\'yay fun\')\nValueError: yay fun\n' == 'Traceback (most recent call last):\n File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 28, in test_exception_info\n test()\n ~~~~^^\n File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 21, in test\n raise ValueError(\'yay fun\')\nValueError: yay fun\n'
E
E Traceback (most recent call last):
E File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 28, in test_exception_info
E test()
E - ~~~~^^
E File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 21, in test
E raise ValueError('yay fun')
E ValueError: yay fun
_ = ValueError('yay fun')
builtin_exc_hook = <built-in function excepthook>
builtin_exc_hook_res = ('Traceback (most recent call last):\n'
' File '
'"/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", '
'line 28, in test_exception_info\n'
' test()\n'
' ~~~~^^\n'
' File '
'"/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", '
'line 21, in test\n'
" raise ValueError('yay fun')\n"
'ValueError: yay fun\n')
exc_info = <ExceptionInfo [ValueError: yay fun] (2 frames, last=Callpoint('test', 21, 'tests.test_tbutils', '/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py', 22, " raise ValueError('yay fun')"))>
exc_info2 = <ExceptionInfo [ValueError: yay fun] (2 frames, last=Callpoint('test', 21, 'tests.test_tbutils', '/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py', 22, " raise ValueError('yay fun')"))>
exc_traceback = <traceback object at 0x7ffff5cdc9c0>
fake_stderr1 = <_io.StringIO object at 0x7ffff5c54700>
fake_stderr2 = <_io.StringIO object at 0x7ffff5c55540>
new_exc_hook_res = ('Traceback (most recent call last):\n'
' File '
'"/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", '
'line 28, in test_exception_info\n'
' test()\n'
' File '
'"/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", '
'line 21, in test\n'
" raise ValueError('yay fun')\n"
'ValueError: yay fun\n')
single_frame_str = (' File '
'"/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", '
'line 21, in test\n'
" raise ValueError('yay fun')\n")
tbi = <TracebackInfo frames=2 last=Callpoint('test', 21, 'tests.test_tbutils', '/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py', 22, " raise ValueError('yay fun')")>
tbi_str = ('Traceback (most recent call last):\n'
' File '
'"/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", '
'line 28, in test_exception_info\n'
' test()\n'
' File '
'"/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", '
'line 21, in test\n'
" raise ValueError('yay fun')\n")
test = <function test_exception_info.<locals>.test at 0x7ffff2d60720>
tests/test_tbutils.py:56: AssertionError
================================================= warnings summary =================================================
tests/conftest.py:8
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/conftest.py:8: PytestRemovedIn9Warning: The (path: py.path.local) argument is deprecated, please use (collection_path: pathlib.Path)
see https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
def pytest_ignore_collect(path, config):
boltons/ecoutils.py:259
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/boltons/ecoutils.py:259: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
return datetime.datetime.utcnow()
boltons/timeutils.py:426
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/boltons/timeutils.py:426: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
EPOCH_NAIVE = datetime.utcfromtimestamp(0)
tests/test_ioutils.py::TestMultiFileReader::test_open
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_ioutils.py:491: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_ioutils.py'>
utf8_file_str = codecs.open(CUR_FILE_PATH, encoding='utf8').read()
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_ioutils.py::TestMultiFileReader::test_open
/usr/lib/python3.13/unittest/case.py:606: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_ioutils.py'>
if method() is not None:
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_jsonutils.py::test_reverse_iter_lines
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_jsonutils.py:16: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/newlines_test_data.txt'>
rev_lines = list(reverse_iter_lines(fo, blocksize))
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_jsonutils.py::test_reverse_iter_lines
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_jsonutils.py:24: ResourceWarning: unclosed file <_io.FileIO name='/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/newlines_test_data.txt' mode='rb' closefd=True>
rev_lines = list(reverse_iter_lines(fo, blocksize))
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_jsonutils.py::test_jsonl_iterator
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/boltons/jsonutils.py:215: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/jsonl_test_data.txt'>
line = next(self._line_iter).lstrip()
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_multibyte_delim
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:57: ResourceWarning: unclosed <socket.socket fd=23, family=1, type=1, proto=0>
x, y = socket.socketpair()
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_multibyte_delim
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:65: ResourceWarning: unclosed <socket.socket fd=22, family=1, type=1, proto=0>
assert bs.recv_until(delim, **kwargs) == empty + cond_delim
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_multibyte_delim
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:57: ResourceWarning: unclosed <socket.socket fd=25, family=1, type=1, proto=0>
x, y = socket.socketpair()
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_multibyte_delim
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:65: ResourceWarning: unclosed <socket.socket fd=24, family=1, type=1, proto=0>
assert bs.recv_until(delim, **kwargs) == empty + cond_delim
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_multibyte_delim
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:58: ResourceWarning: unclosed <socket.socket fd=24, family=1, type=1, proto=0>
bs = BufferedSocket(x)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_multibyte_delim
/usr/lib/python3.13/site-packages/_pytest/python.py:162: ResourceWarning: unclosed <socket.socket fd=25, family=1, type=1, proto=0>
result = testfunction(**testargs)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_multibyte_delim
/usr/lib/python3.13/site-packages/_pytest/python.py:162: ResourceWarning: unclosed <socket.socket fd=24, family=1, type=1, proto=0>
result = testfunction(**testargs)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_props
tests/test_socketutils.py::test_buffers
tests/test_socketutils.py::test_split_delim
tests/test_socketutils.py::test_basic_nonblocking
tests/test_socketutils.py::test_simple_buffered_socket_passthroughs
tests/test_socketutils.py::test_timeout_setters_getters
/usr/lib/python3.13/site-packages/_pytest/python.py:162: ResourceWarning: unclosed <socket.socket fd=23, family=1, type=1, proto=0>
result = testfunction(**testargs)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_props
tests/test_socketutils.py::test_buffers
tests/test_socketutils.py::test_split_delim
tests/test_socketutils.py::test_basic_nonblocking
tests/test_socketutils.py::test_simple_buffered_socket_passthroughs
tests/test_socketutils.py::test_timeout_setters_getters
/usr/lib/python3.13/site-packages/_pytest/python.py:162: ResourceWarning: unclosed <socket.socket fd=22, family=1, type=1, proto=0>
result = testfunction(**testargs)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_basic_nonblocking
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:198: ResourceWarning: unclosed <socket.socket fd=23, family=1, type=1, proto=0>
x, y = socket.socketpair()
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_basic_nonblocking
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:199: ResourceWarning: unclosed <socket.socket fd=22, family=1, type=1, proto=0>
bs = BufferedSocket(x, timeout=0)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_basic_nonblocking
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:209: ResourceWarning: unclosed <socket.socket fd=25, family=1, type=1, proto=0>
x, y = socket.socketpair()
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_basic_nonblocking
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:211: ResourceWarning: unclosed <socket.socket fd=24, family=1, type=1, proto=0>
bs = BufferedSocket(x)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_socketutils_netstring
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:323: ResourceWarning: unclosed <socket.socket fd=24, family=2, type=1, proto=6, laddr=('127.0.0.1', 59728), raddr=('127.0.0.1', 59813)>
client = client_connect()
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_socketutils_netstring
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:331: ResourceWarning: unclosed <socket.socket fd=25, family=2, type=1, proto=6, laddr=('127.0.0.1', 59740), raddr=('127.0.0.1', 59813)>
client = client_connect()
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_socketutils_netstring
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:341: ResourceWarning: unclosed <socket.socket fd=24, family=2, type=1, proto=6, laddr=('127.0.0.1', 59756), raddr=('127.0.0.1', 59813)>
client = client_connect()
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_socketutils_netstring
/usr/lib/python3.13/site-packages/_pytest/python.py:162: ResourceWarning: unclosed <socket.socket fd=25, family=2, type=1, proto=6, laddr=('127.0.0.1', 59766), raddr=('127.0.0.1', 59813)>
result = testfunction(**testargs)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_socketutils_netstring
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:282: ResourceWarning: unclosed <socket.socket fd=23, family=2, type=1, proto=0, laddr=('127.0.0.1', 59813), raddr=('127.0.0.1', 59766)>
start_server = lambda: netstring_server(server_socket)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_socketutils_netstring
/usr/lib/python3.13/threading.py:994: ResourceWarning: unclosed <socket.socket fd=22, family=2, type=1, proto=0, laddr=('127.0.0.1', 59813)>
del self._target, self._args, self._kwargs
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_socketutils_netstring_timeout
/usr/lib/python3.13/site-packages/_pytest/python.py:162: ResourceWarning: unclosed <socket.socket fd=24, family=2, type=1, proto=6, laddr=('127.0.0.1', 36406), raddr=('127.0.0.1', 56333)>
result = testfunction(**testargs)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_socketutils_netstring_timeout
/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_socketutils.py:409: ResourceWarning: unclosed <socket.socket fd=23, family=2, type=1, proto=0, laddr=('127.0.0.1', 56333), raddr=('127.0.0.1', 36406)>
start_server = lambda: netstring_server_timeout_override(server_socket)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_socketutils.py::test_socketutils_netstring_timeout
/usr/lib/python3.13/threading.py:994: ResourceWarning: unclosed <socket.socket fd=22, family=2, type=1, proto=0, laddr=('127.0.0.1', 56333)>
del self._target, self._args, self._kwargs
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================= short test summary info ==============================================
FAILED tests/test_funcutils_fb_py3.py::test_update_wrapper_partial[boltons.funcutils] - TypeError: unsupported callable
FAILED tests/test_tbutils.py::test_exception_info - assert 'Traceback (most recent call last):\n File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 28, in test_exception_info\n test()\n File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 21, in test\n raise ValueError(\'yay fun\')\nValueError: yay fun\n' == 'Traceback (most recent call last):\n File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 28, in test_exception_info\n test()\n ~~~~^^\n File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 21, in test\n raise ValueError(\'yay fun\')\nValueError: yay fun\n'
Traceback (most recent call last):
File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 28, in test_exception_info
test()
- ~~~~^^
File "/tmp/portage/dev-python/boltons-24.0.0/work/boltons-24.0.0/tests/test_tbutils.py", line 21, in test
raise ValueError('yay fun')
ValueError: yay fun
==================================== 2 failed, 414 passed, 40 warnings in 6.06s ====================================
Python 3.13b2 has landed in Fedora rawhide. It would be great to get this resolved ASAP. Thanks!
master
has fixes that should unblock, if you'd like to test. Thanks for the report, both of you!
Thanks, just tried master with 3.13.0b2 and passes fine on my end now.
Thank you, looks good.