Skip to content
Snippets Groups Projects
Commit 3e5b761a authored by Julian Gilbey's avatar Julian Gilbey
Browse files

New upstream (forked) version; lots of debian/* cleanup as a result; use autodep8 for autopkgtests

parent 707b4ebd
No related branches found
No related tags found
No related merge requests found
python-pythonjsonlogger (3.0.0-1) unstable; urgency=medium
* Team upload
* Moved to a maintained fork of python-json-logger, with a pending
PEP 541 request to transfer the PyPI package to new maintainership
* Removed now-unnecessary Python 3.12 patch
* Use autodep8 instead of manual autopkgtest
-- Julian Gilbey <jdg@debian.org> Tue, 26 Mar 2024 20:02:12 +0000
python-pythonjsonlogger (2.0.1-4) unstable; urgency=medium
[ Debian Janitor ]
......
......@@ -4,11 +4,14 @@ Uploaders: Ondřej Kobližek <kobla@debian.org>,
Section: python
Priority: optional
Build-Depends: debhelper-compat (= 13),
dh-python,
dh-sequence-python3,
pybuild-plugin-pyproject,
python3-all,
python3-setuptools,
python3-pytest <!nocheck>,
python3-setuptools
Testsuite: autopkgtest-pkg-pybuild
Standards-Version: 4.6.2
Homepage: https://github.com/madzak/python-json-logger
Homepage: https://github.com/nhairs/python-json-logger
Vcs-Browser: https://salsa.debian.org/python-team/packages/python-pythonjsonlogger
Vcs-Git: https://salsa.debian.org/python-team/packages/python-pythonjsonlogger.git
Rules-Requires-Root: no
......@@ -19,5 +22,5 @@ Depends: ${misc:Depends},
${python3:Depends},
Description: JSON library for Python logging framework
This library is provided to allow standard Python logging to output log data
as json objects. With JSON logs are more readable by machines and there is no
need to create custom parsers for syslog type records.
as json objects. With JSON, logs are more readable by machines and there is
no need to create custom parsers for syslog type records.
......@@ -3,7 +3,7 @@ Upstream-Name: python-json-logger
Source: https://github.com/madzak/python-json-logger
Files: *
Copyright: 2011-2018 Zakaria Zajac <madzak42@gmail.com>
Copyright: 2011- Zakaria Zajac and the python-json-logger Contributors
License: BSD-2-Clause
Files: debian/*
......
Description: Repair unit testing under Python 3.12
Author: Thomas Goirand <zigo@debian.org>
Bug-Debian: https://bugs.debian.org/1058131
Forwarded: no
Last-Update: 2024-01-23
--- python-pythonjsonlogger-2.0.1.orig/tests/tests.py
+++ python-pythonjsonlogger-2.0.1/tests/tests.py
@@ -229,7 +229,10 @@ class TestJsonLogger(unittest.TestCase):
self.logger.info(" message", extra=value)
msg = self.buffer.getvalue()
- self.assertEqual(msg, "{\"message\": \" message\", \"special\": [3.0, 8.0]}\n")
+ if sys.version_info[1] < 12:
+ self.assertEqual(msg, "{\"message\": \" message\", \"special\": [3.0, 8.0]}\n")
+ else:
+ self.assertEqual(msg, "{\"message\": \" message\", \"taskName\": null, \"special\": [3.0, 8.0]}\n")
if __name__ == '__main__':
if len(sys.argv[1:]) > 0:
py3.12-repair-unit-test.patch
README.md
......@@ -3,4 +3,4 @@
export PYBUILD_NAME = pythonjsonlogger
%:
dh $@ --with python3 --buildsystem=pybuild
dh $@ --buildsystem=pybuild
Depends: python3-pythonjsonlogger
Tests: loads3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import json
import logging
from io import StringIO
from pythonjsonlogger import jsonlogger
buf = StringIO()
logger = logging.getLogger('logging-test')
logger.setLevel(logging.DEBUG)
logHandler = logging.StreamHandler(buf)
logger.addHandler(logHandler)
formatter = jsonlogger.JsonFormatter()
logHandler.setFormatter(formatter)
msg = "testing logging format"
logger.info(msg)
logJson = json.loads(buf.getvalue())
assert logJson["message"] == msg
Bug-Database: https://github.com/madzak/python-json-logger/issues
Bug-Submit: https://github.com/madzak/python-json-logger/issues/new
Repository: https://github.com/madzak/python-json-logger.git
Repository-Browse: https://github.com/madzak/python-json-logger
Bug-Database: https://github.com/nhairs/python-json-logger/issues
Bug-Submit: https://github.com/nhairs/python-json-logger/issues/new
Repository: https://github.com/nhairs/python-json-logger.git
Repository-Browse: https://github.com/nhairs/python-json-logger
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment