#213 Use python-requests
Merged by mikem. Opened by mikem.
https://github.com/mikem23/koji-playground.git master

Download 213.patch
no initial comment

This change reworks ClientSession to use python-requests by default. For systems where requests is unavailable (cough rhel5), we have a thin "compatrequests" layer that is based on the old ssl code. This path can also be accessed by setting 'use_old_ssl' to true in the config options of the various commands.

The default behavior of python-requests is to verify the cert of the http server. This is unarguably better and safer, but it is also a behavior change for Koji. This can be disabled by setting no_ssl_verify to True. The serverca option is now valid even if not using ssl auth. If it is set, then this ca is used to verify the hub. If it is not set, the normal system ca bundle is used.

In the midst of adding several new session options and exposing them in several command configurations, I opted to add a single grab_session_options function in the library. All the tools now use this instead of the old boilerplate code.

@mikem The changes look good to me for merging. However, I think it'd be a good idea to also include the GSSAPI work that @puiterwijk did in this branch.

He had previously sent a PR to your playground repository to this branch on GitHub, but it looks like it doesn't cleanly merge now.

I think it'd be a good idea to pull in the patch into your branch as part of this PR, especially in light of the move to Kerberos auth for Fedora's Koji instance.

@ngompa the gssapi change is a single patch and it still cherry picks fine. It's kind of a separate feature, so I think I'll leave it out of the PR, but I definitely intend to merge it promptly

@mikem Then I don't see a problem with merging this now as long as that is pulled in right after it.

rebased

Pull-Request has been merged by mikem

Metadata