Skip to content

Commit 2a03062

Browse files
authored
Merge pull request #405 from reportportal/develop
Release
2 parents ab5671d + add7774 commit 2a03062

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

CHANGELOG.md

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

33
## [Unreleased]
44
### Added
5+
- Return back deprecated `rp_log_batch_payload_size` parameter for sake of backward compatibility, by @HardNorth
6+
7+
## [5.5.3]
8+
### Added
59
- OAuth 2.0 Password Grant authentication, by @HardNorth
610
### Changed
711
- Client version updated to [5.6.7](https://github.com/reportportal/client-Python/releases/tag/5.6.7), by @HardNorth

pytest_reportportal/config.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,23 @@ def __init__(self, pytest_config: Config) -> None:
113113
self.rp_launch_description = self.find_option(pytest_config, "rp_launch_description")
114114
self.rp_log_batch_size = int(self.find_option(pytest_config, "rp_log_batch_size"))
115115
batch_payload_size_limit = self.find_option(pytest_config, "rp_log_batch_payload_limit")
116+
batch_payload_size = self.find_option(pytest_config, "rp_log_batch_payload_size")
117+
if batch_payload_size:
118+
warnings.warn(
119+
"Parameter `rp_log_batch_payload_size` is deprecated since 5.5.4 "
120+
"and will be subject for removing in the next major version. Use `rp_log_batch_payload_limit` argument"
121+
" instead.",
122+
DeprecationWarning,
123+
2,
124+
)
125+
if not batch_payload_size_limit:
126+
batch_payload_size_limit = batch_payload_size
127+
116128
if batch_payload_size_limit:
117129
self.rp_log_batch_payload_limit = int(batch_payload_size_limit)
118130
else:
119131
self.rp_log_batch_payload_limit = MAX_LOG_BATCH_PAYLOAD_SIZE
132+
120133
self.rp_log_level = get_actual_log_level(pytest_config, "rp_log_level")
121134
self.rp_log_format = self.find_option(pytest_config, "rp_log_format")
122135
self.rp_thread_logging = to_bool(self.find_option(pytest_config, "rp_thread_logging") or False)

pytest_reportportal/plugin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from pytest import Item, Session
2828
from reportportal_client import RP, RPLogHandler
2929
from reportportal_client.errors import ResponseError
30-
from reportportal_client.logs import MAX_LOG_BATCH_PAYLOAD_SIZE
3130

3231
from pytest_reportportal import LAUNCH_WAIT_TIMEOUT
3332
from pytest_reportportal.config import AgentConfig
@@ -595,9 +594,12 @@ def add_shared_option(name, help_str, default=None, action="store"):
595594
parser.addini("rp_log_batch_size", default="20", help="Size of batch log requests in async mode")
596595
parser.addini(
597596
"rp_log_batch_payload_limit",
598-
default=str(MAX_LOG_BATCH_PAYLOAD_SIZE),
599597
help="Maximum payload size in bytes of async batch log requests",
600598
)
599+
parser.addini(
600+
"rp_log_batch_payload_size",
601+
help="DEPRECATED: Maximum payload size in bytes of async batch log requests",
602+
)
601603
parser.addini("rp_ignore_attributes", type="args", help="Ignore specified pytest markers, i.e parametrize")
602604
parser.addini(
603605
"rp_is_skipped_an_issue", default=True, type="bool", help="Treat skipped tests as required investigation"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from setuptools import setup
1919

20-
__version__ = "5.5.3"
20+
__version__ = "5.5.4"
2121

2222

2323
def read_file(fname):

tests/unit/test_plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ def test_pytest_addoption_adds_correct_ini_file_arguments():
258258
"rp_tests_attributes",
259259
"rp_log_batch_size",
260260
"rp_log_batch_payload_limit",
261+
"rp_log_batch_payload_size",
261262
"rp_ignore_attributes",
262263
"rp_is_skipped_an_issue",
263264
"rp_hierarchy_code",

0 commit comments

Comments
 (0)