Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SafeConfigParser
has been deprecated since Python 3.2. There has been a shim which has been finally removed in Python 3.11 in this commit in favor of simplyConfigParser
.This means that this utility won't work if users are on Python >= 3.11 (which is the case for Ubuntu Noble).
In this PR I migrated to
ConfigParser
and took the liberty to remove thetry except
that made the package work for Python 2 since Python 2 is been EOL for more than 4 years now (this fix would have been more boilerplate otherwise).readfp
was also deprecated in favor ofread_file
.Test it!
Try building a package on Ubuntu 22.04, then try on Ubuntu 24.04. For example, when
trying to build colcon-cmake using the publish-python utility, the output under Ubuntu 24.04 is:
Now try the PR code:
sudo apt remove python3-stdeb
.pip install git+https://github.com/luca-della-vedova/stdeb@luca/migrate_configparser --break-system-packages