Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enrico/bug context #1944

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Enrico/bug context #1944

wants to merge 4 commits into from

Conversation

em1208
Copy link
Contributor

@em1208 em1208 commented Mar 4, 2024

  • Closes # (insert issue number)
  • Executed pre-commit run --all-files with no errors
  • The change is fully covered by automated unit tests
  • Documented in docs/ as appropriate
  • Added an entry to the CHANGES file

I fixed a bug related to unit conversion when using context. Without the single line change in pint/facets/context/registry.py calling compatible_units fails with KeyError: <UnitsContainer({'[mass]': 1, '[time]': -1})>.

I hope this change can be merged and released soon!

Copy link

codspeed-hq bot commented Mar 4, 2024

CodSpeed Performance Report

Merging #1944 will not alter performance

Comparing em1208:enrico/bug-context (73e208c) with master (3cc2d36)

Summary

✅ 439 untouched benchmarks

@hgrecco
Copy link
Owner

hgrecco commented Mar 13, 2024

If I understand correctly, the problem is that after adding definitions, the cache is not rebuilt. Right? I think I have a better solution. I will try to put it in another PR

@em1208
Copy link
Contributor Author

em1208 commented Mar 15, 2024

@hgrecco Yes, the problem is that when the context is enabled the cache should be rebuilt otherwise currently an exception is raised.

@hgrecco
Copy link
Owner

hgrecco commented Mar 17, 2024

@em1208 This is the proposal #1779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants