Skip to content

Commit

Permalink
Release 1.6.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ljiang1 committed Sep 21, 2019
2 parents 07278fa + e168d65 commit cd268aa
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Splunk SDK for Python Changelog

## Version 1.6.9

### Bug Fix

* Fix buffered input in python 3

## Version 1.6.8

### Bug Fix
Expand Down
2 changes: 1 addition & 1 deletion examples/searchcommands_app/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def run(self):
setup(
description='Custom Search Command examples',
name=os.path.basename(project_dir),
version='1.6.8',
version='1.6.9',
author='Splunk, Inc.',
author_email='devinfo@splunk.com',
url='http://github.com/splunk/splunk-sdk-python',
Expand Down
2 changes: 1 addition & 1 deletion splunklib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@

from __future__ import absolute_import
from splunklib.six.moves import map
__version_info__ = (1, 6, 8)
__version_info__ = (1, 6, 9)
__version__ = ".".join(map(str, __version_info__))
2 changes: 1 addition & 1 deletion splunklib/binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ def request(url, message, **kwargs):
head = {
"Content-Length": str(len(body)),
"Host": host,
"User-Agent": "splunk-sdk-python/1.6.6",
"User-Agent": "splunk-sdk-python/1.6.9",
"Accept": "*/*",
"Connection": "Close",
} # defaults
Expand Down
4 changes: 0 additions & 4 deletions splunklib/searchcommands/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,6 @@ def read(self, ifile):
name, value = None, None

for line in ifile:
# SPL-175233 -- input is buffered, needs to be decoded
if sys.version_info >= (3, 0):
line = line.decode()

if line == '\n':
break
item = line.split(':', 1)
Expand Down
7 changes: 1 addition & 6 deletions splunklib/searchcommands/search_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,13 +1054,8 @@ def iteritems(self):
SearchMetric = namedtuple('SearchMetric', ('elapsed_seconds', 'invocation_count', 'input_count', 'output_count'))


# SPL-175233, set default stdin to be buffered
if sys.version_info >= (3, 0) and sys.platform == 'win32':
stdinput = sys.stdin.buffer
else:
stdinput = sys.stdin

def dispatch(command_class, argv=sys.argv, input_file=stdinput, output_file=sys.stdout, module_name=None):
def dispatch(command_class, argv=sys.argv, input_file=sys.stdin, output_file=sys.stdout, module_name=None):
""" Instantiates and executes a search command class
This function implements a `conditional script stanza <https://docs.python.org/2/library/__main__.html>`_ based on the value of
Expand Down

0 comments on commit cd268aa

Please sign in to comment.