jmcarp / jmcarp/nplusone

[1.0.0] Breaks with Django >=6.1 (seemed fine until Django <=6.0.8)

Open
#52 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.1k
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Hi! 👋

I have been using nplusone in https://github.com/hartwork/wnpp.debian.net since 2021 happily — thank you! 🙏

With the last release being of 2018, the project seems dead to me, but maybe this report still has value to someone.

I have a test suite that is all-green on the master branch but GitHub Dependabot sent me a pull request [bumping Django from 6.0.8 to 6.1](https://github.com/hartwork/wnpp.debian.net/pull/1810) which reveals that nplusone [now crashes](https://github.com/hartwork/wnpp.debian.net/actions/runs/31172217369/job/92846322368?pr=1810) in file `ext/django/patch.py` with error:

```
ValueError: too many values to unpack (expected 3, got 4)
```

I'm attaching a backup of the full CI run log for download here: [wnpp-job-logs.txt](https://github.com/user-attachments/files/31088422/wnpp-job-logs.txt).

To give an example crash backtrace, this is the last one from the CI run:
```
2026-08-07T11:21:43.3998978Z ======================================================================
2026-08-07T11:21:43.3999486Z ERROR: test_wellformed_xml (wnpp_debian_net.views.tests.test_rss_feed.WnppNewsFeedTest.test_wellformed_xml)
2026-08-07T11:21:43.3999632Z ----------------------------------------------------------------------
2026-08-07T11:21:43.3999730Z Traceback (most recent call last):
2026-08-07T11:21:43.4000033Z File "/home/wnpp-debian-net/wnpp_debian_net/views/tests/test_rss_feed.py", line 138, in test_wellformed_xml
2026-08-07T11:21:43.4000136Z response = self.client.get(self.url)
2026-08-07T11:21:43.4000416Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/test/client.py", line 1128, in get
2026-08-07T11:21:43.4000515Z response = super().get(
2026-08-07T11:21:43.4000600Z path,
2026-08-07T11:21:43.4000680Z ...<4 lines>...
2026-08-07T11:21:43.4000765Z **extra,
2026-08-07T11:21:43.4000842Z )
2026-08-07T11:21:43.4001126Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/test/client.py", line 475, in get
2026-08-07T11:21:43.4001217Z return self.generic(
2026-08-07T11:21:43.4001304Z ~~~~~~~~~~~~^
2026-08-07T11:21:43.4001517Z "GET",
2026-08-07T11:21:43.4001603Z ^^^^^^
2026-08-07T11:21:43.4001682Z ...<4 lines>...
2026-08-07T11:21:43.4001767Z **extra,
2026-08-07T11:21:43.4001844Z ^^^^^^^^
2026-08-07T11:21:43.4001925Z )
2026-08-07T11:21:43.4002001Z ^
2026-08-07T11:21:43.4002317Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/test/client.py", line 671, in generic
2026-08-07T11:21:43.4002410Z return self.request(**r)
2026-08-07T11:21:43.4002499Z ~~~~~~~~~~~~^^^^^
2026-08-07T11:21:43.4002927Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/test/client.py", line 1091, in request
2026-08-07T11:21:43.4003029Z self.check_exception(response)
2026-08-07T11:21:43.4003115Z ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
2026-08-07T11:21:43.4003439Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/test/client.py", line 805, in check_exception
2026-08-07T11:21:43.4003527Z raise exc_value
2026-08-07T11:21:43.4003858Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/core/handlers/exception.py", line 56, in inner
2026-08-07T11:21:43.4003961Z response = get_response(request)
2026-08-07T11:21:43.4004300Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/core/handlers/base.py", line 199, in _get_response
2026-08-07T11:21:43.4004495Z response = wrapped_callback(request, *callback_args, **callback_kwargs)
2026-08-07T11:21:43.4004716Z File "/home/wnpp-debian-net/wnpp_debian_net/views/rss_feed.py", line 79, in __call__
2026-08-07T11:21:43.4004855Z response = super().__call__(request, *args, **kwargs)
2026-08-07T11:21:43.4005199Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/contrib/syndication/views.py", line 40, in __call__
2026-08-07T11:21:43.4005305Z feedgen = self.get_feed(obj, request)
2026-08-07T11:21:43.4005652Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/contrib/syndication/views.py", line 181, in get_feed
2026-08-07T11:21:43.4005783Z for item in self._get_dynamic_attr("items", obj):
2026-08-07T11:21:43.4005888Z ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
2026-08-07T11:21:43.4006195Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/db/models/query.py", line 434, in __iter__
2026-08-07T11:21:43.4006287Z self._fetch_all()
2026-08-07T11:21:43.4006366Z ~~~~~~~~~~~~~~~^^
2026-08-07T11:21:43.4006693Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/nplusone/ext/django/patch.py", line 295, in fetch_all
2026-08-07T11:21:43.4006789Z original_fetch_all(self)
2026-08-07T11:21:43.4006876Z ~~~~~~~~~~~~~~~~~~^^^^^^
2026-08-07T11:21:43.4007192Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/db/models/query.py", line 2239, in _fetch_all
2026-08-07T11:21:43.4007330Z self._result_cache = list(self._iterable_class(self))
2026-08-07T11:21:43.4007427Z ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-08-07T11:21:43.4007988Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/django/db/models/query.py", line 141, in __iter__
2026-08-07T11:21:43.4008142Z rel_populator.populate(row, obj)
2026-08-07T11:21:43.4008270Z ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
2026-08-07T11:21:43.4008738Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/nplusone/core/signals.py", line 24, in wrapped
2026-08-07T11:21:43.4008853Z signal.send(
2026-08-07T11:21:43.4008933Z ~~~~~~~~~~~^
2026-08-07T11:21:43.4009026Z get_worker(),
2026-08-07T11:21:43.4009105Z ^^^^^^^^^^^^^
2026-08-07T11:21:43.4009399Z ...<4 lines>...
2026-08-07T11:21:43.4009516Z parser=parser,
2026-08-07T11:21:43.4009598Z ^^^^^^^^^^^^^^
2026-08-07T11:21:43.4009678Z )
2026-08-07T11:21:43.4009755Z ^
2026-08-07T11:21:43.4010036Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/blinker/base.py", line 249, in send
2026-08-07T11:21:43.4010296Z result = receiver(sender, **kwargs)
2026-08-07T11:21:43.4010639Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/nplusone/core/listeners.py", line 118, in handle_eager
2026-08-07T11:21:43.4010775Z self.tracker.track(*parser(args, kwargs, context))
2026-08-07T11:21:43.4010879Z ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
2026-08-07T11:21:43.4011239Z File "/home/wnpp-debian-net/.local/lib/python3.14/site-packages/nplusone/ext/django/patch.py", line 324, in parse_eager_select
2026-08-07T11:21:43.4011345Z klass_info, select, _ = meta['args']
2026-08-07T11:21:43.4011553Z ^^^^^^^^^^^^^^^^^^^^^
2026-08-07T11:21:43.4011701Z ValueError: too many values to unpack (expected 3, got 4)
```

Maybe it helps someone to know that they are not alone with this symptom.

Best, Sebastian

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in ext/django/patch.py at parse_eager_select and inspect the traceback from test_wellformed_xml in wnpp_debian_net/views/tests/test_rss_feed.py. Compare the Django 6.0.8 and 6.1 behavior around the eager-select metadata, then run the affected test or suite; done means Django 6.1 no longer raises the reported ValueError.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.