Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-wai-extra for openSUSE:Factory checked in at 2025-07-31 17:45:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old) and /work/SRC/openSUSE:Factory/.ghc-wai-extra.new.1944 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-wai-extra" Thu Jul 31 17:45:56 2025 rev:17 rq:1296481 version:3.1.17 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes 2024-12-20 23:12:06.608157586 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new.1944/ghc-wai-extra.changes 2025-07-31 17:46:59.454124978 +0200 @@ -1,0 +2,12 @@ +Wed Nov 6 06:52:33 UTC 2024 - Peter Simons <psim...@suse.com> + +- Update wai-extra to version 3.1.17. + ## 3.1.17 + + * Started deprecation of `data-default` [#1011](https://github.com/yesodweb/wai/pull/1011) + * All `Default` instances have comments that these will be removed in a future major version. + * `def` exported from `Network.Wai.Middleware.Gzip` now has a deprecation warning + * All uses of `def` have been replaced with explicit `default{TYPE_NAME}` values. + * Some additional documentation + +------------------------------------------------------------------- Old: ---- wai-extra-3.1.16.tar.gz New: ---- wai-extra-3.1.17.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-wai-extra.spec ++++++ --- /var/tmp/diff_new_pack.sqX57G/_old 2025-07-31 17:47:00.042149418 +0200 +++ /var/tmp/diff_new_pack.sqX57G/_new 2025-07-31 17:47:00.042149418 +0200 @@ -20,7 +20,7 @@ %global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 3.1.16 +Version: 3.1.17 Release: 0 Summary: Provides some basic WAI handlers and middleware License: MIT ++++++ wai-extra-3.1.16.tar.gz -> wai-extra-3.1.17.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.1.16/ChangeLog.md new/wai-extra-3.1.17/ChangeLog.md --- old/wai-extra-3.1.16/ChangeLog.md 2024-11-06 06:01:16.000000000 +0100 +++ new/wai-extra-3.1.17/ChangeLog.md 2024-11-06 05:48:44.000000000 +0100 @@ -1,5 +1,13 @@ # Changelog for wai-extra +## 3.1.17 + +* Started deprecation of `data-default` [#1011](https://github.com/yesodweb/wai/pull/1011) + * All `Default` instances have comments that these will be removed in a future major version. + * `def` exported from `Network.Wai.Middleware.Gzip` now has a deprecation warning + * All uses of `def` have been replaced with explicit `default{TYPE_NAME}` values. +* Some additional documentation + ## 3.1.16 * Substituted `data-default-class` for `data-default` [#1010](https://github.com/yesodweb/wai/pull/1010) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.1.16/Network/Wai/Middleware/Gzip.hs new/wai-extra-3.1.17/Network/Wai/Middleware/Gzip.hs --- old/wai-extra-3.1.16/Network/Wai/Middleware/Gzip.hs 2024-11-06 06:01:16.000000000 +0100 +++ new/wai-extra-3.1.17/Network/Wai/Middleware/Gzip.hs 2024-11-06 05:48:44.000000000 +0100 @@ -51,7 +51,7 @@ import qualified Data.ByteString.Char8 as S8 import Data.ByteString.Lazy.Internal (defaultChunkSize) import Data.Char (isAsciiLower, isAsciiUpper, isDigit) -import Data.Default (Default (..)) +import qualified Data.Default as Default (Default (..)) import Data.Function (fix) import Data.Maybe (isJust) import qualified Data.Set as Set @@ -119,12 +119,12 @@ -- $settings -- --- If you would like to use the default settings, using just 'def' is enough. +-- If you would like to use the default settings, use 'defaultGzipSettings'. -- The default settings don't compress file responses, only builder and stream -- responses, and only if the response passes the MIME and length checks. (cf. -- 'defaultCheckMime' and 'gzipSizeThreshold') -- --- To customize your own settings, use the 'def' method and set the +-- To customize your own settings, use 'defaultGzipSettings' and set the -- fields you would like to change as follows: -- -- @ @@ -196,15 +196,23 @@ -- $miscellaneous -- --- 'def' is re-exported for convenience sake, and 'defaultCheckMime' --- is exported in case anyone wants to use it in defining their own --- 'gzipCheckMime' function. - --- | Use default MIME settings; /do not/ compress files; skip --- compression on data smaller than 860 bytes. -instance Default GzipSettings where +-- 'defaultCheckMime' is exported in case anyone wants to use it in +-- defining their own 'gzipCheckMime' function. +-- 'def' has been re-exported for convenience sake, but its use is now +-- heavily discouraged. Please use the explicit 'defaultGzipSettings'. + +-- | DO NOT USE THIS INSTANCE! +-- Please use 'defaultGzipSettings'. +-- +-- This instance will be removed in a future major version. +instance Default.Default GzipSettings where def = defaultGzipSettings +-- | Deprecated synonym for the 'defaultGzipSettings'. +def :: GzipSettings +def = defaultGzipSettings +{-# Deprecated def "Please use 'defaultGzipSettings'. 'def' and the Default instance will be removed in a future major update." #-} + -- | Default settings for the 'gzip' middleware. -- -- * Does not compress files. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.1.16/Network/Wai/Middleware/RequestLogger.hs new/wai-extra-3.1.17/Network/Wai/Middleware/RequestLogger.hs --- old/wai-extra-3.1.16/Network/Wai/Middleware/RequestLogger.hs 2024-11-06 06:01:16.000000000 +0100 +++ new/wai-extra-3.1.17/Network/Wai/Middleware/RequestLogger.hs 2024-11-06 05:48:44.000000000 +0100 @@ -11,11 +11,14 @@ -- * Create more versions mkRequestLogger, + -- ** Settings type RequestLoggerSettings, defaultRequestLoggerSettings, + -- *** Settings fields outputFormat, autoFlush, destination, + -- ** More settings OutputFormat (..), ApacheSettings, defaultApacheSettings, @@ -23,6 +26,7 @@ setApacheRequestFilter, setApacheUserGetter, DetailedSettings (..), + defaultDetailedSettings, OutputFormatter, OutputFormatterWithDetails, OutputFormatterWithDetailsAndHeaders, @@ -77,6 +81,8 @@ ) -- | The logging format. +-- +-- @since 1.3.0 data OutputFormat = Apache IPAddrSource | -- | @since 3.1.8 @@ -159,14 +165,27 @@ -- ^ @since 3.1.7 } +-- | DO NOT USE THIS INSTANCE! +-- Please use 'defaultDetailedSettings' +-- +-- This instance will be removed in a future major version. instance Default DetailedSettings where - def = - DetailedSettings - { useColors = True - , mModifyParams = Nothing - , mFilterRequests = Nothing - , mPrelogRequests = False - } + def = defaultDetailedSettings + +-- | Default 'DetailedSettings' +-- +-- Uses colors, but doesn't modify nor filter anything. +-- Also doesn't prelog requests. +-- +-- @since 3.1.16 +defaultDetailedSettings :: DetailedSettings +defaultDetailedSettings = + DetailedSettings + { useColors = True + , mModifyParams = Nothing + , mFilterRequests = Nothing + , mPrelogRequests = False + } type OutputFormatter = ZonedDate -> Request -> Status -> Maybe Integer -> LogStr @@ -206,29 +225,52 @@ -- ^ The response headers -> LogStr +-- | Where to send the logs to. +-- +-- @since 1.3.0 data Destination = Handle Handle | Logger LoggerSet | Callback Callback + +-- | When using a callback as a destination. +-- +-- @since 1.3.0 type Callback = LogStr -> IO () --- | @RequestLoggerSettings@ is an instance of Default. See <https://hackage.haskell.org/package/data-default Data.Default> for more information. +-- | Settings for the request logger. +-- +-- Sets what which format, -- -- @outputFormat@, @autoFlush@, and @destination@ are record fields -- for the record type @RequestLoggerSettings@, so they can be used to -- modify settings values using record syntax. +-- +-- @since 1.3.0 data RequestLoggerSettings = RequestLoggerSettings { outputFormat :: OutputFormat - -- ^ Default value: @Detailed@ @True@. + -- ^ Default value: @Detailed True@. + -- + -- @since 1.3.0 , autoFlush :: Bool - -- ^ Only applies when using the @Handle@ constructor for @destination@. + -- ^ Only applies when using the 'Handle' constructor for 'destination'. -- -- Default value: @True@. + -- + -- @since 1.3.0 , destination :: Destination - -- ^ Default: @Handle@ @stdout@. + -- ^ Default: @Handle stdout@. + -- + -- @since 1.3.0 } +-- | Default 'RequestLoggerSettings'. +-- +-- Use this to create 'RequestLoggerSettings', and use the +-- accompanying fields to edit these settings. +-- +-- @since 3.1.8 defaultRequestLoggerSettings :: RequestLoggerSettings defaultRequestLoggerSettings = RequestLoggerSettings @@ -237,9 +279,16 @@ , destination = Handle stdout } +-- | DO NOT USE THIS INSTANCE! +-- Please use 'defaultRequestLoggerSettings' instead. +-- +-- This instance will be removed in a future major release. instance Default RequestLoggerSettings where def = defaultRequestLoggerSettings +-- | Create the 'Middleware' using the given 'RequestLoggerSettings' +-- +-- @since 1.3.0 mkRequestLogger :: RequestLoggerSettings -> IO Middleware mkRequestLogger RequestLoggerSettings{..} = do let (callback, flusher) = @@ -263,7 +312,7 @@ getdate return $ apacheMiddleware apacheRequestFilter apache Detailed useColors -> - let settings = def{useColors = useColors} + let settings = defaultDetailedSettings{useColors = useColors} in detailedMiddleware callbackAndFlush settings DetailedWithSettings settings -> detailedMiddleware callbackAndFlush settings @@ -339,14 +388,16 @@ -- the socket (see 'IPAddrSource' for more information). It logs to 'stdout'. {-# NOINLINE logStdout #-} logStdout :: Middleware -logStdout = unsafePerformIO $ mkRequestLogger def{outputFormat = Apache FromSocket} +logStdout = + unsafePerformIO $ + mkRequestLogger defaultRequestLoggerSettings{outputFormat = Apache FromSocket} -- | Development request logger middleware. -- -- This uses the 'Detailed' 'True' logging format and logs to 'stdout'. {-# NOINLINE logStdoutDev #-} logStdoutDev :: Middleware -logStdoutDev = unsafePerformIO $ mkRequestLogger def +logStdoutDev = unsafePerformIO $ mkRequestLogger defaultRequestLoggerSettings -- | Prints a message using the given callback function for each request. -- This is not for serious production use- it is inefficient. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.1.16/example/Main.hs new/wai-extra-3.1.17/example/Main.hs --- old/wai-extra-3.1.16/example/Main.hs 2024-11-06 06:01:16.000000000 +0100 +++ new/wai-extra-3.1.17/example/Main.hs 2024-11-06 05:48:44.000000000 +0100 @@ -16,7 +16,7 @@ ) import Network.Wai.Handler.Warp (run) import Network.Wai.Middleware.AddHeaders (addHeaders) -import Network.Wai.Middleware.Gzip (def, gzip) +import Network.Wai.Middleware.Gzip (defaultGzipSettings, gzip) app :: Chan ServerEvent -> Application app chan req respond = @@ -67,7 +67,7 @@ main = do chan <- newChan _ <- forkIO . eventChan $ chan - run 8080 (gzip def $ headers $ app chan) + run 8080 (gzip defaultGzipSettings $ headers $ app chan) where -- headers required for SSE to work through nginx -- not required if using warp directly diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.1.16/test/Network/Wai/ParseSpec.hs new/wai-extra-3.1.17/test/Network/Wai/ParseSpec.hs --- old/wai-extra-3.1.16/test/Network/Wai/ParseSpec.hs 2024-11-06 06:01:16.000000000 +0100 +++ new/wai-extra-3.1.17/test/Network/Wai/ParseSpec.hs 2024-11-06 05:48:44.000000000 +0100 @@ -138,40 +138,40 @@ it "exceeding number of files" $ do SRequest req4 _bod4 <- toRequest'' ctype3 content3 - (parseRequestBodyEx (setMaxRequestNumFiles 0 def) lbsBackEnd req4) + parseRequestBodyEx (setMaxRequestNumFiles 0 def) lbsBackEnd req4 `shouldThrow` anyException it "exceeding parameter length" $ do SRequest req4 _bod4 <- toRequest'' ctype3 content3 - (parseRequestBodyEx (setMaxRequestKeyLength 2 def) lbsBackEnd req4) + parseRequestBodyEx (setMaxRequestKeyLength 2 def) lbsBackEnd req4 `shouldThrow` anyException it "exceeding file size" $ do SRequest req4 _bod4 <- toRequest'' ctype3 content3 - (parseRequestBodyEx (setMaxRequestFileSize 2 def) lbsBackEnd req4) + parseRequestBodyEx (setMaxRequestFileSize 2 def) lbsBackEnd req4 `shouldThrow` (== PayloadTooLarge) it "exceeding total file size" $ do SRequest req4 _bod4 <- toRequest'' ctype3 content3 - (parseRequestBodyEx (setMaxRequestFilesSize 20 def) lbsBackEnd req4) + parseRequestBodyEx (setMaxRequestFilesSize 20 def) lbsBackEnd req4 `shouldThrow` (== PayloadTooLarge) SRequest req5 _bod5 <- toRequest'' ctype3 content5 - (parseRequestBodyEx (setMaxRequestFilesSize 20 def) lbsBackEnd req5) + parseRequestBodyEx (setMaxRequestFilesSize 20 def) lbsBackEnd req5 `shouldThrow` (== PayloadTooLarge) it "exceeding max parm value size" $ do SRequest req4 _bod4 <- toRequest'' ctype2 content2 - (parseRequestBodyEx (setMaxRequestParmsSize 10 def) lbsBackEnd req4) + parseRequestBodyEx (setMaxRequestParmsSize 10 def) lbsBackEnd req4 `shouldThrow` (== PayloadTooLarge) it "exceeding max header lines" $ do SRequest req4 _bod4 <- toRequest'' ctype2 content2 - (parseRequestBodyEx (setMaxHeaderLines 1 def) lbsBackEnd req4) + parseRequestBodyEx (setMaxHeaderLines 1 def) lbsBackEnd req4 `shouldThrow` anyException it "exceeding header line size" $ do SRequest req4 _bod4 <- toRequest'' ctype3 content4 - (parseRequestBodyEx (setMaxHeaderLineLength 8190 def) lbsBackEnd req4) + parseRequestBodyEx (setMaxHeaderLineLength 8190 def) lbsBackEnd req4 `shouldThrow` (== RequestHeaderFieldsTooLarge) it "Testing parseRequestBodyEx with application/x-www-form-urlencoded" $ do @@ -195,7 +195,7 @@ "thisisalongparameterkey=andthisbeanevenlongerparametervaluehelloworldhowareyou" let ctype = "application/x-www-form-urlencoded" SRequest req _bod <- toRequest'' ctype content - (parseRequestBodyEx (setMaxRequestParmsSize 10 def) lbsBackEnd req) + parseRequestBodyEx (setMaxRequestParmsSize 10 def) lbsBackEnd req `shouldThrow` anyException where content2 = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.1.16/test/Network/Wai/TestSpec.hs new/wai-extra-3.1.17/test/Network/Wai/TestSpec.hs --- old/wai-extra-3.1.16/test/Network/Wai/TestSpec.hs 2024-11-06 06:01:16.000000000 +0100 +++ new/wai-extra-3.1.17/test/Network/Wai/TestSpec.hs 2024-11-06 05:48:44.000000000 +0100 @@ -108,7 +108,7 @@ ( "Set-Cookie" , toByteString $ Cookie.renderSetCookie $ - Cookie.def + Cookie.defaultSetCookie { Cookie.setCookieName = TE.encodeUtf8 name , Cookie.setCookieValue = TE.encodeUtf8 val } @@ -123,7 +123,7 @@ ( "Set-Cookie" , toByteString $ Cookie.renderSetCookie $ - Cookie.def + Cookie.defaultSetCookie { Cookie.setCookieName = TE.encodeUtf8 name , Cookie.setCookieExpires = @@ -200,7 +200,7 @@ it "sends a cookie set with setClientCookie to server" $ do sresp <- flip runSession cookieApp $ do setClientCookie - ( Cookie.def + ( Cookie.defaultSetCookie { Cookie.setCookieName = "cookie_name" , Cookie.setCookieValue = "cookie_value" } @@ -212,13 +212,13 @@ it "sends a cookie updated with setClientCookie to server" $ do sresp <- flip runSession cookieApp $ do setClientCookie - ( Cookie.def + ( Cookie.defaultSetCookie { Cookie.setCookieName = "cookie_name" , Cookie.setCookieValue = "cookie_value" } ) setClientCookie - ( Cookie.def + ( Cookie.defaultSetCookie { Cookie.setCookieName = "cookie_name" , Cookie.setCookieValue = "cookie_value2" } @@ -230,7 +230,7 @@ it "does not send a cookie deleted with deleteClientCookie to server" $ do sresp <- flip runSession cookieApp $ do setClientCookie - ( Cookie.def + ( Cookie.defaultSetCookie { Cookie.setCookieName = "cookie_name" , Cookie.setCookieValue = "cookie_value" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.1.16/test/WaiExtraSpec.hs new/wai-extra-3.1.17/test/WaiExtraSpec.hs --- old/wai-extra-3.1.16/test/WaiExtraSpec.hs 2024-11-06 06:01:16.000000000 +0100 +++ new/wai-extra-3.1.17/test/WaiExtraSpec.hs 2024-11-06 05:48:44.000000000 +0100 @@ -44,7 +44,7 @@ import Network.Wai.Middleware.Gzip ( GzipFiles (..), GzipSettings (..), - def, + defaultGzipSettings, defaultCheckMime, gzip, ) @@ -197,7 +197,7 @@ gzipApp' :: (Response -> Response) -> Application gzipApp' changeRes = - gzip def $ \_ f -> + gzip defaultGzipSettings $ \_ f -> f . changeRes $ responseLBS status200 @@ -325,19 +325,19 @@ caseGzipFiles :: Assertion caseGzipFiles = do -- Default GzipSettings ignore compressing files - withSession (gzipFileApp def) $ do + withSession (gzipFileApp defaultGzipSettings) $ do _ <- doesNotEncodeGzipJSON [acceptGzip] _ <- doesNotEncodeGzipJSON [] pure () -- Just compresses the file - withSession (gzipFileApp def{gzipFiles = GzipCompress}) $ do + withSession (gzipFileApp defaultGzipSettings{gzipFiles = GzipCompress}) $ do _ <- doesEncodeGzipJSON [acceptGzip] _ <- doesNotEncodeGzipJSON [] pure () -- Checks for a "filename.gz" file in the same folder - withSession (gzipFileApp def{gzipFiles = GzipPreCompressed GzipIgnore}) $ do + withSession (gzipFileApp defaultGzipSettings{gzipFiles = GzipPreCompressed GzipIgnore}) $ do sres <- request defaultRequest @@ -354,7 +354,8 @@ #endif sres - doesNotEncodeGzipJSON [] >> pure () + _ <- doesNotEncodeGzipJSON [] + pure () -- If no "filename.gz" file is in the same folder, just ignore withSession (noPreCompressApp $ GzipPreCompressed GzipIgnore) $ do @@ -375,7 +376,7 @@ assertBool s $ length fs == n checkTempDir 0 "temp directory should be empty" -- Respond with "test/json" file - withSession (gzipFileApp def{gzipFiles = GzipCacheFolder path}) $ do + withSession (gzipFileApp defaultGzipSettings{gzipFiles = GzipCacheFolder path}) $ do _ <- doesEncodeGzipJSON [acceptGzip] liftIO $ checkTempDir 1 "should have one file" _ <- doesEncodeGzipJSON [acceptGzip] @@ -393,13 +394,13 @@ liftIO $ checkTempDir 2 "again should not have done anything" -- try "test/json" again, just to make sure it isn't a weird Session bug - withSession (gzipFileApp def{gzipFiles = GzipCacheFolder path}) $ do + withSession (gzipFileApp defaultGzipSettings{gzipFiles = GzipCacheFolder path}) $ do _ <- doesEncodeGzipJSON [acceptGzip] liftIO $ checkTempDir 2 "just to make sure it isn't a fluke" where noPreCompressApp set = gzipFileApp' - def{gzipFiles = set} + defaultGzipSettings{gzipFiles = set} $ const $ responseFile status200 @@ -620,7 +621,7 @@ iactual <- I.newIORef mempty middleware <- mkRequestLogger - def + defaultRequestLoggerSettings { destination = Callback $ \strs -> I.modifyIORef iactual (`mappend` strs) , outputFormat = Detailed False } @@ -755,7 +756,7 @@ iactual <- I.newIORef mempty middleware <- mkRequestLogger - def + defaultRequestLoggerSettings { destination = Callback $ \strs -> I.modifyIORef iactual (`mappend` strs) , outputFormat = format } @@ -795,7 +796,7 @@ iactual <- I.newIORef mempty middleware <- mkRequestLogger - def + defaultRequestLoggerSettings { destination = Callback $ \strs -> I.modifyIORef iactual (`mappend` strs) , outputFormat = format } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.1.16/test/sample.hs new/wai-extra-3.1.17/test/sample.hs --- old/wai-extra-3.1.16/test/sample.hs 2024-11-06 06:01:16.000000000 +0100 +++ new/wai-extra-3.1.17/test/sample.hs 2024-11-06 05:48:44.000000000 +0100 @@ -30,4 +30,4 @@ _ -> ResponseFile status404 [] "../LICENSE" Nothing main :: IO () -main = run 3000 $ gzip def $ jsonp app +main = run 3000 $ gzip defaultGzipSettings $ jsonp app diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.1.16/wai-extra.cabal new/wai-extra-3.1.17/wai-extra.cabal --- old/wai-extra-3.1.16/wai-extra.cabal 2024-11-06 06:01:16.000000000 +0100 +++ new/wai-extra-3.1.17/wai-extra.cabal 2024-11-06 05:50:34.000000000 +0100 @@ -1,5 +1,5 @@ Name: wai-extra -Version: 3.1.16 +Version: 3.1.17 Synopsis: Provides some basic WAI handlers and middleware. description: Provides basic WAI handler and middleware functionality: