Skip to content

Commit db03fe1

Browse files
authored
Merge pull request #8812 from haskell/mergify/bp/3.10/pr-8789
Doc: bump to Python 3.10; Sphinx 5.3.0. Remove `--constraint: foo -none` & some polishing (backport #8789)
2 parents b3b206e + 2ae57c4 commit db03fe1

File tree

5 files changed

+51
-43
lines changed

5 files changed

+51
-43
lines changed

.github/workflows/users-guide.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
runs-on: ubuntu-latest
4747
strategy:
4848
matrix:
49-
python-version: [3.7]
49+
python-version: ['3.10']
5050

5151
steps:
5252
- uses: actions/checkout@v3

doc/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ build-and-check-requirements: requirements.txt check-requirements
2323
# See https://modelpredict.com/wht-requirements-txt-is-not-enough
2424
requirements.txt: requirements.in
2525
. ../.python-sphinx-virtualenv/bin/activate \
26+
&& pip install --upgrade pip \
2627
&& pip install pip-tools \
2728
&& pip-compile requirements.in
2829

doc/requirements.in

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
sphinx >= 5
2-
sphinx_rtd_theme >= 1
1+
sphinx == 5.3.0
2+
sphinx_rtd_theme >= 1.2
33
sphinx-jsonschema
44
sphinxnotes-strike
55
# Pygments>=2.7.4 suggested by CVE-2021-20270 CVE-2021-27291
66
Pygments >= 2.7.4
7+
# Suggested by dependabot in https://github.com/haskell/cabal/pull/8807
8+
certifi >= 2022.12.7

doc/requirements.txt

+19-18
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,40 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.9
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
44
#
55
# pip-compile requirements.in
66
#
77
alabaster==0.7.12
88
# via sphinx
99
babel==2.9.1
1010
# via sphinx
11-
certifi==2021.10.8
12-
# via requests
11+
certifi==2022.12.7
12+
# via
13+
# -r requirements.in
14+
# requests
1315
charset-normalizer==2.0.7
1416
# via requests
15-
docutils==0.17.1
17+
docutils==0.18.1
1618
# via
1719
# sphinx
1820
# sphinx-jsonschema
1921
# sphinx-rtd-theme
2022
idna==2.10
2123
# via requests
22-
imagesize==1.2.0
23-
# via sphinx
24-
importlib-metadata==4.11.4
24+
imagesize==1.4.1
2525
# via sphinx
26-
jinja2==2.11.3
26+
jinja2==3.1.2
2727
# via sphinx
2828
jsonpointer==2.1
2929
# via sphinx-jsonschema
30-
markupsafe==1.1.1
30+
markupsafe==2.1.2
3131
# via jinja2
32-
packaging==20.9
32+
packaging==23.0
3333
# via sphinx
34-
pygments==2.10.0
34+
pygments==2.14.0
3535
# via
3636
# -r requirements.in
3737
# sphinx
38-
pyparsing==2.4.7
39-
# via packaging
4038
pytz==2021.3
4139
# via babel
4240
pyyaml==5.4.1
@@ -47,21 +45,23 @@ requests==2.26.0
4745
# sphinx-jsonschema
4846
snowballstemmer==2.1.0
4947
# via sphinx
50-
sphinx==5.0.1
48+
sphinx==5.3.0
5149
# via
5250
# -r requirements.in
5351
# sphinx-rtd-theme
5452
# sphinxnotes-strike
5553
sphinx-jsonschema==1.16.11
5654
# via -r requirements.in
57-
sphinx-rtd-theme==1.0.0
55+
sphinx-rtd-theme==1.2.0
5856
# via -r requirements.in
5957
sphinxcontrib-applehelp==1.0.2
6058
# via sphinx
6159
sphinxcontrib-devhelp==1.0.2
6260
# via sphinx
6361
sphinxcontrib-htmlhelp==2.0.0
6462
# via sphinx
63+
sphinxcontrib-jquery==2.0.0
64+
# via sphinx-rtd-theme
6565
sphinxcontrib-jsmath==1.0.1
6666
# via sphinx
6767
sphinxcontrib-qthelp==1.0.3
@@ -72,5 +72,6 @@ sphinxnotes-strike==1.1
7272
# via -r requirements.in
7373
urllib3==1.26.7
7474
# via requests
75-
zipp==3.8.0
76-
# via importlib-metadata
75+
76+
# The following packages are considered to be unsafe in a requirements file:
77+
# setuptools

doc/setup-commands.rst

+26-22
Original file line numberDiff line numberDiff line change
@@ -880,37 +880,29 @@ Miscellaneous options
880880
.. option:: --constraint=constraint
881881

882882
Restrict solutions involving a package to given version
883-
bounds, flag settings, and other properties. For example, to
884-
consider only install plans that use version 2.1 of ``bar``
885-
or do not use ``bar`` at all, write:
883+
bounds, flag settings, and other properties.
884+
885+
The following considers only install plans where ``bar``,
886+
if used, is restricted to version 2.1:
886887

887888
::
888889

889890
$ cabal install --constraint="bar == 2.1"
890891

891-
Version bounds have the same syntax as :pkg-field:`build-depends`.
892-
As a special case, the following prevents ``bar`` from being
893-
used at all:
892+
The following prevents ``bar`` from being used at all:
894893

895894
::
896895

897-
# Note: this is just syntax sugar for '> 1 && < 1', and is
898-
# supported by build-depends.
899-
$ cabal install --constraint="bar -none"
900-
901-
You can also specify flag assignments:
896+
$ cabal install --constraint="bar <0"
902897

903-
::
904-
905-
# Require bar to be installed with the foo flag turned on and
906-
# the baz flag turned off.
907-
$ cabal install --constraint="bar +foo -baz"
898+
Version bounds have the same syntax as :pkg-field:`build-depends`.
899+
Yet extra pseudo version bounds are available here in addition:
908900

909-
To specify multiple constraints, you may pass the
910-
``constraint`` option multiple times.
901+
- ``installed`` to fix a package to the already installed version.
902+
Often useful for GHC-supplied packages in combination with :cfg-field:`allow-newer`,
903+
e.g., ``--allow-newer='*:base' --constraint='base installed'``.
911904

912-
There are also some more specialized constraints, which most people
913-
don't generally need:
905+
- ``source`` to fix a package to the local source copy.
914906

915907
::
916908

@@ -924,18 +916,30 @@ Miscellaneous options
924916
# specify this.)
925917
$ cabal install --constraint="bar source"
926918

919+
Further, we can specify flag assignments with ``+FLAG`` and ``-FLAG``
920+
or enable test (``test``) and benchmark (``bench``) suites:
921+
922+
::
923+
924+
# Require bar to be installed with the foo flag turned on and
925+
# the baz flag turned off.
926+
$ cabal install --constraint="bar +foo -baz"
927+
927928
# Require that bar have test suites and benchmarks enabled.
928929
$ cabal install --constraint="bar test" --constraint="bar bench"
929930

931+
To specify multiple constraints, you may pass the
932+
``constraint`` option multiple times.
933+
930934
By default, constraints only apply to build dependencies
931935
(:pkg-field:`build-depends`), build dependencies of build
932936
dependencies, and so on. Constraints normally do not apply to
933937
dependencies of the ``Setup.hs`` script of any package
934938
(:pkg-field:`custom-setup:setup-depends`) nor do they apply to build tools
935939
(:pkg-field:`build-tool-depends`) or the dependencies of build
936940
tools. To explicitly apply a constraint to a setup or build
937-
tool dependency, you can add a qualifier to the constraint as
938-
follows:
941+
tool dependency, you can add a qualifier ``setup`` or ``any``
942+
to the constraint as follows:
939943

940944
::
941945

0 commit comments

Comments
 (0)