mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
drop python 3.6 support
python 3.6 reached end of life on 2021-12-23
This commit is contained in:
parent
d3bdf1403d
commit
04de6a2e57
111 changed files with 401 additions and 286 deletions
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import collections
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import os.path
|
||||
import shutil
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
LANGUAGES = [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import gzip
|
||||
import os.path
|
||||
|
|
@ -6,7 +8,6 @@ import shutil
|
|||
import subprocess
|
||||
import tarfile
|
||||
import tempfile
|
||||
from typing import Optional
|
||||
from typing import Sequence
|
||||
|
||||
|
||||
|
|
@ -69,7 +70,7 @@ def make_archive(name: str, repo: str, ref: str, destdir: str) -> str:
|
|||
return output_path
|
||||
|
||||
|
||||
def main(argv: Optional[Sequence[str]] = None) -> int:
|
||||
def main(argv: Sequence[str] | None = None) -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--dest', default='pre_commit/resources')
|
||||
args = parser.parse_args(argv)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import os.path
|
||||
import subprocess
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM ubuntu:bionic
|
||||
FROM ubuntu:focal
|
||||
RUN : \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
|
|
@ -10,5 +10,5 @@ RUN : \
|
|||
|
||||
ENV LANG=C.UTF-8 PATH=/venv/bin:$PATH
|
||||
RUN : \
|
||||
&& python3.6 -mvenv /venv \
|
||||
&& python3 -mvenv /venv \
|
||||
&& pip install --no-cache-dir pip setuptools wheel no-manylinux --upgrade
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import os.path
|
||||
import shutil
|
||||
import stat
|
||||
|
|
@ -59,10 +61,7 @@ def main() -> int:
|
|||
if sys.platform == 'win32': # https://bugs.python.org/issue19124
|
||||
import subprocess
|
||||
|
||||
if sys.version_info < (3, 7): # https://bugs.python.org/issue25942
|
||||
return subprocess.Popen(cmd).wait()
|
||||
else:
|
||||
return subprocess.call(cmd)
|
||||
return subprocess.call(cmd)
|
||||
else:
|
||||
os.execvp(cmd[0], cmd)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import base64
|
||||
import hashlib
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
"""A shim executable to put dependencies on sys.path"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os.path
|
||||
import runpy
|
||||
|
|
@ -36,10 +38,7 @@ def main() -> int:
|
|||
if sys.platform == 'win32': # https://bugs.python.org/issue19124
|
||||
import subprocess
|
||||
|
||||
if sys.version_info < (3, 7): # https://bugs.python.org/issue25942
|
||||
return subprocess.Popen(cmd).wait()
|
||||
else:
|
||||
return subprocess.call(cmd)
|
||||
return subprocess.call(cmd)
|
||||
else:
|
||||
os.execvp(cmd[0], cmd)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue