Skip to content

Commit 28f14f8

Browse files
authored
Drop python3.9, m2r2, use myst-parser (#1971)
1 parent 0602e5e commit 28f14f8

File tree

19 files changed

+146
-269
lines changed

19 files changed

+146
-269
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: ['3.9', '3.10', '3.11', '3.12']
23+
python-version: ['3.10', '3.11', '3.12', '3.13']
2424

2525
steps:
2626
- uses: actions/checkout@v4
@@ -56,7 +56,6 @@ jobs:
5656
# Different python versions are covered differently:
5757
poetry run pytest returns docs/pages tests
5858
59-
poetry run doc8 -q docs
6059
poetry run codespell returns tests docs typesafety README.md CONTRIBUTING.md CHANGELOG.md
6160
6261
poetry run poetry check

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@ incremental in minor, bugfixes only are patches.
66
See [0Ver](https://0ver.org/).
77

88

9-
## 0.24.0 WIP
9+
## 0.24.0
1010

1111
### Features
1212

13+
- Drop `python3.9` support
14+
- Add `python3.13` support
15+
- Add support for `mypy>=1.12`
1316
- Add picky exceptions to `future_safe` decorator like `safe` has.
1417
- Improve inference of `ResultLike` objects when exception catching
1518
decorator is applied with explicit exception types
1619
- Add picky exceptions to `impure_safe` decorator like `safe` has. Issue #1543
1720
- Add partition function to result module. Issue #1905
18-
- Adds `default_error` parameter to `returns.converters.maybe_to_result`,
21+
- Add `default_error` parameter to `returns.converters.maybe_to_result`,
1922
which provides a default error value for `Failure`
2023

2124

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ Before submitting your code please do the following steps:
117117
6. Run `pytest` again to make sure it is still working
118118
7. Run `mypy` to ensure that types are correct
119119
8. Run `flake8` to ensure that style is correct
120-
9. Run `doc8` to ensure that docs are correct
121-
10. Run `slotscheck` to ensure that slots are correct
120+
9. Run `slotscheck` to ensure that slots are correct
122121

123122

124123
## Other help

docs/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def _get_project_meta():
5151
'sphinx.ext.napoleon',
5252

5353
# Used to include .md files:
54-
'm2r2',
54+
'myst_parser',
5555

5656
# Used to insert typehints into the final docs:
5757
'sphinx_autodoc_typehints',
@@ -71,6 +71,11 @@ def _get_project_meta():
7171
'show-inheritance': True,
7272
}
7373

74+
suppress_warnings = [
75+
'myst.header',
76+
'myst.xref_missing',
77+
]
78+
7479
# https://pypi.org/project/sphinx-autodoc-typehints/
7580
always_document_param_types = True
7681

docs/index.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
.. mdinclude:: ../README.md
1+
returns
2+
=======
3+
4+
.. include:: ../README.md
5+
:parser: myst_parser.sphinx_
26

37
Contents
48
--------

docs/pages/changelog.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.. mdinclude:: ../../CHANGELOG.md
1+
.. include:: ../../CHANGELOG.md
2+
:parser: myst_parser.sphinx_

poetry.lock

Lines changed: 124 additions & 167 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ _ = "returns.contrib.hypothesis._entrypoint:_setup_hook"
4646

4747

4848
[tool.poetry.dependencies]
49-
python = "^3.9"
49+
python = "^3.10"
5050

5151
typing-extensions = ">=4.0,<5.0"
5252
pytest = { version = "^8.0", optional = true }
@@ -72,7 +72,6 @@ pytest-mypy-plugins = "^3.1"
7272
pytest-subtests = "^0.13"
7373
pytest-shard = "^0.1"
7474

75-
doc8 = "^1.1"
7675

7776
[tool.poetry.group.docs]
7877
optional = true
@@ -83,7 +82,7 @@ sphinx = "^7.3"
8382
sphinx-autodoc-typehints = "^2.3"
8483
sphinxcontrib-mermaid = "^1.0"
8584
furo = "^2024.5"
86-
m2r2 = "^0.3"
85+
myst-parser = "^4.0"
8786
tomli = "^2.0"
8887

8988
[tool.poetry.extras]

setup.cfg

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,6 @@ disallow_subclassing_any = False
203203
disallow_subclassing_any = False
204204

205205

206-
[doc8]
207-
# doc8 configuration: https://pypi.org/project/doc8/
208-
ignore-path = docs/_build
209-
max-line-length = 80
210-
sphinx = True
211-
ignore-path-errors=docs/pages/railway.rst;D000
212-
213-
214206
[codespell]
215207
# codespell configuration: https://pypi.org/project/codespell
216208
ignore-words-list = appliable,falsy

tests/conftest.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)