Skip to content

Commit 785bfc0

Browse files
committed
Implement future changelog previews in the docs (aio-libs#6055)
* Implement future changelog previews in the docs * Self-install on RTD * Fix spelling mistakes in the check notes (cherry picked from commit 079e9c5)
1 parent cd32d18 commit 785bfc0

File tree

12 files changed

+69
-19
lines changed

12 files changed

+69
-19
lines changed

.readthedocs.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html
3+
# for details
4+
5+
---
6+
version: 2
7+
8+
submodules:
9+
include: all # []
10+
exclude: []
11+
recursive: true
12+
113
build:
214
image: latest
315
python:
4-
version: 3.6
5-
pip_install: false
16+
version: 3.8
17+
install:
18+
- method: pip
19+
path: .
20+
- requirements: requirements/doc.txt
21+
...

CHANGES.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
=========
2-
Changelog
3-
=========
4-
51
..
62
You should *NOT* be adding new change log entries to this file, this
73
file is managed by towncrier. You *may* edit previous change logs to

CHANGES/4054.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Implemented readuntil in StreamResponse
1+
Implemented ``readuntil`` in ``StreamResponse``

CHANGES/4700.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
AioHTTPTestCase is more async friendly now.
1+
``AioHTTPTestCase`` is more async friendly now.
22

3-
For people who use unittest and are used to use unittest.TestCase
4-
it will be easier to write new test cases like the sync version of the TestCase class,
3+
For people who use unittest and are used to use :py:exc:`~unittest.TestCase`
4+
it will be easier to write new test cases like the sync version of the :py:exc:`~unittest.TestCase` class,
55
without using the decorator `@unittest_run_loop`, just `async def test_*`.
6-
The only difference is that for the people using python3.7 and below a new dependency is needed, it is `asynctestcase`.
6+
The only difference is that for the people using python3.7 and below a new dependency is needed, it is ``asynctestcase``.

CHANGES/5326.doc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Refactor OpenAPI/Swagger aiohttp addons, added aio-openapi
1+
Refactored OpenAPI/Swagger aiohttp addons, added ``aio-openapi``

CHANGES/5905.bugfix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
remove deprecated loop argument for asnycio.sleep/gather calls
1+
Removed the deprecated ``loop`` argument from the ``asyncio.sleep``/``gather`` calls

docs/changes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
.. _aiohttp_changes:
22

3+
=========
4+
Changelog
5+
=========
6+
7+
To be included in v\ |release| (if present)
8+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9+
10+
.. towncrier-draft-entries:: |release| [UNRELEASED DRAFT]
11+
12+
Released versions
13+
^^^^^^^^^^^^^^^^^
14+
315
.. include:: ../CHANGES.rst
416

517
.. include:: ../HISTORY.rst

docs/conf.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
import io
1616
import os
1717
import re
18+
from pathlib import Path
19+
20+
PROJECT_ROOT_DIR = Path(__file__).parents[1].resolve()
1821

1922
_docs_path = os.path.dirname(__file__)
2023
_version_path = os.path.abspath(
@@ -51,6 +54,7 @@
5154
# Third-party extensions:
5255
"sphinxcontrib.asyncio",
5356
"sphinxcontrib.blockdiag",
57+
"sphinxcontrib.towncrier", # provides `towncrier-draft-entries` directive
5458
]
5559

5660

@@ -434,3 +438,10 @@
434438
("py:exc", "HTTPMethodNotAllowed"), # undocumented
435439
("py:class", "HTTPMethodNotAllowed"), # undocumented
436440
]
441+
442+
# -- Options for towncrier_draft extension -----------------------------------
443+
444+
towncrier_draft_autoversion_mode = "draft" # or: 'sphinx-version', 'sphinx-release'
445+
towncrier_draft_include_empty = True
446+
towncrier_draft_working_directory = PROJECT_ROOT_DIR
447+
# Not yet supported: towncrier_draft_config_path = 'pyproject.toml' # relative to cwd

docs/spelling_wordlist.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ WSMsgType
8282
Websockets
8383
Workflow
8484
abc
85+
addons
8586
aiodns
8687
aioes
8788
aiohttp
@@ -115,6 +116,7 @@ botocore
115116
bugfix
116117
builtin
117118
cChardet
119+
callables
118120
cancelled
119121
canonicalization
120122
canonicalize
@@ -202,6 +204,7 @@ login
202204
lookup
203205
lookups
204206
lossless
207+
lowercased
205208
manylinux
206209
metadata
207210
microservice
@@ -258,6 +261,7 @@ redirections
258261
refactor
259262
refactored
260263
refactoring
264+
referenceable
261265
regex
262266
regexps
263267
regexs
@@ -316,6 +320,7 @@ unittest
316320
unix
317321
unsets
318322
unstripped
323+
uppercased
319324
upstr
320325
url
321326
urldispatcher

requirements/dev.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ click==7.1.2
6262
# towncrier
6363
click-default-group==1.2.2
6464
# via towncrier
65-
coverage==5.5
65+
coverage[toml]==6.0
6666
# via
6767
# -r requirements/test.txt
6868
# pytest-cov
@@ -129,7 +129,7 @@ mccabe==0.6.1
129129
# via
130130
# -r requirements/lint.txt
131131
# flake8
132-
multidict==5.1.0
132+
multidict==5.2.0
133133
# via
134134
# -r requirements/multidict.txt
135135
# yarl
@@ -199,7 +199,7 @@ pytest==6.1.2
199199
# -r requirements/test.txt
200200
# pytest-cov
201201
# pytest-mock
202-
pytest-cov==2.12.1
202+
pytest-cov==3.0.0
203203
# via -r requirements/test.txt
204204
pytest-mock==3.6.1
205205
# via -r requirements/test.txt
@@ -237,6 +237,7 @@ sphinx==4.2.0
237237
# -r requirements/doc.txt
238238
# sphinxcontrib-asyncio
239239
# sphinxcontrib-blockdiag
240+
# sphinxcontrib-towncrier
240241
sphinxcontrib-applehelp==1.0.2
241242
# via sphinx
242243
sphinxcontrib-asyncio==0.3.0
@@ -253,6 +254,8 @@ sphinxcontrib-qthelp==1.0.3
253254
# via sphinx
254255
sphinxcontrib-serializinghtml==1.1.5
255256
# via sphinx
257+
sphinxcontrib-towncrier==0.2.0a0
258+
# via -r requirements/doc.txt
256259
toml==0.10.2
257260
# via
258261
# -r requirements/lint.txt
@@ -261,10 +264,11 @@ toml==0.10.2
261264
# mypy
262265
# pre-commit
263266
# pytest
264-
# pytest-cov
265267
# towncrier
266268
towncrier==21.3.0
267-
# via -r requirements/doc.txt
269+
# via
270+
# -r requirements/doc.txt
271+
# sphinxcontrib-towncrier
268272
trustme==0.9.0 ; platform_machine != "i686"
269273
# via -r requirements/test.txt
270274
typed-ast==1.4.3 ; implementation_name == "cpython"

0 commit comments

Comments
 (0)