Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from SafeConfigParser to ConfigParser #728

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ jobs:
pytest:
uses: ros-infrastructure/ci/.github/workflows/pytest.yaml@main
with:
matrix-filter: >-
del(.matrix.os[] | select(contains("windows"))) | del(.matrix.python[] |
select(contains("3.10") or contains("3.11") or contains("3.12")))
matrix-filter: del(.matrix.os[] | select(contains("windows")))
yamllint:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions bloom/generators/debian/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@

# Python 2/3 support.
try:
from configparser import SafeConfigParser
from configparser import ConfigParser
except ImportError:
from ConfigParser import SafeConfigParser
from ConfigParser import SafeConfigParser as ConfigParser
from dateutil import tz
from packaging.version import parse as parse_version

Expand Down Expand Up @@ -397,7 +397,7 @@ def generate_substitutions_from_package(
setup_cfg_path = os.path.join(package_path, 'setup.cfg')
data['pass_install_scripts'] = True
if os.path.isfile(setup_cfg_path):
setup_cfg = SafeConfigParser()
setup_cfg = ConfigParser()
setup_cfg.read([setup_cfg_path])
if (
setup_cfg.has_option('install', 'install-scripts') or
Expand Down
5 changes: 0 additions & 5 deletions bloom/generators/rpm/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@
import traceback
import textwrap

# Python 2/3 support.
try:
from configparser import SafeConfigParser
except ImportError:
from ConfigParser import SafeConfigParser
from dateutil import tz
from distutils.version import LooseVersion
from time import strptime
Expand Down