Skip to content

docker-py fix: fix(store): warn on init instead of throw#581

Closed
felixfontein wants to merge 2 commits into
ansible-collections:mainfrom
felixfontein:docker-py
Closed

docker-py fix: fix(store): warn on init instead of throw#581
felixfontein wants to merge 2 commits into
ansible-collections:mainfrom
felixfontein:docker-py

Conversation

@felixfontein
Copy link
Copy Markdown
Collaborator

SUMMARY

Cherry-picked docker/docker-py#3080.

Using the proper ansible-core mechanisms for warnings instead of import warnings resulted in a lot of extra code.

Ref: #435

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

vendored Docker SDK for Python

@kristianheljas
Copy link
Copy Markdown

I have a few issues with this one:

  1. warn argument is ambiguous - I was surprised when i discovered that it's a function, not a boolean.
  2. Mere presence of the warning function will suppress an exception in Store.__init().
  3. It's gonna fail with the same message in Store._execute() anyway so I can't see any advantage for the warning.

What are your thoughts about just silencing the InitializationError via explicit argument - validate_program_path=False for example?

felixfontein and others added 2 commits May 10, 2023 22:12
Cherry-picked from docker/docker-py@22718ba

Co-authored-by: yanlong.wang <yanlong.wang@naiver.org>
@felixfontein
Copy link
Copy Markdown
Collaborator Author

Let's close this, as it isn't really needed anyway.

@felixfontein felixfontein deleted the docker-py branch October 15, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants