Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-persistent for openSUSE:Factory 
checked in at 2021-03-28 11:55:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-persistent (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-persistent.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-persistent"

Sun Mar 28 11:55:27 2021 rev:24 rq:881483 version:2.11.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-persistent/ghc-persistent.changes    
2020-12-22 11:44:15.333756018 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-persistent.new.2401/ghc-persistent.changes  
2021-03-28 11:57:34.468288352 +0200
@@ -1,0 +2,18 @@
+Fri Mar 19 09:15:33 UTC 2021 - psim...@suse.com
+
+- Update persistent to version 2.11.0.4.
+  ## 2.11.0.4
+
+  * Fix a compile error 
[#1213](https://github.com/yesodweb/persistent/pull/1213)
+      * That's what I get for running this stuff with flakey CI!
+
+-------------------------------------------------------------------
+Thu Mar 18 12:01:41 UTC 2021 - psim...@suse.com
+
+- Update persistent to version 2.11.0.3.
+  ## 2.11.0.3
+
+  * Backported the fix from 
[#1207](https://github.com/yesodweb/persistent/pull/1207) for asynchronous 
exceptions.
+      * Deprecated the `Acquire` family of functions.
+
+-------------------------------------------------------------------

Old:
----
  persistent-2.11.0.2.tar.gz

New:
----
  persistent-2.11.0.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-persistent.spec ++++++
--- /var/tmp/diff_new_pack.SEGkx8/_old  2021-03-28 11:57:35.016288838 +0200
+++ /var/tmp/diff_new_pack.SEGkx8/_new  2021-03-28 11:57:35.020288841 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-persistent
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name persistent
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        2.11.0.2
+Version:        2.11.0.4
 Release:        0
 Summary:        Type-safe, multi-backend data serialization
 License:        MIT

++++++ persistent-2.11.0.2.tar.gz -> persistent-2.11.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/persistent-2.11.0.2/ChangeLog.md 
new/persistent-2.11.0.4/ChangeLog.md
--- old/persistent-2.11.0.2/ChangeLog.md        2020-12-11 18:53:54.000000000 
+0100
+++ new/persistent-2.11.0.4/ChangeLog.md        2021-03-18 17:46:35.000000000 
+0100
@@ -1,5 +1,15 @@
 # Changelog for persistent
 
+## 2.11.0.4
+
+* Fix a compile error [#1213](https://github.com/yesodweb/persistent/pull/1213)
+    * That's what I get for running this stuff with flakey CI!
+
+## 2.11.0.3
+
+* Backported the fix from 
[#1207](https://github.com/yesodweb/persistent/pull/1207) for asynchronous 
exceptions.
+    * Deprecated the `Acquire` family of functions.
+
 ## 2.11.0.2
 
 * Fix a bug where an empty entity definition would break parsing of 
`EntityDef`s. [#1176](https://github.com/yesodweb/persistent/issues/1176)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/persistent-2.11.0.2/Database/Persist/Quasi.hs 
new/persistent-2.11.0.4/Database/Persist/Quasi.hs
--- old/persistent-2.11.0.2/Database/Persist/Quasi.hs   2020-12-11 
18:53:54.000000000 +0100
+++ new/persistent-2.11.0.4/Database/Persist/Quasi.hs   2021-03-18 
17:46:35.000000000 +0100
@@ -1200,14 +1200,14 @@
                             Nothing ->
                                 go (this : acc) mupd mdel rest
     nope msg =
-        error $ msg <> ", tokens: " <> show allTokens
+        error $ msg `mappend` ", tokens: " `mappend` show allTokens
 
 parseCascadeAction
     :: CascadePrefix
     -> Text
     -> Maybe CascadeAction
 parseCascadeAction prfx text = do
-    cascadeStr <- T.stripPrefix ("On" <> toPrefix prfx) text
+    cascadeStr <- T.stripPrefix ("On" `mappend` toPrefix prfx) text
     case readEither (T.unpack cascadeStr) of
         Right a ->
             Just a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/persistent-2.11.0.2/Database/Persist/Sql/Run.hs 
new/persistent-2.11.0.4/Database/Persist/Sql/Run.hs
--- old/persistent-2.11.0.2/Database/Persist/Sql/Run.hs 2020-11-03 
17:42:54.000000000 +0100
+++ new/persistent-2.11.0.4/Database/Persist/Sql/Run.hs 2021-03-18 
17:46:35.000000000 +0100
@@ -44,6 +44,7 @@
 
     return $ fst <$> mkAcquireType (P.takeResource pool) freeConn
 
+{-# DEPRECATED unsafeAcquireSqlConnFromPool "The Pool ~> Acquire functions are 
unpredictable and may result in resource leaks with asynchronous exceptions. 
They will be removed in 2.12. If you need them, please file an issue and we'll 
try to help get you sorted. See issue #1199 on GitHub for the debugging log." 
#-}
 
 -- | The returned 'Acquire' gets a connection from the pool, starts a new
 -- transaction and gives access to the prepared connection.
@@ -66,6 +67,8 @@
     connFromPool <- unsafeAcquireSqlConnFromPool
     return $ connFromPool >>= acquireSqlConn
 
+{-# DEPRECATED acquireSqlConnFromPool "The Pool ~> Acquire functions are 
unpredictable and may result in resource leaks with asynchronous exceptions. 
They will be removed in 2.12. If you need them, please file an issue and we'll 
try to help get you sorted. See issue #1199 on GitHub for the debugging log." 
#-}
+
 -- | Like 'acquireSqlConnFromPool', but lets you specify an explicit isolation
 -- level.
 --
@@ -77,6 +80,8 @@
     connFromPool <- unsafeAcquireSqlConnFromPool
     return $ connFromPool >>= acquireSqlConnWithIsolation isolation
 
+{-# DEPRECATED acquireSqlConnFromPoolWithIsolation "The Pool ~> Acquire 
functions are unpredictable and may result in resource leaks with asynchronous 
exceptions. They will be removed in 2.12. If you need them, please file an 
issue and we'll try to help get you sorted. See issue #1199 on GitHub for the 
debugging log." #-}
+
 -- | Get a connection from the pool, run the given action, and then return the
 -- connection to the pool.
 --
@@ -86,7 +91,19 @@
 runSqlPool
     :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend 
backend)
     => ReaderT backend m a -> Pool backend -> m a
-runSqlPool r pconn = with (acquireSqlConnFromPool pconn) $ runReaderT r
+runSqlPool r pconn =
+    withRunInIO $ \runInIO ->
+    withResource pconn $ \conn ->
+    UE.mask $ \restore -> do
+        let sqlBackend = projectBackend conn
+        let getter = getStmtConn sqlBackend
+        restore $ connBegin sqlBackend getter Nothing
+        a <- restore (runInIO (runReaderT r conn))
+            `UE.catchAny` \e -> do
+                restore $ connRollback sqlBackend getter
+                UE.throwIO e
+        restore $ connCommit sqlBackend getter
+        pure a
 
 -- | Like 'runSqlPool', but supports specifying an isolation level.
 --
@@ -95,7 +112,18 @@
     :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend 
backend)
     => ReaderT backend m a -> Pool backend -> IsolationLevel -> m a
 runSqlPoolWithIsolation r pconn i =
-    with (acquireSqlConnFromPoolWithIsolation i pconn) $ runReaderT r
+    withRunInIO $ \runInIO ->
+    withResource pconn $ \conn ->
+    mask $ \restore -> do
+        let sqlBackend = projectBackend conn
+        let getter = getStmtConn sqlBackend
+        restore $ connBegin sqlBackend getter (Just i)
+        a <- restore (runInIO (runReaderT r conn))
+            `UE.catchAny` \e -> do
+                restore $ connRollback sqlBackend getter
+                UE.throwIO e
+        restore $ connCommit sqlBackend getter
+        pure a
 
 -- | Like 'withResource', but times out the operation if resource
 -- allocation does not complete within the given timeout period.
@@ -237,9 +265,9 @@
         loggedClose backend = close' backend `UE.catchAny` \e -> runLoggingT
           (logError $ T.pack $ "Error closing database connection in pool: " 
++ show e)
           logFunc
-    liftIO $ createPool 
-        (mkConn logFunc) 
-        loggedClose 
+    liftIO $ createPool
+        (mkConn logFunc)
+        loggedClose
         (connectionPoolConfigStripes config)
         (connectionPoolConfigIdleTimeout config)
         (connectionPoolConfigSize config)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/persistent-2.11.0.2/Database/Persist/Types/Base.hs 
new/persistent-2.11.0.4/Database/Persist/Types/Base.hs
--- old/persistent-2.11.0.2/Database/Persist/Types/Base.hs      2020-11-05 
19:46:28.000000000 +0100
+++ new/persistent-2.11.0.4/Database/Persist/Types/Base.hs      2021-03-18 
16:47:21.000000000 +0100
@@ -27,7 +27,9 @@
 import Numeric (showHex, readHex)
 import Web.PathPieces (PathPiece(..))
 import Web.HttpApiData (ToHttpApiData (..), FromHttpApiData (..), 
parseUrlPieceMaybe, showTextData, readTextData, parseBoundedTextData)
+import Data.Monoid
 
+import Prelude
 
 -- | A 'Checkmark' should be used as a field type whenever a
 -- uniqueness constraint should guarantee that a certain kind of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/persistent-2.11.0.2/persistent.cabal 
new/persistent-2.11.0.4/persistent.cabal
--- old/persistent-2.11.0.2/persistent.cabal    2020-12-11 18:53:54.000000000 
+0100
+++ new/persistent-2.11.0.4/persistent.cabal    2021-03-18 17:46:35.000000000 
+0100
@@ -1,5 +1,5 @@
 name:            persistent
-version:         2.11.0.2
+version:         2.11.0.4
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <mich...@snoyman.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/persistent-2.11.0.2/test/main.hs 
new/persistent-2.11.0.4/test/main.hs
--- old/persistent-2.11.0.2/test/main.hs        2020-12-11 18:53:54.000000000 
+0100
+++ new/persistent-2.11.0.4/test/main.hs        2021-03-18 17:46:35.000000000 
+0100
@@ -9,6 +9,7 @@
 import Data.Time
 import Text.Shakespeare.Text
 import Data.List
+import Data.Monoid
 
 import Database.Persist.Class.PersistField
 import Database.Persist.Quasi

Reply via email to