Skip to content

Commit 98f4be6

Browse files
committed
[build] Drop Python 3.7 and macos 13 support.
The macos13 builder will be retired soon so remove it early to avoid breaking the build. Python 3.7 is not supported on all builders already and has been EOL for > 2 years now.
1 parent f915f99 commit 98f4be6

File tree

7 files changed

+14
-28
lines changed

7 files changed

+14
-28
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,11 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727
strategy:
2828
matrix:
29-
os: [macos-13, macos-14, ubuntu-22.04, ubuntu-latest, windows-latest]
30-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
31-
exclude:
32-
# macos-14 builders use M1 (ARM64) which does not have a Python 3.7 package available.
33-
- os: macos-14
34-
python-version: "3.7"
35-
# ubuntu 24+ does not have Python 3.7
36-
- os: ubuntu-latest
37-
python-version: "3.7"
38-
29+
os: [macos-14, macos-latest, ubuntu-22.04, ubuntu-latest, windows-latest]
30+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
3931
env:
4032
# Version is extracted below and used to find correct package install path.
4133
scenedetect_version: ""
42-
# Setuptools must be pinned for the Python 3.7 builders.
43-
setuptools_version: "${{ matrix.python-version == '3.7' && '==62.3.4' || '' }}"
4434

4535
steps:
4636
- uses: actions/checkout@v4
@@ -61,7 +51,7 @@ jobs:
6151

6252
- name: Install Dependencies
6353
run: |
64-
python -m pip install --upgrade pip build wheel virtualenv setuptools${{ env.setuptools_version }}
54+
python -m pip install --upgrade pip build wheel virtualenv setuptools
6555
pip install -r requirements_headless.txt --only-binary av,opencv-python-headless
6656
6757
- name: Install MoviePy

scenedetect/backends/moviepy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def duration(self) -> ty.Optional[FrameTimecode]:
116116
@property
117117
def aspect_ratio(self) -> float:
118118
"""Display/pixel aspect ratio as a float (1.0 represents square pixels)."""
119-
# TODO: Use cached_property once Python 3.7 support is deprecated.
119+
# TODO: Use cached_property.
120120
if self._aspect_ratio is None:
121121
# MoviePy doesn't support extracting the aspect ratio yet, so for now we just fall
122122
# back to using OpenCV to determine it.

scenedetect/common.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,11 @@ def get_seconds(self) -> float:
352352
)
353353
return self.seconds
354354

355+
# TODO(https://scenedetect.com/issue/168): We should remove `nearest_frame` if possible, it
356+
# assumes constant framerate and causes more problems than it solves. Setting it to False makes
357+
# test_cli_load_scenes_with_time_frames in test_cli.py fail due to differences in end time.
358+
# We may also just need to clamp end time to the one specified by the user, this may not be
359+
# happening in the code.
355360
def get_timecode(
356361
self, precision: int = 3, use_rounding: bool = True, nearest_frame: bool = True
357362
) -> str:

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ classifiers =
2323
Intended Audience :: System Administrators
2424
Operating System :: OS Independent
2525
Programming Language :: Python :: 3
26-
Programming Language :: Python :: 3.7
2726
Programming Language :: Python :: 3.8
2827
Programming Language :: Python :: 3.9
2928
Programming Language :: Python :: 3.10
@@ -50,7 +49,7 @@ packages =
5049
scenedetect.backends
5150
scenedetect.detectors
5251
scenedetect.output
53-
python_requires = >=3.7
52+
python_requires = >=3.8
5453

5554
[options.extras_require]
5655
opencv = opencv-python

tests/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ def test_cli_backend_unsupported():
630630
)
631631

632632

633-
def test_cli_load_scenes():
633+
def test_cli_load_scenes_options():
634634
"""Ensure we can load scenes both with and without the cut row."""
635635
assert invoke_scenedetect("-i {VIDEO} time {TIME} {DETECTOR} list-scenes") == 0
636636
assert invoke_scenedetect("-i {VIDEO} time {TIME} load-scenes -i {VIDEO_NAME}-Scenes.csv") == 0
@@ -648,7 +648,7 @@ def test_cli_load_scenes():
648648
assert invoke_scenedetect("-i {VIDEO} time {TIME} load-scenes -i {VIDEO_NAME}-Scenes.csv") == 0
649649

650650

651-
def test_cli_load_scenes_with_time_frames():
651+
def test_cli_load_scenes_output():
652652
"""Verify we can use `load-scenes` with the `time` command and get the desired output."""
653653
scenes_csv = """
654654
Scene Number,Start Frame

website/pages/changelog.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -671,20 +671,15 @@ Development
671671

672672
PySceneDetect is a major breaking release which overhauls how timestamps are handled throughout the API. This allows PySceneDetect to properly process variable framerate (VFR) videos. A significant amount of technical debt has been addressed, including removal of deprecated or overly complicated APIs.
673673

674-
Although there have been minimal changes to most API examples, there are several breaking changes. Applications written for the 0.6 API *may* require modification to work with the new API.
675-
676-
### CLI Changes
674+
Although there have been minimal changes to most API examples, there are several breaking changes. Applications written for the 0.6 API *may* require modification to work with the new API. Minimum supported Python version is now **Python 3.8**.
677675

678676
### CLI Changes
679677

680678
- [feature] [WIP] New `save-xml` command supports saving scenes in Final Cut Pro format [#156](https://github.com/Breakthrough/PySceneDetect/issues/156)
681679
- [refactor] Remove deprecated `-d`/`--min-delta-hsv` option from `detect-adaptive` command
682680

683-
684681
### API Changes
685682

686-
#### Breaking
687-
688683
* Replace `frame_num` parameter (`int`) with `timecode` (`FrameTimecode`) in `SceneDetector` interface (#168)[https://github.com/Breakthrough/PySceneDetect/issues/168]:
689684
* The detector interface: `SceneDetector.process_frame()` and `SceneDetector.post_process()`
690685
* Statistics: `StatsManager.get_metrics()`, `StatsManager.set_metrics()`, and `StatsManager.metrics_exist()`
@@ -707,9 +702,6 @@ Although there have been minimal changes to most API examples, there are several
707702
* Remove `advance` parameter from `VideoStream.read()`
708703
* Remove `SceneDetector.stats_manager_required` property, no longer required
709704
* `SceneDetector` is now a [Python abstract class](https://docs.python.org/3/library/abc.html)
710-
711-
#### General
712-
713705
* Deprecated functionality preserved from v0.6 now uses the `warnings` module
714706
* Add properties to access `frame_num`, `framerate`, and `seconds` from `FrameTimecode` instead of getter methods
715707
* Add new `Timecode` type to represent frame timings in terms of the video's source timebase

website/pages/download.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
PySceneDetect is completely free software, and can be downloaded from the links below. See the [license and copyright information](copyright.md) page for details. If you have trouble running PySceneDetect, ensure that you have all the required dependencies listed in the [Dependencies](#dependencies) section below.
55

6-
PySceneDetect requires at least Python 3.7 or higher.
6+
PySceneDetect requires at least Python 3.8 or higher.
77

88

99
## Install via pip &nbsp; <span class="wy-text-neutral"><span class="fa fa-windows"></span> &nbsp; <span class="fa fa-linux"></span> &nbsp; <span class="fa fa-apple"></span></span></h3>

0 commit comments

Comments
 (0)