log21 3.0.0__tar.gz → 3.0.2__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.
- {log21-3.0.0 → log21-3.0.2}/PKG-INFO +51 -70
- {log21-3.0.0 → log21-3.0.2}/README.md +50 -69
- {log21-3.0.0 → log21-3.0.2}/pyproject.toml +1 -1
- {log21-3.0.0 → log21-3.0.2}/src/log21/__init__.py +1 -1
- {log21-3.0.0 → log21-3.0.2}/src/log21/argumentify.py +3 -5
- {log21-3.0.0 → log21-3.0.2}/src/log21/_argparse.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/_module_helper.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/argparse.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/colors.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/crash_reporter/__init__.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/crash_reporter/formatters.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/crash_reporter/reporters.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/file_handler.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/formatters.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/levels.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/logger.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/logging_window.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/manager.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/pprint.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/progress_bar.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/stream_handler.py +0 -0
- {log21-3.0.0 → log21-3.0.2}/src/log21/tree_print.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: log21
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.2
|
|
4
4
|
Summary: A simple logging package
|
|
5
5
|
Keywords: python,log,colorize,color,logging,Python3,CodeWriter21
|
|
6
6
|
Author: CodeWriter21(Mehrad Pooryoussof)
|
|
@@ -94,75 +94,56 @@ pip install git+https://github.com/MPCodeWriter21/log21
|
|
|
94
94
|
Changelog
|
|
95
95
|
---------
|
|
96
96
|
|
|
97
|
-
### v3.0.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
+ Resolved errors occurring in environments with newer versions of argparse.
|
|
148
|
-
|
|
149
|
-
#### Internal and Maintenance Changes
|
|
150
|
-
|
|
151
|
-
+ Migrated the build system configuration to `uv`.
|
|
152
|
-
+ Updated Python version classifiers and set the supported Python version to 3.9+.
|
|
153
|
-
+ Added `vermin` to the pre-commit configuration.
|
|
154
|
-
+ Updated `.gitignore`, license metadata, and tool configurations.
|
|
155
|
-
+ Silenced and resolved a large number of linter warnings.
|
|
156
|
-
+ General internal refactoring with no intended user-visible behavioral changes.
|
|
157
|
-
|
|
158
|
-
#### Notes
|
|
159
|
-
|
|
160
|
-
+ There are **no intentional behavioral changes** in logging output, argument parsing
|
|
161
|
-
logic, or UI components.
|
|
162
|
-
+ Most projects will require **minimal or no changes** unless they depend on internal
|
|
163
|
-
modules or renamed exceptions.
|
|
164
|
-
+ See [MIGRATION-V2-V3.md](https://github.com/MPCodeWriter21/log21/blob/master/MIGRATION-V2-V3.md)
|
|
165
|
-
for detailed upgrade instructions.
|
|
97
|
+
### v3.0.2
|
|
98
|
+
|
|
99
|
+
Change `argumentify` to use the whole function description as the argument-parser
|
|
100
|
+
description instead of the one-line short description.
|
|
101
|
+
|
|
102
|
+
+ Example:
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
def main(verbose: bool = False) -> None:
|
|
106
|
+
"""This is a very useful tool and I will describe it thoroughly. It is so good that
|
|
107
|
+
we have a second line in the first part of the description.
|
|
108
|
+
|
|
109
|
+
And now we can talk more about the tool...
|
|
110
|
+
|
|
111
|
+
:param verbose: This flag will make the logs more verbose!
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
argumentify(main)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The way old versions would look:
|
|
118
|
+
|
|
119
|
+
```help
|
|
120
|
+
usage: test.py [-h] [--verbose]
|
|
121
|
+
|
|
122
|
+
This is a very useful tool and I will describe it thoroughly. It is so good that
|
|
123
|
+
|
|
124
|
+
options:
|
|
125
|
+
-h, --help
|
|
126
|
+
show this help message and exit
|
|
127
|
+
--verbose, -v
|
|
128
|
+
This flag will make the logs more verbose!
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Now at v3.0.2:
|
|
133
|
+
|
|
134
|
+
```help
|
|
135
|
+
usage: test.py [-h] [--verbose]
|
|
136
|
+
|
|
137
|
+
This is a very useful tool and I will describe it thoroughly. It is so good that we have a
|
|
138
|
+
second line in the first part of the description. And now we can talk more about the tool...
|
|
139
|
+
|
|
140
|
+
options:
|
|
141
|
+
-h, --help
|
|
142
|
+
show this help message and exit
|
|
143
|
+
--verbose, -v
|
|
144
|
+
This flag will make the logs more verbose!
|
|
145
|
+
|
|
146
|
+
```
|
|
166
147
|
|
|
167
148
|
[Full CHANGELOG](https://github.com/MPCodeWriter21/log21/blob/master/CHANGELOG.md)
|
|
168
149
|
|
|
@@ -69,75 +69,56 @@ pip install git+https://github.com/MPCodeWriter21/log21
|
|
|
69
69
|
Changelog
|
|
70
70
|
---------
|
|
71
71
|
|
|
72
|
-
### v3.0.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
+ Resolved errors occurring in environments with newer versions of argparse.
|
|
123
|
-
|
|
124
|
-
#### Internal and Maintenance Changes
|
|
125
|
-
|
|
126
|
-
+ Migrated the build system configuration to `uv`.
|
|
127
|
-
+ Updated Python version classifiers and set the supported Python version to 3.9+.
|
|
128
|
-
+ Added `vermin` to the pre-commit configuration.
|
|
129
|
-
+ Updated `.gitignore`, license metadata, and tool configurations.
|
|
130
|
-
+ Silenced and resolved a large number of linter warnings.
|
|
131
|
-
+ General internal refactoring with no intended user-visible behavioral changes.
|
|
132
|
-
|
|
133
|
-
#### Notes
|
|
134
|
-
|
|
135
|
-
+ There are **no intentional behavioral changes** in logging output, argument parsing
|
|
136
|
-
logic, or UI components.
|
|
137
|
-
+ Most projects will require **minimal or no changes** unless they depend on internal
|
|
138
|
-
modules or renamed exceptions.
|
|
139
|
-
+ See [MIGRATION-V2-V3.md](https://github.com/MPCodeWriter21/log21/blob/master/MIGRATION-V2-V3.md)
|
|
140
|
-
for detailed upgrade instructions.
|
|
72
|
+
### v3.0.2
|
|
73
|
+
|
|
74
|
+
Change `argumentify` to use the whole function description as the argument-parser
|
|
75
|
+
description instead of the one-line short description.
|
|
76
|
+
|
|
77
|
+
+ Example:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
def main(verbose: bool = False) -> None:
|
|
81
|
+
"""This is a very useful tool and I will describe it thoroughly. It is so good that
|
|
82
|
+
we have a second line in the first part of the description.
|
|
83
|
+
|
|
84
|
+
And now we can talk more about the tool...
|
|
85
|
+
|
|
86
|
+
:param verbose: This flag will make the logs more verbose!
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
argumentify(main)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The way old versions would look:
|
|
93
|
+
|
|
94
|
+
```help
|
|
95
|
+
usage: test.py [-h] [--verbose]
|
|
96
|
+
|
|
97
|
+
This is a very useful tool and I will describe it thoroughly. It is so good that
|
|
98
|
+
|
|
99
|
+
options:
|
|
100
|
+
-h, --help
|
|
101
|
+
show this help message and exit
|
|
102
|
+
--verbose, -v
|
|
103
|
+
This flag will make the logs more verbose!
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Now at v3.0.2:
|
|
108
|
+
|
|
109
|
+
```help
|
|
110
|
+
usage: test.py [-h] [--verbose]
|
|
111
|
+
|
|
112
|
+
This is a very useful tool and I will describe it thoroughly. It is so good that we have a
|
|
113
|
+
second line in the first part of the description. And now we can talk more about the tool...
|
|
114
|
+
|
|
115
|
+
options:
|
|
116
|
+
-h, --help
|
|
117
|
+
show this help message and exit
|
|
118
|
+
--verbose, -v
|
|
119
|
+
This flag will make the logs more verbose!
|
|
120
|
+
|
|
121
|
+
```
|
|
141
122
|
|
|
142
123
|
[Full CHANGELOG](https://github.com/MPCodeWriter21/log21/blob/master/CHANGELOG.md)
|
|
143
124
|
|
|
@@ -31,7 +31,7 @@ from .stream_handler import StreamHandler, ColorizingStreamHandler
|
|
|
31
31
|
# yapf: enable
|
|
32
32
|
|
|
33
33
|
__author__ = 'CodeWriter21 (Mehrad Pooryoussof)'
|
|
34
|
-
__version__ = '3.0.
|
|
34
|
+
__version__ = '3.0.2'
|
|
35
35
|
__github__ = 'https://GitHub.com/MPCodeWriter21/log21'
|
|
36
36
|
__all__ = [
|
|
37
37
|
'ColorizingStreamHandler', 'DecolorizingFileHandler', 'ColorizingFormatter',
|
|
@@ -359,7 +359,7 @@ def _add_arguments(
|
|
|
359
359
|
config['required'] = True
|
|
360
360
|
if argument.kind == _inspect._ParameterKind.VAR_POSITIONAL:
|
|
361
361
|
config['nargs'] = '*'
|
|
362
|
-
if argument.default:
|
|
362
|
+
if argument.default is not None:
|
|
363
363
|
config['default'] = argument.default
|
|
364
364
|
parser.add_argument(
|
|
365
365
|
*generate_flag(argument, reserved_flags=reserved_flags), **config
|
|
@@ -384,9 +384,7 @@ def _argumentify_one(func: Callable) -> None:
|
|
|
384
384
|
)
|
|
385
385
|
|
|
386
386
|
# Create the parser
|
|
387
|
-
parser = _argparse.ColorizingArgumentParser(
|
|
388
|
-
description=info.docstring.short_description
|
|
389
|
-
)
|
|
387
|
+
parser = _argparse.ColorizingArgumentParser(description=info.docstring.description)
|
|
390
388
|
# Add the arguments
|
|
391
389
|
_add_arguments(parser, info)
|
|
392
390
|
cli_args = parser.parse_args()
|
|
@@ -432,7 +430,7 @@ def _argumentify(functions: _Dict[str, Callable]) -> None:
|
|
|
432
430
|
parser = _argparse.ColorizingArgumentParser()
|
|
433
431
|
subparsers = parser.add_subparsers(required=True)
|
|
434
432
|
for name, (_, info) in functions_info.items():
|
|
435
|
-
subparser = subparsers.add_parser(name, help=info.docstring.
|
|
433
|
+
subparser = subparsers.add_parser(name, help=info.docstring.description)
|
|
436
434
|
_add_arguments(subparser, info)
|
|
437
435
|
subparser.set_defaults(func=info.function)
|
|
438
436
|
cli_args = parser.parse_args()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|