Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-guessit for openSUSE:Factory checked in at 2026-11-18 18:32:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-guessit (Old) and /work/SRC/openSUSE:Factory/.python-guessit.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-guessit" Wed Nov 18 18:32:12 2026 rev:31 rq:1398392 version:4.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-guessit/python-guessit.changes 2026-11-13 18:35:45.744394811 +0100 +++ /work/SRC/openSUSE:Factory/.python-guessit.new.1251/python-guessit.changes 2026-11-18 18:34:05.519316478 +0100 @@ -1,0 +2,7 @@ +Wed Nov 18 11:05:48 UTC 2026 - Luigi Baldoni <[email protected]> + +- Update to version 4.5.2 + Bug Fixes: + * episodes: Number the episode behind a numbered expected_title + +------------------------------------------------------------------- Old: ---- guessit-4.5.1.tar.gz New: ---- guessit-4.5.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-guessit.spec ++++++ --- /var/tmp/diff_new_pack.AosBgB/_old 2026-11-18 18:34:06.271348337 +0100 +++ /var/tmp/diff_new_pack.AosBgB/_new 2026-11-18 18:34:06.273348422 +0100 @@ -24,7 +24,7 @@ %bcond_with libalternatives %endif Name: python-guessit -Version: 4.5.1 +Version: 4.5.2 Release: 0 Summary: A library for guessing information from video files License: LGPL-3.0-or-later ++++++ guessit-4.5.1.tar.gz -> guessit-4.5.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-4.5.1/CHANGELOG.md new/guessit-4.5.2/CHANGELOG.md --- old/guessit-4.5.1/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 +++ new/guessit-4.5.2/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 @@ -2,6 +2,14 @@ <!-- version list --> +## v4.5.2 (2026-11-17) + +### Bug Fixes + +- **episodes**: Number the episode behind a numbered expected_title + ([`b1da441`](https://github.com/guessit-io/guessit/commit/b1da44186863ee2cddb7e2492f81b59067b234c0)) + + ## v4.5.1 (2026-11-10) ### Bug Fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-4.5.1/PKG-INFO new/guessit-4.5.2/PKG-INFO --- old/guessit-4.5.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 +++ new/guessit-4.5.2/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.5 Name: guessit -Version: 4.5.1 +Version: 4.5.2 Summary: GuessIt - a library for guessing information from video filenames. Project-URL: Homepage, https://guessit-io.github.io/guessit Project-URL: Repository, https://github.com/guessit-io/guessit @@ -106,6 +106,14 @@ <!-- version list --> +## v4.5.2 (2026-11-17) + +### Bug Fixes + +- **episodes**: Number the episode behind a numbered expected_title + ([`b1da441`](https://github.com/guessit-io/guessit/commit/b1da44186863ee2cddb7e2492f81b59067b234c0)) + + ## v4.5.1 (2026-11-10) ### Bug Fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-4.5.1/guessit/__version__.py new/guessit-4.5.2/guessit/__version__.py --- old/guessit-4.5.1/guessit/__version__.py 2020-02-02 01:00:00.000000000 +0100 +++ new/guessit-4.5.2/guessit/__version__.py 2020-02-02 01:00:00.000000000 +0100 @@ -4,4 +4,4 @@ """ # pragma: no cover -__version__ = "4.5.1" +__version__ = "4.5.2" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-4.5.1/guessit/rules/properties/episodes.py new/guessit-4.5.2/guessit/rules/properties/episodes.py --- old/guessit-4.5.1/guessit/rules/properties/episodes.py 2020-02-02 01:00:00.000000000 +0100 +++ new/guessit-4.5.2/guessit/rules/properties/episodes.py 2020-02-02 01:00:00.000000000 +0100 @@ -1303,7 +1303,8 @@ for episode in episodes_ if self._is_lone_digit(episode) and ( - self._numbers_something_else(matches, episode, in_final_part) or self._fraction_of_a_number(episode) + self._numbers_something_else(matches, episode, in_final_part) + or self._fraction_of_a_number(matches, episode) ) ] kept = [episode for episode in episodes_ if episode not in misplaced] @@ -1325,10 +1326,15 @@ return not in_final_part or bool(quoted) @staticmethod - def _fraction_of_a_number(episode: Match) -> bool: - """A digit behind the dot of a decimal number ("02.5"): a half episode, not a second one.""" + def _fraction_of_a_number(matches: Matches, episode: Match) -> bool: + """A digit behind the dot of a decimal number ("02.5"): a half episode, not a second one. + Not when the number in front of the dot belongs to a title (#966): an expected_title can + match up to that number ("Foo.2" titled "Foo 2"), and the digit behind the dot then + numbers the episode, not the fraction of the title's own number.""" before = (episode.input_string or "")[: episode.start] - return len(before) > 1 and before[-1] == "." and before[-2].isdigit() + if not (len(before) > 1 and before[-1] == "." and before[-2].isdigit()): + return False + return not matches.at_index(episode.start - 2, predicate=lambda m: m.name == "title") @classmethod def _detached_from_list(cls, episodes_: list[Match]) -> list[Match]: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-4.5.1/guessit/test/test_forced_type.py new/guessit-4.5.2/guessit/test/test_forced_type.py --- old/guessit-4.5.1/guessit/test/test_forced_type.py 2020-02-02 01:00:00.000000000 +0100 +++ new/guessit-4.5.2/guessit/test/test_forced_type.py 2020-02-02 01:00:00.000000000 +0100 @@ -170,3 +170,23 @@ result = guessit(name, {"type": "episode"}) for prop, value in expected.items(): assert result.get(prop) == value, f"{prop}: {result.get(prop)!r} != {value!r} in {dict(result)}" + + [email protected]( + ("name", "expected_title", "expected"), + [ + # An expected_title matching up to a number ("Foo.2" titled "Foo 2") owns the digit in + # front of the dot: the lone digit behind it then numbers the episode, and must not be + # discarded as the fraction of the title's own number (#966). + ("Foo.2.2", ["re:Foo 2"], {"title": "Foo 2", "episode": 2}), + ("Foo.2.2", ["Foo 2"], {"title": "Foo 2", "episode": 2}), + ("Foo.2.2.bar", ["re:Foo 2"], {"title": "Foo 2", "episode": 2, "episode_title": "bar"}), + ("Bar.3.3.x265", ["re:Bar 3"], {"title": "Bar 3", "episode": 3}), + ], +) +def test_forced_episode_with_numbered_expected_title( + name: str, expected_title: list[str], expected: dict[str, object] +) -> None: + result = guessit(name, {"expected_title": expected_title, "type": "episode"}) + for prop, value in expected.items(): + assert result.get(prop) == value, f"{prop}: {result.get(prop)!r} != {value!r} in {dict(result)}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-4.5.1/pyproject.toml new/guessit-4.5.2/pyproject.toml --- old/guessit-4.5.1/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 +++ new/guessit-4.5.2/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ [project] name = "guessit" -version = "4.5.1" +version = "4.5.2" description = "GuessIt - a library for guessing information from video filenames." dynamic = ["readme"] license = "LGPL-3.0-or-later" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guessit-4.5.1/uv.lock new/guessit-4.5.2/uv.lock --- old/guessit-4.5.1/uv.lock 2020-02-02 01:00:00.000000000 +0100 +++ new/guessit-4.5.2/uv.lock 2020-02-02 01:00:00.000000000 +0100 @@ -471,7 +471,7 @@ [[package]] name = "guessit" -version = "4.5.1" +version = "4.5.2" source = { editable = "." } dependencies = [ { name = "babelfish" },
