Skip to content

Commit 3ddbe22

Browse files
authored
Merge pull request #21 from bskinn/release-1.0.0.2
Release 1.0.0.2
2 parents 2a9b3d8 + 0e7abd1 commit 3ddbe22

File tree

16 files changed

+287
-134
lines changed

16 files changed

+287
-134
lines changed

.github/workflows/ci_tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: push
44

55
jobs:
66
all_checks:
7-
name: Run all tests, lints, etc. (Python 3.10)
7+
name: Run all tests, lints, etc. (Python 3.11)
88
runs-on: ubuntu-latest
99
if: "!contains(github.event.head_commit.message, '[skip ci]')"
1010

@@ -15,7 +15,7 @@ jobs:
1515
- name: Install Python
1616
uses: actions/setup-python@v2
1717
with:
18-
python-version: '3.10'
18+
python-version: '3.11'
1919

2020
- name: Update pip & setuptools
2121
run: python -m pip install -U pip setuptools
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ubuntu-latest
4444
strategy:
4545
matrix:
46-
python: ['3.6', '3.7', '3.8', '3.9']
46+
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
4747
if: "!contains(github.event.head_commit.message, '[skip ci]')"
4848

4949
steps:
@@ -68,4 +68,3 @@ jobs:
6868
run: |
6969
pytest --cov
7070
tox -e sdist_install
71-

AUTHORS.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
Credits
22
=======
33

4-
`flake8-absolute-import` is authored and maintained by Brian Skinn ([Blog](https://bskinn.github.io)) ([Twitter](https://twitter.com/btskinn)). The skeleton of the AST-based implementation used for this plugin was shamelessly swiped from [`flake8-2020`](https://github.com/asottile/flake8-2020) by [Anthony Sottile](https://github.com/asottile).
4+
`flake8-absolute-import` is authored and maintained by Brian Skinn
5+
([Blog](https://bskinn.github.io)) ([Twitter](https://twitter.com/btskinn)). The
6+
skeleton of the AST-based implementation used for this plugin was shamelessly
7+
swiped from [`flake8-2020`](https://github.com/asottile/flake8-2020) by
8+
[Anthony Sottile](https://github.com/asottile).
59

6-
While there is disagreement about the upsides and downsides of relative imports in Python, as best this author can tell there are numerous projects and developers out there who desire to hold strictly to absolute imports in their code. The goal of this flake8 plugin is to simplify enforcement of this policy.
10+
While there is disagreement about the upsides and downsides of relative imports
11+
in Python, as best this author can tell there are numerous projects and
12+
developers out there who desire to hold strictly to absolute imports in their
13+
code. The goal of this flake8 plugin is to simplify enforcement of this policy.
714

8-
v1.0 provides a single catch-all error, `ABS101`, raised on any relative imports found.
15+
v1.0 provides a single catch-all error, `ABS101`, raised on any relative imports
16+
found.

CHANGELOG.md

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,82 @@ and this project strives to adhere (mostly) to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

99

10-
### [1.0.0.1] - ####-##-##
10+
### [1.0.0.2] - 2023-10-08
11+
12+
This is an administrative release, primarily to update officially supported
13+
Python and flake8 versions. There should be no plugin behavior changes between
14+
this version and v1.0.0.1.
15+
16+
#### Dependencies
17+
18+
- Support for Python 3.12 was officially added
19+
20+
- Support for Python 3.6 and 3.7 was officially removed, though the plugin
21+
should continue to work for Python 3.6+
22+
23+
- The minimum supported flake8 version is now 5.0
24+
25+
#### Administrative
26+
27+
- `MANIFEST.in` was augmented with the files needed to allow the test suite to
28+
run from an unpacked sdist.
29+
30+
- The build metadata was completely migrated from `setup.cfg` to
31+
`pyproject.toml`, and the maximum possible metadata is now drawn from
32+
`pyproject.toml` (all but `long_description`).
33+
34+
- The read of the project version and the load of the README contents in
35+
`setup.py` was modernized/improved.
36+
37+
#### Testing
38+
39+
- Python versions in the GitHub Actions and Azure Pipelines matrices were updated.
40+
41+
- An Azure Pipelines job was added to confirm that a built sdist carries all the
42+
files needed to allow the test suite to run.
43+
44+
- Obscure parameters/variables in some tests were given better names, and string
45+
formatting was upgraded to use f-strings.
46+
47+
48+
### [1.0.0.1] - 2021-12-04
1149

1250
This is an administrative/metadata release, primarily to update officially
1351
supported Python versions. There should be no behavior changes between
1452
this version and v1.0.0.
1553

1654
#### Dependencies
1755

18-
- Support for Python 3.10 and 3.11-dev was officially added
56+
- Support for Python 3.10 and 3.11-dev was officially added.
1957

20-
- Support for Python 3.5 was officially removed, though the plugin should
21-
remain compatible
58+
- Support for Python 3.5 was officially removed, though the plugin should remain
59+
compatible.
2260

2361
#### Testing
2462

25-
- Support for running the `tox` matrix on Windows was removed (it doesn't
26-
seem to work right with the batch-files-in-bin-folder approach I use for
27-
multiple Pythons in development)
63+
- Support for running the `tox` matrix on Windows was removed (it doesn't seem
64+
to work right with the batch-files-in-bin-folder approach I use for multiple
65+
Pythons in development).
2866

29-
- Routine CI switched from Travis CI to GitHub Actions
67+
- Routine CI was switched from Travis CI to GitHub Actions.
3068

31-
- CI and `tox` versions updated to focus on Python 3.10
69+
- CI and `tox` versions were updated to focus on Python 3.10.
3270

33-
- `pytest` and `coverage` configs revised to avoid `source`/`include` collision
34-
in `coverage`
71+
- `pytest` and `coverage` configs were revised to avoid `source`/`include`
72+
collision in `coverage`.
3573

3674
#### Administrative
3775

3876
- `setuptools` configuration has been mostly ported to `setup.cfg`, except for the
39-
pieces that still need to be defined dynamically
77+
pieces that still need to be defined dynamically.
4078

4179
- Built artifacts for distribution should now be created using `build`, which
42-
has been added to `requirements-dev.txt`
80+
has been added to `requirements-dev.txt`.
4381

4482

4583
### [1.0.0] - 2019-09-09
4684

4785
#### Features
4886

49-
- Detect any relative imports and report with error code ABS101
87+
- Detect any relative imports and report with error code ABS101.
5088

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019-2021 Brian Skinn
3+
Copyright (c) 2019-2023 Brian Skinn
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
include LICENSE.txt README.rst CHANGELOG.md pyproject.toml
1+
include AUTHORS.md LICENSE.txt README.rst CHANGELOG.md pyproject.toml
2+
include requirements-dev.txt requirements-flake8.txt tox.ini

README.rst

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ flake8-absolute-import
55

66
**Current Development Version:**
77

8-
.. image:: https://img.shields.io/github/workflow/status/bskinn/flake8-absolute-import/ci-tests?logo=github
8+
.. image:: https://img.shields.io/github/actions/workflow/status/bskinn/flake8-absolute-import/ci_tests.yml?branch=main&logo=github
99
:alt: GitHub Workflow Status
1010
:target: https://github.com/bskinn/flake8-absolute-import/actions
1111

@@ -27,13 +27,16 @@ flake8-absolute-import
2727
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
2828
:target: https://github.com/psf/black
2929

30+
.. image:: https://pepy.tech/badge/flake8-absolute-import/month
31+
:target: https://pepy.tech/project/flake8-absolute-import
32+
3033
----
3134

3235
*Don't like relative imports?*
3336

3437
Lint 'em out!
3538

36-
``flake8-absolute-import`` uses a simple check of the AST for each
39+
``flake8-absolute-import`` uses a direct check of the AST for each
3740
``from x import y`` statement to flag relative imports.
3841
Specifically, it checks for a nonzero *level* attribute on each
3942
|ImportFrom|_ node.
@@ -49,16 +52,21 @@ Relative imports raise the ``ABS101`` error code:
4952

5053
Available on `PyPI <https://pypi.python.org/pypi/flake8-absolute-import>`__
5154
(``pip install flake8-absolute-import``). ``flake8`` should automatically
52-
detect and load the plugin. ``flake8``>=3.7 is required.
55+
detect and load the plugin. ``flake8``>=5.0 is required.
5356

5457
Source on `GitHub <https://github.com/bskinn/flake8-absolute-import>`__. Bug reports
5558
and feature requests are welcomed at the
5659
`Issues <https://github.com/bskinn/flake8-absolute-import/issues>`__ page there.
5760

58-
Copyright (c) Brian Skinn 2019-2021
61+
Copyright (c) Brian Skinn 2019-2023
5962

60-
License: The MIT License. See `LICENSE.txt <https://github.com/bskinn/flake8-absolute-import/blob/main/LICENSE.txt>`__
61-
for full license terms.
63+
The ``flake8-absolute-import`` documentation (including docstrings and README)
64+
is licensed under a
65+
`Creative Commons Attribution 4.0 International License <http://creativecommons.org/licenses/by/4.0/>`__
66+
(CC-BY). The ``flake8-absolute-import`` codebase is released under the
67+
`MIT License <https://opensource.org/licenses/MIT>`__. See
68+
`LICENSE.txt <https://github.com/bskinn/flake8-absolute-import/blob/main/LICENSE.txt>`__ for
69+
full license terms.
6270

6371
.. _ImportFrom: https://greentreesnakes.readthedocs.io/en/latest/nodes.html#ImportFrom
6472
.. |ImportFrom| replace:: ``ImportFrom``

azure-pipelines.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,31 @@ jobs:
1212
- template: azure-coretest.yml
1313
parameters:
1414
pythons:
15-
py37:
16-
spec: '3.7'
1715
py38:
1816
spec: '3.8'
1917
py39:
2018
spec: '3.9'
2119
py310:
2220
spec: '3.10'
21+
py311:
22+
spec: '3.11'
23+
py312:
24+
spec: '3.12'
2325
platforms: [linux, windows, macOs]
2426

27+
- template: azure-sdisttest.yml
28+
2529
- job: flake8
2630
pool:
2731
vmImage: 'Ubuntu-latest'
2832
steps:
2933
- task: UsePythonVersion@0
3034
inputs:
31-
versionSpec: '3.10'
35+
versionSpec: '3.11'
3236

3337
- script: pip install -U tox
3438
displayName: Install tox
3539

36-
- script: pip install -r requirements-flake8.txt
37-
displayName: Install flake8 & plugins
38-
3940
- script: tox -e flake8
4041
displayName: Lint the codebase
4142

@@ -45,7 +46,7 @@ jobs:
4546
steps:
4647
- task: UsePythonVersion@0
4748
inputs:
48-
versionSpec: '3.10'
49+
versionSpec: '3.11'
4950

5051
- script: pip install -r requirements-ci.txt
5152
displayName: Install CI requirements

azure-sdisttest.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
jobs:
2+
- job: testable_sdist
3+
displayName: Ensure sdist is testable
4+
5+
variables:
6+
pip_cache_dir: $(Pipeline.Workspace)/.pip
7+
8+
pool:
9+
vmImage: 'Ubuntu-latest'
10+
11+
steps:
12+
- task: UsePythonVersion@0
13+
inputs:
14+
versionSpec: '3.11'
15+
16+
- task: Cache@2
17+
inputs:
18+
key: 'pip | "$(Agent.OS)" | requirements-dev.txt | requirements-flake8.txt'
19+
restoreKeys: |
20+
pip | "$(Agent.OS)"
21+
path: $(pip_cache_dir)
22+
displayName: Cache pip
23+
24+
- script: python -m pip install build
25+
displayName: Install 'build' package
26+
27+
- script: |
28+
python -m build -s
29+
ls -lah dist
30+
displayName: Build sdist
31+
32+
- script: |
33+
mkdir sandbox
34+
displayName: Create sandbox
35+
36+
- script: |
37+
cp dist/*.gz sandbox/
38+
cd sandbox
39+
tar xvf *.gz
40+
displayName: Unpack sdist in sandbox
41+
42+
- script: |
43+
cd sandbox
44+
python -m venv env
45+
displayName: Create venv
46+
47+
# Only the dir of the unpacked sdist will have a digit in its name
48+
- script: |
49+
cd sandbox
50+
echo $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" )
51+
displayName: Check unpack dir name
52+
53+
- script: |
54+
cd sandbox
55+
source env/bin/activate
56+
cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" )
57+
python -m pip install -r requirements-dev.txt
58+
displayName: Install dev req'ts to venv
59+
60+
- script: |
61+
cd sandbox
62+
source env/bin/activate
63+
cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" )
64+
cd doc
65+
O=-Ean make html
66+
displayName: Build docs in sandbox (skipped, no docs)
67+
condition: false
68+
69+
- script: |
70+
cd sandbox
71+
source env/bin/activate
72+
cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" )
73+
pytest
74+
displayName: Run test suite in sandbox

0 commit comments

Comments
 (0)