Skip to content

Commit 6899980

Browse files
committed
Release 1.6.3
* release/1.6.3: (41 commits) Update changelog Update version number Using string_types for python3 compatibility. Using basestring instead of str so that unicode values are also accepted. Remove Python 2.6 from CI removed comments drop support for python 2.6 fix test_service authentication tests fix test_service authentication tests fix test_service tests update server cert file fix test failures update splunk version to 6.6 and 7.0 update travis.yml update travis splunk version to 6.6 and 7.0 Added carry returns back to sum.map.output One more fix Fix last two unit tests distrubuted commands are streaming Strip new line chars to normalize different line separators ...
2 parents f32374a + 0608952 commit 6899980

File tree

130 files changed

+3130
-1928
lines changed

Some content is hidden

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

130 files changed

+3130
-1928
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ before_install:
3030
- mkdir -p $SPLUNK_HOME/var/log/splunk
3131

3232
env:
33-
- SPLUNK_VERSION=6.2.6-sdk
34-
- SPLUNK_VERSION=6.3.1-sdk
33+
- SPLUNK_VERSION=6.6-sdk
34+
- SPLUNK_VERSION=7.0-sdk
3535

3636
language: python
3737

3838
python:
3939
- "2.7"
40-
- "2.6"
40+
- "3.5"
4141

4242
install: "pip install unittest2"
4343

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Splunk SDK for Python Changelog
22

3+
## Version 1.6.3
4+
5+
### New features and APIs
6+
7+
* Support for Python 3.x has been added for external integrations with the Splunk platform. However, because Splunk Enterprise 7+ still includes Python 2.7.x, any apps or scripts that run on the Splunk platform must continue to be written for Python 2.7.x.
8+
9+
### Bug fixes
10+
11+
The following bugs have been fixed:
12+
13+
* Search commands error - `ERROR ChunkedExternProcessor - Invalid custom search command type: eventing`.
14+
15+
* Search commands running more than once for certain cases.
16+
17+
* Search command protocol v2 inverting the `distributed` configuration flag.
18+
319
## Version 1.6.2
420

521
### Minor changes
@@ -558,3 +574,4 @@ API reference under the section on accessing Splunk resources at:
558574
## 0.1.0 (preview)
559575

560576
* Initial Python SDK release
577+

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Build Status](https://travis-ci.org/splunk/splunk-sdk-python.svg?branch=master)](https://travis-ci.org/splunk/splunk-sdk-python)
22
# The Splunk Software Development Kit for Python
33

4-
#### Version 1.6.2
4+
#### Version 1.6.3
55

66
The Splunk Software Development Kit (SDK) for Python contains library code and
77
examples designed to enable developers to build applications using Splunk.
@@ -36,7 +36,7 @@ Here's what you need to get going with the Splunk SDK for Python.
3636

3737
#### Python
3838

39-
The Splunk SDK for Python requires Python 2.6+.
39+
The Splunk SDK for Python requires Python 2.7+.
4040

4141
#### Splunk
4242

@@ -168,9 +168,7 @@ prompt in the **/splunk-sdk-python/tests** subdirectory and enter:
168168
python test_app.py
169169

170170
The test suite uses Python's standard library and the built-in `unittest`
171-
library. If you're using Python 2.7, you're all set. However, if you are using
172-
Python 2.6, you'll also need to install the `unittest2` library to
173-
get the additional features that were added to Python 2.7.
171+
library.
174172

175173
You can read more about our testing framework on
176174
[GitHub](https://github.com/splunk/splunk-sdk-python/tree/master/tests).
@@ -315,7 +313,3 @@ You can reach the Developer Platform team at [email protected]_.
315313
The Splunk Software Development Kit for Python is licensed under the Apache
316314
License 2.0. Details can be found in the file LICENSE.
317315

318-
For compatibility with Python 2.6, The Splunk Software Development Kit
319-
for Python ships with ordereddict.py from the ordereddict package on
320-
[PyPI](http://pypi.python.org/pypi/ordereddict/1.1), which is licensed
321-
under the MIT license (see the top of splunklib/ordereddict.py).

examples/abc/a.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
"""Retrieves a list of installed apps from Splunk by making REST API calls
1616
using Python's httplib module."""
1717

18-
import httplib
18+
from __future__ import absolute_import
19+
from __future__ import print_function
20+
import splunklib.six.moves.http_client
1921
import urllib
2022
from xml.etree import ElementTree
2123

@@ -25,7 +27,7 @@
2527
PASSWORD = "changeme"
2628

2729
# Present credentials to Splunk and retrieve the session key
28-
connection = httplib.HTTPSConnection(HOST, PORT)
30+
connection = six.moves.http_client.HTTPSConnection(HOST, PORT)
2931
body = urllib.urlencode({'username': USERNAME, 'password': PASSWORD})
3032
headers = {
3133
'Content-Type': "application/x-www-form-urlencoded",
@@ -40,12 +42,12 @@
4042
finally:
4143
connection.close()
4244
if response.status != 200:
43-
raise Exception, "%d (%s)" % (response.status, response.reason)
45+
raise Exception("%d (%s)" % (response.status, response.reason))
4446
body = response.read()
4547
sessionKey = ElementTree.XML(body).findtext("./sessionKey")
4648

4749
# Now make the request to Splunk for list of installed apps
48-
connection = httplib.HTTPSConnection(HOST, PORT)
50+
connection = six.moves.http_client.HTTPSConnection(HOST, PORT)
4951
headers = {
5052
'Content-Length': "0",
5153
'Host': HOST,
@@ -59,10 +61,10 @@
5961
finally:
6062
connection.close()
6163
if response.status != 200:
62-
raise Exception, "%d (%s)" % (response.status, response.reason)
64+
raise Exception("%d (%s)" % (response.status, response.reason))
6365

6466
body = response.read()
6567
data = ElementTree.XML(body)
6668
apps = data.findall("{http://www.w3.org/2005/Atom}entry/{http://www.w3.org/2005/Atom}title")
6769
for app in apps:
68-
print app.text
70+
print(app.text)

examples/abc/b.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
"""Retrieves a list of installed apps from Splunk using the binding module."""
1616

17+
from __future__ import absolute_import
18+
from __future__ import print_function
1719
import sys, os
1820
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
1921

@@ -34,11 +36,11 @@
3436

3537
response = context.get('apps/local')
3638
if response.status != 200:
37-
raise Exception, "%d (%s)" % (response.status, response.reason)
39+
raise Exception("%d (%s)" % (response.status, response.reason))
3840

3941
body = response.body.read()
4042
data = ElementTree.XML(body)
4143
apps = data.findall("{http://www.w3.org/2005/Atom}entry/{http://www.w3.org/2005/Atom}title")
4244
for app in apps:
43-
print app.text
45+
print(app.text)
4446

examples/abc/c.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# under the License.
1414

1515
"""Retrieves a list of installed apps from Splunk using the client module."""
16+
from __future__ import absolute_import
17+
from __future__ import print_function
1618
import sys, os
1719
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
1820

@@ -30,4 +32,4 @@
3032
password=PASSWORD)
3133

3234
for app in service.apps:
33-
print app.name
35+
print(app.name)

examples/analytics/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
# License for the specific language governing permissions and limitations
1515
# under the License.
1616

17-
import input
18-
import output
17+
from __future__ import absolute_import
18+
from . import input
19+
from . import output

0 commit comments

Comments
 (0)