Skip to content

Commit

Permalink
chore: Drop Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Stranger6667 committed Nov 29, 2023
1 parent ec91bfa commit 4e08411
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ A clear and concise description of what you expected to happen.
**Environment (please complete the following information):**

- OS: [e.g. Linux or Windows]
- Python version: [e.g. 3.7.2]
- hypothesis-graphql version: [e.g. 0.3.0]
- hypothesis version: [e.g. 5.30.1]
- Python version: [e.g. 3.10.8]
- hypothesis-graphql version: [e.g. 0.11.0]
- hypothesis version: [e.g. 6.91.1]

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]

name: ${{ matrix.os }}/tests_${{ matrix.python }}
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
- Support for Python 3.12.
- Include tests in the source tarball. #82

### Removed

- Python 3.7 support.

## [0.10.0] - 2023-04-12

### Changed
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ the problem.

5. Tests are run using `tox`:

tox -e py37
tox -e py39

The test environment above is usually enough to cover most cases
locally.
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -29,7 +28,7 @@ maintainers = [{ name = "Dmitry Dygalo", email = "[email protected]" }]
readme = "README.md"
license = "MIT"
include = ["src/hypothesis_graphql/py.typed"]
requires-python = ">=3.7"
requires-python = ">=3.8"
dependencies = [
"hypothesis>=5.8.0,<7.0",
"graphql-core>=3.1.0,<3.3.0",
Expand Down Expand Up @@ -102,7 +101,7 @@ ignore = [
"D213", # Multiline summary second line
"D401", # Imperative mood
]
target-version = "py37"
target-version = "py38"

# Ignore `F401` (unused import) in all `__init__.py` files.
[tool.ruff.per-file-ignores]
Expand Down
8 changes: 4 additions & 4 deletions src/hypothesis_graphql/_strategies/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
FieldNodeInput = Tuple[List[graphql.ArgumentNode], Optional[SelectionNodes]]


@lru_cache()
@lru_cache
def inline_fragment(type_name: str) -> Callable[[SelectionNodes], graphql.InlineFragmentNode]:
def factory(nodes: SelectionNodes) -> graphql.InlineFragmentNode:
return graphql.InlineFragmentNode(
Expand All @@ -26,15 +26,15 @@ def factory(nodes: SelectionNodes) -> graphql.InlineFragmentNode:
return factory


@lru_cache()
@lru_cache
def argument(name: str) -> Callable[[graphql.ValueNode], graphql.ArgumentNode]:
def factory(value: graphql.ValueNode) -> graphql.ArgumentNode:
return graphql.ArgumentNode(name=graphql.NameNode(value=name), value=value)

return factory


@lru_cache()
@lru_cache
def field(name: str) -> Callable[[FieldNodeInput], graphql.FieldNode]:
def factory(tup: FieldNodeInput) -> graphql.FieldNode:
return graphql.FieldNode(
Expand All @@ -46,7 +46,7 @@ def factory(tup: FieldNodeInput) -> graphql.FieldNode:
return factory


@lru_cache()
@lru_cache
def object_field(name: str) -> Callable[[graphql.ValueNode], graphql.ObjectFieldNode]:
def factory(value: graphql.ValueNode) -> graphql.ObjectFieldNode:
return graphql.ObjectFieldNode(name=graphql.NameNode(value=name), value=value)
Expand Down
4 changes: 2 additions & 2 deletions src/hypothesis_graphql/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ def List(
# Boolean & Enum nodes have a limited set of variants, therefore caching is effective in this case


@lru_cache()
@lru_cache
def Boolean(value: bool) -> graphql.BooleanValueNode:
return graphql.BooleanValueNode(value=value)


@lru_cache()
@lru_cache
def Enum(value: str) -> graphql.EnumValueNode:
return graphql.EnumValueNode(value=value)

Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[tox]
isolated_build = true
envlist = py{37,38,39,310,311,312},coverage-report
envlist = py{38,39,310,311,312},coverage-report

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
Expand All @@ -28,7 +27,7 @@ allowlist_externals =
description = Report coverage over all measured test runs.
basepython = python3.10
skip_install = true
depends = py{37,38,39,310,311,312}
depends = py{38,39,310,311,312}
commands =
coverage combine
coverage report
Expand Down

0 comments on commit 4e08411

Please sign in to comment.