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

Update to Pyo3 0.21 #7

Merged
merged 7 commits into from
May 16, 2024
Merged

Commits on Apr 7, 2024

  1. Configuration menu
    Copy the full SHA
    4ae3eae View commit details
    Browse the repository at this point in the history
  2. Update to pyo3 0.21

    Dr-Emann committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    0cd73f1 View commit details
    Browse the repository at this point in the history
  3. Use downcast instead of extract where possible

    [docs](https://pyo3.rs/v0.21.1/performance#extract-versus-downcast) suggest
    this is faster, and can lead to better error messages in the
    `bloom.update(bloom)` case: before, `extract::<PyRef<Bloom>>()` would fail, so
    we would fall back to trying (and failing) to iterate the Bloom object. Now,
    instead, we get a clear error that `bloom` is already borrowed mutably.
    
    We could instead take `&Bound<'_, Bloom>`, and check `slf.is(other)` before
    borrowing, to avoid the error entirely, but it makes the signature and body of
    the functions a fair bit uglier, not sure if it's worth it.
    Dr-Emann committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    47f5abc View commit details
    Browse the repository at this point in the history
  4. Fix CI for macos

    Per [maturin PR](PyO3/maturin#1620), use
    `--target universal2-apple-darwin` instead
    Dr-Emann committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    ed5c8f5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    eb2845a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b1d6b0e View commit details
    Browse the repository at this point in the history
  7. Participate in python GC

    Allow gc to collect a Bloom object even if the hash function contains a
    reference to the Bloom filter
    
    We don't have to implement `__clear__`, because our reference is immutable, it
    will be set in `__new__` and never modified. Reference cycles must include at
    least one mutable reference, so allow the hash_func object's __clear__ to break
    the cycle
    Dr-Emann committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    be7b67e View commit details
    Browse the repository at this point in the history