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.14.3 #1796

Merged
merged 32 commits into from
Aug 22, 2021
Merged

release: 0.14.3 #1796

merged 32 commits into from
Aug 22, 2021

Commits on Aug 15, 2021

  1. Fixed broken link in async-await.md

    Andrew J Westlake authored and davidhewitt committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    a212be8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3a3706e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5a5a3af View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    74f4bfa View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    aef1637 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4f4a718 View commit details
    Browse the repository at this point in the history
  7. ffi: cleanup pystate

    davidhewitt committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    62812f3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a162563 View commit details
    Browse the repository at this point in the history
  9. examples: make word-count example comparison fairer

    David Hewitt authored and davidhewitt committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    b87a08a View commit details
    Browse the repository at this point in the history
  10. ffi: fix PyStatus._type

    The field wasn't defined previously. And the enum wasn't defined as
    `[repr(C)]`.
    
    This missing field could result in memory corruption if a Rust-allocated
    `PyStatus` was passed to a Python API, which could perform an
    out-of-bounds write. In my code, the out-of-bounds write corrupted a
    variable on the stack, leading to a segfault due to illegal memory
    access. However, this crash only occurred on Rust 1.54! So I initially
    mis-attribted it as a compiler bug / regression. It appears that a
    low-level Rust change in 1.54.0 changed the LLVM IR in such a way to
    cause LLVM optimization passes to produce sufficiently different
    assembly code, tickling the crash. See
    rust-lang/rust#87947 if you want to see
    the wild goose chase I went on in Rust / LLVM land to potentially
    pin this on a compiler bug.
    
    Lessen learned: Rust crashes are almost certainly due to use of
    `unsafe`.
    indygreg authored and davidhewitt committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    b0fed29 View commit details
    Browse the repository at this point in the history
  11. Update CHANGELOG.md

    davidhewitt committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    08f1068 View commit details
    Browse the repository at this point in the history
  12. macros: raise AttributeError on property deletion requests

    The setter function will receive a NULL value on deletion requests.
    This wasn't properly handled before, leading to a panic.
    
    The new code raises AttributeError in this scenario instead.
    
    A test for the behavior has been added. Documentation has also
    been updated to reflect the behavior.
    indygreg authored and davidhewitt committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    a783a8d View commit details
    Browse the repository at this point in the history
  13. Update CHANGELOG.md

    davidhewitt committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    1741a03 View commit details
    Browse the repository at this point in the history
  14. ffi: define some cpython/unicodeobject bindings

    pyo3 doesn't currently define various Unicode bindings that allow the
    retrieval of raw data from Python strings. Said bindings are a
    prerequisite to possibly exposing this data in the Rust API (#1776).
    Even if those high-level APIs never materialize, the FFI bindings are
    necessary to enable consumers of the raw C API to utilize them.
    
    This commit partially defines the FFI bindings as defined in
    CPython's Include/cpython/unicodeobject.h file.
    
    I used the latest CPython 3.9 Git commit for defining the order
    of the symbols and the implementation of various inline preprocessor
    macros. I tried to be as faithful as possible to the original
    implementation, preserving intermediate `#define`s as inline functions.
    
    Missing symbols have been annotated with `skipped` and symbols currently
    defined in `src/ffi/unicodeobject.rs` have been annotated with `move`.
    
    The `state` field of `PyASCIIObject` is a bitfield, which Rust doesn't
    support. So we've provided accessor functions for retrieving these
    fields' values. No accessor functions are present because you shouldn't
    be touching these values from Rust code.
    
    Tests of the bitfield APIs and macro implementations have been added.
    indygreg authored and davidhewitt committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    90acff4 View commit details
    Browse the repository at this point in the history
  15. ffi: move limited API unicode symbols to cpython/unicodeobject.rs

    All symbols which are canonically defined in cpython/unicodeobject.h
    and had been defined in our unicodeobject.rs have been moved to our
    corresponding cpython/unicodeobject.rs file.
    
    This module is only present in non-limited build configurations, so
    we were able to drop the cfg annotations as part of moving the
    definitions.
    indygreg authored and davidhewitt committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    1510855 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    62181cc View commit details
    Browse the repository at this point in the history
  17. string: enable use of PyUnicode_AsUTF8AndSize on all Python versions

    This API is available in all supported Python versions and isn't
    deprecated.
    indygreg authored and davidhewitt committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    f2ebe82 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2021

  1. Expand supported num-complex versions

    When building an extension with rust-numpy and ndarray on the MSRV of
    1.41 with complex numbers. The num-complex crate version needs to be
    0.2 which was the pinned version as of ndarray 0.13.1 which was the last
    release of ndarray that supported building with rust 1.41. However, the
    pyo3 pinned version of 0.4 is incompatible with this and will cause an
    error when building because of the version mismatch. To fix this This
    commit expands the supported versions for num-complex to match what
    rust-numpy uses [1] so that we can build pyo3, numpy, ndarray, and
    num-complex in an extension with rust 1.41.
    
    Fixes #1798
    
    [1] https://github.com/PyO3/rust-numpy/blob/v0.14.1/Cargo.toml#L19
    mtreinish authored and davidhewitt committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    dd156cf View commit details
    Browse the repository at this point in the history
  2. Update Cargo.toml

    Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
    mtreinish and davidhewitt committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    b48f4c9 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2021

  1. test macro hygiene for pyclass

    mejrs authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    3bdcbfa View commit details
    Browse the repository at this point in the history
  2. use macro to shadow

    mejrs authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    f50a7a8 View commit details
    Browse the repository at this point in the history
  3. fix extends param

    mejrs authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    b4f1633 View commit details
    Browse the repository at this point in the history
  4. remove shadowing

    mejrs authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    99e7fe8 View commit details
    Browse the repository at this point in the history
  5. fully disambiguate types

    mejrs authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    a85f3b4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bbee0b2 View commit details
    Browse the repository at this point in the history
  7. Edit changelog

    pschafhalter authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    4fdd4ad View commit details
    Browse the repository at this point in the history
  8. Update changelog

    pschafhalter authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    b8e932b View commit details
    Browse the repository at this point in the history
  9. Py_CompileString decref (#1810)

    * update changelog
    
    * fix memory leak in PyModule::from_code
    
    * add PR link to changelog
    
    * Add Py_DECREF also when PyImport_ExecCodeModuleEx fails
    
    * Remove duplicated calls, simplify logic
    
    Co-authored-by: messense <messense@icloud.com>
    
    Co-authored-by: messense <messense@icloud.com>
    2 people authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    8177535 View commit details
    Browse the repository at this point in the history
  10. Use 'crate::' to refer to pyo3

    Fixes: #1811
    Signed-off-by: Christian Heimes <christian@python.org>
    tiran authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    81fd23c View commit details
    Browse the repository at this point in the history
  11. string: implement API to access raw string data

    With the recent implementation of non-limited unicode APIs, we're
    able to query Python's low-level state to access the raw bytes that
    Python is using to store string objects.
    
    This commit implements a safe Rust API for obtaining a view into
    Python's internals and representing the raw bytes Python is using
    to store strings.
    
    Not only do we allow accessing what Python has stored internally,
    but we also support coercing this data to a `Cow<str>`.
    
    Closes #1776.
    indygreg authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    ee155ae View commit details
    Browse the repository at this point in the history
  12. build: document InterpreterConfig fields

    I'm building functionality on top of this config and figured I'd
    take the time to document the fields to make things easier to
    understand.
    indygreg authored and davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    19ca9e7 View commit details
    Browse the repository at this point in the history
  13. release: 0.14.3

    davidhewitt committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    5e53c4d View commit details
    Browse the repository at this point in the history