JuliaPy / JuliaPy/PythonCall.jl

Improve the `pyconvert` rule dispatch system

Open
#366 6 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Julia
Stars
1.1k
Forks
86
Avg merge
1d 22h
Merged PRs (30d)
3

Description

**Is your feature request related to a problem? Please describe.**
I add a rule with a bug in the function, try a conversion, see the bug, and define a new rule with a different (hopefully less buggy) function. However, when I try the conversion again, I get the old function :cry:.

**Describe the solution you'd like**
When tied for priority in all other respects, I'd like to get the most recently added conversion, not the least recently added conversion.

**Describe alternatives you've considered**
Removing rules is a more robust approach, and works even if I added a new rule with an erroneously high priority, but that can be orthogonal to this feature request.

**Additional context**
I'm happy to make a PR if this is a change we want to make. It's technically breaking, but only barely, and IIUC we are okay with more breaking releases at this time.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the pyconvert rule registration and dispatch entry point, then reproduce two tied-priority rules where the newer rule currently loses. Trace how rules are ordered and identify the existing dispatch tests, if present. Done means tied rules consistently select the most recently added conversion without changing other priority behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia, python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.