Bug 1425461

Summary: don't depend on docker-py when not importing it
Product: [Fedora] Fedora Reporter: Tomas Tomecek <ttomecek>
Component: python-dockerptyAssignee: Tomas Tomecek <ttomecek>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: admiller, carl, roman, ttomecek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-04 15:25:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1410270    

Description Tomas Tomecek 2017-02-21 13:40:03 UTC
dockerpty depends on docker-py even when it doesn't import it. This library imports docker-py only in tests, otherwise it expects to get Client instance. The only `import docker` in code is in this commentary:

```
class PseudoTerminal(object):
    """
    Wraps the pseudo-TTY (PTY) allocated to a docker container.

    The PTY is managed via the current process' TTY until it is closed.

    Example:

        import docker
```

Can we remove the dependency then?

Comment 1 Tomas Tomecek 2017-02-21 13:41:49 UTC
Just realized I'm committer so I'm able to do the change.

Adam, are you okay with this?

Comment 2 Tomas Tomecek 2017-02-23 09:49:46 UTC
Since this is breaking docker-compose in rawhide, I proceeded with a build.

Comment 3 Fedora End Of Life 2017-02-28 12:24:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 5 Red Hat Bugzilla 2023-09-14 03:53:59 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days