diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2c19b23d02..ffc8a55ecc 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -93,19 +93,15 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-13, macos-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.9', '3.10', '3.11', '3.12'] include: - { os: ubuntu-latest, shell: bash } - - { os: ubuntu-22.04, shell: bash, python-version: 3.7 } - { os: macos-latest, shell: bash } - { os: macos-13, shell: bash } - { os: windows-latest, shell: pwsh } - { os: windows-latest, shell: msys2, python-version: 'mingw64' } exclude: - - { os: macos-latest, python-version: 3.7 } - - { os: macos-latest, python-version: 3.8 } - { os: macos-latest, python-version: 3.9 } - - { os: ubuntu-latest, python-version: 3.7 } defaults: run: @@ -151,7 +147,7 @@ jobs: pip install .[dev] -v --break-system-packages - name: Run tests w/ python coverage run: make ci-postbuild - # (only on ubuntu/pyhton3.7) + # (only on GH_COV_OS and GH_COV_PY) - name: Generate C++ coverage report if: matrix.python-version == env.GH_COV_PY && matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT run: make lcov @@ -172,9 +168,10 @@ jobs: strategy: matrix: os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] - python-build: ['cp37', 'cp38', 'cp39', 'cp310', 'cp311', 'cp312'] + python-build: ['cp39', 'cp310', 'cp311', 'cp312'] exclude: - - { os: macos-latest, python-build: 'cp37' } + # none currently + # - { os: macos-latest, python-build: 'cp37' } steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index 297aed333a..814f36bfe0 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ OpenTimelineIO [![OpenTimelineIO](docs/_static/OpenTimelineIO@3xDark.png)](http://opentimeline.io) ============== -[![Supported VFX Platform Versions](https://img.shields.io/badge/vfx%20platform-2020--2023-lightgrey.svg)](http://www.vfxplatform.com/) -![Supported Versions](https://img.shields.io/badge/python-3.7%2C%203.8%2C%203.9%2C%203.10%2C%203.11-blue) +[![Supported VFX Platform Versions](https://img.shields.io/badge/vfx%20platform-2022--2025-lightgrey.svg)](http://www.vfxplatform.com/) +![Supported Versions](https://img.shields.io/badge/python-3.9%2C%203.10%2C%203.11%2C%203.12-blue) [![Build Status](https://github.com/AcademySoftwareFoundation/OpenTimelineIO/actions/workflows/python-package.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/OpenTimelineIO/actions/workflows/python-package.yml) [![codecov](https://codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO/branch/main/graph/badge.svg)](https://codecov.io/gh/AcademySoftwareFoundation/OpenTimelineIO) [![docs](https://readthedocs.org/projects/opentimelineio/badge/?version=latest)](https://opentimelineio.readthedocs.io/en/latest/index.html) @@ -55,8 +55,8 @@ Documentation, including quick start, architecture, use cases, API docs, and muc Supported VFX Platforms ----------------- The current release supports: -- VFX platform 2023, 2022, 2021, 2020 -- Python 3.7 - 3.10 +- VFX platform 2025, 2024, 2023, 2022 +- Python 3.9 - 3.12 For more information on our vfxplatform support policy: [Contribution Guidelines Documentation Page](https://opentimelineio.readthedocs.io/en/latest/tutorials/contributing.html) For more information on the vfxplatform: [VFX Platform Homepage](https://vfxplatform.com) @@ -154,7 +154,7 @@ You can also install the PySide2 dependency with `python -m pip install .[view]` You may need to escape the `[` depending on your shell, `\[view\]` . -Currently the code base is written against python 3.7, 3.8, 3.9, 3.10 and 3.11, +Currently the code base is written against python 3.9-3.12, in keeping with the pep8 style. We ask that before developers submit pull request, they: diff --git a/setup.py b/setup.py index 6f277ddbfa..eb73f5fde8 100644 --- a/setup.py +++ b/setup.py @@ -205,10 +205,10 @@ def cmake_install(self): # check the python version first if ( sys.version_info[0] < 3 or - (sys.version_info[0] == 3 and sys.version_info[1] < 7) + (sys.version_info[0] == 3 and sys.version_info[1] < 9) ): sys.exit( - 'OpenTimelineIO requires python3.7 or greater, detected version:' + 'OpenTimelineIO requires python3.9 or greater, detected version:' ' {}.{}'.format( sys.version_info[0], sys.version_info[1] @@ -317,11 +317,10 @@ def run(self): 'Topic :: Software Development :: Libraries :: Python Modules', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Operating System :: OS Independent', 'Natural Language :: English', ], @@ -357,10 +356,9 @@ def run(self): }, # Disallow 3.9.0 because of https://github.com/python/cpython/pull/22670 - python_requires='>=3.7, !=3.9.0', # noqa: E501 + python_requires='>3.9.0', # noqa: E501 install_requires=[ - 'importlib_metadata>=1.4; python_version < "3.8"', ], entry_points={ 'console_scripts': [ diff --git a/src/py-opentimelineio/opentimelineio/plugins/manifest.py b/src/py-opentimelineio/opentimelineio/plugins/manifest.py index b0cf891ef7..2bb1caa10f 100644 --- a/src/py-opentimelineio/opentimelineio/plugins/manifest.py +++ b/src/py-opentimelineio/opentimelineio/plugins/manifest.py @@ -7,13 +7,9 @@ import inspect import logging import os -from pathlib import Path -try: - from importlib import metadata -except ImportError: - # For python 3.7 - import importlib_metadata as metadata +# for python <= 3.9 +from importlib import metadata from .. import ( core, @@ -287,12 +283,7 @@ def load_manifest(): except AttributeError: name = plugin_entry_point.__name__ - try: - filepath = resources.files(name) / "plugin_manifest.json" - except AttributeError: - # For python <= 3.7 - with resources.path(name, "plugin_manifest.json") as p: - filepath = Path(p) + filepath = resources.files(name) / "plugin_manifest.json" if filepath.as_posix() in result.source_files: continue @@ -317,18 +308,10 @@ def load_manifest(): ) # the builtin plugin manifest - try: - builtin_manifest_path = ( - resources.files("opentimelineio.adapters") - / "builtin_adapters.plugin_manifest.json" - ).as_posix() - except AttributeError: - # For python <= 3.7 - with resources.path( - "opentimelineio.adapters", - "builtin_adapters.plugin_manifest.json" - ) as p: - builtin_manifest_path = p.as_posix() + builtin_manifest_path = ( + resources.files("opentimelineio.adapters") + / "builtin_adapters.plugin_manifest.json" + ).as_posix() if os.path.abspath(builtin_manifest_path) not in result.source_files: plugin_manifest = manifest_from_file(builtin_manifest_path) diff --git a/tests/baselines/plugin_module/otio_mockplugin/__init__.py b/tests/baselines/plugin_module/otio_mockplugin/__init__.py index 4b88e7f4fd..79807ca2a7 100644 --- a/tests/baselines/plugin_module/otio_mockplugin/__init__.py +++ b/tests/baselines/plugin_module/otio_mockplugin/__init__.py @@ -2,7 +2,6 @@ # Copyright Contributors to the OpenTimelineIO project from importlib import resources -from pathlib import Path from opentimelineio.plugins import manifest @@ -21,12 +20,10 @@ def plugin_manifest(): - try: - filepath = resources.files(__package__) / "unusually_named_plugin_manifest.json" - except AttributeError: - # For python <= 3.7 - with resources.path(__package__, "unusually_named_plugin_manifest.json") as p: - filepath = Path(p) + filepath = ( + resources.files(__package__) + / "unusually_named_plugin_manifest.json" + ) return manifest.manifest_from_string( filepath.read_text() diff --git a/tests/test_plugin_detection.py b/tests/test_plugin_detection.py index b5f55c9392..c1bec8c175 100644 --- a/tests/test_plugin_detection.py +++ b/tests/test_plugin_detection.py @@ -12,11 +12,7 @@ from importlib import reload as import_reload -try: - import importlib.metadata as metadata -except ImportError: - # For python 3.7 - import importlib_metadata as metadata +import importlib.metadata as metadata import opentimelineio as otio from tests import baseline_reader