pythonnet / pythonnet/pythonnet

Follow up on AssemblyManager.LookupTypes calls

Open
#1,320 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
5.5k
Forks
780
PR merge metrics
No merged PRs in 30d

Description

In two places (classobject.cs and genericutil.cs) we call into AssemblyManager.LookupTypes and use just the first matching entry. We should look into these instances and check whether we can do a more informed decision on which type to choose exactly.

The respective code was adjusted slightly in #1318 (before we had an obsolete function LookupType that did the same).

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 by reading the two AssemblyManager.LookupTypes call sites in classobject.cs and genericutil.cs, then review the related changes in #1318 and the LookupTypes implementation. Determine what information can distinguish matching types and define the selection behavior for both call sites; the work is done when neither relies blindly on the first match and the behavior is covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.