json-logging-python icon indicating copy to clipboard operation
json-logging-python copied to clipboard

Rework on #109

Open mavwolverine opened this issue 4 months ago • 11 comments

PR Type

Enhancement


Description

  • Modernize Python code to support versions 3.9-3.12

  • Replace deprecated datetime.utcnow() with timezone-aware alternative

  • Update string formatting to use f-strings

  • Remove Python 2 compatibility code


Changes diagram

flowchart LR
  A["Python 2/3 compatibility code"] --> B["Python 3.9+ only code"]
  C["datetime.utcnow()"] --> D["datetime.now(timezone.utc)"]
  E["String format()"] --> F["f-strings"]
  G["super(Class, self)"] --> H["super()"]

Changes walkthrough 📝

Relevant files
Enhancement
6 files
hello.py
Convert string formatting to f-strings                                     
+2/-2     
custom_log_format_request.py
Modernize super() calls                                                                   
+3/-3     
formatters.py
Remove Python 2 compatibility code                                             
+6/-9     
setup.py
Simplify file opening logic                                                           
+1/-1     
constants.py
Add Python 3.12 taskName attribute support                             
+9/-2     
handler.py
Use modern type hints                                                                       
+1/-1     
Formatting
8 files
__init__.py
Remove coding declaration                                                               
+0/-1     
__init__.py
Remove coding declaration                                                               
+0/-1     
__init__.py
Remove coding declaration                                                               
+0/-1     
__init__.py
Remove empty line                                                                               
+0/-1     
__init__.py
Remove coding declaration                                                               
+0/-1     
__init__.py
Remove coding declaration                                                               
+0/-1     
__init__.py
Remove coding declaration                                                               
+0/-1     
framework_base.py
Remove coding declaration                                                               
+0/-1     
Bug fix
3 files
dto.py
Fix datetime deprecation and super() calls                             
+3/-3     
util.py
Fix datetime deprecation and modernize class                         
+3/-4     
benmark_micro.py
Fix datetime deprecation warning                                                 
+2/-3     
Dependencies
1 files
code_quality.yml
Update GitHub Actions to latest versions                                 
+6/-6     

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • mavwolverine avatar Jul 12 '25 21:07 mavwolverine