Skip to content

VMware Plugin: Adapt to Python 3.12#1850

Merged
BareosBot merged 4 commits intobareos:masterfrom
sduehr:dev/sduehr/master/vmware-fix-python312
Jul 3, 2024
Merged

VMware Plugin: Adapt to Python 3.12#1850
BareosBot merged 4 commits intobareos:masterfrom
sduehr:dev/sduehr/master/vmware-fix-python312

Conversation

@sduehr
Copy link
Member

@sduehr sduehr commented Jun 6, 2024

The changed configparser and ssl modules in Python 3.12 required adaptions of the plugin code so that it now works with the Python versions 3.6, 3.9, 3.10 and 3.12

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

@arogge arogge marked this pull request as draft June 11, 2024 10:10
@arogge arogge self-requested a review June 25, 2024 10:08
@arogge arogge marked this pull request as ready for review June 25, 2024 10:08
@arogge arogge added this to the 24.0.0 milestone Jun 25, 2024
@sebsura
Copy link
Contributor

sebsura commented Jun 27, 2024

Would it also be possible to fix these error messages ?

bareos/core/cmake/get_python_compile_settings.py:37: SyntaxWarning: invalid escape sequence '\ '
  'message(STATUS "Python{0}_{1}\ is\  {2}")'.format(
bareos/core/cmake/get_python_compile_settings.py:50: SyntaxWarning: invalid escape sequence '\ '
  'message(STATUS "Python{0}_{1}_FLAGS\ is\  {2}")'.format(
bareos/core/cmake/get_python_compile_settings.py:59: SyntaxWarning: invalid escape sequence '\ '
  'message(STATUS "Python{0}_{1}\ is\  {2}")'.format(
bareos/core/cmake/get_python_compile_settings.py:70: SyntaxWarning: invalid escape sequence '\ '
  'message(STATUS "Python{0}_{1}\ is\  {2}")'.format(

Im not sure why we tried to espace spaces (i have found nothing online about this) but with python 3.12 it actually throws these warnings. We should just replace \ by i guess.

Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is a more complicated than it should be, I think we can simplify this.

@sduehr
Copy link
Member Author

sduehr commented Jul 2, 2024

Would it also be possible to fix these error messages ?

bareos/core/cmake/get_python_compile_settings.py:37: SyntaxWarning: invalid escape sequence '\ '
  'message(STATUS "Python{0}_{1}\ is\  {2}")'.format(
bareos/core/cmake/get_python_compile_settings.py:50: SyntaxWarning: invalid escape sequence '\ '
  'message(STATUS "Python{0}_{1}_FLAGS\ is\  {2}")'.format(
bareos/core/cmake/get_python_compile_settings.py:59: SyntaxWarning: invalid escape sequence '\ '
  'message(STATUS "Python{0}_{1}\ is\  {2}")'.format(
bareos/core/cmake/get_python_compile_settings.py:70: SyntaxWarning: invalid escape sequence '\ '
  'message(STATUS "Python{0}_{1}\ is\  {2}")'.format(

Im not sure why we tried to espace spaces (i have found nothing online about this) but with python 3.12 it actually throws these warnings. We should just replace \ by i guess.

I changed it within the last commit.

@sduehr sduehr requested a review from arogge July 2, 2024 16:03
@sduehr sduehr assigned arogge and unassigned sduehr Jul 2, 2024
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@arogge
Copy link
Member

arogge commented Jul 3, 2024

You still need to re-run bareos-check-sources on core/cmake/get_python_compile_settings.py to update the copyright header.

@sduehr sduehr mentioned this pull request Jul 3, 2024
6 tasks
sduehr and others added 4 commits July 3, 2024 16:02
The changed configparser and ssl modules in Python 3.12 required
adaptions of the plugin code so that it now works with the
Python versions 3.6, 3.9, 3.10 and 3.12
@BareosBot BareosBot force-pushed the dev/sduehr/master/vmware-fix-python312 branch from 6cee255 to bed6de4 Compare July 3, 2024 16:02
@BareosBot BareosBot merged commit b0a6229 into bareos:master Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants