Skip to content

Commit 6de4f52

Browse files
committed
Add core.log_manager deprecation
1 parent 7e114bb commit 6de4f52

File tree

4 files changed

+43
-3
lines changed

4 files changed

+43
-3
lines changed

reportportal_client/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
__all__ = [
2323
'current',
24-
"RPLogger",
25-
"RPLogHandler",
24+
'RPLogger',
25+
'RPLogHandler',
2626
'ReportPortalService',
2727
'step',
2828
]

reportportal_client/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
limitations under the License.
1616
"""
1717
import logging
18-
1918
import requests
2019
from requests.adapters import HTTPAdapter, Retry
2120

reportportal_client/core/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@
1212
# limitations under the License
1313

1414
"""This package contains core reportportal-client modules."""
15+
16+
from reportportal_client.logs import log_manager
17+
18+
__all__ = [
19+
'log_manager'
20+
]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (c) 2022 EPAM Systems
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# https://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License
13+
14+
"""
15+
.. deprecated:: 5.2.4
16+
Use `logs.log_manager` instead.
17+
"""
18+
19+
import warnings
20+
21+
from reportportal_client.logs.log_manager import LogManager, \
22+
MAX_LOG_BATCH_PAYLOAD_SIZE
23+
24+
warnings.warn(
25+
message="`core.log_manager` is deprecated since 5.2.4 and will be subject "
26+
"for removing in the next major version. Use logs.log_manager` "
27+
"instead",
28+
category=DeprecationWarning,
29+
stacklevel=2
30+
)
31+
32+
__all__ = [
33+
'LogManager',
34+
'MAX_LOG_BATCH_PAYLOAD_SIZE'
35+
]

0 commit comments

Comments
 (0)