Skip to content

Commit 99e5367

Browse files
authored
chore: drop python 3.6 (#400)
1 parent 044169d commit 99e5367

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+192
-89
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v3
1717
- uses: actions/setup-python@v4
1818
with:
19-
python-version: 3.6
19+
python-version: "3.7"
2020
- uses: pre-commit/[email protected]
2121

2222
test-dist:
@@ -42,7 +42,6 @@ jobs:
4242
fail-fast: false
4343
matrix:
4444
include:
45-
- python: "3.6"
4645
- python: "3.7"
4746
- python: "3.8"
4847
- python: "3.9"

.pre-commit-config.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33

44
default_language_version:
5-
python: python3.6
5+
python: python3.7
66

77
exclude: ^src/auditwheel/_vendor/
88

99
repos:
1010
- repo: https://github.com/pre-commit/pre-commit-hooks
11-
rev: v4.1.0
11+
rev: v4.3.0
1212
hooks:
1313
- id: check-builtin-literals
1414
- id: check-added-large-files
@@ -23,28 +23,30 @@ repos:
2323
- id: trailing-whitespace
2424

2525
- repo: https://github.com/asottile/pyupgrade
26-
rev: v2.30.1
26+
rev: v3.1.0
2727
hooks:
2828
- id: pyupgrade
29-
args: ["--py36-plus"]
29+
args: ["--py37-plus"]
3030

3131
- repo: https://github.com/psf/black
32-
rev: 22.8.0
32+
rev: 22.10.0
3333
hooks:
3434
- id: black
3535

3636
- repo: https://github.com/PyCQA/isort
3737
rev: 5.10.1
3838
hooks:
3939
- id: isort
40+
args: ["-a", "from __future__ import annotations"]
41+
exclude: ^tests/integration/.*/src/.*pyx$
4042

4143
- repo: https://github.com/PyCQA/flake8
4244
rev: 5.0.4
4345
hooks:
4446
- id: flake8
4547

4648
- repo: https://github.com/pre-commit/mirrors-mypy
47-
rev: v0.931
49+
rev: v0.982
4850
hooks:
4951
- id: mypy
5052
exclude: ^tests/integration/.*/.*$

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ advised that bundling, like static linking, may implicate copyright concerns.
4040
Requirements
4141
------------
4242
- OS: Linux
43-
- Python: 3.6+
43+
- Python: 3.7+
4444
- `patchelf <https://github.com/NixOS/patchelf>`_: 0.14+
4545

4646
Only systems that use `ELF
@@ -135,7 +135,7 @@ daemon. These tests will pull a number of docker images if they are not already
135135
available on your system, but it won't update existing images.
136136
To update these images manually, run::
137137

138-
docker pull python:3.6-slim
138+
docker pull python:3.7-slim
139139
docker pull quay.io/pypa/manylinux1_x86_64
140140
docker pull quay.io/pypa/manylinux2010_x86_64
141141
docker pull quay.io/pypa/manylinux2014_x86_64

noxfile.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1+
from __future__ import annotations
2+
13
import os
24
import sys
35
from pathlib import Path
4-
from typing import List
56

67
import nox
78

89
nox.options.sessions = ["lint", "test-dist"]
910

10-
PYTHON_ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]
11+
PYTHON_ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10"]
1112
RUNNING_CI = "TRAVIS" in os.environ or "GITHUB_ACTIONS" in os.environ
1213

1314

14-
@nox.session(python=["3.6"], reuse_venv=True)
15+
@nox.session(python=["3.7"], reuse_venv=True)
1516
def lint(session: nox.Session) -> None:
1617
"""
1718
Run linters on the codebase.
@@ -36,7 +37,7 @@ def coverage(session: nox.Session) -> None:
3637
)
3738

3839

39-
def _docker_images(session: nox.Session) -> List[str]:
40+
def _docker_images(session: nox.Session) -> list[str]:
4041
tmp_dir = Path(session.create_tmp())
4142
script = tmp_dir / "list_images.py"
4243
images_file = tmp_dir / "images.lst"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
# enable version inference
77

88
[tool.black]
9-
target-version = ["py36", "py37", "py38", "py39"]
9+
target-version = ["py37", "py38", "py39", "py310"]
1010
extend-exclude = "src/auditwheel/_vendor"
1111

1212
[tool.isort]

scripts/calculate_symbol_versions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
defined version (.gnu.version_d) from libraries in lib_whitelist.
44
This should be run inside a manylinux Docker container.
55
"""
6+
from __future__ import annotations
7+
68
import argparse
79
import json
810
import os

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ classifier =
1414
License :: OSI Approved :: MIT License
1515
Operating System :: POSIX :: Linux
1616
Programming Language :: Python :: 3
17-
Programming Language :: Python :: 3.6
1817
Programming Language :: Python :: 3.7
1918
Programming Language :: Python :: 3.8
2019
Programming Language :: Python :: 3.9
@@ -32,7 +31,7 @@ install_requires =
3231
packages = find:
3332
package_dir =
3433
=src
35-
python_requires = >=3.6
34+
python_requires = >=3.7
3635
zip_safe = False
3736

3837
[options.package_data]

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from setuptools import setup
24

35
extras = {

src/auditwheel/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import sys
24

35
from .main import main

src/auditwheel/condatools.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"""Context managers like those in wheeltools.py for unpacking
22
conda packages.
33
"""
4+
from __future__ import annotations
5+
46
import os
5-
from typing import List, Optional
67

78
from .tmpdirs import InTemporaryDirectory
89
from .tools import tarbz2todir
@@ -22,13 +23,13 @@ def __enter__(self) -> str:
2223
class InCondaPkgCtx(InCondaPkg):
2324
def __init__(self, in_conda_pkg: str) -> None:
2425
super().__init__(in_conda_pkg)
25-
self.path: Optional[str] = None
26+
self.path: str | None = None
2627

2728
def __enter__(self):
2829
self.path = super().__enter__()
2930
return self
3031

31-
def iter_files(self) -> List[str]:
32+
def iter_files(self) -> list[str]:
3233
if self.path is None:
3334
raise ValueError("This function should be called from context manager")
3435
files = os.path.join(self.path, "info", "files")

0 commit comments

Comments
 (0)