Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

🐛 sphinx-needs: a `filter=None` written in a dynamic-function call drops the need ("Unsupported kwarg value type")

Open
#2,245 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
tooling

Research direction

Start by reproducing the failure with a dynamic function such as [[links_from_match("name", "ref", filter=None)]] in a small Sphinx project, and find where the dynamic-function parser raises "Unsupported kwarg ... value type" (the error is reported through needs.create_need). Decide whether the parser should accept a None literal as the keyword's default or the docs should say it cannot be written. Done when the call either yields the expected need or documentation states the restriction, and a refused call keeps the need with the needs.dynamic_function warning.

Written by the indexing model from the issue text.

Description

bug pkg: sphinx-needs
What

Every built-in's documented signature spells a None default (links_from_filter(filter, include_self=False, include_parts=False) aside, links_from_match(field, equals, include_self=False, filter=None), copy(option, need_id=None, …, filter=None), …), but the dynamic-function parser refuses a None keyword VALUE, and the refusal drops the whole need.

Measured (sphinx-needs master 05b4fd2d, found in ubcode#4119's review)

:m_none: [[links_from_match("name", "ref", filter=None)]] → WARNING: Need could not be created: Link option 'm_none' is invalid: Error parsing dynamic function 'links_from_match': Unsupported kwarg 'filter' value type [needs.create_need] — the need is absent from needs.json. The same for any function's keyword written as =None. ubCode reads such a keyword as the default (no filter) and keeps the need; the divergence is recorded on its side.

Ask

The parser accepts a None literal for a keyword whose default is None (reading it as the default), or the docs say the literal cannot be written — and a refused call should not drop the need (the usual needs.dynamic_function warning with the field left at its placeholder).

Dominant language
Python
Stars
309
Forks
103
Avg merge
10h 41m
Merged PRs (30d)
128

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from useblocks/sphinx-needs

All issues in useblocks/sphinx-needs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.