Skip to content

Commit ace80f4

Browse files
authored
Merge pull request #173 from arcivanov/unpin_msgpack
Unpin msgpack version
2 parents d1b81ba + 0568a26 commit ace80f4

File tree

7 files changed

+20
-35
lines changed

7 files changed

+20
-35
lines changed

.travis.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
sudo: false
22
language: python
33
python:
4-
- "2.7"
5-
- "3.4"
64
- "3.5"
75
- "3.6"
86
- "3.7"
97
- "3.8"
10-
- pypy
8+
- "3.9"
119
- pypy3
1210
- nightly
1311
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
@@ -27,7 +25,7 @@ deploy:
2725
secure: CpNaj4F3TZvpP1aSJWidh/XexrWODV2sBdObrYU79Gyh9hFl6WLsA3JM9BfVsy9cGb/P/jP6ly4Z0/6qdIzZ5D6FPOB1B7rn5GZ2LAMOypRCA6W2uJbRjUU373Wut0p0OmQcMPto6XJsMlpvOEq+1uAq+LLAnAGEmmYTeskZebs=
2826
on:
2927
tags: true
30-
condition: '"$TRAVIS_PYTHON_VERSION" = "3.8" || "$TRAVIS_PYTHON_VERSION" = "2.7"'
28+
condition: '"$TRAVIS_PYTHON_VERSION" = "3.9" || "$TRAVIS_PYTHON_VERSION" = "2.7"'
3129
distributions: "sdist bdist_wheel"
3230

3331
matrix:

README.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ Python application.
2424
Requirements
2525
------------
2626

27-
- Python 2.7 or 3.4+
28-
- ``msgpack-python``
27+
- Python 3.5+
28+
- ``msgpack``
2929
- **IMPORTANT**: Version 0.8.0 is the last version supporting Python 2.6, 3.2 and 3.3
30+
- **IMPORTANT**: Version 0.9.6 is the last version supporting Python 2.7 and 3.4
3031

3132
Installation
3233
------------

fluent/asyncsender.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
from __future__ import print_function
4-
53
import threading
6-
7-
try:
8-
from queue import Queue, Full, Empty
9-
except ImportError:
10-
from Queue import Queue, Full, Empty
4+
from queue import Queue, Full, Empty
115

126
from fluent import sender
137
from fluent.sender import EventTime
@@ -121,8 +115,8 @@ def _send(self, bytes_):
121115
self._queue_overflow_handler(discarded_bytes)
122116
try:
123117
self._queue.put(bytes_, block=(not self._queue_circular))
124-
except Full: # pragma: no cover
125-
return False # this actually can't happen
118+
except Full: # pragma: no cover
119+
return False # this actually can't happen
126120

127121
return True
128122

fluent/handler.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99
except ImportError: # pragma: no cover
1010
import json
1111

12-
try:
13-
basestring
14-
except NameError: # pragma: no cover
15-
basestring = (str, bytes)
16-
1712
from fluent import sender
1813

1914

@@ -120,7 +115,7 @@ def _structuring(self, data, record):
120115

121116
if isinstance(msg, dict):
122117
self._add_dic(data, msg)
123-
elif isinstance(msg, basestring):
118+
elif isinstance(msg, str):
124119
self._add_dic(data, self._format_msg(record, msg))
125120
else:
126121
self._add_dic(data, {'message': msg})
@@ -171,8 +166,8 @@ def _format_by_dict_uses_time(self):
171166
@staticmethod
172167
def _add_dic(data, dic):
173168
for key, value in dic.items():
174-
if isinstance(key, basestring):
175-
data[str(key)] = value
169+
if isinstance(key, str):
170+
data[key] = value
176171

177172

178173
class FluentHandler(logging.Handler):

fluent/sender.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
from __future__ import print_function
4-
53
import errno
64
import socket
75
import struct

setup.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,32 @@
1212

1313
setup(
1414
name='fluent-logger',
15-
version='0.9.6',
15+
version='0.10.0',
1616
description=desc,
1717
long_description=open(README).read(),
1818
package_dir={'fluent': 'fluent'},
1919
packages=['fluent'],
20-
install_requires=['msgpack<1.0.0'],
20+
install_requires=['msgpack>1.0'],
2121
author='Kazuki Ohta',
2222
author_email='[email protected]',
23+
maintainer='Arcadiy Ivanov',
24+
maintainer_email='[email protected]',
2325
url='https://github.com/fluent/fluent-logger-python',
24-
download_url='http://pypi.python.org/pypi/fluent-logger/',
26+
download_url='https://pypi.org/project/fluent-logger/',
2527
license='Apache License, Version 2.0',
2628
classifiers=[
27-
'Programming Language :: Python :: 2',
28-
'Programming Language :: Python :: 2.7',
2929
'Programming Language :: Python :: 3',
30-
'Programming Language :: Python :: 3.4',
3130
'Programming Language :: Python :: 3.5',
3231
'Programming Language :: Python :: 3.6',
3332
'Programming Language :: Python :: 3.7',
33+
'Programming Language :: Python :: 3.8',
34+
'Programming Language :: Python :: 3.9',
3435
'Programming Language :: Python :: Implementation :: CPython',
3536
'Programming Language :: Python :: Implementation :: PyPy',
3637
'Development Status :: 5 - Production/Stable',
3738
'Topic :: System :: Logging',
3839
'Intended Audience :: Developers',
3940
],
40-
python_requires=">=2.7,!=3.0,!=3.1,!=3.2,!=3.3",
41+
python_requires='>=3.5',
4142
test_suite='tests'
4243
)

tests/mockserver.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ def run(self):
6666
def get_received(self):
6767
self.join()
6868
self._buf.seek(0)
69-
# TODO: have to process string encoding properly. currently we assume
70-
# that all encoding is utf-8.
71-
return list(Unpacker(self._buf, encoding='utf-8'))
69+
return list(Unpacker(self._buf))
7270

7371
def close(self):
7472

0 commit comments

Comments
 (0)