Skip to content

Commit 75ef3ca

Browse files
committed
Remove end-of-life Python 3.7 support
1 parent a6e532d commit 75ef3ca

File tree

12 files changed

+54
-21
lines changed

12 files changed

+54
-21
lines changed

.github/workflows/test_docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
add-apt-repository -y ppa:deadsnakes/ppa
3737
add-apt-repository -y ppa:gift/dev
3838
apt-get update -q
39-
apt-get install -y build-essential git libffi-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-mock python3-pip python3-setuptools python3-yaml
39+
apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-mock python3-pip python3-setuptools python3-yaml
4040
- name: Install tox
4141
run: |
4242
python3 -m pip install tox

.github/workflows/test_tox.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
strategy:
1515
matrix:
1616
include:
17-
- python-version: '3.7'
18-
toxenv: 'py37,wheel'
1917
- python-version: '3.8'
2018
toxenv: 'py38,wheel'
2119
- python-version: '3.9'
@@ -46,7 +44,7 @@ jobs:
4644
add-apt-repository -y ppa:deadsnakes/ppa
4745
add-apt-repository -y ppa:gift/dev
4846
apt-get update -q
49-
apt-get install -y build-essential git libffi-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-mock python3-pip python3-setuptools python3-yaml
47+
apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-mock python3-pip python3-setuptools python3-yaml
5048
- name: Install tox
5149
run: |
5250
python3 -m pip install tox
@@ -82,7 +80,7 @@ jobs:
8280
add-apt-repository -y ppa:deadsnakes/ppa
8381
add-apt-repository -y ppa:gift/dev
8482
apt-get update -q
85-
apt-get install -y build-essential git libffi-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-mock python3-pip python3-setuptools python3-yaml
83+
apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-mock python3-pip python3-setuptools python3-yaml
8684
- name: Install tox
8785
run: |
8886
python3 -m pip install tox
@@ -120,7 +118,7 @@ jobs:
120118
add-apt-repository -y ppa:deadsnakes/ppa
121119
add-apt-repository -y ppa:gift/dev
122120
apt-get update -q
123-
apt-get install -y build-essential git libffi-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-mock python3-pip python3-setuptools python3-yaml
121+
apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-mock python3-pip python3-setuptools python3-yaml
124122
- name: Install tox
125123
run: |
126124
python3 -m pip install tox

config/dpkg/changelog

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
dtfabric (20231227-1) unstable; urgency=low
1+
dtfabric (20240211-1) unstable; urgency=low
22

33
* Auto-generated
44

5-
-- Joachim Metz <[email protected]> Wed, 27 Dec 2023 07:02:16 +0100
5+
-- Joachim Metz <[email protected]> Sun, 11 Feb 2024 05:34:33 +0100

docs/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
# docstrings.
5353
napoleon_google_docstring = True
5454
napoleon_numpy_docstring = False
55+
napoleon_include_init_with_doc = True
5556
napoleon_include_private_with_doc = False
5657
napoleon_include_special_with_doc = True
5758

docs/sources/user/Installation-instructions.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To deactivate the virtualenv run:
2727
deactivate
2828
```
2929

30-
## Ubuntu 18.04 and 20.04 LTS
30+
## Ubuntu 22.04 LTS
3131

3232
To install dtFabric from the [GIFT Personal Package Archive (PPA)](https://launchpad.net/~gift):
3333

@@ -49,14 +49,14 @@ necessary packages for running dtFabric. l2tbinaries provides the following
4949
branches:
5050

5151
* master; branch intended for the "packaged release" of dtFabric and dependencies;
52+
* staging; branch intended for testing pre-releases of dtFabric;
5253
* dev; branch intended for the "development release" of dtFabric;
5354
* testing; branch intended for testing newly created packages.
5455

5556
The l2tdevtools project provides [an update script](https://github.com/log2timeline/l2tdevtools/wiki/Update-script)
5657
to ease the process of keeping the dependencies up to date.
5758

58-
The script requires [pywin32](https://github.com/mhammond/pywin32/releases) and
59-
[Python WMI](https://pypi.org/project/WMI/).
59+
The script requires [pywin32](https://github.com/mhammond/pywin32/releases).
6060

6161
To install the release versions of the dependencies run:
6262

dtfabric/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# -*- coding: utf-8 -*-
22
"""Data type fabric."""
33

4-
__version__ = '20231227'
4+
__version__ = '20240211'

dtfabric/data_types.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,11 @@ def __init__(
433433

434434
@property
435435
def members(self) -> 'List[DataTypeDefinition]':
436-
"""members (list[DataTypeDefinition]): member data type definitions."""
436+
"""Retrieves the member data type definitions.
437+
438+
Returns:
439+
list[DataTypeDefinition]: member data type definitions.
440+
"""
437441
return list(self._members_by_name.values())
438442

439443
def AddMemberDefinition(
@@ -868,7 +872,11 @@ def __init__(
868872

869873
@property
870874
def members(self) -> 'List[DataTypeDefinition]':
871-
"""members (list[DataTypeDefinition]): member data type definitions."""
875+
"""Retrieves the member data type definitions.
876+
877+
Returns:
878+
list[DataTypeDefinition]: member data type definitions.
879+
"""
872880
return list(self._members_by_name.values())
873881

874882
def AddMemberDefinition(
@@ -941,7 +949,11 @@ def __init__(
941949

942950
@property
943951
def members(self) -> 'List[DataTypeDefinition]':
944-
"""members (list[DataTypeDefinition]): member data type definitions."""
952+
"""Retrieves the member data type definitions.
953+
954+
Returns:
955+
list[DataTypeDefinition]: member data type definitions.
956+
"""
945957
return list(self._members_by_name.values())
946958

947959
def AddMemberDefinition(

dtfabric/runtime/data_maps.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -2175,7 +2175,11 @@ class FormatMap(LayoutDataTypeMap):
21752175

21762176
@property
21772177
def layout(self):
2178-
"""list[LayoutElementDefinition]: layout element definitions."""
2178+
"""Retrieves the layout element definitions.
2179+
2180+
Returns:
2181+
list[LayoutElementDefinition]: layout element definitions.
2182+
"""
21792183
return getattr(self._data_type_definition, 'layout', [])
21802184

21812185
def MapByteStream(self, byte_stream, **unused_kwargs): # pylint: disable=redundant-returns-doc

pyproject.toml

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
[build-system]
22
requires = ["setuptools", "wheel"]
33
build-backend = "setuptools.build_meta"
4+
5+
[tool.docformatter]
6+
black = false
7+
non-cap = ["dfDateTime", "dfImageTools", "dfVFS", "dfWinReg", "dtFabric", "iMessage", "iOS", "iPod", "mDNS"]
8+
non-strict = false
9+
wrap-summaries = 80
10+
wrap-descriptions = 80

setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = dtfabric
3-
version = 20231227
3+
version = 20240211
44
description = Data type fabric (dtfabric)
55
long_description = dtFabric, or data type fabric, is a project to manage data types and structures, as used in the libyal projects.
66
long_description_content_type = text/plain
@@ -22,7 +22,7 @@ install_requires = file:requirements.txt
2222
package_dir =
2323
dtfabric = dtfabric
2424
packages = find:
25-
python_requires = >=3.7
25+
python_requires = >=3.8
2626
scripts =
2727
scripts/validate-definitions.py
2828

tox.ini

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py3{7,8,9,10,11,12},coverage,docs,lint,wheel
2+
envlist = py3{8,9,10,11,12},coverage,docformatter,docs,lint,wheel
33

44
[testenv]
55
allowlist_externals = ./run_tests.py
@@ -19,12 +19,19 @@ deps =
1919
setuptools >= 65
2020
wheel
2121
commands =
22-
py3{7,8,9,10,11,12}: ./run_tests.py
22+
py3{8,9,10,11,12}: ./run_tests.py
2323
coverage: coverage erase
2424
coverage: coverage run --source=dtfabric --omit="*_test*,*__init__*,*test_lib*" run_tests.py
2525
coverage: coverage xml
2626
wheel: python -m build --no-isolation --wheel
2727

28+
[testenv:docformatter]
29+
usedevelop = True
30+
deps =
31+
docformatter
32+
commands =
33+
docformatter --in-place --recursive dtfabric tests
34+
2835
[testenv:docs]
2936
usedevelop = True
3037
deps =
@@ -45,10 +52,14 @@ setenv =
4552
deps =
4653
-rrequirements.txt
4754
-rtest_requirements.txt
55+
docformatter
4856
pylint >= 3.0.0, < 3.1.0
57+
setuptools
4958
yamllint >= 1.26.0
5059
commands =
60+
docformatter --version
5161
pylint --version
5262
yamllint -v
63+
docformatter --check --diff --recursive dtfabric scripts setup.py tests
5364
pylint --rcfile=.pylintrc dtfabric scripts setup.py tests
5465
yamllint -c .yamllint.yaml test_data

utils/update_release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dtfabric (${VERSION}-1) unstable; urgency=low
2525
EOT
2626

2727
# Regenerate the API documentation.
28-
tox -edocs
28+
tox -edocformatter,docs
2929

3030
exit ${EXIT_SUCCESS};
3131

0 commit comments

Comments
 (0)