commit ghc-amazonka-core for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-amazonka-core for openSUSE:Factory checked in at 2017-03-24 02:11:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-amazonka-core (Old) and /work/SRC/openSUSE:Factory/.ghc-amazonka-core.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-amazonka-core" Fri Mar 24 02:11:08 2017 rev:2 rq:461553 version:1.4.5 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-amazonka-core/ghc-amazonka-core.changes 2017-02-03 17:38:03.369686009 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-amazonka-core.new/ghc-amazonka-core.changes 2017-03-24 02:11:09.369190340 +0100 @@ -1,0 +2,5 @@ +Sun Feb 12 14:17:06 UTC 2017 - psimons@suse.com + +- Update to version 1.4.5 with cabal2obs. + +------------------------------------------------------------------- Old: ---- 1.cabal amazonka-core-1.4.3.tar.gz New: ---- amazonka-core-1.4.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-amazonka-core.spec ++++++ --- /var/tmp/diff_new_pack.UNjXk9/_old 2017-03-24 02:11:09.857121305 +0100 +++ /var/tmp/diff_new_pack.UNjXk9/_new 2017-03-24 02:11:09.861120739 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-amazonka-core # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,14 +19,13 @@ %global pkg_name amazonka-core %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.4.3 +Version: 1.4.5 Release: 0 Summary: Core data types and functionality for Amazonka libraries License: MPL-2.0 Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-attoparsec-devel @@ -87,7 +86,6 @@ %prep %setup -q -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ amazonka-core-1.4.3.tar.gz -> amazonka-core-1.4.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amazonka-core-1.4.3/amazonka-core.cabal new/amazonka-core-1.4.5/amazonka-core.cabal --- old/amazonka-core-1.4.3/amazonka-core.cabal 2016-06-09 21:31:26.000000000 +0200 +++ new/amazonka-core-1.4.5/amazonka-core.cabal 2016-12-04 16:29:21.000000000 +0100 @@ -1,5 +1,5 @@ name: amazonka-core -version: 1.4.3 +version: 1.4.5 synopsis: Core data types and functionality for Amazonka libraries. homepage: https://github.com/brendanhay/amazonka bug-reports: https://github.com/brendanhay/amazonka/issues @@ -73,7 +73,7 @@ build-depends: aeson >= 0.8 , attoparsec >= 0.11.3 - , base >= 4.7 && < 5 + , base >= 4.7 && < 5 , bifunctors >= 4.1 , bytestring >= 0.9 , case-insensitive >= 1.2 @@ -83,7 +83,7 @@ , deepseq >= 1.4 , exceptions >= 0.6 , hashable >= 1.2 - , http-conduit >= 2.1.4 + , http-conduit >= 2.2 && < 3 , http-types >= 0.8 , lens >= 4.4 , memory >= 0.6 @@ -145,4 +145,4 @@ , text , time , QuickCheck - , quickcheck-unicode \ No newline at end of file + , quickcheck-unicode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amazonka-core-1.4.3/src/Network/AWS/Data/Base64.hs new/amazonka-core-1.4.5/src/Network/AWS/Data/Base64.hs --- old/amazonka-core-1.4.3/src/Network/AWS/Data/Base64.hs 2016-06-09 21:31:26.000000000 +0200 +++ new/amazonka-core-1.4.5/src/Network/AWS/Data/Base64.hs 2016-12-04 16:29:21.000000000 +0100 @@ -15,6 +15,7 @@ , _Base64 ) where +import Control.Applicative (pure) import Control.DeepSeq import Data.Aeson.Types import qualified Data.Attoparsec.Text as AText @@ -48,7 +49,7 @@ -- the underlying serialisers (JSON, XML) use Text internally. instance FromText Base64 where parser = AText.takeText >>= - either fail (return . Base64) + either fail (pure . Base64) . BA.convertFromBase BA.Base64 . Text.encodeUtf8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amazonka-core-1.4.3/src/Network/AWS/Data/JSON.hs new/amazonka-core-1.4.5/src/Network/AWS/Data/JSON.hs --- old/amazonka-core-1.4.3/src/Network/AWS/Data/JSON.hs 2016-06-09 21:31:26.000000000 +0200 +++ new/amazonka-core-1.4.5/src/Network/AWS/Data/JSON.hs 2016-12-04 16:29:21.000000000 +0100 @@ -13,6 +13,7 @@ -- * FromJSON FromJSON (..) , parseJSONText + , eitherDecode , eitherDecode' -- ** Parser a @@ -34,7 +35,7 @@ , (.=) ) where -import Data.Aeson (eitherDecode') +import Data.Aeson (eitherDecode, eitherDecode') import Data.Aeson.Types import qualified Data.HashMap.Strict as Map import Network.AWS.Data.Text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amazonka-core-1.4.3/src/Network/AWS/Data/Log.hs new/amazonka-core-1.4.5/src/Network/AWS/Data/Log.hs --- old/amazonka-core-1.4.3/src/Network/AWS/Data/Log.hs 2016-06-09 21:31:26.000000000 +0200 +++ new/amazonka-core-1.4.5/src/Network/AWS/Data/Log.hs 2016-12-04 16:29:21.000000000 +0100 @@ -120,6 +120,9 @@ instance ToLog HttpException where build x = "[HttpException] {\n" <> build (show x) <> "\n}" +instance ToLog HttpExceptionContent where + build x = "[HttpExceptionContent] {\n" <> build (show x) <> "\n}" + instance ToLog Request where build x = buildLines [ "[Client Request] {" @@ -127,7 +130,7 @@ , " secure = " <> build (secure x) , " method = " <> build (method x) , " target = " <> build target - , " timeout = " <> build (responseTimeout x) + , " timeout = " <> build (show (responseTimeout x)) , " redirects = " <> build (redirectCount x) , " path = " <> build (path x) , " query = " <> build (queryString x) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amazonka-core-1.4.3/src/Network/AWS/Data/Text.hs new/amazonka-core-1.4.5/src/Network/AWS/Data/Text.hs --- old/amazonka-core-1.4.3/src/Network/AWS/Data/Text.hs 2016-06-09 21:31:26.000000000 +0200 +++ new/amazonka-core-1.4.5/src/Network/AWS/Data/Text.hs 2016-12-04 16:29:21.000000000 +0100 @@ -76,6 +76,9 @@ instance FromText ByteString where parser = Text.encodeUtf8 <$> A.takeText +instance (CI.FoldCase a, FromText a) => FromText (CI a) where + parser = CI.mk <$> parser + instance FromText Char where parser = A.anyChar <* A.endOfInput diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amazonka-core-1.4.3/src/Network/AWS/Error.hs new/amazonka-core-1.4.5/src/Network/AWS/Error.hs --- old/amazonka-core-1.4.3/src/Network/AWS/Error.hs 2016-06-09 21:31:26.000000000 +0200 +++ new/amazonka-core-1.4.5/src/Network/AWS/Error.hs 2016-12-04 16:29:21.000000000 +0100 @@ -12,22 +12,22 @@ -- module Network.AWS.Error where -import Control.Applicative -import Control.Monad -import Data.Aeson -import Data.Aeson.Types (parseEither) -import qualified Data.ByteString.Lazy as LBS -import Data.Maybe -import Data.Monoid -import Network.AWS.Data.ByteString -import Network.AWS.Data.Headers -import Network.AWS.Data.Text -import Network.AWS.Data.XML -import Network.AWS.Lens (Choice, Getting, Optic', filtered) -import Network.AWS.Lens ((<&>)) -import Network.AWS.Types -import Network.HTTP.Conduit -import Network.HTTP.Types.Status (Status (..)) +import Control.Applicative +import Control.Monad +import Data.Aeson +import Data.Aeson.Types (parseEither) +import Data.Maybe +import Data.Monoid +import Network.AWS.Data.ByteString +import Network.AWS.Data.Headers +import Network.AWS.Data.Text +import Network.AWS.Data.XML +import Network.AWS.Lens (Choice, Getting, Optic', filtered) +import Network.AWS.Types +import Network.HTTP.Conduit +import Network.HTTP.Types.Status (Status (..)) + +import qualified Data.ByteString.Lazy as LBS statusSuccess :: Status -> Bool statusSuccess (statusCode -> n) = n >= 200 && n < 300 @@ -36,14 +36,19 @@ httpStatus = _Error . f where f g = \case - TransportError (StatusCodeException s h c) - -> TransportError <$> (StatusCodeException <$> g s <*> pure h <*> pure c) + TransportError (HttpExceptionRequest rq (StatusCodeException rs b)) + -> (\x -> TransportError (HttpExceptionRequest rq (StatusCodeException (rs { responseStatus = x }) b))) + <$> g (responseStatus rs) + TransportError e -> pure (TransportError e) + SerializeError (SerializeError' a s b e) - -> g s <&> \x -> SerializeError (SerializeError' a x b e) + -> (\x -> SerializeError (SerializeError' a x b e)) <$> g s + ServiceError e - -> g (_serviceStatus e) <&> \x -> ServiceError (e { _serviceStatus = x }) + -> (\x -> ServiceError (e { _serviceStatus = x })) + <$> g (_serviceStatus e) hasStatus :: (Applicative f, Choice p) => Int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amazonka-core-1.4.3/src/Network/AWS/Request.hs new/amazonka-core-1.4.5/src/Network/AWS/Request.hs --- old/amazonka-core-1.4.3/src/Network/AWS/Request.hs 2016-06-09 21:31:26.000000000 +0200 +++ new/amazonka-core-1.4.5/src/Network/AWS/Request.hs 2016-12-04 16:29:21.000000000 +0100 @@ -36,8 +36,9 @@ -- ** Constructors , defaultRequest - -- ** Hashing - , contentMD5 + -- ** Operation Plugins + , contentMD5Header + , expectHeader -- ** Lenses , requestHeaders @@ -98,7 +99,9 @@ } postBody :: (ToRequest a, ToBody a) => Service -> a -> Request a -postBody s x = putBody s x & rqMethod .~ POST +postBody s x = defaultRequest s x + & rqMethod .~ POST + & rqBody .~ toBody x putXML :: (ToRequest a, ToElement a) => Service -> a -> Request a putXML s x = defaultRequest s x @@ -112,9 +115,8 @@ putBody :: (ToRequest a, ToBody a) => Service -> a -> Request a putBody s x = defaultRequest s x - & rqMethod .~ PUT - & rqBody .~ toBody x - & rqHeaders %~ hdr hExpect "100-continue" + & rqMethod .~ PUT + & rqBody .~ toBody x defaultRequest :: ToRequest a => Service -> a -> Request a defaultRequest s x = Request @@ -126,14 +128,6 @@ , _rqBody = "" } -contentMD5 :: Request a -> Request a -contentMD5 rq - | missing, Just x <- md5 = rq & rqHeaders %~ hdr HTTP.hContentMD5 x - | otherwise = rq - where - missing = isNothing $ lookup HTTP.hContentMD5 (_rqHeaders rq) - md5 = md5Base64 (_rqBody rq) - queryString :: Lens' Client.Request ByteString queryString f x = f (Client.queryString x) <&> \y -> x { Client.queryString = y } @@ -159,3 +153,14 @@ n -> ":" <> toBS n secure = Client.secure x + +contentMD5Header :: Request a -> Request a +contentMD5Header rq + | missing, Just x <- md5 = rq & rqHeaders %~ hdr HTTP.hContentMD5 x + | otherwise = rq + where + missing = isNothing $ lookup HTTP.hContentMD5 (_rqHeaders rq) + md5 = md5Base64 (_rqBody rq) + +expectHeader :: Request a -> Request a +expectHeader = rqHeaders %~ hdr hExpect "100-continue" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amazonka-core-1.4.3/src/Network/AWS/Types.hs new/amazonka-core-1.4.5/src/Network/AWS/Types.hs --- old/amazonka-core-1.4.3/src/Network/AWS/Types.hs 2016-06-09 21:31:26.000000000 +0200 +++ new/amazonka-core-1.4.5/src/Network/AWS/Types.hs 2016-12-04 16:29:21.000000000 +0100 @@ -120,45 +120,44 @@ , _Default ) where -import Control.Applicative -import Control.Concurrent (ThreadId) -import Control.DeepSeq -import Control.Exception -import Control.Monad.IO.Class -import Control.Monad.Trans.Resource -import Data.Aeson hiding (Error) -import qualified Data.ByteString as BS -import Data.ByteString.Builder (Builder) -import Data.Coerce -import Data.Conduit -import Data.Data (Data, Typeable) -import Data.Hashable -import Data.IORef -import Data.Maybe -import Data.Monoid -import Data.Proxy -import Data.String -import qualified Data.Text as Text -import qualified Data.Text.Encoding as Text -import Data.Time -import GHC.Generics (Generic) -import Network.AWS.Data.Body -import Network.AWS.Data.ByteString -import Network.AWS.Data.JSON -import Network.AWS.Data.Log -import Network.AWS.Data.Path -import Network.AWS.Data.Query -import Network.AWS.Data.Text -import Network.AWS.Data.XML -import Network.AWS.Lens (Iso', Lens', Prism', Setter') -import Network.AWS.Lens (exception, iso, lens, prism, - sets) -import Network.HTTP.Conduit hiding (Proxy, Request, Response) -import qualified Network.HTTP.Conduit as Client -import Network.HTTP.Types.Header -import Network.HTTP.Types.Method -import Network.HTTP.Types.Status (Status) -import Text.XML (def) +import Control.Applicative +import Control.Concurrent (ThreadId) +import Control.DeepSeq +import Control.Exception +import Control.Monad.IO.Class +import Control.Monad.Trans.Resource +import Data.Aeson hiding (Error) +import Data.ByteString.Builder (Builder) +import Data.Coerce +import Data.Conduit +import Data.Data (Data, Typeable) +import Data.Hashable +import Data.IORef +import Data.Maybe +import Data.Monoid +import Data.Proxy +import Data.String +import Data.Time +import GHC.Generics (Generic) +import Network.AWS.Data.Body +import Network.AWS.Data.ByteString +import Network.AWS.Data.JSON +import Network.AWS.Data.Log +import Network.AWS.Data.Path +import Network.AWS.Data.Query +import Network.AWS.Data.Text +import Network.AWS.Data.XML +import Network.AWS.Lens (Iso', Lens', Prism', Setter') +import Network.AWS.Lens (exception, iso, lens, prism, sets) +import Network.HTTP.Conduit hiding (Proxy, Request, Response) +import Network.HTTP.Types.Header +import Network.HTTP.Types.Method +import Network.HTTP.Types.Status (Status) + +import qualified Data.ByteString as BS +import qualified Data.Text as Text +import qualified Data.Text.Encoding as Text +import qualified Network.HTTP.Conduit as Client -- | A convenience alias to avoid type ambiguity. type ClientRequest = Client.Request @@ -443,13 +442,15 @@ -- | Construct a 'ClientRequest' using common parameters such as TLS and prevent -- throwing errors when receiving erroneous status codes in respones. clientRequest :: Endpoint -> Maybe Seconds -> ClientRequest -clientRequest e t = def +clientRequest e t = Client.defaultRequest { Client.secure = _endpointSecure e , Client.host = _endpointHost e , Client.port = _endpointPort e , Client.redirectCount = 0 - , Client.checkStatus = \_ _ _ -> Nothing - , Client.responseTimeout = microseconds <$> t + , Client.responseTimeout = + case t of + Nothing -> Client.responseTimeoutNone + Just x -> Client.responseTimeoutMicro (microseconds x) } -- | An unsigned request. @@ -559,20 +560,23 @@ withAuth (Ref _ r) f = liftIO (readIORef r) >>= f withAuth (Auth e) f = f e --- | The sum of available AWS regions. +-- | The available AWS regions. data Region - = Ireland -- ^ Europe / eu-west-1 - | Frankfurt -- ^ Europe / eu-central-1 - | Tokyo -- ^ Asia Pacific / ap-northeast-1 - | Singapore -- ^ Asia Pacific / ap-southeast-1 - | Sydney -- ^ Asia Pacific / ap-southeast-2 - | Beijing -- ^ China / cn-north-1 - | NorthVirginia -- ^ US / us-east-1 - | NorthCalifornia -- ^ US / us-west-1 - | Oregon -- ^ US / us-west-2 - | GovCloud -- ^ AWS GovCloud / us-gov-west-1 - | GovCloudFIPS -- ^ AWS GovCloud (FIPS 140-2) S3 Only / fips-us-gov-west-1 - | SaoPaulo -- ^ South America / sa-east-1 + = NorthVirginia -- ^ US East ('us-east-1'). + | Ohio -- ^ US East ('us-east-2'). + | NorthCalifornia -- ^ US West ('us-west-1'). + | Oregon -- ^ US West ('us-west-2'). + | Tokyo -- ^ Asia Pacific ('ap-northeast-1'). + | Seoul -- ^ Asia Pacific ('ap-northeast-2'). + | Mumbai -- ^ Asia Pacific ('ap-south-1'). + | Singapore -- ^ Asia Pacific ('ap-southeast-1'). + | Sydney -- ^ Asia Pacific ('ap-southeast-2'). + | SaoPaulo -- ^ South America ('sa-east-1'). + | Ireland -- ^ EU ('eu-west-1'). + | Frankfurt -- ^ EU ('eu-central-1'). + | GovCloud -- ^ US GovCloud ('us-gov-west-1'). + | GovCloudFIPS -- ^ US GovCloud FIPS (S3 Only, 'fips-us-gov-west-1'). + | Beijing -- ^ China ('cn-north-1'). deriving (Eq, Ord, Read, Show, Data, Typeable, Generic) instance Hashable Region @@ -580,42 +584,51 @@ instance FromText Region where parser = takeLowerText >>= \case - "eu-west-1" -> pure Ireland - "eu-central-1" -> pure Frankfurt + "us-east-1" -> pure NorthVirginia + "us-east-2" -> pure Ohio + "us-west-1" -> pure NorthCalifornia + "us-west-2" -> pure Oregon "ap-northeast-1" -> pure Tokyo + "ap-northeast-2" -> pure Seoul + "ap-south-1" -> pure Mumbai "ap-southeast-1" -> pure Singapore "ap-southeast-2" -> pure Sydney - "cn-north-1" -> pure Beijing - "us-east-1" -> pure NorthVirginia - "us-west-2" -> pure Oregon - "us-west-1" -> pure NorthCalifornia + "sa-east-1" -> pure SaoPaulo + "eu-west-1" -> pure Ireland + "eu-central-1" -> pure Frankfurt "us-gov-west-1" -> pure GovCloud "fips-us-gov-west-1" -> pure GovCloudFIPS - "sa-east-1" -> pure SaoPaulo - e -> fromTextError $ "Failure parsing Region from " <> e + "cn-north-1" -> pure Beijing + e -> + fromTextError $ "Failure parsing Region from " <> e instance ToText Region where toText = \case - Ireland -> "eu-west-1" - Frankfurt -> "eu-central-1" - Tokyo -> "ap-northeast-1" - Singapore -> "ap-southeast-1" - Sydney -> "ap-southeast-2" - Beijing -> "cn-north-1" NorthVirginia -> "us-east-1" + Ohio -> "us-east-2" NorthCalifornia -> "us-west-1" Oregon -> "us-west-2" + Tokyo -> "ap-northeast-1" + Seoul -> "ap-northeast-2" + Mumbai -> "ap-south-1" + Singapore -> "ap-southeast-1" + Sydney -> "ap-southeast-2" + SaoPaulo -> "sa-east-1" + Ireland -> "eu-west-1" + Frankfurt -> "eu-central-1" GovCloud -> "us-gov-west-1" GovCloudFIPS -> "fips-us-gov-west-1" - SaoPaulo -> "sa-east-1" + Beijing -> "cn-north-1" instance ToByteString Region instance ToLog Region where build = build . toBS -instance FromXML Region where parseXML = parseXMLText "Region" -instance ToXML Region where toXML = toXMLText +instance FromXML Region where parseXML = parseXMLText "Region" +instance ToXML Region where toXML = toXMLText +instance FromJSON Region where parseJSON = parseJSONText "Region" +instance ToJSON Region where toJSON = toJSONText -- | An integral value representing seconds. newtype Seconds = Seconds Int
participants (1)
-
root@hilbert.suse.de