Skip to content

Comments

Fix submit() resolving RefProxy and RefMutProxy arguments#507

Merged
gpauloski merged 2 commits intomainfrom
submit-bug
Mar 9, 2024
Merged

Fix submit() resolving RefProxy and RefMutProxy arguments#507
gpauloski merged 2 commits intomainfrom
submit-bug

Conversation

@gpauloski
Copy link
Collaborator

Inserting a proxy into a set resolves it because it calls hash.

Description

submit() was resolving RefProxy and RefMutProxy arguments because it adds those proxy types to a set. Inserting into a set calls __hash__ which is forwarded to the target necessitating a resolve.

This was fixed by appending the proxies to a list, and ensuring the callback can appropriately handle lists of reference proxies with duplicates.

I'm not happy about how much time I've lost debugging poor application performance due to this bug.

Fixes N/A

Type of Change

  • Breaking Change (fix or enhancement which changes existing semantics of the public interface)
  • Enhancement (new features or improvements to existing functionality)
  • Bug (fixes for a bug or issue)
  • Internal (refactoring, style changes, testing, optimizations)
  • Documentation update (changes to documentation or examples)
  • Package (dependencies, versions, package metadata)
  • Development (CI workflows, pre-commit, linters, templates)
  • Security (security related changes)

Testing

Added new unit tests.

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Tags added to PR (e.g., breaking, bug, enhancement, internal, documentation, package, development, security).
  • Code changes pass pre-commit (e.g., mypy, ruff, etc.).
  • Tests have been added to show the fix is effective or that the new feature works.
  • New and existing unit tests pass locally with the changes.
  • Docs have been updated and reviewed if relevant.

Inserting a proxy into a set resolves it because it calls __hash__.
@gpauloski gpauloski added the bug Error, flaw, or fault that causes unexpected behavior label Mar 9, 2024
@gpauloski gpauloski merged commit 0912163 into main Mar 9, 2024
@gpauloski gpauloski deleted the submit-bug branch March 9, 2024 03:10
gpauloski added a commit that referenced this pull request Mar 9, 2024
Fix `submit()` resolving `Proxy` arguments (re: #507)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Error, flaw, or fault that causes unexpected behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant