diff --git a/changelogs/fragments/452-python-deps-build.yml b/changelogs/fragments/452-python-deps-build.yml new file mode 100644 index 00000000..7b0eb4e5 --- /dev/null +++ b/changelogs/fragments/452-python-deps-build.yml @@ -0,0 +1,2 @@ +bugfixes: + - "Fix handling of Python dependency data when building changelogs and collections (https://github.com/ansible-community/antsibull/pull/452)." diff --git a/src/antsibull/build_collection.py b/src/antsibull/build_collection.py index edefffb0..ea00d3a4 100644 --- a/src/antsibull/build_collection.py +++ b/src/antsibull/build_collection.py @@ -33,6 +33,7 @@ def build_collection_command(): # Parse the deps file deps_file = DepsFile(os.path.join(app_ctx.extra['data_dir'], app_ctx.extra['deps_file'])) dummy1_, dummy2_, deps = deps_file.parse() + deps.pop('_python', None) # Template the galaxy.yml file dep_string = json.dumps(deps) diff --git a/src/antsibull/changelog.py b/src/antsibull/changelog.py index ffe21868..4e9ac535 100644 --- a/src/antsibull/changelog.py +++ b/src/antsibull/changelog.py @@ -468,6 +468,7 @@ def get_changelog( for path in glob.glob(os.path.join(deps_dir, '*.deps'), recursive=False): deps_file = DepsFile(path) deps = deps_file.parse() + deps.deps.pop('_python', None) version = PypiVer(deps.ansible_version) if version > ansible_version: print(f"Ignoring {path}, since {deps.ansible_version}"