Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-discogs-client for
openSUSE:Factory checked in at 2026-08-21 16:59:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-discogs-client (Old)
and /work/SRC/openSUSE:Factory/.python-discogs-client.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-discogs-client"
Fri Aug 21 16:59:49 2026 rev:8 rq:1372740 version:2.9
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-discogs-client/python-discogs-client.changes
2025-07-14 10:57:59.228263917 +0200
+++
/work/SRC/openSUSE:Factory/.python-discogs-client.new.1258/python-discogs-client.changes
2026-08-21 16:59:51.634915809 +0200
@@ -1,0 +2,9 @@
+Fri Aug 21 09:37:37 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 2.9:
+ * Bump ubuntu version in build workflow
+ * A new configuration option `trust_per_page` allows
+ controlling how pagination is handled
+ * PyPi: https://pypi.org/project/python3-discogs-client/2.9/
+
+-------------------------------------------------------------------
Old:
----
v2.8.tar.gz
New:
----
v2.9.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-discogs-client.spec ++++++
--- /var/tmp/diff_new_pack.rpxLIS/_old 2026-08-21 16:59:52.468945499 +0200
+++ /var/tmp/diff_new_pack.rpxLIS/_new 2026-08-21 16:59:52.470945571 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-discogs-client
#
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
Name: python-discogs-client
-Version: 2.8
+Version: 2.9
Release: 0
Summary: Python API client for Discogs
License: BSD-2-Clause
++++++ v2.8.tar.gz -> v2.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/discogs_client-2.8/.bumpversion.cfg
new/discogs_client-2.9/.bumpversion.cfg
--- old/discogs_client-2.8/.bumpversion.cfg 2025-02-17 08:24:23.000000000
+0100
+++ new/discogs_client-2.9/.bumpversion.cfg 2026-07-15 09:05:29.000000000
+0200
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 2.8
+current_version = 2.9
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))?
serialize =
{major}.{minor}.{patch}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/discogs_client-2.8/.github/workflows/discogs_client-build.yml
new/discogs_client-2.9/.github/workflows/discogs_client-build.yml
--- old/discogs_client-2.8/.github/workflows/discogs_client-build.yml
2025-02-17 08:24:23.000000000 +0100
+++ new/discogs_client-2.9/.github/workflows/discogs_client-build.yml
2026-07-15 09:05:29.000000000 +0200
@@ -8,7 +8,7 @@
jobs:
build:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/discogs_client-2.8/PYPIRC_TEMPLATE
new/discogs_client-2.9/PYPIRC_TEMPLATE
--- old/discogs_client-2.8/PYPIRC_TEMPLATE 1970-01-01 01:00:00.000000000
+0100
+++ new/discogs_client-2.9/PYPIRC_TEMPLATE 2026-07-15 09:05:29.000000000
+0200
@@ -0,0 +1,15 @@
+[distutils]
+index-servers =
+ distutils
+ test-python3-discogs-client
+ python3-discogs-client
+
+[test-python3-discogs-client]
+ repository = https://test.pypi.org/legacy/
+ username = __token__
+ password = pypi-REDACTED-TOKEN
+
+[python3-discogs-client]
+ repository = https://upload.pypi.org/legacy/
+ username = __token__
+ password = pypi-REDACTED-TOKEN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/discogs_client-2.8/discogs_client/__init__.py
new/discogs_client-2.9/discogs_client/__init__.py
--- old/discogs_client-2.8/discogs_client/__init__.py 2025-02-17
08:24:23.000000000 +0100
+++ new/discogs_client-2.9/discogs_client/__init__.py 2026-07-15
09:05:29.000000000 +0200
@@ -1,4 +1,4 @@
-__version__ = '2.8'
+__version__ = '2.9'
__version_info__ = tuple(int(i) for i in __version__.split('.') if i.isdigit())
from discogs_client.client import Client
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/discogs_client-2.8/discogs_client/client.py
new/discogs_client-2.9/discogs_client/client.py
--- old/discogs_client-2.8/discogs_client/client.py 2025-02-17
08:24:23.000000000 +0100
+++ new/discogs_client-2.9/discogs_client/client.py 2026-07-15
09:05:29.000000000 +0200
@@ -19,6 +19,7 @@
self.user_agent = user_agent
self.verbose = False
self._fetcher = RequestsFetcher()
+ self._trust_per_page = True # Default: True
if consumer_key and consumer_secret:
self.set_consumer_key(consumer_key, consumer_secret)
@@ -219,3 +220,13 @@
"""
self._fetcher.connect_timeout = connect
self._fetcher.read_timeout = read
+
+ @property
+ def trust_per_page(self) -> bool:
+ return self._trust_per_page
+
+ @trust_per_page.setter
+ def trust_per_page(self, value: bool) -> None:
+ if not isinstance(value, bool):
+ raise ValueError("trust_per_page must be a bool")
+ self._trust_per_page = value
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/discogs_client-2.8/discogs_client/models.py
new/discogs_client-2.9/discogs_client/models.py
--- old/discogs_client-2.8/discogs_client/models.py 2025-02-17
08:24:23.000000000 +0100
+++ new/discogs_client-2.9/discogs_client/models.py 2026-07-15
09:05:29.000000000 +0200
@@ -354,18 +354,42 @@
return item
def __getitem__(self, index):
- page_index = index // self.per_page + 1
- offset = index % self.per_page
+ """Retrieve an item by its index.
- try:
- page = self.page(page_index)
- except HTTPError as e:
- if e.status_code == 404:
- raise IndexError(e.msg)
- else:
+ By default, uses the API's ``per_page`` value to calculate the page
+ containing the item directly. If the API returns fewer items per page
+ than reported, this may yield incorrect results — set
+ ``client.trust_per_page = False`` to fall back to a sequential page
+ walk at the cost of performance.
+ """
+ if self.client._trust_per_page:
+ page_index = index // self.per_page + 1
+ offset = index % self.per_page
+
+ try:
+ page = self.page(page_index)
+ except HTTPError as e:
+ if e.status_code == 404:
+ raise IndexError(e.msg) from e
+ raise
+
+ return page[offset]
+
+ # Fallback to sequential page loading if we're not trusting the
per_page parameter
+ current = 0
+ page_index = 1
+ while True:
+ try:
+ page = self.page(page_index)
+ except HTTPError as e:
+ if e.status_code == 404:
+ raise IndexError(e.msg) from e
raise
+ if current + len(page) > index:
+ return page[index - current]
+ current += len(page)
+ page_index += 1
- return page[offset]
def __len__(self):
return self.count
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/discogs_client-2.8/discogs_client/tests/test_core.py
new/discogs_client-2.9/discogs_client/tests/test_core.py
--- old/discogs_client-2.8/discogs_client/tests/test_core.py 2025-02-17
08:24:23.000000000 +0100
+++ new/discogs_client-2.9/discogs_client/tests/test_core.py 2026-07-15
09:05:29.000000000 +0200
@@ -111,6 +111,46 @@
results.per_page = 10
self.assertTrue(results._num_pages is None)
+ def test_pagination_index_without_trust_per_page_and_short_pages(self):
+ """Without trust_per_page, sequential page walking handles
under-filled pages correctly."""
+ client = Client('ua')
+ client.trust_per_page = False # opt into sequential walk
+ client._base_url = ''
+ client._trust_per_page = False
+ client._fetcher = MemoryFetcher({
+ '/artists/1': (
+ b'{"id": 1, "name": "Badger", "releases_url":
"/artists/1/releases"}',
+ 200,
+ ),
+ '/artists/1/releases?page=1&per_page=50': (
+ b'{"pagination": {"per_page": 50, "pages": 3, "items": 5}, '
+ b'"releases": ['
+ b'{"id": 101, "type": "release", "title": "A"},'
+ b'{"id": 102, "type": "release", "title": "B"}'
+ b']}',
+ 200,
+ ),
+ '/artists/1/releases?page=2&per_page=50': (
+ b'{"pagination": {"per_page": 50, "pages": 3, "items": 5}, '
+ b'"releases": [{"id": 103, "type": "release", "title": "C"}]}',
+ 200,
+ ),
+ '/artists/1/releases?page=3&per_page=50': (
+ b'{"pagination": {"per_page": 50, "pages": 3, "items": 5}, '
+ b'"releases": ['
+ b'{"id": 104, "type": "release", "title": "D"},'
+ b'{"id": 105, "type": "release", "title": "E"}'
+ b']}',
+ 200,
+ ),
+ })
+
+ results = client.artist(1).releases
+ self.assertEqual(results[0].id, 101) # page 1
+ self.assertEqual(results[2].id, 103) # page 2, cross-page
+ self.assertEqual(results[4].id, 105) # page 3, last item
+ self.assertRaises(IndexError, lambda: results[5])
+
def test_timeout_defaults_to_none(self):
# Need to create client without LoggingDelegator here
# self.d would throw AttributeError trying to access timeout
properties on LoggingDelegator
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/discogs_client-2.8/docs/source/conf.py
new/discogs_client-2.9/docs/source/conf.py
--- old/discogs_client-2.8/docs/source/conf.py 2025-02-17 08:24:23.000000000
+0100
+++ new/discogs_client-2.9/docs/source/conf.py 2026-07-15 09:05:29.000000000
+0200
@@ -22,7 +22,7 @@
author = 'The Joalla Team'
# The full version, including alpha/beta/rc tags
-release = '2.8'
+release = '2.9'
# -- General configuration ---------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/discogs_client-2.8/docs/source/optional_configuration.md
new/discogs_client-2.9/docs/source/optional_configuration.md
--- old/discogs_client-2.8/docs/source/optional_configuration.md
2025-02-17 08:24:23.000000000 +0100
+++ new/discogs_client-2.9/docs/source/optional_configuration.md
2026-07-15 09:05:29.000000000 +0200
@@ -30,3 +30,25 @@
```
_Timeouts support integer and float values, you can also set either value to
`None` to disable timeout for connect or read separately_
+
+## Trust Discogs per page value
+
+When accessing paginated results by index (e.g. `results[42]`),
+python3-discogs-client uses the `per_page` value from the API response to
+calculate which page contains the item directly. This is fast, but assumes the
+API always returns exactly `per_page` items per page.
+
+If the API returns fewer items per page than the reported `per_page` value,
+this calculation can be off. In such cases, disable this behaviour to fall
+back to a sequential page walk:
+
+```python
+>>> import discogs_client
+>>> d = discogs_client.Client('ExampleApplication/0.1')
+>>> d.trust_per_page = False
+```
+
+:::{attention}
+The sequential fallback is slower for large result sets, as it must fetch pages
+one by one until it reaches the requested index.
+:::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/discogs_client-2.8/pypi.sh
new/discogs_client-2.9/pypi.sh
--- old/discogs_client-2.8/pypi.sh 2025-02-17 08:24:23.000000000 +0100
+++ new/discogs_client-2.9/pypi.sh 2026-07-15 09:05:29.000000000 +0200
@@ -7,12 +7,12 @@
rm -rf dist/
echo
python -m build
-python -m twine upload --repository testpypi dist/*
+python -m twine upload --repository test-python3-discogs-client dist/*
echo
echo "Test install:"
echo "python3 -m pip install --index-url https://test.pypi.org/simple/
--no-deps python3-discogs-client"
echo
echo "All good? Upload to real PyPI:"
-echo python3 -m twine upload dist/*
+echo python3 -m twine upload --repository python3-discogs-client dist/*
echo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/discogs_client-2.8/release_workflow.sh
new/discogs_client-2.9/release_workflow.sh
--- old/discogs_client-2.8/release_workflow.sh 2025-02-17 08:24:23.000000000
+0100
+++ new/discogs_client-2.9/release_workflow.sh 2026-07-15 09:05:29.000000000
+0200
@@ -19,7 +19,12 @@
echo " - Add to the sections with changes"
echo " - Delete the sections without news"
echo " - Keep a consistent format between releases as good as possible."
+echo " - Configure PyPI access:'"
+echo " - Make sure you have a ~/.pypirc following PYPIRC_TEMPLATE."
+echo " - Make sure you have a project-specific token for"
+echo " python3-discogs-client on test.pypi.org and pypi.org."
echo " - Execute 'pypi.sh'"
+echo " - Make sure you have a ~/.pypirc following PYPIRC_TEMPLATE."
echo " - Builds package (wheel)"
echo " - Uploads to Test-PyPI"
echo " - Execute the suggested install command to briefly test the package"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/discogs_client-2.8/setup.py
new/discogs_client-2.9/setup.py
--- old/discogs_client-2.8/setup.py 2025-02-17 08:24:23.000000000 +0100
+++ new/discogs_client-2.9/setup.py 2026-07-15 09:05:29.000000000 +0200
@@ -4,7 +4,7 @@
setup(
name='python3-discogs-client',
- version='2.8',
+ version='2.9',
description='Python API client for Discogs',
long_description='This is an active fork of the official "Discogs API
client for Python", which was deprecated by discogs.com as of June 2020. We
think it is a very useful Python module and decided to continue maintaining it.
Please visit: https://github.com/joalla/discogs_client for more information.',
url='https://github.com/joalla/discogs_client',