File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,16 +25,10 @@ Make sure the tests pass:
2525
2626.. code-block :: sh
2727
28- python -m pip install -e .[tests,daphne]
28+ python -m pip install -e . --group tests
29+ python -m pip install -e " .[daphne]"
2930 pytest
3031
31- .. note ::
32- If you're using ``zsh `` for your shell, the above command will fail with a
33- ``zsh: no matches found: .[tests] `` error.
34- To fix this use ``noglob ``::
35-
36- noglob python -m pip install -e .[tests]
37-
3832 Make your change. Add tests for your change. Make the tests pass:
3933
4034.. code-block :: sh
Original file line number Diff line number Diff line change @@ -74,10 +74,10 @@ your environment:
7474.. code-block :: sh
7575
7676 cd channels/
77- python -m pip install -e .[ tests]
77+ python -m pip install -e . --group tests
7878
79- Note the ``[ tests] `` section there; that tells ``pip `` that you want to install
80- the ``tests `` extra , which will bring in testing dependencies like
79+ Note the ``--group tests `` section there; that tells ``pip `` that you want to install
80+ the ``tests `` dependency group from `` pyproject.toml `` , which will bring in testing dependencies like
8181``pytest-django ``.
8282
8383Then, you can run the tests:
Original file line number Diff line number Diff line change @@ -34,6 +34,15 @@ dependencies = [
3434 " asgiref>=3.9.0,<4" ,
3535]
3636
37+
38+ [project .optional-dependencies ]
39+ daphne = [
40+ " daphne>=4.0.0" ,
41+ ]
42+ types = [
43+ " types-channels" ,
44+ ]
45+
3746[dependency-groups ]
3847tests = [
3948 " async-timeout" ,
@@ -43,12 +52,6 @@ tests = [
4352 " pytest-asyncio" ,
4453 " selenium" ,
4554]
46- daphne = [
47- " daphne>=4.0.0" ,
48- ]
49- types = [
50- " types-channels" ,
51- ]
5255
5356[project .urls ]
5457Documentation = " https://channels.readthedocs.io/"
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ envlist =
88 qa
99
1010[testenv]
11+ extras = daphne
1112dependency_groups =
1213 tests
13- daphne
1414commands =
1515 pytest -v {posargs}
1616deps =
You can’t perform that action at this time.
0 commit comments