Skip to content

Commit e261b6e

Browse files
merge with mainline
2 parents e2b4265 + 07270fc commit e261b6e

Some content is hidden

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

49 files changed

+1397
-943
lines changed

.git_archival.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe)$
4+
ref-names: $Format:%D$

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git_archival.txt export-subst

.github/workflows/python-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python_version: [ '3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.6' ]
23+
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11.0-alpha - 3.11.0', 'pypy-3.8' ]
2424
os: [windows-latest, ubuntu-latest] #, macos-latest]
2525
include:
2626
- os: windows-latest
2727
python_version: 'msys2'
2828

2929
name: ${{ matrix.os }} - Python ${{ matrix.python_version }}
3030
steps:
31-
- uses: actions/checkout@v1
31+
- uses: actions/checkout@v3
3232
- name: Setup python
33-
uses: actions/setup-python@v2
33+
uses: actions/setup-python@v4
3434
if: matrix.python_version != 'msys2'
3535
with:
3636
python-version: ${{ matrix.python_version }}
@@ -83,7 +83,7 @@ jobs:
8383
- name: Setup python
8484
uses: actions/setup-python@v2
8585
with:
86-
python-version: "3.6"
86+
python-version: "3.7"
8787
architecture: x64
8888
- run: pip install -e .[toml,test] pytest virtualenv
8989
- run: pytest --test-legacy testing/test_setuptools_support.py || true # ignore fail flaky on ci
@@ -92,11 +92,11 @@ jobs:
9292
strategy:
9393
fail-fast: false
9494
matrix:
95-
python_version: [ '3.6', '3.9', 'pypy-3.6' ]
95+
python_version: [ '3.7', '3.9', 'pypy-3.8' ]
9696
installer: ["pip install"]
9797
name: check self install - Python ${{ matrix.python_version }} via ${{ matrix.installer }}
9898
steps:
99-
- uses: actions/checkout@v1
99+
- uses: actions/checkout@v3
100100
- name: Setup python
101101
uses: actions/setup-python@v2
102102
with:
@@ -105,7 +105,7 @@ jobs:
105105
# self install testing needs some clarity
106106
# so its being executed without any other tools running
107107
# setuptools smaller 52 is needed to do easy_install
108-
- run: pip install -U "setuptools<52" tomli packaging
108+
- run: pip install -U "setuptools<52" tomli packaging typing_extensions importlib_metadata
109109
- run: python setup.py egg_info
110110
- run: python setup.py sdist
111111
- run: ${{ matrix.installer }} dist/*

.pre-commit-config.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
default_language_version:
2+
python: python3.9
13
repos:
24
- repo: https://github.com/psf/black
35
rev: 22.3.0
46
hooks:
57
- id: black
68
args: [--safe, --quiet]
79
- repo: https://github.com/asottile/reorder_python_imports
8-
rev: v3.0.1
10+
rev: v3.1.0
911
hooks:
1012
- id: reorder-python-imports
11-
args: [ "--application-directories=.:src" , --py3-plus]
13+
args: [ "--application-directories=.:src" , --py37-plus, --add-import, 'from __future__ import annotations']
1214
- repo: https://github.com/pre-commit/pre-commit-hooks
1315
rev: v4.2.0
1416
hooks:
@@ -21,19 +23,22 @@ repos:
2123
hooks:
2224
- id: flake8
2325
- repo: https://github.com/asottile/pyupgrade
24-
rev: v2.32.0
26+
rev: v2.32.1
2527
hooks:
2628
- id: pyupgrade
27-
args: [--py36-plus]
29+
args: [--py37-plus]
2830
- repo: https://github.com/asottile/setup-cfg-fmt
2931
rev: v1.20.1
3032
hooks:
3133
- id: setup-cfg-fmt
3234
- repo: https://github.com/pre-commit/mirrors-mypy
33-
rev: 'v0.942'
35+
rev: 'v0.960'
3436
hooks:
3537
- id: mypy
38+
args: [--strict]
39+
language_version: "3.10"
3640
additional_dependencies:
3741
- types-setuptools
3842
- tokenize-rt==3.2.0
39-
- pytest == 6.2.5
43+
- pytest == 7.1
44+
- importlib_metadata

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
v7.0.0
2+
=======
3+
4+
* drop python 3.6 support
5+
* include git archival support
6+
7+
18
v6.4.3
29
======
310

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
exclude *.nix
22
exclude .pre-commit-config.yaml
3+
exclude .git_archival.txt
34
include *.py
45
include testing/*.py
56
include tox.ini

mypy.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[mypy]
2-
python_version = 3.6
2+
python_version = 3.7
33
warn_return_any = True
44
warn_unused_configs = True
55
mypy_path = $MYPY_CONFIG_FILE_DIR/src
66

77
[mypy-setuptools_scm.*]
88
# disabled as it will take a bit
99
# disallow_untyped_defs = True
10-
# strict = true
10+
strict = true

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
requires = [
33
"setuptools>=45",
44
"tomli>=1.0",
5-
"packaging>=20.0"
5+
"packaging>=20.0",
6+
"typing_extensions",
7+
"importlib_metadata",
68
]
79
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ classifiers =
1515
Programming Language :: Python
1616
Programming Language :: Python :: 3
1717
Programming Language :: Python :: 3 :: Only
18-
Programming Language :: Python :: 3.6
1918
Programming Language :: Python :: 3.7
2019
Programming Language :: Python :: 3.8
2120
Programming Language :: Python :: 3.9
@@ -31,7 +30,8 @@ install_requires =
3130
packaging>=20.0
3231
setuptools
3332
tomli>=1.0.0 # keep in sync
34-
python_requires = >=3.6
33+
typing-extensions
34+
python_requires = >=3.7
3535
package_dir =
3636
=src
3737
zip_safe = true
@@ -59,6 +59,7 @@ setuptools_scm.parse_scm =
5959
.git = setuptools_scm.git:parse
6060
setuptools_scm.parse_scm_fallback =
6161
.hg_archival.txt = setuptools_scm.hg:parse_archival
62+
.git_archival.txt = setuptools_scm.git:parse_archival
6263
PKG-INFO = setuptools_scm.hacks:parse_pkginfo
6364
pip-egg-info = setuptools_scm.hacks:parse_pip_egg_info
6465
setup.py = setuptools_scm.hacks:fallback_version

setup.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,15 @@
99
1010
pip usage is recommended
1111
"""
12+
from __future__ import annotations
13+
1214
import os
1315
import sys
1416

1517
import setuptools
16-
from setuptools.command.bdist_egg import bdist_egg as original_bdist_egg
17-
18-
19-
class bdist_egg(original_bdist_egg):
20-
def run(self):
21-
raise SystemExit(
22-
"%s is forbidden, "
23-
"please update to setuptools>=45 which uses pip" % type(self).__name__
24-
)
2518

2619

27-
def scm_version():
28-
29-
if sys.version_info < (3, 6):
30-
raise RuntimeError(
31-
"support for python < 3.6 has been removed in setuptools_scm>=6.0.0"
32-
)
20+
def scm_version() -> str:
3321
here = os.path.dirname(os.path.abspath(__file__))
3422
src = os.path.join(here, "src")
3523

@@ -40,8 +28,11 @@ def scm_version():
4028
from setuptools_scm import git
4129
from setuptools_scm import hg
4230
from setuptools_scm.version import guess_next_dev_version, get_local_node_and_date
31+
from setuptools_scm.config import Configuration
32+
33+
from setuptools_scm.version import ScmVersion
4334

44-
def parse(root, config):
35+
def parse(root: str, config: Configuration) -> ScmVersion | None:
4536
try:
4637
return parse_pkginfo(root, config)
4738
except OSError:
@@ -64,5 +55,4 @@ def parse(root, config):
6455
],
6556
"test": ["pytest>=6.2", "virtualenv>20"],
6657
},
67-
cmdclass={"bdist_egg": bdist_egg},
6858
)

0 commit comments

Comments
 (0)