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

release: 0.22.3 #4518

Merged
merged 32 commits into from
Sep 15, 2024
Merged

release: 0.22.3 #4518

merged 32 commits into from
Sep 15, 2024

Commits on Sep 3, 2024

  1. Configuration menu
    Copy the full SHA
    be10c5e View commit details
    Browse the repository at this point in the history
  2. Improve error messages for #[pyfunction] defined inside #[pymethods] (#…

    …4349)
    
    * Improve error messages for #[pyfunction] defined inside #[pymethods]
    
    Make error message more specific when `#[pyfunction]` is used in
    `#[pymethods]`.
    
    Effectively, this replaces the error message:
    
    ```
    error: static method needs #[staticmethod] attribute
    ```
    
    To:
    ```
    functions inside #[pymethods] do not need to be annotated with #[pyfunction]
    ```
    
    ...and also removes the other misleading error messages to the function in
    question.
    
    Fixes #4340
    
    Co-authored-by: László Vaskó <1771332+vlaci@users.noreply.github.com>
    
    * review fixes
    
    ---------
    
    Co-authored-by: László Vaskó <1771332+vlaci@users.noreply.github.com>
    2 people authored and davidhewitt committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    cd70cec View commit details
    Browse the repository at this point in the history
  3. Update dict.get_item binding to use PyDict_GetItemRef (#4355)

    * Update dict.get_item binding to use PyDict_GetItemRef
    
    Refs #4265
    
    * test: add test for dict.get_item error path
    
    * test: add test for dict.get_item error path
    
    * test: add test for dict.get_item error path
    
    * fix: fix logic error in dict.get_item bindings
    
    * update: apply david's review suggestions for dict.get_item bindings
    
    * update: create ffi::compat to store compatibility shims
    
    * update: move PyDict_GetItemRef bindings to spot in order from dictobject.h
    
    * build: fix build warning with --no-default-features
    
    * doc: expand release note fragments
    
    * fix: fix clippy warnings
    
    * respond to review comments
    
    * Apply suggestion from @mejrs
    
    * refactor so cfg is applied to functions
    
    * properly set cfgs
    
    * fix clippy lints
    
    * Apply @davidhewitt's suggestion
    
    * deal with upstream deprecation of new_bound
    ngoldbaum authored and davidhewitt committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    6710dcd View commit details
    Browse the repository at this point in the history
  4. fix: adding tests for pyclass hygiene cases (#4359)

    * fix: updated pyclass heighten check to validate for eq and ord, fixing Ok issue in eq implementation.
    
    identified similar issues in Complex enum and tuple enum,  resolved serveral cases, but working on current error coming from traits not being in scope
    
    * fix: fully qualified clone and from calls for enums.
    
    * update: added changelog entry
    
    ---------
    
    Co-authored-by: MG <mg@rookie.ninja>
    2 people authored and davidhewitt committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    37e9122 View commit details
    Browse the repository at this point in the history
  5. fix incorrect spans on ret and py local varianbles in emitted code (

    #4382)
    
    * fix incorrect spans on `ret` and `py` local varianbles in emitted code
    
    * add newsfragment
    Icxolu authored and davidhewitt committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    9e36baa View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ebd4747 View commit details
    Browse the repository at this point in the history
  7. fix returning tuples from async fns (#4407)

    Fixes #4400
    
    As the return value is ultimately communicated back via a StopIteration
    exception instance, a peculiar behavior of `PyErr::new` is encountered
    here: when the argument is a tuple `arg`, it is used to construct the
    exception as if calling from Python `Exception(*arg)` and not
    `Exception(arg)` like for every other type of argument.
    
    This comes from from CPython's `PyErr_SetObject` which ultimately calls
    `_PyErr_CreateException` where the "culprit" is found here:
    https://github.com/python/cpython/blob/main/Python/errors.c#L33
    
    We can fix this particular bug in the invocation of `PyErr::new` but it
    is a more general question if we want to keep reflecting this somewhat
    surprising CPython behavior, or create a better API, introducing a
    breaking change.
    birkenfeld authored and davidhewitt committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    d103c76 View commit details
    Browse the repository at this point in the history
  8. Add PyList_GetItemRef and use it in list.get_item (#4410)

    * Add PyList_GetItemRef bindings and compat shim
    
    * Use PyList_GetItemRef in list.get_item()
    
    * add release notes
    
    * apply code review comments
    
    * Update newsfragments/4410.added.md
    
    Co-authored-by: David Hewitt <mail@davidhewitt.dev>
    
    * apply `all()` doc cfg hints
    
    ---------
    
    Co-authored-by: David Hewitt <mail@davidhewitt.dev>
    ngoldbaum and davidhewitt committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    5e6e432 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4275773 View commit details
    Browse the repository at this point in the history
  10. Fix a soundness bug with PyClassInitializer (#4454)

    From now you cannot initialize a `PyClassInitializer<SubClass>` with `PyClassInitializer::from(Py<BaseClass>).add_subclass(SubClass)`.
    
    This was out of bounds write. Now it panics. See details at #4452.
    ChayimFriedman2 authored and davidhewitt committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    2fc6e62 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    36ca4a1 View commit details
    Browse the repository at this point in the history
  12. ffi: define compat for Py_NewRef and Py_XNewRef (#4445)

    * ffi: define compat for `Py_NewRef` and `Py_XNewRef`
    
    * add missing inline hint
    
    Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
    
    * don't use std::ffi::c_int (requires MSRV 1.64)
    
    * add test to guard against ambiguity
    
    * fix `Py_NewRef` cfg on PyPy
    
    ---------
    
    Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
    davidhewitt and ngoldbaum committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    2b0a36e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    b0c4256 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    1ad96b3 View commit details
    Browse the repository at this point in the history
  15. Use vectorcall (where possible) when calling Python functions (#4456)

    * Use vectorcall (where possible) when calling Python functions
    
    This works without any changes to user code.
    
    The way it works is by creating a methods on `IntoPy` to call functions, and specializing them for tuples.
    
    This currently supports only non-kwargs for methods, and kwargs with somewhat slow approach (converting from PyDict) for functions. This can be improved, but that will require additional API.
    
    We may consider adding more impls IntoPy<Py<PyTuple>> that specialize (for example, for arrays and `Vec`), but this i a good start.
    
    * Add vectorcall benchmarks
    
    * Fix Clippy (elide a lifetime)
    
    ---------
    
    Co-authored-by: David Hewitt <mail@davidhewitt.dev>
    ChayimFriedman2 and davidhewitt committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    196c5fe View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    5d4a155 View commit details
    Browse the repository at this point in the history
  17. fixup CI warnings

    davidhewitt committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    09d6dbe View commit details
    Browse the repository at this point in the history
  18. ci: fix nightly build

    davidhewitt committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    5abc496 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. ci: ui test updates

    davidhewitt committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    01bd06c View commit details
    Browse the repository at this point in the history
  2. ci: swap .python-version file for explicit versions in actions yml (#…

    …4462)
    
    * ci: swap .python-version file for explicit versions in actions yml
    
    * pin valgrind job to 3.12.4
    davidhewitt committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    1c82750 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3f4b125 View commit details
    Browse the repository at this point in the history
  4. ci: fix benchmarks build

    davidhewitt committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    bed8161 View commit details
    Browse the repository at this point in the history
  5. fix ui tests (#4397)

    Icxolu authored and davidhewitt committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    4057c6e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9acf868 View commit details
    Browse the repository at this point in the history
  7. fix nightly ci (#4385)

    Icxolu authored and davidhewitt committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    d183248 View commit details
    Browse the repository at this point in the history
  8. fix beta/nightly ci (#4549)

    Icxolu authored and davidhewitt committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    a8e9c73 View commit details
    Browse the repository at this point in the history
  9. type_object: fix new clippy complaint about length of doc comment (#4527

    )
    
    * type_object: fix new clippy complaint about length of doc comment
    
    * all: replace minor version specific links to CPython docs
    birkenfeld authored and davidhewitt committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    076555f View commit details
    Browse the repository at this point in the history
  10. ci: fix nightly warning about unreachable pattern (#4437)

    * ci: fix nightly warning about unreachable pattern
    
    * add comment
    davidhewitt committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    b9f65d5 View commit details
    Browse the repository at this point in the history
  11. ci: updates for Rust 1.81 (#4533)

    Icxolu authored and davidhewitt committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    01a22ed View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f0b6bfd View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    8978b22 View commit details
    Browse the repository at this point in the history
  14. release: 0.22.3

    davidhewitt committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    d8510d1 View commit details
    Browse the repository at this point in the history