Open fenchu opened 3 weeks ago
There are lots of distutils.strtobool
rout there t: https://github.com/symonsoft/str2bool
I had the follwoign in my code stolen from somwhere:
#!/usr/bin/env python3
_MAP = {
'y': True,
'yes': True,
't': True,
'true': True,
'on': True,
'1': True,
'n': False,
'no': False,
'f': False,
'false': False,
'off': False,
'0': False
}
def strtobool(value):
try:
return _MAP[str(value).lower()]
except KeyError:
raise ValueError('"{}" is not a valid bool value'.format(value))
Describe the bug Regression? older versions seemed to work fine with python3.12
distutils is not in python3.12 - https://peps.python.org/pep-0632/
In Python 3.12, distutils will no longer be installed by make install or any of the first-party distribution. Third-party redistributors should no longer include distutils in their bundles or repositories.
Steps to Reproduce Steps to reproduce the behavior: pip install pytest pip install pytest-reportportal
run any pytest, do not even need to enable the plugin.
Expected behavior nothing
Actual behavior
Package versions Include version info of the following packages: reportportal-client, pytest-reportportal
Additional context