Skip to content

Commit 5f9e182

Browse files
committed
Squash all changesUpdate pyproject.toml, GH workflows, uv.lock
1 parent a0b9c91 commit 5f9e182

File tree

4 files changed

+2190
-1572
lines changed

4 files changed

+2190
-1572
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
python-version: ${{ matrix.python-version }}
3232
- name: (Python 3.7) Install dependencies
3333
if: ${{ matrix.python-version == '3.7' }}
34-
run: python -m pip install python-dotenv pytest
34+
run: python -m pip install deprecated python-dotenv pytest
3535
- name: (Python >= 3.9) Install dependencies
3636
if: ${{ matrix.python-version != '3.7' }}
3737
run: python -m pip install . --group test

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ classifiers = [
2929
"Topic :: Software Development :: Libraries :: Application Frameworks",
3030
]
3131

32-
dependencies = ["python-dotenv>=0.21.1"]
32+
dependencies = [
33+
"deprecated>=1.3.1",
34+
"python-dotenv>=0.21.1",
35+
]
3336
optional-dependencies = { compat = ["six>=1.17.0"] }
3437

3538
[dependency-groups]

splunklib/client.py

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,6 @@
1111
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1212
# License for the specific language governing permissions and limitations
1313
# under the License.
14-
#
15-
# The purpose of this module is to provide a friendlier domain interface to
16-
# various Splunk endpoints. The approach here is to leverage the binding
17-
# layer to capture endpoint context and provide objects and methods that
18-
# offer simplified access their corresponding endpoints. The design avoids
19-
# caching resource state. From the perspective of this module, the 'policy'
20-
# for caching resource state belongs in the application or a higher level
21-
# framework, and its the purpose of this module to provide simplified
22-
# access to that resource state.
23-
#
24-
# A side note, the objects below that provide helper methods for updating eg:
25-
# Entity state, are written so that they may be used in a fluent style.
26-
#
2714

2815
"""The **splunklib.client** module provides a Pythonic interface to the
2916
`Splunk REST API <http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTcontents>`_,
@@ -56,10 +43,21 @@
5643
5744
print(my_app['author']) # Or: print(my_app.author)
5845
my_app.package() # Creates a compressed package of this application
46+
47+
The purpose of this module is to provide a friendlier domain interface to
48+
various Splunk endpoints. The approach here is to leverage the binding
49+
layer to capture endpoint context and provide objects and methods that
50+
offer simplified access their corresponding endpoints. The design avoids
51+
caching resource state. From the perspective of this module, the 'policy'
52+
for caching resource state belongs in the application or a higher level
53+
framework, and its the purpose of this module to provide simplified
54+
access to that resource state.
55+
56+
A side note, the objects below that provide helper methods for updating eg:
57+
Entity state, are written so that they may be used in a fluent style.
5958
"""
6059

6160
import contextlib
62-
import datetime
6361
import json
6462
import logging
6563
import re
@@ -68,8 +66,9 @@
6866
from time import sleep
6967
from urllib import parse
7068

69+
from deprecated import deprecated
70+
7171
from . import data
72-
from .data import record
7372
from .binding import (
7473
AuthenticationError,
7574
Context,
@@ -80,17 +79,18 @@
8079
_NoAuthenticationToken,
8180
namespace,
8281
)
82+
from .data import record
8383

8484
logger = logging.getLogger(__name__)
8585

8686
__all__ = [
87-
"connect",
87+
"AuthenticationError",
88+
"IncomparableException",
8889
"NotSupportedError",
8990
"OperationError",
90-
"IncomparableException",
9191
"Service",
92+
"connect",
9293
"namespace",
93-
"AuthenticationError",
9494
]
9595

9696
PATH_APPS = "apps/local/"
@@ -2007,6 +2007,10 @@ def clear_password(self):
20072007
return self.content.get("clear_password")
20082008

20092009
@property
2010+
@deprecated(
2011+
version="2.2.0",
2012+
reason="To improve security, this field now returns an empty string and will be removed from Splunk in a future release.",
2013+
)
20102014
def encrypted_password(self):
20112015
return self.content.get("encr_password")
20122016

0 commit comments

Comments
 (0)