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.
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pythonLogs
3
- Version: 4.0.6
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,<4.0
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](#source-code)
63
- - [Run Tests and Get Coverage Report using Poe](#run-tests-and-get-coverage-report-using-poe)
60
+ - [Development](#development)
61
+ - [Development](#development)
62
+ - [Building from Source](#building-from-source)
63
+ - [Running Tests](#running-tests)
64
64
  - [License](#license)
65
- - [Buy me a cup of coffee](#buy-me-a-cup-of-coffee)
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
- # Source Code
553
- ### Build
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 test
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
- # Buy me a cup of coffee
571
- + [GitHub Sponsor](https://github.com/sponsors/ddc)
572
- + [ko-fi](https://ko-fi.com/ddcsta)
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](#source-code)
34
- - [Run Tests and Get Coverage Report using Poe](#run-tests-and-get-coverage-report-using-poe)
33
+ - [Development](#development)
34
+ - [Development](#development)
35
+ - [Building from Source](#building-from-source)
36
+ - [Running Tests](#running-tests)
35
37
  - [License](#license)
36
- - [Buy me a cup of coffee](#buy-me-a-cup-of-coffee)
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
- # Source Code
524
- ### Build
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 test
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
- # Buy me a cup of coffee
542
- + [GitHub Sponsor](https://github.com/sponsors/ddc)
543
- + [ko-fi](https://ko-fi.com/ddcsta)
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 = "4.0.6"
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.10"
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
@@ -58,7 +58,7 @@ __author__ = "Daniel Costa"
58
58
  __email__ = "danieldcsta@gmail.com>"
59
59
  __license__ = "MIT"
60
60
  __copyright__ = "Copyright 2024-present ddc"
61
- _req_python_version = (3, 10, 0)
61
+ _req_python_version = (3, 12, 0)
62
62
 
63
63
 
64
64
  try:
File without changes