Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop python<3.8 #2655

Merged
merged 1 commit into from
Dec 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
hooks:
- id: reorder-python-imports
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/)
args: [--py37-plus, --add-import, 'from __future__ import annotations']
args: [--py38-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
hooks:
Expand All @@ -28,7 +28,7 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py38-plus]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.1
hooks:
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resources:
jobs:
- template: job--python-tox.yml@asottile
parameters:
toxenvs: [py37]
toxenvs: [py38]
os: windows
additional_variables:
TEMP: C:\Temp
Expand All @@ -34,7 +34,7 @@ jobs:
displayName: install R
- template: job--python-tox.yml@asottile
parameters:
toxenvs: [py37]
toxenvs: [py38]
os: linux
name_postfix: _latest_git
pre_test:
Expand All @@ -52,7 +52,7 @@ jobs:
displayName: install R
- template: job--python-tox.yml@asottile
parameters:
toxenvs: [py37, py38, py39]
toxenvs: [py38, py39, py310]
os: linux
pre_test:
- task: UseRubyVersion@0
Expand Down
9 changes: 2 additions & 7 deletions pre_commit/constants.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
from __future__ import annotations

import sys

if sys.version_info >= (3, 8): # pragma: >=3.8 cover
import importlib.metadata as importlib_metadata
else: # pragma: <3.8 cover
import importlib_metadata
import importlib.metadata

CONFIG_FILE = '.pre-commit-config.yaml'
MANIFEST_FILE = '.pre-commit-hooks.yaml'
Expand All @@ -15,7 +10,7 @@
# Bump when modifying `empty_template`
LOCAL_REPO_VERSION = '1'

VERSION = importlib_metadata.version('pre_commit')
VERSION = importlib.metadata.version('pre_commit')

# `manual` is not invoked by any installed git hook. See #719
STAGES = (
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ install_requires =
nodeenv>=0.11.1
pyyaml>=5.1
virtualenv>=20.10.0
importlib-metadata;python_version<"3.8"
python_requires = >=3.7
python_requires = >=3.8

[options.packages.find]
exclude =
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37,py38,pypy3,pre-commit
envlist = py,pypy3,pre-commit

[testenv]
deps = -rrequirements-dev.txt
Expand Down