Skip to content

Commit e51f558

Browse files
authored
Bump deps and tools, use hatchling and support 3.12 (#62)
1 parent 694b8db commit e51f558

File tree

10 files changed

+134
-181
lines changed

10 files changed

+134
-181
lines changed

Diff for: .github/workflows/check.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
py:
2020
- "3.11"
2121
- "3.10"
22-
- "pypy-3.7-v7.3.7" # ahead to start it earlier because takes longer
22+
- "pypy-3.7-v7.3.7" # ahead to start it earlier because takes longer
2323
- "3.9"
2424
- "3.8"
2525
- "3.7"
@@ -96,7 +96,7 @@ jobs:
9696

9797
publish:
9898
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
99-
needs: [ check, test ]
99+
needs: [check, test]
100100
runs-on: ubuntu-22.04
101101
steps:
102102
- name: Setup python to build package

Diff for: .gitignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
.idea
2-
*.egg-info/
3-
.tox/
1+
/.tox
42
.coverage*
53
coverage.xml
64
.*_cache
75
__pycache__
86
**.pyc
9-
build
10-
dist
11-
src/pytest_print/version.py
7+
src/pytest_print/_version.py

Diff for: .pre-commit-config.yaml

+21-20
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@ repos:
1111
- id: debug-statements
1212
- id: end-of-file-fixer
1313
- id: trailing-whitespace
14-
- repo: https://github.com/codespell-project/codespell
15-
rev: v2.2.4
16-
hooks:
17-
- id: codespell
1814
- repo: https://github.com/asottile/pyupgrade
19-
rev: v3.3.1
15+
rev: v3.3.2
2016
hooks:
2117
- id: pyupgrade
22-
args: [ "--py36-plus" ]
18+
args: ["--py37-plus"]
2319
- repo: https://github.com/PyCQA/isort
2420
rev: 5.12.0
2521
hooks:
@@ -28,26 +24,22 @@ repos:
2824
rev: 23.3.0
2925
hooks:
3026
- id: black
31-
args: [ --safe ]
27+
args: [--safe]
3228
- repo: https://github.com/asottile/blacken-docs
3329
rev: 1.13.0
3430
hooks:
3531
- id: blacken-docs
36-
additional_dependencies: [ black==23.3 ]
37-
- repo: https://github.com/pre-commit/pygrep-hooks
38-
rev: v1.10.0
32+
additional_dependencies: [black==23.3]
33+
- repo: https://github.com/tox-dev/pyproject-fmt
34+
rev: "0.11.1"
3935
hooks:
40-
- id: rst-backticks
36+
- id: pyproject-fmt
37+
additional_dependencies: [tox>=4.5.1]
4138
- repo: https://github.com/tox-dev/tox-ini-fmt
4239
rev: "1.3.0"
4340
hooks:
4441
- id: tox-ini-fmt
45-
args: [ "-p", "fix" ]
46-
- repo: https://github.com/asottile/setup-cfg-fmt
47-
rev: v2.2.0
48-
hooks:
49-
- id: setup-cfg-fmt
50-
args: [ --min-py3-version, "3.7", "--max-py-version", "3.10" ]
42+
args: ["-p", "fix"]
5143
- repo: https://github.com/PyCQA/flake8
5244
rev: 6.0.0
5345
hooks:
@@ -60,7 +52,16 @@ repos:
6052
- flake8-unused-arguments==0.0.13
6153
- flake8-noqa==1.3.1
6254
- pep8-naming==0.13.3
63-
- repo: https://github.com/tox-dev/pyproject-fmt
64-
rev: "0.9.2"
55+
- flake8-pyproject==1.2.3
56+
- repo: https://github.com/pre-commit/mirrors-prettier
57+
rev: "v2.7.1"
58+
hooks:
59+
- id: prettier
60+
additional_dependencies:
61+
62+
- "@prettier/[email protected]"
63+
args: ["--print-width=120", "--prose-wrap=always"]
64+
- repo: meta
6565
hooks:
66-
- id: pyproject-fmt
66+
- id: check-hooks-apply
67+
- id: check-useless-excludes

Diff for: CHANGELOG.md

+23-14
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@
66

77
**Merged pull requests:**
88

9-
- Drop python 2 support [\#17](https://github.com/pytest-dev/pytest-print/pull/17) ([gaborbernat](https://github.com/gaborbernat))
10-
- \[pre-commit.ci\] pre-commit autoupdate [\#14](https://github.com/pytest-dev/pytest-print/pull/14) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
11-
- \[pre-commit.ci\] pre-commit autoupdate [\#13](https://github.com/pytest-dev/pytest-print/pull/13) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
12-
- \[pre-commit.ci\] pre-commit autoupdate [\#12](https://github.com/pytest-dev/pytest-print/pull/12) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
13-
- \[pre-commit.ci\] pre-commit autoupdate [\#11](https://github.com/pytest-dev/pytest-print/pull/11) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
14-
- \[pre-commit.ci\] pre-commit autoupdate [\#10](https://github.com/pytest-dev/pytest-print/pull/10) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
15-
- \[pre-commit.ci\] pre-commit autoupdate [\#9](https://github.com/pytest-dev/pytest-print/pull/9) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
9+
- Drop python 2 support [\#17](https://github.com/pytest-dev/pytest-print/pull/17)
10+
([gaborbernat](https://github.com/gaborbernat))
11+
- \[pre-commit.ci\] pre-commit autoupdate [\#14](https://github.com/pytest-dev/pytest-print/pull/14)
12+
([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
13+
- \[pre-commit.ci\] pre-commit autoupdate [\#13](https://github.com/pytest-dev/pytest-print/pull/13)
14+
([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
15+
- \[pre-commit.ci\] pre-commit autoupdate [\#12](https://github.com/pytest-dev/pytest-print/pull/12)
16+
([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
17+
- \[pre-commit.ci\] pre-commit autoupdate [\#11](https://github.com/pytest-dev/pytest-print/pull/11)
18+
([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
19+
- \[pre-commit.ci\] pre-commit autoupdate [\#10](https://github.com/pytest-dev/pytest-print/pull/10)
20+
([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
21+
- \[pre-commit.ci\] pre-commit autoupdate [\#9](https://github.com/pytest-dev/pytest-print/pull/9)
22+
([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
1623

1724
## [0.2.1](https://github.com/pytest-dev/pytest-print/tree/0.2.1) (2020-10-23)
1825

@@ -32,11 +39,13 @@
3239

3340
**Implemented enhancements:**
3441

35-
- allow force on, document flags [\#3](https://github.com/pytest-dev/pytest-print/pull/3) ([gaborbernat](https://github.com/gaborbernat))
42+
- allow force on, document flags [\#3](https://github.com/pytest-dev/pytest-print/pull/3)
43+
([gaborbernat](https://github.com/gaborbernat))
3644

3745
**Merged pull requests:**
3846

39-
- Remove PyPy special cases [\#4](https://github.com/pytest-dev/pytest-print/pull/4) ([vtbassmatt](https://github.com/vtbassmatt))
47+
- Remove PyPy special cases [\#4](https://github.com/pytest-dev/pytest-print/pull/4)
48+
([vtbassmatt](https://github.com/vtbassmatt))
4049

4150
## [0.1.2](https://github.com/pytest-dev/pytest-print/tree/0.1.2) (2018-11-29)
4251

@@ -48,16 +57,16 @@
4857

4958
**Closed issues:**
5059

51-
- How to use “pytest\_print[\#1](https://github.com/pytest-dev/pytest-print/issues/1)
60+
- How to use “pytest_print[\#1](https://github.com/pytest-dev/pytest-print/issues/1)
5261

5362
**Merged pull requests:**
5463

55-
- Update setup.py [\#2](https://github.com/pytest-dev/pytest-print/pull/2) ([shashanksingh28](https://github.com/shashanksingh28))
64+
- Update setup.py [\#2](https://github.com/pytest-dev/pytest-print/pull/2)
65+
([shashanksingh28](https://github.com/shashanksingh28))
5666

5767
## [0.1.0](https://github.com/pytest-dev/pytest-print/tree/0.1.0) (2018-04-14)
5868

5969
[Full Changelog](https://github.com/pytest-dev/pytest-print/compare/727896d18cab117ad84010086cbc4c9a16d9e8f7...0.1.0)
6070

61-
62-
63-
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
71+
\* _This Changelog was automatically generated by
72+
[github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)_

Diff for: LICENSE.txt renamed to LICENSE

File renamed without changes.

Diff for: pyproject.toml

+80-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,92 @@
11
[build-system]
2-
build-backend = 'setuptools.build_meta'
2+
build-backend = "hatchling.build"
33
requires = [
4-
"setuptools>=67.6.1",
5-
"setuptools_scm>=7.1",
4+
"hatch-vcs>=0.3",
5+
"hatchling>=1.14",
66
]
77

8-
[tool.setuptools_scm]
9-
write_to = "src/pytest_print/version.py"
10-
write_to_template = """
11-
\"\"\" Version information \"\"\"
8+
[project]
9+
name = "pytest-print"
10+
description = "pytest-print adds the printer fixture you can use to print messages to the user (directly to the pytest runner, not stdout)"
11+
readme = "README.md"
12+
keywords = [
13+
"env",
14+
"pytest",
15+
]
16+
license.file = "LICENSE"
17+
maintainers = [{ name = "Bernát Gábor", email = "[email protected]" }]
18+
requires-python = ">=3.7"
19+
classifiers = [
20+
"Development Status :: 5 - Production/Stable",
21+
"Intended Audience :: Developers",
22+
"License :: OSI Approved :: MIT License",
23+
"Operating System :: OS Independent",
24+
"Programming Language :: Python",
25+
"Programming Language :: Python :: 3 :: Only",
26+
"Programming Language :: Python :: 3.7",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: Implementation :: CPython",
33+
"Topic :: Software Development :: Libraries :: Python Modules",
34+
]
35+
dynamic = [
36+
"version",
37+
]
38+
dependencies = [
39+
"pytest>=7.3.1",
40+
]
41+
optional-dependencies.test = [
42+
"coverage>=7.2.3",
43+
"pytest-mock>=3.10",
44+
]
45+
urls.Homepage = "https://github.com/pytest-dev/pytest-print"
46+
urls.Source = "https://github.com/pytest-dev/pytest-print"
47+
urls.Tracker = "https://github.com/pytest-dev/pytest-print/issues"
48+
[project.entry-points.pytest11]
49+
env = "pytest_print"
1250

13-
__version__ = "{version}"
14-
"""
51+
[tool.hatch]
52+
build.hooks.vcs.version-file = "src/pytest_print/_version.py"
53+
version.source = "vcs"
1554

1655
[tool.black]
1756
line-length = 120
1857

1958
[tool.isort]
2059
profile = "black"
2160
known_first_party = ["pytest_print"]
61+
62+
[tool.flake8]
63+
ignore = ["E203"]
64+
max-complexity = 22
65+
max-line-length = 120
66+
unused-arguments-ignore-abstract-functions = true
67+
noqa-require-code = true
68+
dictionaries = ["en_US", "python", "technical", "django"]
69+
70+
[tool.coverage]
71+
run.source = ["pytest_print", "tests"]
72+
run.dynamic_context = "test_function"
73+
run.branch = true
74+
run.parallel = true
75+
report.omit = ["tests/example.py"]
76+
report.fail_under = 78
77+
report.show_missing = true
78+
html.show_contexts = true
79+
html.skip_covered = false
80+
paths.source = [
81+
"src",
82+
".tox*/*/lib/python*/site-packages",
83+
".tox*/pypy*/site-packages",
84+
".tox*\\*\\Lib\\site-packages",
85+
"*/src",
86+
"*\\src",
87+
]
88+
89+
[tool.mypy]
90+
python_version = "3.11"
91+
show_error_codes = true
92+
strict = true

Diff for: setup.cfg

-116
This file was deleted.

Diff for: setup.py

-3
This file was deleted.

0 commit comments

Comments
 (0)