Skip to content

Commit 71c6920

Browse files
committed
Migrate to setuptools since distutils is deprecated #26
Code that imports distutils will no longer work from Python 3.12, see https://www.python.org/dev/peps/pep-0632/#backwards-compatibility.
1 parent a66df69 commit 71c6920

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

json_log_formatter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def to_json(self, record):
8787
# ujson doesn't support default argument and raises TypeError.
8888
# "ValueError: Circular reference detected" is raised
8989
# when there is a reference to object inside the object itself.
90-
except (TypeError, ValueError):
90+
except (TypeError, ValueError, OverflowError):
9191
try:
9292
return self.json_lib.dumps(record)
9393
except (TypeError, ValueError, OverflowError):

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from distutils.core import setup
1+
from setuptools import setup
22

33
setup(
44
name='JSON-log-formatter',
5-
version='0.5.0',
5+
version='0.5.1',
66
license='MIT',
77
packages=['json_log_formatter'],
88
author='Marsel Mavletkulov',

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist=py27,py35,py36,py37,py38
2+
envlist=py27,py35,py36,py37,py38,py39,py310
33

44
[testenv]
55
deps=

0 commit comments

Comments
 (0)