Skip to content

Commit 95c664e

Browse files
committed
Fixes #368
1 parent 55ce972 commit 95c664e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22

33
## [Unreleased]
4+
### Fixed
5+
- Issue [#368](https://github.com/reportportal/agent-python-pytest/issues/368): Distutils in the agent, by @HardNorth
6+
### Added
7+
- Python 12 support, by @HardNorth
48

59
## [5.4.1]
610
### Fixed

pytest_reportportal/config.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"""This module contains class that stores RP agent configuration data."""
1515

1616
import warnings
17-
from distutils.util import strtobool
1817
from os import getenv
1918
from typing import Optional, Union, Any, Tuple
2019

2120
from _pytest.config import Config
2221
from reportportal_client import OutputType, ClientType
2322
from reportportal_client.logs import MAX_LOG_BATCH_PAYLOAD_SIZE
23+
from reportportal_client.helpers import to_bool
2424

2525
try:
2626
# This try/except can go away once we support pytest >= 5.4.0
@@ -116,9 +116,7 @@ def __init__(self, pytest_config: Config) -> None:
116116
self.rp_log_batch_payload_size = MAX_LOG_BATCH_PAYLOAD_SIZE
117117
self.rp_log_level = get_actual_log_level(pytest_config, 'rp_log_level')
118118
self.rp_log_format = self.find_option(pytest_config, 'rp_log_format')
119-
self.rp_thread_logging = bool(strtobool(str(self.find_option(
120-
pytest_config, 'rp_thread_logging'
121-
) or False)))
119+
self.rp_thread_logging = to_bool(self.find_option(pytest_config, 'rp_thread_logging') or False)
122120
self.rp_mode = self.find_option(pytest_config, 'rp_mode')
123121
self.rp_parent_item_id = self.find_option(pytest_config,
124122
'rp_parent_item_id')
@@ -177,15 +175,13 @@ def __init__(self, pytest_config: Config) -> None:
177175

178176
rp_verify_ssl = self.find_option(pytest_config, 'rp_verify_ssl', True)
179177
try:
180-
self.rp_verify_ssl = bool(strtobool(rp_verify_ssl))
178+
self.rp_verify_ssl = to_bool(rp_verify_ssl)
181179
except (ValueError, AttributeError):
182180
self.rp_verify_ssl = rp_verify_ssl
183181
self.rp_launch_timeout = int(
184182
self.find_option(pytest_config, 'rp_launch_timeout'))
185183

186-
self.rp_launch_uuid_print = bool(strtobool(self.find_option(
187-
pytest_config, 'rp_launch_uuid_print'
188-
) or 'False'))
184+
self.rp_launch_uuid_print = to_bool(self.find_option(pytest_config, 'rp_launch_uuid_print') or 'False')
189185
print_output = self.find_option(pytest_config, 'rp_launch_uuid_print_output')
190186
self.rp_launch_uuid_print_output = OutputType[print_output.upper()] if print_output else None
191187
client_type = self.find_option(pytest_config, 'rp_client_type')

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dill>=0.3.6
22
pytest>=3.8.0
3-
reportportal-client~=5.5.4
3+
reportportal-client~=5.5.7
44
aenum>=3.1.0
55
requests>=2.28.0

0 commit comments

Comments
 (0)