pythonLogs 4.0.6__tar.gz → 5.0.0__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.
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/PKG-INFO +19 -17
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/README.md +17 -13
- pythonlogs-5.0.0/build.py +71 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pyproject.toml +9 -5
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/__init__.py +1 -1
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/LICENSE +0 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/.env.example +0 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/basic_log.py +0 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/constants.py +0 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/factory.py +0 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/log_utils.py +0 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/memory_utils.py +0 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/settings.py +0 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/size_rotating.py +0 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/thread_safety.py +0 -0
- {pythonlogs-4.0.6 → pythonlogs-5.0.0}/pythonLogs/timed_rotating.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pythonLogs
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.0
|
|
4
4
|
Summary: High-performance Python logging library with file rotation and optimized caching for better performance
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: python3,python-3,python,log,logging,logger,logutils,log-utils,pythonLogs
|
|
7
7
|
Author: Daniel Costa
|
|
8
8
|
Author-email: danieldcsta@gmail.com
|
|
9
9
|
Maintainer: Daniel Costa
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.12,<4.0
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Environment :: Other Environment
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
@@ -15,8 +15,6 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
15
15
|
Classifier: Natural Language :: English
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
20
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
@@ -59,10 +57,12 @@ High-performance Python logging library with file rotation and optimized caching
|
|
|
59
57
|
- [Memory Management](#memory-management)
|
|
60
58
|
- [Flexible Configuration Options](#flexible-configuration-options)
|
|
61
59
|
- [Migration Guide](#migration-guide)
|
|
62
|
-
- [Development](#
|
|
63
|
-
- [
|
|
60
|
+
- [Development](#development)
|
|
61
|
+
- [Development](#development)
|
|
62
|
+
- [Building from Source](#building-from-source)
|
|
63
|
+
- [Running Tests](#running-tests)
|
|
64
64
|
- [License](#license)
|
|
65
|
-
- [
|
|
65
|
+
- [Support](#support)
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
@@ -549,26 +549,28 @@ timed_logger = timed_rotating_logger(level=LogLevel.WARNING, name="app", directo
|
|
|
549
549
|
- 📚 **Centralized configuration** through factory pattern
|
|
550
550
|
|
|
551
551
|
|
|
552
|
-
#
|
|
553
|
-
|
|
552
|
+
# Development
|
|
553
|
+
|
|
554
|
+
### Building from Source
|
|
554
555
|
```shell
|
|
555
556
|
poetry build -f wheel
|
|
556
557
|
```
|
|
557
558
|
|
|
558
|
-
|
|
559
|
-
# Run Tests and Get Coverage Report using Poe
|
|
559
|
+
### Running Tests
|
|
560
560
|
```shell
|
|
561
561
|
poetry update --with test
|
|
562
|
-
poe
|
|
562
|
+
poe tests
|
|
563
563
|
```
|
|
564
564
|
|
|
565
|
-
|
|
566
565
|
# License
|
|
566
|
+
|
|
567
567
|
Released under the [MIT License](LICENSE)
|
|
568
568
|
|
|
569
|
+
# Support
|
|
570
|
+
|
|
571
|
+
If you find this project helpful, consider supporting development:
|
|
569
572
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
+ [Paypal](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)
|
|
573
|
+
- [GitHub Sponsor](https://github.com/sponsors/ddc)
|
|
574
|
+
- [ko-fi](https://ko-fi.com/ddcsta)
|
|
575
|
+
- [PayPal](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)
|
|
574
576
|
|
|
@@ -30,10 +30,12 @@ High-performance Python logging library with file rotation and optimized caching
|
|
|
30
30
|
- [Memory Management](#memory-management)
|
|
31
31
|
- [Flexible Configuration Options](#flexible-configuration-options)
|
|
32
32
|
- [Migration Guide](#migration-guide)
|
|
33
|
-
- [Development](#
|
|
34
|
-
- [
|
|
33
|
+
- [Development](#development)
|
|
34
|
+
- [Development](#development)
|
|
35
|
+
- [Building from Source](#building-from-source)
|
|
36
|
+
- [Running Tests](#running-tests)
|
|
35
37
|
- [License](#license)
|
|
36
|
-
- [
|
|
38
|
+
- [Support](#support)
|
|
37
39
|
|
|
38
40
|
|
|
39
41
|
|
|
@@ -520,25 +522,27 @@ timed_logger = timed_rotating_logger(level=LogLevel.WARNING, name="app", directo
|
|
|
520
522
|
- 📚 **Centralized configuration** through factory pattern
|
|
521
523
|
|
|
522
524
|
|
|
523
|
-
#
|
|
524
|
-
|
|
525
|
+
# Development
|
|
526
|
+
|
|
527
|
+
### Building from Source
|
|
525
528
|
```shell
|
|
526
529
|
poetry build -f wheel
|
|
527
530
|
```
|
|
528
531
|
|
|
529
|
-
|
|
530
|
-
# Run Tests and Get Coverage Report using Poe
|
|
532
|
+
### Running Tests
|
|
531
533
|
```shell
|
|
532
534
|
poetry update --with test
|
|
533
|
-
poe
|
|
535
|
+
poe tests
|
|
534
536
|
```
|
|
535
537
|
|
|
536
|
-
|
|
537
538
|
# License
|
|
539
|
+
|
|
538
540
|
Released under the [MIT License](LICENSE)
|
|
539
541
|
|
|
542
|
+
# Support
|
|
543
|
+
|
|
544
|
+
If you find this project helpful, consider supporting development:
|
|
540
545
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
+ [Paypal](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)
|
|
546
|
+
- [GitHub Sponsor](https://github.com/sponsors/ddc)
|
|
547
|
+
- [ko-fi](https://ko-fi.com/ddcsta)
|
|
548
|
+
- [PayPal](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
import compileall
|
|
3
|
+
import sys
|
|
4
|
+
import tomllib
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def parse_python_version_requirement():
|
|
9
|
+
"""Parse Python version requirement from pyproject.toml"""
|
|
10
|
+
pyproject_path = Path(__file__).parent / "pyproject.toml"
|
|
11
|
+
|
|
12
|
+
with open(pyproject_path, "rb") as f:
|
|
13
|
+
data = tomllib.load(f)
|
|
14
|
+
|
|
15
|
+
python_req = data["tool"]["poetry"]["dependencies"]["python"]
|
|
16
|
+
|
|
17
|
+
# Parse version constraint like "^3.12"
|
|
18
|
+
if python_req.startswith("^"):
|
|
19
|
+
min_version = python_req[1:]
|
|
20
|
+
major, minor = map(int, min_version.split("."))
|
|
21
|
+
return major, minor
|
|
22
|
+
elif python_req.startswith(">="):
|
|
23
|
+
min_version = python_req[2:]
|
|
24
|
+
major, minor = map(int, min_version.split("."))
|
|
25
|
+
return major, minor
|
|
26
|
+
else:
|
|
27
|
+
# Default fallback
|
|
28
|
+
return 3, 12
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def get_compatible_python_versions(min_major, min_minor):
|
|
32
|
+
"""Generate list of compatible Python versions"""
|
|
33
|
+
versions = []
|
|
34
|
+
current_major, current_minor = sys.version_info[:2]
|
|
35
|
+
|
|
36
|
+
# Start from the minimum required version
|
|
37
|
+
for major in range(min_major, min_major + 1): # Only Python 3.x for now
|
|
38
|
+
start_minor = min_minor if major == min_major else 0
|
|
39
|
+
# Go up to current Python version + 2 minor versions for future compatibility
|
|
40
|
+
end_minor = max(current_minor + 2, 12) if major == current_major else 12
|
|
41
|
+
|
|
42
|
+
for minor in range(start_minor, end_minor + 1):
|
|
43
|
+
if major == 3 and minor >= min_minor:
|
|
44
|
+
versions.append(f"{major}.{minor}")
|
|
45
|
+
|
|
46
|
+
return versions
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def build():
|
|
50
|
+
"""Build bytecode for all compatible Python versions"""
|
|
51
|
+
try:
|
|
52
|
+
min_major, min_minor = parse_python_version_requirement()
|
|
53
|
+
compatible_versions = get_compatible_python_versions(min_major, min_minor)
|
|
54
|
+
|
|
55
|
+
print(f"Building for Python versions: {', '.join(compatible_versions)}")
|
|
56
|
+
|
|
57
|
+
# Compile for current Python version
|
|
58
|
+
print(f"Compiling for Python {sys.version_info.major}.{sys.version_info.minor}")
|
|
59
|
+
compileall.compile_dir('pythonDatabases', force=True)
|
|
60
|
+
|
|
61
|
+
# Note: For actual cross-version bytecode, you'd need multiple Python interpreters
|
|
62
|
+
# This compiles with current interpreter but documents compatibility
|
|
63
|
+
print("Build completed successfully")
|
|
64
|
+
|
|
65
|
+
except Exception as e:
|
|
66
|
+
print(f"Build failed: {e}")
|
|
67
|
+
sys.exit(1)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
if __name__ == "__main__":
|
|
71
|
+
build()
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "pythonLogs"
|
|
7
|
-
version = "
|
|
7
|
+
version = "5.0.0"
|
|
8
8
|
description = "High-performance Python logging library with file rotation and optimized caching for better performance"
|
|
9
9
|
license = "MIT"
|
|
10
10
|
readme = "README.md"
|
|
@@ -30,8 +30,15 @@ classifiers = [
|
|
|
30
30
|
"Natural Language :: English",
|
|
31
31
|
]
|
|
32
32
|
|
|
33
|
+
[tool.poetry.build]
|
|
34
|
+
script = "build.py"
|
|
35
|
+
generate-setup-file = false
|
|
36
|
+
|
|
37
|
+
[tool.poetry.group.test]
|
|
38
|
+
optional = true
|
|
39
|
+
|
|
33
40
|
[tool.poetry.dependencies]
|
|
34
|
-
python = "^3.
|
|
41
|
+
python = "^3.12"
|
|
35
42
|
pydantic-settings = "^2.10.1"
|
|
36
43
|
python-dotenv = "^1.1.1"
|
|
37
44
|
|
|
@@ -48,9 +55,6 @@ _coverage_xml = "coverage xml"
|
|
|
48
55
|
tests = ["_test", "_coverage_report", "_coverage_xml"]
|
|
49
56
|
test = ["tests"]
|
|
50
57
|
|
|
51
|
-
[tool.poetry.group.test]
|
|
52
|
-
optional = true
|
|
53
|
-
|
|
54
58
|
[tool.black]
|
|
55
59
|
line-length = 120
|
|
56
60
|
skip-string-normalization = true
|
|
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
|