Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Commit 5842362

Browse files
committed
Drop artefact for python2 support
Remove python2 compatible syntax in tests and remove a packaging option in `setup.cfg` (c.f. https://packaging.python.org/en/latest/guides/dropping-older-python-versions/)
1 parent d1731dd commit 5842362

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

setup.cfg

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
[bdist_wheel]
2-
# This flag says that the code is written to work on both Python 2 and Python
3-
# 3. If at all possible, it is good practice to do this. If you cannot, you
4-
# will need to generate wheels for each Python version that you support.
5-
python-tag=py3
6-
71
[mypy]
82

93
# For details on each flag, please see the mypy documentation at:

tests/tests.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@
1212
except ImportError:
1313
pass
1414

15-
try:
16-
from StringIO import StringIO # noqa
17-
except ImportError:
18-
# Python 3 Support
19-
from io import StringIO
15+
from io import StringIO
2016

2117
sys.path.append('src/python-json-logger')
2218
from pythonjsonlogger import jsonlogger
@@ -78,7 +74,6 @@ def testAddStaticFields(self):
7874
self.assertEqual(logJson["log_stream"], "kafka")
7975
self.assertEqual(logJson["message"], msg)
8076

81-
8277
def testFormatKeys(self):
8378
supported_keys = [
8479
'asctime',
@@ -258,6 +253,7 @@ def encode_complex(z):
258253
msg = self.buffer.getvalue()
259254
self.assertEqual(msg, "{\"message\": \" message\", \"special\": [3.0, 8.0]}\n")
260255

256+
261257
if __name__ == '__main__':
262258
if len(sys.argv[1:]) > 0:
263259
if sys.argv[1] == 'xml':

0 commit comments

Comments
 (0)