on master help sign in
6 files changed+42−29
since splitsnapshots
unifiedsplit
.github/workflows/ci.yaml+8−10 CHANGELOG.md+10 Network/HTTP/Req.hs+8−9 README.md+1−1 cabal.project+4 req.cabal+11−9
.github/workflows/ci.yaml+8−10
@@ -12,16 +12,14 @@ jobs:
1212 runs-on: ubuntu-latest
1313 steps:
1414 - uses: actions/checkout@v4
15− - uses: haskell-actions/run-ormolu@v15
15+ - uses: haskell-actions/run-ormolu@v17
1616 build:
1717 runs-on: ubuntu-latest
1818 needs: ormolu
1919 strategy:
2020 matrix:
21− cabal: ["3.10"]
22− ghc: ["9.4.7", "9.6.3", "9.8.1"]
23− env:
24− CONFIG: "--enable-tests --enable-benchmarks --flags=dev"
21+ cabal: ["3.12"]
22+ ghc: ["9.6.3", "9.8.2", "9.10.1"]
2523 steps:
2624 - uses: actions/checkout@v4
2725 - uses: haskell-actions/setup@v2
@@ -30,8 +28,8 @@ jobs:
3028 ghc-version: ${{ matrix.ghc }}
3129 cabal-version: ${{ matrix.cabal }}
3230 - run: cabal update
33− - run: cabal freeze $CONFIG
34− - uses: actions/cache@v4.0.0
31+ - run: cabal freeze
32+ - uses: actions/cache@v4.2.3
3533 with:
3634 path: |
3735 ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
@@ -40,10 +38,10 @@ jobs:
4038 restore-keys: |
4139 ${{ runner.os }}-${{ matrix.ghc }}-
4240 - run: cabal format && git diff --exit-code --color=always
43− - run: cabal build $CONFIG
41+ - run: cabal build
4442 - run: |
4543 docker pull kennethreitz/httpbin
4644 docker run -p 1234:80 kennethreitz/httpbin &
47− cabal test $CONFIG
48− - run: cabal haddock $CONFIG
45+ cabal test
46+ - run: cabal haddock
4947 - 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+
111## Req 3.13.2
212
313* Disable the problematic `httpbin-tests` test suite by default. Only enable
Network/HTTP/Req.hs+8−9
@@ -585,10 +585,10 @@ req' method url body options m = do
585585 withReqManager (m request)
586586
587587-- | Perform an action using the global implicit 'L.Manager' that the rest
588−-- of the library uses. This allows to reuse connections that the
588+-- of the library uses. This allows us to reuse connections that the
589589-- 'L.Manager' controls.
590590withReqManager :: (MonadIO m) => (L.Manager -> m a) -> m a
591−withReqManager m = liftIO (readIORef globalManager) >>= m
591+withReqManager m = m globalManager
592592
593593-- | The global 'L.Manager' that 'req' uses. Here we just go with the
594594-- default settings, so users don't need to deal with this manager stuff at
@@ -601,16 +601,16 @@ withReqManager m = liftIO (readIORef globalManager) >>= m
601601-- manager. From that moment on the 'IORef' will be just reused—exactly the
602602-- behavior we want here in order to maximize connection sharing. GHC could
603603-- spoil the plan by inlining the definition, hence the @NOINLINE@ pragma.
604−globalManager :: IORef L.Manager
604+globalManager :: L.Manager
605605globalManager = unsafePerformIO $ do
606606 context <- NC.initConnectionContext
607607 let settings =
608608 L.mkManagerSettingsContext
609609 (Just context)
610− (NC.TLSSettingsSimple False False False def)
610+ def
611611 Nothing
612612 manager <- L.newManager settings
613− newIORef manager
613+ return manager
614614{-# NOINLINE globalManager #-}
615615
616616----------------------------------------------------------------------------
@@ -716,7 +716,6 @@ data HttpConfig = HttpConfig
716716 -- @since 3.6.0
717717 httpConfigBodyPreviewLength :: forall a. (Num a) => a
718718 }
719− deriving (Typeable)
720719
721720-- | The default value of 'HttpConfig'.
722721--
@@ -1025,7 +1024,7 @@ instance (HttpMethod method) => RequestComponent (Tagged "method" method) where
10251024-- > -- https://%D1%8E%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4.%D1%80%D1%84
10261025data Url (scheme :: Scheme) = Url Scheme (NonEmpty Text)
10271026 -- NOTE The second value is the path segments in reversed order.
1028− deriving (Eq, Ord, Show, Data, Typeable, Generic)
1027+ deriving (Eq, Ord, Show, Data, Generic)
10291028
10301029type role Url nominal
10311030
@@ -2012,7 +2011,7 @@ data HttpException
20122011 | -- | A wrapper with Aeson-produced 'String' describing why decoding
20132012 -- failed
20142013 JsonHttpException String
2015− deriving (Show, Typeable, Generic)
2014+ deriving (Show, Generic)
20162015
20172016instance Exception HttpException
20182017
@@ -2049,4 +2048,4 @@ data Scheme
20492048 Http
20502049 | -- | HTTPS
20512050 Https
2052− 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 @@
44[![Hackage](https://img.shields.io/hackage/v/req.svg?style=flat)](https://hackage.haskell.org/package/req)
55[![Stackage Nightly](http://stackage.org/package/req/badge/nightly)](http://stackage.org/nightly/package/req)
66[![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)
88
99* [Related packages](#related-packages)
1010* [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−9
@@ -1,11 +1,11 @@
11cabal-version: 2.4
22name: req
3−version: 3.13.2
3+version: 3.13.4
44license: BSD-3-Clause
55license-file: LICENSE.md
66maintainer: Mark Karpov <markkarpov92@gmail.com>
77author: 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
99homepage: https://github.com/mrkkrp/req
1010bug-reports: https://github.com/mrkkrp/req/issues
1111synopsis: HTTP client library
@@ -39,9 +39,9 @@ library
3939 blaze-builder >=0.3 && <0.5,
4040 bytestring >=0.10.8 && <0.13,
4141 case-insensitive >=0.2 && <1.3,
42− containers >=0.5 && <0.7,
43− crypton-connection >=0.4 && <0.5,
44− data-default-class,
42+ containers >=0.5 && <0.8,
43+ crypton-connection >=0.4.2 && <0.5,
44+ data-default-class >=0.2.0.0,
4545 exceptions >=0.6 && <0.11,
4646 http-api-data >=0.2 && <0.7,
4747 http-client >=0.7.13.1 && <0.8,
@@ -51,14 +51,16 @@ library
5151 monad-control >=1.0 && <1.1,
5252 mtl >=2.0 && <3.0,
5353 retry >=0.8 && <0.10,
54− template-haskell >=2.19 && <2.22,
54+ template-haskell >=2.19 && <2.23,
5555 text >=0.2 && <2.2,
5656 transformers >=0.5.3.0 && <0.7,
5757 transformers-base,
5858 unliftio-core >=0.1.1 && <0.3
5959
6060 if flag(dev)
61− ghc-options: -Wall -Werror -Wpartial-fields -Wunused-packages
61+ ghc-options:
62+ -Wall -Werror -Wpartial-fields -Wunused-packages
63+ -Wno-unused-imports
6264
6365 else
6466 ghc-options: -O2 -Wall
@@ -85,9 +87,9 @@ test-suite pure-tests
8587 modern-uri >=0.3 && <0.4,
8688 req,
8789 retry >=0.8 && <0.10,
88− template-haskell >=2.19 && <2.22,
90+ template-haskell >=2.19 && <2.23,
8991 text >=0.2 && <2.2,
90− time >=1.2 && <1.13
92+ time >=1.2 && <1.15
9193
9294 if flag(dev)
9395 ghc-options: