Skip to content

Commit 0538a07

Browse files
committed
Squash all changesUpdate pyproject.toml, GH workflows, uv.lock
1 parent f1b5dc0 commit 0538a07

File tree

6 files changed

+2196
-1578
lines changed

6 files changed

+2196
-1578
lines changed

.github/workflows/pre-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
name: splunk-test-pypi
1414
steps:
1515
- name: Checkout source
16-
uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1717
- name: Set up Python ${{ env.PYTHON_VERSION }}
18-
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
18+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
1919
with:
2020
python-version: ${{ env.PYTHON_VERSION }}
2121
- name: Install dependencies

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
name: splunk-pypi
1616
steps:
1717
- name: Checkout source
18-
uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1919
- name: Set up Python ${{ env.PYTHON_VERSION }}
20-
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
20+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
2121
with:
2222
python-version: ${{ env.PYTHON_VERSION }}
2323
- name: Install dependencies

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ jobs:
2222
splunk-version: latest
2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e
25+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
2626
- name: Launch Splunk Docker instance
2727
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
2828
- name: Setup Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
29+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
3030
with:
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)