Hello community, here is the log from the commit of package ghc-http-api-data for openSUSE:Leap:15.2 checked in at 2020-02-19 18:39:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/ghc-http-api-data (Old) and /work/SRC/openSUSE:Leap:15.2/.ghc-http-api-data.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-http-api-data" Wed Feb 19 18:39:27 2020 rev:11 rq:771340 version:0.4.1.1 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/ghc-http-api-data/ghc-http-api-data.changes 2020-01-15 15:02:09.821801918 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.ghc-http-api-data.new.26092/ghc-http-api-data.changes 2020-02-19 18:39:28.174062017 +0100 @@ -1,0 +2,24 @@ +Tue Nov 12 09:57:07 UTC 2019 - [email protected] + +- Update http-api-data to version 0.4.1.1. + 0.4.1.1 + ------- + + * Allow cookie <0.5 + * Change to `build-type: Simple` + +------------------------------------------------------------------- +Fri Nov 8 16:13:57 UTC 2019 - Peter Simons <[email protected]> + +- Drop obsolete group attributes. + +------------------------------------------------------------------- +Sun May 26 09:27:02 UTC 2019 - [email protected] + +- Update http-api-data to version 0.4.1. + Upstream has edited the change log file since the last release in + a non-trivial way, i.e. they did more than just add a new entry + at the top. You can review the file at: + http://hackage.haskell.org/package/http-api-data-0.4.1/src/CHANGELOG.md + +------------------------------------------------------------------- Old: ---- http-api-data-0.4.tar.gz New: ---- http-api-data-0.4.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-http-api-data.spec ++++++ --- /var/tmp/diff_new_pack.bl99vF/_old 2020-02-19 18:39:28.494062410 +0100 +++ /var/tmp/diff_new_pack.bl99vF/_new 2020-02-19 18:39:28.494062410 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-http-api-data # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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,11 +19,10 @@ %global pkg_name http-api-data %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.4 +Version: 0.4.1.1 Release: 0 Summary: Converting to/from HTTP API data like URL pieces, headers and query parameters License: BSD-2-Clause -Group: Development/Libraries/Haskell URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel @@ -31,7 +30,6 @@ BuildRequires: ghc-attoparsec-iso8601-devel BuildRequires: ghc-base-compat-devel BuildRequires: ghc-bytestring-devel -BuildRequires: ghc-cabal-doctest-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-cookie-devel BuildRequires: ghc-hashable-devel @@ -39,16 +37,12 @@ BuildRequires: ghc-rpm-macros BuildRequires: ghc-tagged-devel BuildRequires: ghc-text-devel -BuildRequires: ghc-time-devel -BuildRequires: ghc-time-locale-compat-devel +BuildRequires: ghc-time-compat-devel BuildRequires: ghc-unordered-containers-devel BuildRequires: ghc-uuid-types-devel %if %{with tests} BuildRequires: ghc-HUnit-devel BuildRequires: ghc-QuickCheck-devel -BuildRequires: ghc-directory-devel -BuildRequires: ghc-doctest-devel -BuildRequires: ghc-filepath-devel BuildRequires: ghc-hspec-devel BuildRequires: ghc-nats-devel BuildRequires: ghc-quickcheck-instances-devel @@ -62,7 +56,6 @@ %package devel Summary: Haskell %{pkg_name} library development files -Group: Development/Libraries/Haskell Requires: %{name} = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} ++++++ http-api-data-0.4.tar.gz -> http-api-data-0.4.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-api-data-0.4/CHANGELOG.md new/http-api-data-0.4.1.1/CHANGELOG.md --- old/http-api-data-0.4/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 +++ new/http-api-data-0.4.1.1/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,14 @@ +0.4.1.1 +------- + +* Allow cookie <0.5 +* Change to `build-type: Simple` + +0.4.1 +----- + +* Use `time-compat` to provide instances for `DayOfWeek`. + 0.4 --- @@ -18,7 +29,7 @@ * GHC-8.6 support * Remove dependency on `uri-bytestring` and use functions from `http-types` instead - (see [#75](https://github.com/fizruk/http-api-data/pull/78)) + (see [#75](https://github.com/fizruk/http-api-data/pull/75)) * Add support for `SetCookie` (see [#74](https://github.com/fizruk/http-api-data/pull/74)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-api-data-0.4/Setup.hs new/http-api-data-0.4.1.1/Setup.hs --- old/http-api-data-0.4/Setup.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/http-api-data-0.4.1.1/Setup.hs 2001-09-09 03:46:40.000000000 +0200 @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-api-data-0.4/Setup.lhs new/http-api-data-0.4.1.1/Setup.lhs --- old/http-api-data-0.4/Setup.lhs 2001-09-09 03:46:40.000000000 +0200 +++ new/http-api-data-0.4.1.1/Setup.lhs 1970-01-01 01:00:00.000000000 +0100 @@ -1,36 +0,0 @@ -\begin{code} -{-# LANGUAGE CPP #-} -{-# OPTIONS_GHC -Wall #-} -module Main (main) where - -#ifndef MIN_VERSION_cabal_doctest -#define MIN_VERSION_cabal_doctest(x,y,z) 0 -#endif - -#if MIN_VERSION_cabal_doctest(1,0,0) - -import Distribution.Extra.Doctest ( defaultMainWithDoctests ) -main :: IO () -main = defaultMainWithDoctests "doctests" - -#else - -#ifdef MIN_VERSION_Cabal --- If the macro is defined, we have new cabal-install, --- but for some reason we don't have cabal-doctest in package-db --- --- Probably we are running cabal sdist, when otherwise using new-build --- workflow -#warning You are configuring this package without cabal-doctest installed. \ - The doctests test-suite will not work as a result. \ - To fix this, install cabal-doctest before configuring. -#endif - -import Distribution.Simple - -main :: IO () -main = defaultMain - -#endif - -\end{code} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-api-data-0.4/http-api-data.cabal new/http-api-data-0.4.1.1/http-api-data.cabal --- old/http-api-data-0.4/http-api-data.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/http-api-data-0.4.1.1/http-api-data.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ cabal-version: >= 1.10 name: http-api-data -version: 0.4 +version: 0.4.1.1 synopsis: Converting to/from HTTP API data like URL pieces, headers and query parameters. category: Web @@ -15,7 +15,7 @@ maintainer: Nickolay Kudasov <[email protected]> homepage: http://github.com/fizruk/http-api-data stability: unstable -build-type: Custom +build-type: Simple extra-source-files: include/overlapping-compat.h @@ -29,13 +29,8 @@ GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, - GHC==8.6.2 - -custom-setup - setup-depends: - base, - Cabal, - cabal-doctest >=1.0.6 && <1.1 + GHC==8.6.5, + GHC==8.8.1 flag use-text-show description: Use text-show library for efficient ToHttpApiData implementations. @@ -47,36 +42,39 @@ include-dirs: include/ -- GHC bundled - build-depends: base >= 4.7 && < 4.13 + build-depends: base >= 4.7 && < 4.14 , bytestring >= 0.10.4.0 && < 0.11 , containers >= 0.5.5.1 && < 0.7 , text >= 1.2.3.0 && < 1.3 - , time >= 1.4.2 && < 1.9 + + -- so Semigroup Builder exists + if impl(ghc >= 8.0) + build-depends: bytestring >= 0.10.8.1 -- other-dependencies build-depends: attoparsec >= 0.13.2.2 && < 0.14 , attoparsec-iso8601 >= 1.0.1.0 && < 1.1 - , base-compat >= 0.10.5 && < 0.11 - , cookie >= 0.4.3 && < 0.4.5 - , hashable >= 1.2.7.0 && < 1.3 - , http-types >= 0.12.2 && < 0.13 + , base-compat >= 0.10.5 && < 0.12 + , cookie >= 0.4.3 && < 0.5 + , hashable >= 1.2.7.0 && < 1.4 + , http-types >= 0.12.3 && < 0.13 , tagged >= 0.8.5 && < 0.9 - , time-locale-compat >= 0.1.1.5 && < 0.2 - , unordered-containers >= 0.2.9.0 && < 0.3 + , time-compat >= 1.9.2 && < 1.10 + , unordered-containers >= 0.2.10.0 && < 0.3 , uuid-types >= 1.0.3 && <1.1 if !impl(ghc >= 7.10) build-depends: nats >= 1.1.2 && < 1.2, - void >= 0.7.2 && < 0.8 + void >= 0.7.3 && < 0.8 if !impl(ghc >= 8.0) - build-depends: semigroups >= 0.18.5 && < 0.19 + build-depends: semigroups >= 0.18.5 && < 0.20 if flag(use-text-show) cpp-options: -DUSE_TEXT_SHOW - build-depends: text-show >= 3.7.4 && <3.8 + build-depends: text-show >= 3.8.2 && <3.9 exposed-modules: Web.HttpApiData @@ -96,7 +94,7 @@ hs-source-dirs: test ghc-options: -Wall default-language: Haskell2010 - build-tool-depends: hspec-discover:hspec-discover >= 2.6.0 && <2.7 + build-tool-depends: hspec-discover:hspec-discover >= 2.7.1 && <2.8 -- inherited depndencies build-depends: base @@ -106,26 +104,14 @@ , http-api-data , nats , text - , time + , time-compat , unordered-containers , uuid-types build-depends: HUnit >= 1.6.0.0 && <1.7 - , hspec >= 2.6.0 && <2.7 - , QuickCheck >= 2.11.3 && <2.13 - , quickcheck-instances >= 0.3.19 && <0.4 - -test-suite doctests - ghc-options: -Wall - build-depends: - base, - directory >= 1.0, - doctest >= 0.16.0 && <0.17, - filepath - default-language: Haskell2010 - hs-source-dirs: test - main-is: doctests.hs - type: exitcode-stdio-1.0 + , hspec >= 2.7.1 && <2.8 + , QuickCheck >= 2.13.1 && <2.14 + , quickcheck-instances >= 0.3.21 && <0.4 source-repository head type: git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-api-data-0.4/src/Web/HttpApiData.hs new/http-api-data-0.4.1.1/src/Web/HttpApiData.hs --- old/http-api-data-0.4/src/Web/HttpApiData.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/http-api-data-0.4.1.1/src/Web/HttpApiData.hs 2001-09-09 03:46:40.000000000 +0200 @@ -49,10 +49,9 @@ -- -- >>> :set -XOverloadedStrings -- >>> import Control.Applicative --- >>> import Data.Time +-- >>> import Data.Time.Compat -- >>> import Data.Int -- >>> import Data.Text (Text) --- >>> import Data.Time (Day) -- >>> import Data.Version -- $examples diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-api-data-0.4/src/Web/Internal/FormUrlEncoded.hs new/http-api-data-0.4.1.1/src/Web/Internal/FormUrlEncoded.hs --- old/http-api-data-0.4/src/Web/Internal/FormUrlEncoded.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/http-api-data-0.4.1.1/src/Web/Internal/FormUrlEncoded.hs 2001-09-09 03:46:40.000000000 +0200 @@ -48,7 +48,7 @@ import qualified Data.Text.Encoding as Text import Data.Text.Encoding.Error (lenientDecode) import qualified Data.Text.Lazy as Lazy -import Data.Time (Day, LocalTime, NominalDiffTime, +import Data.Time.Compat (Day, LocalTime, NominalDiffTime, UTCTime, ZonedTime) import Data.Void (Void) import Data.Word (Word16, Word32, Word64, Word8) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-api-data-0.4/src/Web/Internal/HttpApiData.hs new/http-api-data-0.4.1.1/src/Web/Internal/HttpApiData.hs --- old/http-api-data-0.4/src/Web/Internal/HttpApiData.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/http-api-data-0.4.1.1/src/Web/Internal/HttpApiData.hs 2001-09-09 03:46:40.000000000 +0200 @@ -28,6 +28,7 @@ import Data.Data (Data) import qualified Data.Fixed as F import Data.Int (Int16, Int32, Int64, Int8) +import qualified Data.Map as Map import Data.Monoid (All (..), Any (..), Dual (..), First (..), Last (..), Product (..), Sum (..)) @@ -42,10 +43,13 @@ import qualified Data.Text.Lazy as L import Data.Text.Read (Reader, decimal, rational, signed) -import Data.Time (Day, FormatTime, LocalTime, +import Data.Time.Compat (Day, FormatTime, LocalTime, NominalDiffTime, TimeOfDay, - UTCTime, ZonedTime, formatTime) -import Data.Time.Locale.Compat (defaultTimeLocale, + UTCTime, ZonedTime, formatTime, + DayOfWeek (..), + nominalDiffTimeToSeconds, + secondsToNominalDiffTime) +import Data.Time.Format.Compat (defaultTimeLocale, iso8601DateFormat) import Data.Typeable (Typeable) import qualified Data.UUID.Types as UUID @@ -60,10 +64,6 @@ import Web.Cookie (SetCookie, parseSetCookie, renderSetCookie) -#if MIN_VERSION_time(1,9,1) -import Data.Time (nominalDiffTimeToSeconds, - secondsToNominalDiffTime) -#endif #if USE_TEXT_SHOW import TextShow (TextShow, showt) @@ -75,7 +75,7 @@ -- $setup -- >>> data BasicAuthToken = BasicAuthToken Text deriving (Show) -- >>> instance FromHttpApiData BasicAuthToken where parseHeader h = BasicAuthToken <$> parseHeaderWithPrefix "Basic " h; parseQueryParam p = BasicAuthToken <$> parseQueryParam p --- >>> import Data.Time +-- >>> import Data.Time.Compat -- >>> import Data.Version -- | Convert value to HTTP API data. @@ -495,28 +495,23 @@ toUrlPiece = timeToUrlPiece "%H:%M:%S%QZ" toEncodedUrlPiece = unsafeToEncodedUrlPiece --- The CPP in both this function and the function after it are to avoid --- exporting @nominalDiffTimeToSeconds@ and @secondsToNominalDiffTime@, --- since these names are already used by @Data.Time@ from the @time@ library --- starting in version @1.9.1@. -nominalDiffTimeToSecs :: NominalDiffTime -> F.Pico -nominalDiffTimeToSecs = -#if !MIN_VERSION_time(1,9,1) - realToFrac -#else - nominalDiffTimeToSeconds -#endif +-- | +-- >>> toUrlPiece Monday +-- "monday" +instance ToHttpApiData DayOfWeek where + toUrlPiece Monday = "monday" + toUrlPiece Tuesday = "tuesday" + toUrlPiece Wednesday = "wednesday" + toUrlPiece Thursday = "thursday" + toUrlPiece Friday = "friday" + toUrlPiece Saturday = "saturday" + toUrlPiece Sunday = "sunday" + + toEncodedUrlPiece = unsafeToEncodedUrlPiece -secsToNominalDiffTime :: F.Pico -> NominalDiffTime -secsToNominalDiffTime = -#if !MIN_VERSION_time(1,9,1) - realToFrac -#else - secondsToNominalDiffTime -#endif instance ToHttpApiData NominalDiffTime where - toUrlPiece = toUrlPiece . nominalDiffTimeToSecs + toUrlPiece = toUrlPiece . nominalDiffTimeToSeconds toEncodedUrlPiece = unsafeToEncodedUrlPiece instance ToHttpApiData String where toUrlPiece = T.pack @@ -686,7 +681,16 @@ -- Right 2015-10-03 00:14:24 UTC instance FromHttpApiData UTCTime where parseUrlPiece = runAtto Atto.utcTime -instance FromHttpApiData NominalDiffTime where parseUrlPiece = fmap secsToNominalDiffTime . parseUrlPiece +instance FromHttpApiData DayOfWeek where + parseUrlPiece t = case Map.lookup (T.toLower t) m of + Just dow -> Right dow + Nothing -> Left $ "Incorrect DayOfWeek: " <> T.take 10 t + where + m :: Map.Map Text DayOfWeek + m = Map.fromList [ (toUrlPiece dow, dow) | dow <- [Monday .. Sunday] ] + + +instance FromHttpApiData NominalDiffTime where parseUrlPiece = fmap secondsToNominalDiffTime . parseUrlPiece instance FromHttpApiData All where parseUrlPiece = coerce (parseUrlPiece :: Text -> Either Text Bool) instance FromHttpApiData Any where parseUrlPiece = coerce (parseUrlPiece :: Text -> Either Text Bool) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-api-data-0.4/test/Web/Internal/HttpApiDataSpec.hs new/http-api-data-0.4.1.1/test/Web/Internal/HttpApiDataSpec.hs --- old/http-api-data-0.4/test/Web/Internal/HttpApiDataSpec.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/http-api-data-0.4.1.1/test/Web/Internal/HttpApiDataSpec.hs 2001-09-09 03:46:40.000000000 +0200 @@ -13,7 +13,7 @@ import qualified Data.Text as T import qualified Data.Text.Encoding as TE import qualified Data.Text.Lazy as L -import Data.Time +import Data.Time.Compat import qualified Data.UUID.Types as UUID import Data.Version import Data.Word @@ -86,6 +86,7 @@ checkUrlPiece (Proxy :: Proxy ZonedTime) "ZonedTime" checkUrlPiece (Proxy :: Proxy UTCTime) "UTCTime" checkUrlPiece (Proxy :: Proxy NominalDiffTime) "NominalDiffTime" + checkUrlPiece (Proxy :: Proxy DayOfWeek) "DayOfWeek" checkUrlPiece (Proxy :: Proxy Version) "Version" checkUrlPiece (Proxy :: Proxy UUID.UUID) "UUID" checkUrlPiece' setCookieGen "Cookie" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-api-data-0.4/test/Web/Internal/TestInstances.hs new/http-api-data-0.4.1.1/test/Web/Internal/TestInstances.hs --- old/http-api-data-0.4/test/Web/Internal/TestInstances.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/http-api-data-0.4.1.1/test/Web/Internal/TestInstances.hs 2001-09-09 03:46:40.000000000 +0200 @@ -12,7 +12,7 @@ import Data.Char import qualified Data.HashMap.Strict as HashMap import qualified Data.Text as T -import Data.Time +import Data.Time.Compat import GHC.Exts (fromList) import GHC.Generics diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-api-data-0.4/test/doctests.hs new/http-api-data-0.4.1.1/test/doctests.hs --- old/http-api-data-0.4/test/doctests.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/http-api-data-0.4.1.1/test/doctests.hs 1970-01-01 01:00:00.000000000 +0100 @@ -1,25 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : Main (doctests) --- Copyright : (C) 2012-14 Edward Kmett --- License : BSD-style (see the file LICENSE) --- Maintainer : Edward Kmett <[email protected]> --- Stability : provisional --- Portability : portable --- --- This module provides doctests for a project based on the actual versions --- of the packages it was built with. It requires a corresponding Setup.lhs --- to be added to the project ------------------------------------------------------------------------------ -module Main where - -import Build_doctests (flags, pkgs, module_sources) -import Data.Foldable (traverse_) -import Test.DocTest - -main :: IO () -main = do - traverse_ putStrLn args - doctest args - where - args = flags ++ pkgs ++ module_sources
