1.9.9 requires python 3.10 #989

Closed
opened 2025-02-04 06:50:32 +00:00 by kimheino · 3 comments
Contributor

What I'm trying to do and why

Borgmatic 1.9.9 requires python 3.10. RHEL9 / Centos9 / etc have only python 3.9. Borgmatic 1.9.8 was fine.

https://docs.python.org/3/library/logging.html#logging.Formatter
"Changed in version 3.10: Added the defaults parameter."

Steps to reproduce

(08:47) root@risa:~> borgmatic
Traceback (most recent call last):
File "/usr/bin/borgmatic", line 8, in
sys.exit(main())
File "/usr/lib/python3.9/site-packages/borgmatic/commands/borgmatic.py", line 922, in main
configure_logging(
File "/usr/lib/python3.9/site-packages/borgmatic/logger.py", line 297, in configure_logging
console_handler.setFormatter(Console_color_formatter())
File "/usr/lib/python3.9/site-packages/borgmatic/logger.py", line 108, in init
super(Console_color_formatter, self).init(
TypeError: init() got an unexpected keyword argument 'defaults'

Actual behavior

No response

Expected behavior

Borgmatic to still support RHEL9 / Python 3.9.

Other notes / implementation ideas

No response

borgmatic version

No response

borgmatic installation method

No response

Borg version

1.9..9

Python version

3.9

Database version (if applicable)

No response

Operating system and version

No response

### What I'm trying to do and why Borgmatic 1.9.9 requires python 3.10. RHEL9 / Centos9 / etc have only python 3.9. Borgmatic 1.9.8 was fine. https://docs.python.org/3/library/logging.html#logging.Formatter "Changed in version 3.10: Added the defaults parameter." ### Steps to reproduce (08:47) root@risa:~> borgmatic Traceback (most recent call last): File "/usr/bin/borgmatic", line 8, in <module> sys.exit(main()) File "/usr/lib/python3.9/site-packages/borgmatic/commands/borgmatic.py", line 922, in main configure_logging( File "/usr/lib/python3.9/site-packages/borgmatic/logger.py", line 297, in configure_logging console_handler.setFormatter(Console_color_formatter()) File "/usr/lib/python3.9/site-packages/borgmatic/logger.py", line 108, in __init__ super(Console_color_formatter, self).__init__( TypeError: __init__() got an unexpected keyword argument 'defaults' ### Actual behavior _No response_ ### Expected behavior Borgmatic to still support RHEL9 / Python 3.9. ### Other notes / implementation ideas _No response_ ### borgmatic version _No response_ ### borgmatic installation method _No response_ ### Borg version 1.9..9 ### Python version 3.9 ### Database version (if applicable) _No response_ ### Operating system and version _No response_
Owner

Ugh, thanks for filing this and tracking down the cause. My bad for missing the prominent Changed in version 3.10 label in the Python docs. I'll have to come up with another way to accomplish the logging feature since Python 3.9 isn't fully end-of-lifed for another nine months.

Ugh, thanks for filing this and tracking down the cause. My bad for missing the prominent *Changed in version 3.10* label in the Python docs. I'll have to come up with another way to accomplish the logging feature since Python 3.9 isn't fully [end-of-lifed](https://endoflife.date/python) for another nine months.
witten added the
bug
label 2025-02-04 07:25:47 +00:00
Owner

Okay, this should be fixed in main and will be part of the next release. I ended up finding an alternate way to inject the logging prefix into the Python logging formatter without relying on Python 3.10+ features (which were introduced in #635).

Thanks again!

Okay, this should be fixed in main and will be part of the next release. I ended up finding an alternate way to inject the logging prefix into the Python logging formatter without relying on Python 3.10+ features (which were introduced in #635). Thanks again!
Owner

Released in borgmatic 1.9.10!

Released in borgmatic 1.9.10!
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#989
No description provided.