Skip to content

Commit a7d2f5a

Browse files
authored
Merge remote-tracking branch 'upstream/develop' into macros
2 parents 788ab3a + f37f17e commit a7d2f5a

File tree

92 files changed

+1560
-2839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1560
-2839
lines changed

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout source
12-
uses: actions/checkout@v2.3.2
12+
uses: actions/checkout@v3
1313
- name: Set up Python
14-
uses: actions/setup-python@v2
14+
uses: actions/setup-python@v4
1515
with:
1616
python-version: 3.7
1717
- name: Install dependencies
1818
run: pip install twine
1919
- name: Build package
2020
run: python setup.py sdist
2121
- name: Publish package to PyPI
22-
uses: pypa/gh-action-pypi-publish@v1.3.1
22+
uses: pypa/gh-action-pypi-publish@v1.8.10
2323
with:
2424
user: __token__
2525
password: ${{ secrets.pypi_password }}

.github/workflows/test.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
matrix:
1212
os:
1313
- ubuntu-latest
14-
python: [ 2.7, 3.7 ]
14+
python: [ 3.7, 3.9]
1515
splunk-version:
1616
- "8.1"
1717
- "8.2"
@@ -20,13 +20,13 @@ jobs:
2020

2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v3
2424

2525
- name: Run docker-compose
2626
run: SPLUNK_VERSION=${{matrix.splunk-version}} docker-compose up -d
2727

2828
- name: Setup Python
29-
uses: actions/setup-python@v2
29+
uses: actions/setup-python@v4
3030
with:
3131
python-version: ${{ matrix.python }}
3232

@@ -35,3 +35,6 @@ jobs:
3535

3636
- name: Test Execution
3737
run: tox -e py
38+
fossa-scan:
39+
uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
40+
secrets: inherit

CHANGELOG.md

+37
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# Splunk Enterprise SDK for Python Changelog
22

3+
## Version 2.0.0-beta
4+
5+
### Feature updates
6+
* `ensure_binary`, `ensure_str` and `assert_regex` utility methods have been migrated from `six.py` to `splunklib/utils.py`
7+
8+
### Major changes
9+
* Removed Code specific to Python2
10+
* Removed six.py dependency
11+
* Removed `__future__` imports
12+
* Refactored & Updated `splunklib` and `tests` to utilise Python3 features
13+
* Updated CI test matrix to run with Python versions - 3.7 and 3.9
14+
* Refactored Code throwing `deprecation` warnings
15+
* Refactored Code violating Pylint rules
16+
## Version 1.7.4
17+
18+
### Bug fixes
19+
* [#532](https://github.com/splunk/splunk-sdk-python/pull/532) update encoding errors mode to 'replace' [[issue#505](https://github.com/splunk/splunk-sdk-python/issues/505)]
20+
* [#507](https://github.com/splunk/splunk-sdk-python/pull/507) masked sensitive data in logs [[issue#506](https://github.com/splunk/splunk-sdk-python/issues/506)]
21+
22+
### Minor changes
23+
* [#530](https://github.com/splunk/splunk-sdk-python/pull/530) Update GitHub CI build status in README and removed RTD(Read The Docs) reference
24+
25+
## Version 1.7.3
26+
27+
### Bug fixes
28+
* [#493](https://github.com/splunk/splunk-sdk-python/pull/493) Fixed file permission for event_writer.py file [[issue#487](https://github.com/splunk/splunk-sdk-python/issues/487)]
29+
* [#500](https://github.com/splunk/splunk-sdk-python/pull/500) Replaced index_field with accelerated_field for kvstore [[issue#497](https://github.com/splunk/splunk-sdk-python/issues/497)]
30+
* [#502](https://github.com/splunk/splunk-sdk-python/pull/502) Updated check for IPv6 addresses
31+
32+
### Minor changes
33+
* [#490](https://github.com/splunk/splunk-sdk-python/pull/490) Added ACL properties update feature
34+
* [#495](https://github.com/splunk/splunk-sdk-python/pull/495) Added Splunk 8.1 in GitHub Actions Matrix
35+
* [#485](https://github.com/splunk/splunk-sdk-python/pull/485) Added test case for cookie persistence
36+
* [#503](https://github.com/splunk/splunk-sdk-python/pull/503) README updates on accessing "service" instance in CSC and ModularInput apps
37+
* [#504](https://github.com/splunk/splunk-sdk-python/pull/504) Updated authentication token names in docs to reduce confusion
38+
* [#494](https://github.com/splunk/splunk-sdk-python/pull/494) Reuse splunklib.__version__ in handler.request
39+
340
## Version 1.7.2
441

542
### Minor changes

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ docs:
3434
.PHONY: test
3535
test:
3636
@echo "$(ATTN_COLOR)==> test $(NO_COLOR)"
37-
@tox -e py27,py37
37+
@tox -e py37,py39
3838

3939
.PHONY: test_specific
4040
test_specific:
@@ -44,17 +44,17 @@ test_specific:
4444
.PHONY: test_smoke
4545
test_smoke:
4646
@echo "$(ATTN_COLOR)==> test_smoke $(NO_COLOR)"
47-
@tox -e py27,py37 -- -m smoke
47+
@tox -e py37,py39 -- -m smoke
4848

4949
.PHONY: test_no_app
5050
test_no_app:
5151
@echo "$(ATTN_COLOR)==> test_no_app $(NO_COLOR)"
52-
@tox -e py27,py37 -- -m "not app"
52+
@tox -e py37,py39 -- -m "not app"
5353

5454
.PHONY: test_smoke_no_app
5555
test_smoke_no_app:
5656
@echo "$(ATTN_COLOR)==> test_smoke_no_app $(NO_COLOR)"
57-
@tox -e py27,py37 -- -m "smoke and not app"
57+
@tox -e py37,py39 -- -m "smoke and not app"
5858

5959
.PHONY: env
6060
env:

README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
[![Build Status](https://travis-ci.org/splunk/splunk-sdk-python.svg?branch=master)](https://travis-ci.org/splunk/splunk-sdk-python)
2-
[![Documentation Status](https://readthedocs.org/projects/splunk-python-sdk/badge/?version=latest)](https://splunk-python-sdk.readthedocs.io/en/latest/?badge=latest)
1+
[![Build Status](https://github.com/splunk/splunk-sdk-python/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/splunk/splunk-sdk-python/actions/workflows/test.yml)
2+
3+
[Reference Docs](https://dev.splunk.com/enterprise/reference)
34

45
# The Splunk Enterprise Software Development Kit for Python
56

6-
#### Version 1.7.2
7+
#### Version 1.7.4
78

89
The Splunk Enterprise Software Development Kit (SDK) for Python contains library code designed to enable developers to build applications using the Splunk platform.
910

@@ -24,13 +25,13 @@ The Splunk Enterprise SDK for Python contains library code, and it's examples ar
2425

2526
Here's what you need to get going with the Splunk Enterprise SDK for Python.
2627

27-
* Python 2.7+ or Python 3.7.
28+
* Python 3.7 or Python 3.9.
2829

29-
The Splunk Enterprise SDK for Python has been tested with Python v2.7 and v3.7.
30+
The Splunk Enterprise SDK for Python is compatible with python3 and has been tested with Python v3.7 and v3.9.
3031

31-
* Splunk Enterprise 9.0 or 8.2
32+
* Splunk Enterprise 9.2 or 8.2
3233

33-
The Splunk Enterprise SDK for Python has been tested with Splunk Enterprise 9.0 and 8.2
34+
The Splunk Enterprise SDK for Python has been tested with Splunk Enterprise 9.2, 8.2 and 8.1
3435

3536
If you haven't already installed Splunk Enterprise, download it [here](http://www.splunk.com/download).
3637
For more information, see the Splunk Enterprise [_Installation Manual_](https://docs.splunk.com/Documentation/Splunk/latest/Installation).
@@ -60,7 +61,7 @@ Install the sources you cloned from GitHub:
6061
You'll need `docker` and `docker-compose` to get up and running using this method.
6162

6263
```
63-
make up SPLUNK_VERSION=9.0
64+
make up SPLUNK_VERSION=9.2
6465
make wait_up
6566
make test
6667
make down
@@ -109,7 +110,7 @@ here is an example of .env file:
109110
# Access scheme (default: https)
110111
scheme=https
111112
# Your version of Splunk Enterprise
112-
version=9.0
113+
version=9.2
113114
# Bearer token for authentication
114115
#splunkToken=<Bearer-token>
115116
# Session key for authentication
@@ -127,7 +128,7 @@ The Splunk Enterprise SDK for Python contains a collection of unit tests. To run
127128

128129
You can also run individual test files, which are located in **/splunk-sdk-python/tests**. To run a specific test, enter:
129130

130-
make specific_test_name
131+
make test_specific
131132

132133
The test suite uses Python's standard library, the built-in `unittest` library, `pytest`, and `tox`.
133134

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
# General information about the project.
4545
project = u'Splunk SDK for Python'
46-
copyright = u'2021, Splunk Inc'
46+
copyright = u'2024, Splunk Inc'
4747

4848
# The version info for the project you're documenting, acts as replacement for
4949
# |version| and |release|, also used in various other places throughout the

scripts/build-env.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011-2020 Splunk, Inc.
1+
# Copyright 2011-2024 Splunk, Inc.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"): you may
44
# not use this file except in compliance with the License. You may obtain

scripts/test_specific.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
echo "To run a specific test:"
2-
echo " tox -e py27,py37 [test_file_path]::[test_name]"
2+
echo " tox -e py37,py39 [test_file_path]::[TestClassName]::[test_method]"
3+
echo "For Example, To run 'test_autologin' testcase from 'test_service.py' file run"
4+
echo " tox -e py37 -- tests/test_service.py::ServiceTestCase::test_autologin"

setup.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
#
3-
# Copyright 2011-2015 Splunk, Inc.
3+
# Copyright © 2011-2024 Splunk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License"): you may
66
# not use this file except in compliance with the License. You may obtain
@@ -24,10 +24,7 @@
2424
failed = False
2525

2626
def run_test_suite():
27-
try:
28-
import unittest2 as unittest
29-
except ImportError:
30-
import unittest
27+
import unittest
3128

3229
def mark_failed():
3330
global failed

sitecustomize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
#
3-
# Copyright 2011-2015 Splunk, Inc.
3+
# Copyright © 2011-2024 Splunk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License"): you may
66
# not use this file except in compliance with the License. You may obtain

splunklib/__init__.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011-2015 Splunk, Inc.
1+
# Copyright © 2011-2024 Splunk, Inc.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"): you may
44
# not use this file except in compliance with the License. You may obtain
@@ -14,12 +14,10 @@
1414

1515
"""Python library for Splunk."""
1616

17-
from __future__ import absolute_import
18-
from splunklib.six.moves import map
1917
import logging
2018

2119
DEFAULT_LOG_FORMAT = '%(asctime)s, Level=%(levelname)s, Pid=%(process)s, Logger=%(name)s, File=%(filename)s, ' \
22-
'Line=%(lineno)s, %(message)s'
20+
'Line=%(lineno)s, %(message)s'
2321
DEFAULT_DATE_FORMAT = '%Y-%m-%d %H:%M:%S %Z'
2422

2523

@@ -31,5 +29,6 @@ def setup_logging(level, log_format=DEFAULT_LOG_FORMAT, date_format=DEFAULT_DATE
3129
format=log_format,
3230
datefmt=date_format)
3331

34-
__version_info__ = (1, 7, 2)
32+
33+
__version_info__ = (2, 0, 0)
3534
__version__ = ".".join(map(str, __version_info__))

0 commit comments

Comments
 (0)