avoid deprecation warnings when built with http-client >= 0.4.18
Since I want git-annex to keep building on debian stable, I need to still support the old http-client, which required explicit calls to closeManager, or use of withManager to get Managers to close at appropriate times. This is not needed in the new version, and so they added a deprecation warning. IMHO much too early, because look at the mess I had to go through to avoid that deprecation warning while supporting both versions..
This commit is contained in:
parent
cad3349001
commit
9e3ac97608
2 changed files with 25 additions and 12 deletions
|
@ -21,7 +21,7 @@ import qualified Data.ByteString as S
|
|||
import qualified Data.Map as M
|
||||
import Data.Char
|
||||
import Network.Socket (HostName)
|
||||
import Network.HTTP.Conduit (Manager, newManager, closeManager)
|
||||
import Network.HTTP.Conduit (Manager, newManager)
|
||||
import Network.HTTP.Client (defaultManagerSettings, managerResponseTimeout, responseStatus, responseBody, RequestBody(..))
|
||||
import Network.HTTP.Types
|
||||
import Control.Monad.Trans.Resource
|
||||
|
@ -48,7 +48,7 @@ import Utility.Metered
|
|||
import Utility.DataUnits
|
||||
import Annex.Content
|
||||
import Annex.Url (withUrlOptions)
|
||||
import Utility.Url (checkBoth)
|
||||
import Utility.Url (checkBoth, closeManager)
|
||||
|
||||
type BucketName = String
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue