Skip to content

Commit

Permalink
Remove end-of-life Python 3.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Feb 11, 2024
1 parent a6e532d commit 75ef3ca
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
add-apt-repository -y ppa:deadsnakes/ppa
add-apt-repository -y ppa:gift/dev
apt-get update -q
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
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
- name: Install tox
run: |
python3 -m pip install tox
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
strategy:
matrix:
include:
- python-version: '3.7'
toxenv: 'py37,wheel'
- python-version: '3.8'
toxenv: 'py38,wheel'
- python-version: '3.9'
Expand Down Expand Up @@ -46,7 +44,7 @@ jobs:
add-apt-repository -y ppa:deadsnakes/ppa
add-apt-repository -y ppa:gift/dev
apt-get update -q
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
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
- name: Install tox
run: |
python3 -m pip install tox
Expand Down Expand Up @@ -82,7 +80,7 @@ jobs:
add-apt-repository -y ppa:deadsnakes/ppa
add-apt-repository -y ppa:gift/dev
apt-get update -q
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
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
- name: Install tox
run: |
python3 -m pip install tox
Expand Down Expand Up @@ -120,7 +118,7 @@ jobs:
add-apt-repository -y ppa:deadsnakes/ppa
add-apt-repository -y ppa:gift/dev
apt-get update -q
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
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
- name: Install tox
run: |
python3 -m pip install tox
Expand Down
4 changes: 2 additions & 2 deletions config/dpkg/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dtfabric (20231227-1) unstable; urgency=low
dtfabric (20240211-1) unstable; urgency=low

* Auto-generated

-- Joachim Metz <joachim.metz@gmail.com> Wed, 27 Dec 2023 07:02:16 +0100
-- Joachim Metz <joachim.metz@gmail.com> Sun, 11 Feb 2024 05:34:33 +0100
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
# docstrings.
napoleon_google_docstring = True
napoleon_numpy_docstring = False
napoleon_include_init_with_doc = True
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = True

Expand Down
6 changes: 3 additions & 3 deletions docs/sources/user/Installation-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To deactivate the virtualenv run:
deactivate
```

## Ubuntu 18.04 and 20.04 LTS
## Ubuntu 22.04 LTS

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

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

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

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

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

To install the release versions of the dependencies run:

Expand Down
2 changes: 1 addition & 1 deletion dtfabric/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
"""Data type fabric."""

__version__ = '20231227'
__version__ = '20240211'
18 changes: 15 additions & 3 deletions dtfabric/data_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,11 @@ def __init__(

@property
def members(self) -> 'List[DataTypeDefinition]':
"""members (list[DataTypeDefinition]): member data type definitions."""
"""Retrieves the member data type definitions.
Returns:
list[DataTypeDefinition]: member data type definitions.
"""
return list(self._members_by_name.values())

def AddMemberDefinition(
Expand Down Expand Up @@ -868,7 +872,11 @@ def __init__(

@property
def members(self) -> 'List[DataTypeDefinition]':
"""members (list[DataTypeDefinition]): member data type definitions."""
"""Retrieves the member data type definitions.
Returns:
list[DataTypeDefinition]: member data type definitions.
"""
return list(self._members_by_name.values())

def AddMemberDefinition(
Expand Down Expand Up @@ -941,7 +949,11 @@ def __init__(

@property
def members(self) -> 'List[DataTypeDefinition]':
"""members (list[DataTypeDefinition]): member data type definitions."""
"""Retrieves the member data type definitions.
Returns:
list[DataTypeDefinition]: member data type definitions.
"""
return list(self._members_by_name.values())

def AddMemberDefinition(
Expand Down
6 changes: 5 additions & 1 deletion dtfabric/runtime/data_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2175,7 +2175,11 @@ class FormatMap(LayoutDataTypeMap):

@property
def layout(self):
"""list[LayoutElementDefinition]: layout element definitions."""
"""Retrieves the layout element definitions.
Returns:
list[LayoutElementDefinition]: layout element definitions.
"""
return getattr(self._data_type_definition, 'layout', [])

def MapByteStream(self, byte_stream, **unused_kwargs): # pylint: disable=redundant-returns-doc
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.docformatter]
black = false
non-cap = ["dfDateTime", "dfImageTools", "dfVFS", "dfWinReg", "dtFabric", "iMessage", "iOS", "iPod", "mDNS"]
non-strict = false
wrap-summaries = 80
wrap-descriptions = 80
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = dtfabric
version = 20231227
version = 20240211
description = Data type fabric (dtfabric)
long_description = dtFabric, or data type fabric, is a project to manage data types and structures, as used in the libyal projects.
long_description_content_type = text/plain
Expand All @@ -22,7 +22,7 @@ install_requires = file:requirements.txt
package_dir =
dtfabric = dtfabric
packages = find:
python_requires = >=3.7
python_requires = >=3.8
scripts =
scripts/validate-definitions.py

Expand Down
15 changes: 13 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py3{7,8,9,10,11,12},coverage,docs,lint,wheel
envlist = py3{8,9,10,11,12},coverage,docformatter,docs,lint,wheel

[testenv]
allowlist_externals = ./run_tests.py
Expand All @@ -19,12 +19,19 @@ deps =
setuptools >= 65
wheel
commands =
py3{7,8,9,10,11,12}: ./run_tests.py
py3{8,9,10,11,12}: ./run_tests.py
coverage: coverage erase
coverage: coverage run --source=dtfabric --omit="*_test*,*__init__*,*test_lib*" run_tests.py
coverage: coverage xml
wheel: python -m build --no-isolation --wheel

[testenv:docformatter]
usedevelop = True
deps =
docformatter
commands =
docformatter --in-place --recursive dtfabric tests

[testenv:docs]
usedevelop = True
deps =
Expand All @@ -45,10 +52,14 @@ setenv =
deps =
-rrequirements.txt
-rtest_requirements.txt
docformatter
pylint >= 3.0.0, < 3.1.0
setuptools
yamllint >= 1.26.0
commands =
docformatter --version
pylint --version
yamllint -v
docformatter --check --diff --recursive dtfabric scripts setup.py tests
pylint --rcfile=.pylintrc dtfabric scripts setup.py tests
yamllint -c .yamllint.yaml test_data
2 changes: 1 addition & 1 deletion utils/update_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dtfabric (${VERSION}-1) unstable; urgency=low
EOT

# Regenerate the API documentation.
tox -edocs
tox -edocformatter,docs

exit ${EXIT_SUCCESS};

0 comments on commit 75ef3ca

Please sign in to comment.