on master help sign in
.github/workflows/ci.yaml+8−10
since splitsnapshots
unifiedsplit
@@ -12,16 +12,14 @@ jobs:
12 runs-on: ubuntu-latest
12 runs-on: ubuntu-latest
13 steps:
13 steps:
14 - uses: actions/checkout@v4
14 - uses: actions/checkout@v4
15− - uses: haskell-actions/run-ormolu@v14
15+ - uses: haskell-actions/run-ormolu@v17
16 build:
16 build:
17 runs-on: ubuntu-latest
17 runs-on: ubuntu-latest
18 needs: ormolu
18 needs: ormolu
19 strategy:
19 strategy:
20 matrix:
20 matrix:
21− cabal: ["3.10"]
21+ cabal: ["3.12"]
22− ghc: ["9.4.7", "9.6.3", "9.8.1"]
22+ ghc: ["9.6.3", "9.8.2", "9.10.1"]
23− env:
24− CONFIG: "--enable-tests --enable-benchmarks --flags=dev"
25 steps:
23 steps:
26 - uses: actions/checkout@v4
24 - uses: actions/checkout@v4
27 - uses: haskell-actions/setup@v2
25 - uses: haskell-actions/setup@v2
@@ -30,8 +28,8 @@ jobs:
30 ghc-version: ${{ matrix.ghc }}
28 ghc-version: ${{ matrix.ghc }}
31 cabal-version: ${{ matrix.cabal }}
29 cabal-version: ${{ matrix.cabal }}
32 - run: cabal update
30 - run: cabal update
33− - run: cabal freeze $CONFIG
31+ - run: cabal freeze
34− - uses: actions/cache@v3.3.1
32+ - uses: actions/cache@v4.2.3
35 with:
33 with:
36 path: |
34 path: |
37 ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
35 ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
@@ -40,10 +38,10 @@ jobs:
40 restore-keys: |
38 restore-keys: |
41 ${{ runner.os }}-${{ matrix.ghc }}-
39 ${{ runner.os }}-${{ matrix.ghc }}-
42 - run: cabal format && git diff --exit-code --color=always
40 - run: cabal format && git diff --exit-code --color=always
43− - run: cabal build $CONFIG
41+ - run: cabal build
44 - run: |
42 - run: |
45 docker pull kennethreitz/httpbin
43 docker pull kennethreitz/httpbin
46 docker run -p 1234:80 kennethreitz/httpbin &
44 docker run -p 1234:80 kennethreitz/httpbin &
47− cabal test $CONFIG
45+ cabal test
48− - run: cabal haddock $CONFIG
46+ - run: cabal haddock
49 - run: cabal sdist
47 - run: cabal sdist
CHANGELOG.md+10
@@ -1,3 +1,13 @@
1+## Req 3.13.4
2+
3+* Fixed empty ciphersuite list when compiling against `tls < 2.0.6`
4+ (see [PR 175](https://github.com/mrkkrp/req/pull/175)). As a side effect, now
5+ compatible with older versions of `crypton-connection` (>= 0.3).
6+
7+## Req 3.13.3
8+
9+* Works with `crypton-connection-0.4` and newer.
10+
1## Req 3.13.2
11## Req 3.13.2
2
12
3* Disable the problematic `httpbin-tests` test suite by default. Only enable
13* Disable the problematic `httpbin-tests` test suite by default. Only enable
Network/HTTP/Req.hs+9−9
@@ -236,6 +236,7 @@ import Data.ByteString qualified as B
236import Data.ByteString.Lazy qualified as BL
236import Data.ByteString.Lazy qualified as BL
237import Data.CaseInsensitive qualified as CI
237import Data.CaseInsensitive qualified as CI
238import Data.Data (Data)
238import Data.Data (Data)
239+import Data.Default.Class (def)
239import Data.Function (on)
240import Data.Function (on)
240import Data.IORef
241import Data.IORef
241import Data.Kind (Constraint, Type)
242import Data.Kind (Constraint, Type)
@@ -584,10 +585,10 @@ req' method url body options m = do
584 withReqManager (m request)
585 withReqManager (m request)
585
586
586-- | Perform an action using the global implicit 'L.Manager' that the rest
587-- | Perform an action using the global implicit 'L.Manager' that the rest
587−-- of the library uses. This allows to reuse connections that the
588+-- of the library uses. This allows us to reuse connections that the
588-- 'L.Manager' controls.
589-- 'L.Manager' controls.
589withReqManager :: (MonadIO m) => (L.Manager -> m a) -> m a
590withReqManager :: (MonadIO m) => (L.Manager -> m a) -> m a
590−withReqManager m = liftIO (readIORef globalManager) >>= m
591+withReqManager m = m globalManager
591
592
592-- | The global 'L.Manager' that 'req' uses. Here we just go with the
593-- | The global 'L.Manager' that 'req' uses. Here we just go with the
593-- default settings, so users don't need to deal with this manager stuff at
594-- default settings, so users don't need to deal with this manager stuff at
@@ -600,16 +601,16 @@ withReqManager m = liftIO (readIORef globalManager) >>= m
600-- manager. From that moment on the 'IORef' will be just reused—exactly the
601-- manager. From that moment on the 'IORef' will be just reused—exactly the
601-- behavior we want here in order to maximize connection sharing. GHC could
602-- behavior we want here in order to maximize connection sharing. GHC could
602-- spoil the plan by inlining the definition, hence the @NOINLINE@ pragma.
603-- spoil the plan by inlining the definition, hence the @NOINLINE@ pragma.
603−globalManager :: IORef L.Manager
604+globalManager :: L.Manager
604globalManager = unsafePerformIO $ do
605globalManager = unsafePerformIO $ do
605 context <- NC.initConnectionContext
606 context <- NC.initConnectionContext
606 let settings =
607 let settings =
607 L.mkManagerSettingsContext
608 L.mkManagerSettingsContext
608 (Just context)
609 (Just context)
609− (NC.TLSSettingsSimple False False False)
610+ def
610 Nothing
611 Nothing
611 manager <- L.newManager settings
612 manager <- L.newManager settings
612− newIORef manager
613+ return manager
613{-# NOINLINE globalManager #-}
614{-# NOINLINE globalManager #-}
614
615
615----------------------------------------------------------------------------
616----------------------------------------------------------------------------
@@ -715,7 +716,6 @@ data HttpConfig = HttpConfig
715 -- @since 3.6.0
716 -- @since 3.6.0
716 httpConfigBodyPreviewLength :: forall a. (Num a) => a
717 httpConfigBodyPreviewLength :: forall a. (Num a) => a
717 }
718 }
718− deriving (Typeable)
719
719
720-- | The default value of 'HttpConfig'.
720-- | The default value of 'HttpConfig'.
721--
721--
@@ -1024,7 +1024,7 @@ instance (HttpMethod method) => RequestComponent (Tagged "method" method) where
1024-- > -- https://%D1%8E%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4.%D1%80%D1%84
1024-- > -- https://%D1%8E%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4.%D1%80%D1%84
1025data Url (scheme :: Scheme) = Url Scheme (NonEmpty Text)
1025data Url (scheme :: Scheme) = Url Scheme (NonEmpty Text)
1026 -- NOTE The second value is the path segments in reversed order.
1026 -- NOTE The second value is the path segments in reversed order.
1027− deriving (Eq, Ord, Show, Data, Typeable, Generic)
1027+ deriving (Eq, Ord, Show, Data, Generic)
1028
1028
1029type role Url nominal
1029type role Url nominal
1030
1030
@@ -2011,7 +2011,7 @@ data HttpException
2011 | -- | A wrapper with Aeson-produced 'String' describing why decoding
2011 | -- | A wrapper with Aeson-produced 'String' describing why decoding
2012 -- failed
2012 -- failed
2013 JsonHttpException String
2013 JsonHttpException String
2014− deriving (Show, Typeable, Generic)
2014+ deriving (Show, Generic)
2015
2015
2016instance Exception HttpException
2016instance Exception HttpException
2017
2017
@@ -2048,4 +2048,4 @@ data Scheme
2048 Http
2048 Http
2049 | -- | HTTPS
2049 | -- | HTTPS
2050 Https
2050 Https
2051− deriving (Eq, Ord, Show, Data, Typeable, Generic, TH.Lift)
2051+ deriving (Eq, Ord, Show, Data, Generic, TH.Lift)
README.md+1−1
@@ -4,7 +4,7 @@
4[![Hackage](https://img.shields.io/hackage/v/req.svg?style=flat)](https://hackage.haskell.org/package/req)
4[![Hackage](https://img.shields.io/hackage/v/req.svg?style=flat)](https://hackage.haskell.org/package/req)
5[![Stackage Nightly](http://stackage.org/package/req/badge/nightly)](http://stackage.org/nightly/package/req)
5[![Stackage Nightly](http://stackage.org/package/req/badge/nightly)](http://stackage.org/nightly/package/req)
6[![Stackage LTS](http://stackage.org/package/req/badge/lts)](http://stackage.org/lts/package/req)
6[![Stackage LTS](http://stackage.org/package/req/badge/lts)](http://stackage.org/lts/package/req)
7−![CI](https://github.com/mrkkrp/req/workflows/CI/badge.svg?branch=master)
7+[![CI](https://github.com/mrkkrp/req/actions/workflows/ci.yaml/badge.svg)](https://github.com/mrkkrp/req/actions/workflows/ci.yaml)
8
8
9* [Related packages](#related-packages)
9* [Related packages](#related-packages)
10* [Blog posts](#blog-posts)
10* [Blog posts](#blog-posts)
cabal.projectnew file+4
@@ -0,0 +1,4 @@
1+packages: .
2+tests: True
3+benchmarks: True
4+constraints: req +dev
req.cabal+11−8
@@ -1,11 +1,11 @@
1cabal-version: 2.4
1cabal-version: 2.4
2name: req
2name: req
3−version: 3.13.1
3+version: 3.13.4
4license: BSD-3-Clause
4license: BSD-3-Clause
5license-file: LICENSE.md
5license-file: LICENSE.md
6maintainer: Mark Karpov <markkarpov92@gmail.com>
6maintainer: Mark Karpov <markkarpov92@gmail.com>
7author: Mark Karpov <markkarpov92@gmail.com>
7author: Mark Karpov <markkarpov92@gmail.com>
8−tested-with: ghc ==9.4.7 ghc ==9.6.3 ghc ==9.8.1
8+tested-with: ghc ==9.6.3 ghc ==9.8.2 ghc ==9.10.1
9homepage: https://github.com/mrkkrp/req
9homepage: https://github.com/mrkkrp/req
10bug-reports: https://github.com/mrkkrp/req/issues
10bug-reports: https://github.com/mrkkrp/req/issues
11synopsis: HTTP client library
11synopsis: HTTP client library
@@ -39,8 +39,9 @@ library
39 blaze-builder >=0.3 && <0.5,
39 blaze-builder >=0.3 && <0.5,
40 bytestring >=0.10.8 && <0.13,
40 bytestring >=0.10.8 && <0.13,
41 case-insensitive >=0.2 && <1.3,
41 case-insensitive >=0.2 && <1.3,
42− containers >=0.5 && <0.7,
42+ containers >=0.5 && <0.8,
43− crypton-connection >=0.2.2 && <0.4,
43+ crypton-connection >=0.4.2 && <0.5,
44+ data-default-class >=0.2.0.0,
44 exceptions >=0.6 && <0.11,
45 exceptions >=0.6 && <0.11,
45 http-api-data >=0.2 && <0.7,
46 http-api-data >=0.2 && <0.7,
46 http-client >=0.7.13.1 && <0.8,
47 http-client >=0.7.13.1 && <0.8,
@@ -50,14 +51,16 @@ library
50 monad-control >=1.0 && <1.1,
51 monad-control >=1.0 && <1.1,
51 mtl >=2.0 && <3.0,
52 mtl >=2.0 && <3.0,
52 retry >=0.8 && <0.10,
53 retry >=0.8 && <0.10,
53− template-haskell >=2.19 && <2.22,
54+ template-haskell >=2.19 && <2.23,
54 text >=0.2 && <2.2,
55 text >=0.2 && <2.2,
55 transformers >=0.5.3.0 && <0.7,
56 transformers >=0.5.3.0 && <0.7,
56 transformers-base,
57 transformers-base,
57 unliftio-core >=0.1.1 && <0.3
58 unliftio-core >=0.1.1 && <0.3
58
59
59 if flag(dev)
60 if flag(dev)
61+ ghc-options:
60− ghc-options: -Wall -Werror -Wpartial-fields -Wunused-packages
62+ -Wall -Werror -Wpartial-fields -Wunused-packages
63+ -Wno-unused-imports
61
64
62 else
65 else
63 ghc-options: -O2 -Wall
66 ghc-options: -O2 -Wall
@@ -84,9 +87,9 @@ test-suite pure-tests
84 modern-uri >=0.3 && <0.4,
87 modern-uri >=0.3 && <0.4,
85 req,
88 req,
86 retry >=0.8 && <0.10,
89 retry >=0.8 && <0.10,
87− template-haskell >=2.19 && <2.22,
90+ template-haskell >=2.19 && <2.23,
88 text >=0.2 && <2.2,
91 text >=0.2 && <2.2,
89− time >=1.2 && <1.13
92+ time >=1.2 && <1.15
90
93
91 if flag(dev)
94 if flag(dev)
92 ghc-options:
95 ghc-options: