containers / podman-py

Python bindings for Podman's RESTful API
Apache License 2.0
247 stars 88 forks source link

from_env: Use default base_url if no environment is given #372

Closed kajinamit closed 7 months ago

kajinamit commented 7 months ago

The PodmanClient class has its own mechanism to detect the default value for base_url if no specific value is provided. However this mechanism can't be used when creating an instance by from_env, because from_env requires (DOCKER|CONTAINER)_HOST environment.

This drops the validation from from_env, so that users can use from_env without explicitly setting the HOST environment.

rhatdan commented 7 months ago

/approve /lgtm

openshift-ci[bot] commented 7 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kajinamit, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/containers/podman-py/blob/main/OWNERS)~~ [rhatdan] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
kajinamit commented 6 months ago

I wonder if I can request a new release so that this fix is available in a released version .

rhatdan commented 6 months ago

Should be a new release with podman 5.0 next week.

rhatdan commented 6 months ago

@umohnani8 PTAL