scverse / scverse/spatialdata

Using `functools.partial` in an unsupported way that’ll break in a future Python version

Open
#993 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

https://github.com/scverse/spatialdata/blob/8c3e51880004499304f79b17e3b36d2fb5e9dd82/src/spatialdata/_core/query/relational_query.py#L530-L534

…/spatialdata/_core/query/relational_query.py:530: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in enum.member() if you want to preserve the old behavior

you should test with pytest -W error to make sure you don’t have ticking time bombs like this.

Contributor guide

Open the contributing guide

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.

Research direction

Start in src/spatialdata/_core/query/relational_query.py at lines 530-534, where the FutureWarning identifies the unsupported functools.partial usage. Run the relevant tests with pytest -W error to reproduce the warning. Done means the warning no longer occurs and the tests pass under warning-as-error mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.