diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index dce53a7..653a224 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.8.x' + python-version: '3.10.x' - name: Install Poetry uses: abatilo/actions-poetry@v2.3.0 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02c4600..06dad03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,12 +12,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install poetry diff --git a/pyproject.toml b/pyproject.toml index e6b8594..76e4fc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "pymp4" -version = "1.4.0" +version = "1.5.0" description = "Python parser for MP4 boxes" authors = ["beardypig "] license = "Apache-2.0" @@ -23,7 +23,7 @@ classifiers = [ ] [tool.poetry.dependencies] -python = ">=3.7,<4.0" +python = ">=3.10,<4.0" construct = "2.8.8" [tool.poetry.group.dev.dependencies] diff --git a/src/pymp4/__init__.py b/src/pymp4/__init__.py index 8b13789..bc6108e 100644 --- a/src/pymp4/__init__.py +++ b/src/pymp4/__init__.py @@ -1 +1,5 @@ +import collections +import collections.abc +if not hasattr(collections, "Sequence"): + collections.Sequence = collections.abc.Sequence diff --git a/src/pymp4/cli.py b/src/pymp4/cli.py index 426b8f6..67cdb4e 100644 --- a/src/pymp4/cli.py +++ b/src/pymp4/cli.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -from __future__ import print_function import io import logging import argparse diff --git a/src/pymp4/parser.py b/src/pymp4/parser.py index e3ab8b2..bfde3f7 100644 --- a/src/pymp4/parser.py +++ b/src/pymp4/parser.py @@ -30,7 +30,7 @@ class PrefixedIncludingSize(Subconstruct): __slots__ = ["name", "lengthfield", "subcon"] def __init__(self, lengthfield, subcon): - super(PrefixedIncludingSize, self).__init__(subcon) + super().__init__(subcon) self.lengthfield = lengthfield def _parse(self, stream, context, path): @@ -799,7 +799,7 @@ def _encode(self, obj, context): class TellMinusSizeOf(Subconstruct): def __init__(self, subcon): - super(TellMinusSizeOf, self).__init__(subcon) + super().__init__(subcon) self.flagbuildnone = True def _parse(self, stream, context, path): diff --git a/src/pymp4/util.py b/src/pymp4/util.py index 73a3eb8..60661b6 100644 --- a/src/pymp4/util.py +++ b/src/pymp4/util.py @@ -22,7 +22,7 @@ log = logging.getLogger(__name__) -class BoxUtil(object): +class BoxUtil: @classmethod def first(cls, box, type_): if box.type == type_: