python-json-logger 3.2.0__tar.gz → 3.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {python_json_logger-3.2.0/src/python_json_logger.egg-info → python_json_logger-3.2.1}/PKG-INFO +4 -7
  2. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/README.md +3 -6
  3. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/pyproject.toml +1 -1
  4. {python_json_logger-3.2.0 → python_json_logger-3.2.1/src/python_json_logger.egg-info}/PKG-INFO +4 -7
  5. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/python_json_logger.egg-info/SOURCES.txt +1 -0
  6. python_json_logger-3.2.1/src/pythonjsonlogger/__init__.py +17 -0
  7. python_json_logger-3.2.1/src/pythonjsonlogger/jsonlogger.py +18 -0
  8. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/tests/test_deprecation.py +18 -1
  9. python_json_logger-3.2.0/src/pythonjsonlogger/__init__.py +0 -29
  10. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/LICENSE +0 -0
  11. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/MANIFEST.in +0 -0
  12. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/NOTICE +0 -0
  13. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/setup.cfg +0 -0
  14. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/python_json_logger.egg-info/dependency_links.txt +0 -0
  15. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/python_json_logger.egg-info/requires.txt +0 -0
  16. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/python_json_logger.egg-info/top_level.txt +0 -0
  17. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/pythonjsonlogger/core.py +0 -0
  18. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/pythonjsonlogger/defaults.py +0 -0
  19. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/pythonjsonlogger/exception.py +0 -0
  20. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/pythonjsonlogger/json.py +0 -0
  21. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/pythonjsonlogger/msgspec.py +0 -0
  22. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/pythonjsonlogger/orjson.py +0 -0
  23. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/pythonjsonlogger/py.typed +0 -0
  24. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/src/pythonjsonlogger/utils.py +0 -0
  25. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/tests/__init__.py +0 -0
  26. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/tests/test_formatters.py +0 -0
  27. {python_json_logger-3.2.0 → python_json_logger-3.2.1}/tests/test_missing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-json-logger
3
- Version: 3.2.0
3
+ Version: 3.2.1
4
4
  Summary: JSON Log Formatter for the Python Logging Package
5
5
  Author-email: Zakaria Zajac <zak@madzak.com>, Nicholas Hairs <info+python-json-logger@nicholashairs.com>
6
6
  Maintainer-email: Nicholas Hairs <info+python-json-logger@nicholashairs.com>
@@ -47,9 +47,10 @@ Requires-Dist: mkdocs-gen-files; extra == "dev"
47
47
  Requires-Dist: mkdocs-literate-nav; extra == "dev"
48
48
  Requires-Dist: mike; extra == "dev"
49
49
 
50
- <!-- [![PyPi](https://img.shields.io/pypi/v/python-json-logger.svg)](https://pypi.python.org/pypi/python-json-logger/)
50
+ [![PyPi](https://img.shields.io/pypi/v/python-json-logger.svg)](https://pypi.python.org/pypi/python-json-logger/)
51
51
  [![PyPI - Status](https://img.shields.io/pypi/status/python-json-logger)](https://pypi.python.org/pypi/python-json-logger/)
52
- [![Python Versions](https://img.shields.io/pypi/pyversions/python-json-logger.svg)](https://github.com/nhairs/python-json-logger) -->
52
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/python-json-logger)](https://pypi.python.org/pypi/python-json-logger/)
53
+ [![Python Versions](https://img.shields.io/pypi/pyversions/python-json-logger.svg)](https://github.com/nhairs/python-json-logger)
53
54
  [![License](https://img.shields.io/github/license/nhairs/python-json-logger.svg)](https://github.com/nhairs/python-json-logger)
54
55
  ![Build Status](https://github.com/nhairs/python-json-logger/actions/workflows/test-suite.yml/badge.svg)
55
56
  #
@@ -60,10 +61,6 @@ Python JSON Logger enables you produce JSON logs when using Python's `logging` p
60
61
  JSON logs are machine readable allowing for much easier parsing and ingestion into log aggregation tools.
61
62
 
62
63
 
63
- ### 🚨 Important 🚨
64
-
65
- This repository is a maintained fork of [madzak/python-json-logger](https://github.com/madzak/python-json-logger) pending [a PEP 541 request](https://github.com/pypi/support/issues/3607) for the PyPI package. The future direction of the project is being discussed [here](https://github.com/nhairs/python-json-logger/issues/1).
66
-
67
64
  ## Documentation
68
65
 
69
66
  - [Documentation](https://nhairs.github.io/python-json-logger/latest/)
@@ -1,6 +1,7 @@
1
- <!-- [![PyPi](https://img.shields.io/pypi/v/python-json-logger.svg)](https://pypi.python.org/pypi/python-json-logger/)
1
+ [![PyPi](https://img.shields.io/pypi/v/python-json-logger.svg)](https://pypi.python.org/pypi/python-json-logger/)
2
2
  [![PyPI - Status](https://img.shields.io/pypi/status/python-json-logger)](https://pypi.python.org/pypi/python-json-logger/)
3
- [![Python Versions](https://img.shields.io/pypi/pyversions/python-json-logger.svg)](https://github.com/nhairs/python-json-logger) -->
3
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/python-json-logger)](https://pypi.python.org/pypi/python-json-logger/)
4
+ [![Python Versions](https://img.shields.io/pypi/pyversions/python-json-logger.svg)](https://github.com/nhairs/python-json-logger)
4
5
  [![License](https://img.shields.io/github/license/nhairs/python-json-logger.svg)](https://github.com/nhairs/python-json-logger)
5
6
  ![Build Status](https://github.com/nhairs/python-json-logger/actions/workflows/test-suite.yml/badge.svg)
6
7
  #
@@ -11,10 +12,6 @@ Python JSON Logger enables you produce JSON logs when using Python's `logging` p
11
12
  JSON logs are machine readable allowing for much easier parsing and ingestion into log aggregation tools.
12
13
 
13
14
 
14
- ### 🚨 Important 🚨
15
-
16
- This repository is a maintained fork of [madzak/python-json-logger](https://github.com/madzak/python-json-logger) pending [a PEP 541 request](https://github.com/pypi/support/issues/3607) for the PyPI package. The future direction of the project is being discussed [here](https://github.com/nhairs/python-json-logger/issues/1).
17
-
18
15
  ## Documentation
19
16
 
20
17
  - [Documentation](https://nhairs.github.io/python-json-logger/latest/)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-json-logger"
7
- version = "3.2.0"
7
+ version = "3.2.1"
8
8
  description = "JSON Log Formatter for the Python Logging Package"
9
9
  authors = [
10
10
  {name = "Zakaria Zajac", email = "zak@madzak.com"},
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-json-logger
3
- Version: 3.2.0
3
+ Version: 3.2.1
4
4
  Summary: JSON Log Formatter for the Python Logging Package
5
5
  Author-email: Zakaria Zajac <zak@madzak.com>, Nicholas Hairs <info+python-json-logger@nicholashairs.com>
6
6
  Maintainer-email: Nicholas Hairs <info+python-json-logger@nicholashairs.com>
@@ -47,9 +47,10 @@ Requires-Dist: mkdocs-gen-files; extra == "dev"
47
47
  Requires-Dist: mkdocs-literate-nav; extra == "dev"
48
48
  Requires-Dist: mike; extra == "dev"
49
49
 
50
- <!-- [![PyPi](https://img.shields.io/pypi/v/python-json-logger.svg)](https://pypi.python.org/pypi/python-json-logger/)
50
+ [![PyPi](https://img.shields.io/pypi/v/python-json-logger.svg)](https://pypi.python.org/pypi/python-json-logger/)
51
51
  [![PyPI - Status](https://img.shields.io/pypi/status/python-json-logger)](https://pypi.python.org/pypi/python-json-logger/)
52
- [![Python Versions](https://img.shields.io/pypi/pyversions/python-json-logger.svg)](https://github.com/nhairs/python-json-logger) -->
52
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/python-json-logger)](https://pypi.python.org/pypi/python-json-logger/)
53
+ [![Python Versions](https://img.shields.io/pypi/pyversions/python-json-logger.svg)](https://github.com/nhairs/python-json-logger)
53
54
  [![License](https://img.shields.io/github/license/nhairs/python-json-logger.svg)](https://github.com/nhairs/python-json-logger)
54
55
  ![Build Status](https://github.com/nhairs/python-json-logger/actions/workflows/test-suite.yml/badge.svg)
55
56
  #
@@ -60,10 +61,6 @@ Python JSON Logger enables you produce JSON logs when using Python's `logging` p
60
61
  JSON logs are machine readable allowing for much easier parsing and ingestion into log aggregation tools.
61
62
 
62
63
 
63
- ### 🚨 Important 🚨
64
-
65
- This repository is a maintained fork of [madzak/python-json-logger](https://github.com/madzak/python-json-logger) pending [a PEP 541 request](https://github.com/pypi/support/issues/3607) for the PyPI package. The future direction of the project is being discussed [here](https://github.com/nhairs/python-json-logger/issues/1).
66
-
67
64
  ## Documentation
68
65
 
69
66
  - [Documentation](https://nhairs.github.io/python-json-logger/latest/)
@@ -13,6 +13,7 @@ src/pythonjsonlogger/core.py
13
13
  src/pythonjsonlogger/defaults.py
14
14
  src/pythonjsonlogger/exception.py
15
15
  src/pythonjsonlogger/json.py
16
+ src/pythonjsonlogger/jsonlogger.py
16
17
  src/pythonjsonlogger/msgspec.py
17
18
  src/pythonjsonlogger/orjson.py
18
19
  src/pythonjsonlogger/py.typed
@@ -0,0 +1,17 @@
1
+ ### IMPORTS
2
+ ### ============================================================================
3
+ ## Future
4
+
5
+ ## Standard Library
6
+ import warnings
7
+
8
+ ## Installed
9
+
10
+ ## Application
11
+ from . import json
12
+ from . import utils
13
+
14
+ ### CONSTANTS
15
+ ### ============================================================================
16
+ ORJSON_AVAILABLE = utils.package_is_available("orjson")
17
+ MSGSPEC_AVAILABLE = utils.package_is_available("msgspec")
@@ -0,0 +1,18 @@
1
+ """Stub module retained for compatibility.
2
+
3
+ It retains access to old names whilst sending deprecation warnings.
4
+ """
5
+
6
+ # pylint: disable=wrong-import-position,unused-import
7
+
8
+ import warnings
9
+
10
+ ## Throw warning
11
+ warnings.warn(
12
+ "pythonjsonlogger.jsonlogger has been moved to pythonjsonlogger.json",
13
+ DeprecationWarning,
14
+ )
15
+
16
+ ## Import names
17
+ from .json import JsonFormatter, JsonEncoder
18
+ from .core import RESERVED_ATTRS
@@ -4,6 +4,8 @@
4
4
  from __future__ import annotations
5
5
 
6
6
  ## Standard Library
7
+ import subprocess
8
+ import sys
7
9
 
8
10
  ## Installed
9
11
  import pytest
@@ -16,7 +18,7 @@ import pythonjsonlogger
16
18
  ### ============================================================================
17
19
  def test_jsonlogger_deprecated():
18
20
  with pytest.deprecated_call():
19
- pythonjsonlogger.jsonlogger
21
+ import pythonjsonlogger.jsonlogger
20
22
  return
21
23
 
22
24
 
@@ -26,3 +28,18 @@ def test_jsonlogger_reserved_attrs_deprecated():
26
28
  # a DeprecationWarning and we specifically want the one for RESERVED_ATTRS
27
29
  pythonjsonlogger.json.RESERVED_ATTRS
28
30
  return
31
+
32
+
33
+ @pytest.mark.parametrize(
34
+ "command",
35
+ [
36
+ "from pythonjsonlogger import jsonlogger",
37
+ "import pythonjsonlogger.jsonlogger",
38
+ "from pythonjsonlogger.jsonlogger import JsonFormatter",
39
+ "from pythonjsonlogger.jsonlogger import RESERVED_ATTRS",
40
+ ],
41
+ )
42
+ def test_import(command: str):
43
+ output = subprocess.check_output([sys.executable, "-c", f"{command};print('OK')"])
44
+ assert output.strip() == b"OK"
45
+ return
@@ -1,29 +0,0 @@
1
- ### IMPORTS
2
- ### ============================================================================
3
- ## Future
4
-
5
- ## Standard Library
6
- import warnings
7
-
8
- ## Installed
9
-
10
- ## Application
11
- import pythonjsonlogger.json
12
- import pythonjsonlogger.utils
13
-
14
- ### CONSTANTS
15
- ### ============================================================================
16
- ORJSON_AVAILABLE = pythonjsonlogger.utils.package_is_available("orjson")
17
- MSGSPEC_AVAILABLE = pythonjsonlogger.utils.package_is_available("msgspec")
18
-
19
-
20
- ### DEPRECATED COMPATIBILITY
21
- ### ============================================================================
22
- def __getattr__(name: str):
23
- if name == "jsonlogger":
24
- warnings.warn(
25
- "pythonjsonlogger.jsonlogger has been moved to pythonjsonlogger.json",
26
- DeprecationWarning,
27
- )
28
- return pythonjsonlogger.json
29
- raise AttributeError(f"module {__name__} has no attribute {name}")