Experimental support for binary snapshots. #610 (Florian Plattner)
--force-update-snapshots now causes cargo-insta to write every snapshot, regardless of whether snapshots fully match, and now implies --accept. This allows for --force-update-snapshots to update inline snapshots' delimiters and indentation.
For the previous behavior of --force-update-snapshots, which limited writes to snapshots which didn't fully match, use --require-full-match. The main difference between --require-full-match and the existing behavior of --force-update-snapshots
is a non-zero exit code on any snapshots which don't fully match.
Like the previous behavior or --force-update-snapshots, --require-full-match doesn't track inline snapshots' delimiters or
indentation, so can't update if those don't match. #644
Inline snapshots only use # characters as delimiters when required. #603
Warnings for undiscovered snapshots are more robust, and include files with custom snapshot extensions. #637
Insta runs correctly on packages which reference rust files in a parent path. #626
Warnings are printed when any snapshot uses a legacy format. #599
Re-release of 1.41.1 to generate release artifacts correctly.
1.41.0
Experimental support for binary snapshots. #610 (Florian Plattner)
--force-update-snapshots now causes cargo-insta to write every snapshot, regardless of whether
snapshots fully match, and now implies --accept. This
allows for --force-update-snapshots to update inline snapshots'
delimiters and indentation.
For the previous behavior of --force-update-snapshots, which limited writes to
snapshots which didn't fully match, use --require-full-match.
The main difference between --require-full-match and the existing behavior of --force-update-snapshots
is a non-zero exit code on any snapshots which don't fully match.
Like the previous behavior of --force-update-snapshots, --require-full-match
doesn't track inline snapshots' delimiters or
indentation, so can't update if those don't match. #644
Inline snapshots only use # characters as delimiters when required. #603
Warnings for undiscovered snapshots are more robust, and include files with
custom snapshot extensions. #637
Insta runs correctly on packages which reference rust files in a parent path. #626
Warnings are printed when any snapshot uses a legacy format. #599
insta now internally uses INSTA_UPDATE=force rather than
INSTA_FORCE_UPDATE=1. (This doesn't affect users of cargo-insta, which
handles this internally.) #482
cargo-insta's integration tests continue to grow over the past couple of versions,
and now offer coverage of most of cargo-insta's interface.
Add a prelude module to simplify importing method traits required by the Bound API. (#417)
Extend documentation to cover some more surprising behaviours. (#405) (#414)
v0.20.0
Increase MSRV to 1.56 released in October 2021 and available in Debain 12, RHEL 9 and Alpine 3.17 following the same change for PyO3. (#378)
Add support for ASCII (PyFixedString<N>) and Unicode (PyFixedUnicode<N>) string arrays, i.e. dtypes SN and UN where N is the number of characters. (#378)
Add support for the bfloat16 dtype by extending the optional integration with the half crate. Note that the bfloat16 dtype is not part of NumPy itself so that usage requires third-party packages like Tensorflow. (#381)
Add PyArrayLike type which extracts PyReadonlyArray if a NumPy array of the correct type is given and attempts a conversion using numpy.asarray otherwise. (#383)
v0.19.0
Add PyUntypedArray as an untyped base type for PyArray which can be used to inspect arguments before more targeted downcasts. This is accompanied by some methods like dtype and shape moving from PyArray to PyUntypedArray. They are still accessible though, as PyArray dereferences to PyUntypedArray via the Deref trait. (#369)
Drop deprecated PyArray::from_exact_iter as it does not provide any benefits over PyArray::from_iter. (#370)
v0.18.0
Add conversions from and to datatypes provided by the nalgebra crate. (#347)
Drop our wrapper for NumPy iterators which were deprecated in v0.16.0 as ndarray's iteration facilities are almost always preferable. (#324)
Dynamic borrow checking now uses a capsule-based API and therefore works across multiple extensions using PyO3 and potentially other bindings or languages. (#361)
v0.17.2
Fix unsound aliasing into Box<[T]> when converting them into NumPy arrays. (#351)
v0.17.1
Fix use-after-free in PyArray::resize, PyArray::reshape and PyArray::reshape_with_order. (#341)
Fix UB in ToNpyDims::as_dims_ptr with dimensions of dynamic size (-1). (#344)
v0.17.0
Add dynamic borrow checking to safely construct references into the interior of NumPy arrays. (#274)
The deprecated iterator builders NpySingleIterBuilder::{readonly,readwrite} and NpyMultiIterBuilder::add_{readonly,readwrite} now take referencces to PyReadonlyArray and PyReadwriteArray instead of consuming them.
The destructive PyArray::resize method is now unsafe if used without an instance of PyReadwriteArray. (#302)
Add support for datetime64 and timedelta64 element types via the datetime module. (#308)
Add support for IEEE 754-2008 16-bit floating point numbers via an optional dependency on the half crate. (#314)
The inner, dot and einsum functions can also return a scalar instead of a zero-dimensional array to match NumPy's types (#285)
The PyArray::resize function supports n-dimensional contiguous arrays. (#312)
Deprecate PyArray::from_exact_iter after optimizing PyArray::from_iter. (#292)
This release fixes a compile regression from 0.22.4 where #[pymethods] with name __clear__ and clear would generate code with a naming conflict. Thanks @awolverp for the report and @Icxolu for the fix!
PyO3 0.22.4
This release is a security fix for PyO3 0.22.0 through 0.22.3.
The PyWeakrefMethods trait functions for reading borrowed values from Python weak references have been identified as unsound, because they did not account for the possibility the last strong reference could be cleared at any time, leading the borrowed value to be dangling and risk of use-after-free.
PyO3 0.22.4 protects against this issue by making these methods permanently leak strong references. The methods are also marked deprecated and will be removed in PyO3 0.23. Users should switch to use the use PyWeakrefMethods functions which return owned references (the deprecation messages indicate the appropriate upgrade paths).
These functions were added in PyO3 0.22.0; all versions from 0.22.0 through 0.22.3 have been yanked.
Aside from the security fix, PyO3 0.22.4 contains a number of other bugfixes, including:
A fix for cases where __traverse__ functions of base types were not called when using #[pyclass(extends = ...)]
A fix for a regression in 0.22.3 where PyO3 generated code would trigger compile failures with crates using #![forbid(unsafe_code)]
Thank you to the following contributors for the improvements:
This release contains a number of quality improvements building upon PyO3 0.22.2.
Python function calls (using .call0(), .call1(args) and .call(args, kwargs)) will now make use of the "vectorcall" calling conventions where possible, which can reduce overheads in many cases.
There have been several fix-ups to PyO3's FFI definitions. A new pyo3::ffi::compat namespace has been added which offers some backwards-compatible implementations of Python APIs otherwise normally only available on recent Pythons.
There have been numerous other bug-fixes and minor tweaks to improve user experience.
Thank you to the following contributors for the improvements:
This release contains some minor reliability fixes building upon PyO3 0.22.1.
As PyO3 is still working on supporting freethreaded Python (upcoming in 3.13), support has been gated behind an UNSAFE_PYO3_BUILD_FREE_THREADED=1 environment variable to avoid unsuspecting users running into broken builds.
Packages built for the abi3 stable ABI will now use FFI functions for refcounting instead of inline reference count modifications on all versions of the stable ABI (previously only abi3 builds for 3.12 and up would use FFI functions). This helps mitigate interactions of old versions of the stable ABI with future CPython releases which do more complex reference counting (e.g. immortal objects, freethreaded reference counting).
Bumps the dependencies group with 21 updates in the / directory:
1.0.89
1.0.92
1.40.0
1.41.1
0.21.0
0.22.1
0.2.22
0.2.25
1.0.86
1.0.89
1.0.210
1.0.214
0.6.15
0.6.17
1.0.8
1.0.10
0.2.5
0.2.6
1.1.1
1.1.2
1.3.0
1.4.0
1.0.2
1.0.3
2.5.0
2.6.0
0.2.158
0.2.161
0.15.6
0.16.1
1.19.0
1.20.2
1.8.0
1.9.0
1.10.6
1.11.1
0.6.7
0.6.8
0.22.21
0.22.22
0.6.18
0.6.20
Updates
anyhow
from 1.0.89 to 1.0.92Release notes
Sourced from anyhow's releases.
Commits
fd03a8e
Release 1.0.92a16252b
Merge pull request #390 from dtolnay/rawaddrfcf2ef8
Compile &raw test on Rust 1.82+ only1e7e9fe
Parse raw address expression syntax7d1a8f9
Add test of raw addr expression syntax6c52daa
Release 1.0.914986853
Merge pull request #388 from dtolnay/outdirf130b76
Clean up dep-info files from OUT_DIRa0b868a
Release 1.0.900f74169
Improve rendering of inline code in macros documentationUpdates
insta
from 1.40.0 to 1.41.1Release notes
Sourced from insta's releases.
... (truncated)
Changelog
Sourced from insta's changelog.
Commits
cb08d92
Bump version to 1.41.1 (#681)6d555d4
Changelog for 1.41.1 (#680)0317928
Refine changelog (#675)0e07a50
Update a couple docstrings (#669)083ce14
Another small simplification ofprepare_test_runner
(#667)b7dea9b
Small simplification ofprepare_test_runner
(#666)5fd34e6
Print a version with--version
(#665)a8b6cc2
Small refactors (#664)4f16d70
Show hidden files in functional tests (#663)2b8fce7
ConsolidateCargo.toml
creation in functional tests (#662)Updates
numpy
from 0.21.0 to 0.22.1Release notes
Sourced from numpy's releases.
Changelog
Sourced from numpy's changelog.
... (truncated)
Commits
56a96c2
release: 0.22.1327ab10
AddFrom\<PyReadwriteArray>
forPyReadonlyArray
a4b922f
Add safe interface to clearWRITEABLE
flag6cd2a84
Re-enable builds on 32-bit Windows64145d2
Fix static-size FFI type aliases9095a77
release: 0.22.0d07dbf5
apply check forcore
vs_core
at runtime7e702be
changed core module call to _coref71d9c5
skip 3.13 test on numpy 1501c14a
add python 3.13 to ci martricesUpdates
prettyplease
from 0.2.22 to 0.2.25Release notes
Sourced from prettyplease's releases.
Commits
50de5c6
Release 0.2.2506791ea
Merge pull request #85 from dtolnay/externsafedb38f77
Print safe and explicitly unsafe foreign items91ebe48
Merge pull request #84 from dtolnay/buildenv265ab3b
Use $CARGO_PKG_VERSION from buildscript exec-time instead of build-timec6f0815
Release 0.2.244ca0f76
Merge pull request #83 from dtolnay/precisecapture3381c64
Pretty print TypeParamBound::PreciseCapturea1701f7
Release 0.2.23b4919cf
Merge pull request #82 from dtolnay/rawaddrUpdates
proc-macro2
from 1.0.86 to 1.0.89Release notes
Sourced from proc-macro2's releases.
Commits
671d87d
Release 1.0.899574d98
Merge pull request #474 from dtolnay/outdir3e8962c
Clean up dep-info files from OUT_DIR6b3395a
Release 1.0.88faee27e
Merge pull request #472 from dtolnay/startend44f8ff2
Restore nightly behavior of Span::start and Span::end50b477d
Release 1.0.87f0b6802
Merge pull request #471 from dtolnay/punctnew98ea261
Check valid punctuation character in Punct::newd60aaad
Ignore missing_panics_doc pedantic clippy lintUpdates
pyo3
from 0.21.2 to 0.22.5Release notes
Sourced from pyo3's releases.
... (truncated)
Changelog
Sourced from pyo3's changelog.
... (truncated)
Commits
4c88e9a
release: 0.22.58f6464e
fix__clear__
slot naming collision withclear
method (#4619)dff9723
release: 0.22.43330bf2
fix garbage collection in inheritance cases (#4563)8b23397
ci: pypy 3.7 macos on x64 stillce63713
ci: run benchmarks on ubuntu 22.04 (#4609)b1173f5
ci: fix more ubuntu-24.04 failures (#4610)7371028
ci: move more jobs to macOS arm (#4600)8e3dc45
avoid callingPyType_GetSlot
on static types before Python 3.10 (#4599)969300d
leak references for safety inPyWeakRefMethods::upgrade_borrowed
(#4590)Updates
serde
from 1.0.210 to 1.0.214Release notes
Sourced from serde's releases.
Commits
4180621
Release 1.0.214210373b
Merge pull request #2568 from Mingun/into_deserializer-for-deserializers9cda015
Implement IntoDeserializer for all Deserializers in serde::de::value module58a8d22
Release 1.0.213ef0ed22
Merge pull request #2847 from dtolnay/newtypewith79925ac
Ignore dead_code warning in regression testb60e409
Hygiene for macro-generated newtype struct deserialization with 'with' attrfdc36e5
Add regression test for issue 284649e11ce
Ignore trivially_copy_pass_by_ref pedantic clippy lint in test7ae1b5f
Release 1.0.212Updates
syn
from 2.0.77 to 2.0.87Release notes
Sourced from syn's releases.
Commits
a777cff
Release 2.0.871f103d4
Merge pull request #1779 from dtolnay/scan0986a66
Ignore enum_glob_use pedantic clippy lintca97c7d
Translate expr scanner to table driven8039cb3
Test that every expr can be scanned0132c44
Make scan_expr compilable from integration test7c102c3
Extract non-full expr scanner to moduleceaf4d6
Merge pull request #1778 from dtolnay/exprpeeka890e9d
Expose can_begin_expr as Expr::peek12f068c
Merge pull request #1777 from dtolnay/anygroupUpdates
anstream
from 0.6.15 to 0.6.17Commits
5628f47
chore: Release42d4175
chore: Release924fc50
chore: Release313e16a
docs: Update changelog2bbc343
Merge pull request #225 from DaniPopes/as-locked-write-impls8639e08
feat: Implement AsLockedWrite generically toof4a1f98
Merge pull request #224 from DaniPopes/raw-stream-autotraitsed1dbd7
feat: Implement AutoStream for dyn Write + auto traits8a57dcc
Merge pull request #223 from DaniPopes/raw-stream-refmuta1cbc88
refactor: Implement RawStream for Box<T> genericallyUpdates
anstyle
from 1.0.8 to 1.0.10Commits
9ce373f
chore: Release6668ff0
docs: Update changelog13e008a
Merge pull request #228 from DaniPopes/avoid-write-macro-strfb843c5
perf: avoid using write! macro with single str5628f47
chore: Release42d4175
chore: Release924fc50
chore: Release313e16a
docs: Update changelog2bbc343
Merge pull request #225 from DaniPopes/as-locked-write-impls8639e08
feat: Implement AsLockedWrite generically tooUpdates
anstyle-parse
from 0.2.5 to 0.2.6Commits
5628f47
chore: Release42d4175
chore: Release924fc50
chore: Release313e16a
docs: Update changelog2bbc343
Merge pull request #225 from DaniPopes/as-locked-write-impls8639e08
feat: Implement AsLockedWrite generically toof4a1f98
Merge pull request #224 from DaniPopes/raw-stream-autotraitsed1dbd7
feat: Implement AutoStream for dyn Write + auto traits8a57dcc
Merge pull request #223 from DaniPopes/raw-stream-refmuta1cbc88
refactor: Implement RawStream for Box<T> genericallyUpdates
anstyle-query
from 1.1.1 to 1.1.2Commits
5628f47
chore: Release42d4175
chore: Release924fc50
chore: Release313e16a
docs: Update changelog2bbc343
Merge pull request #225 from DaniPopes/as-locked-write-impls8639e08
feat: Implement AsLockedWrite generically toof4a1f98
Merge pull request #224 from DaniPopes/raw-stream-autotraitsed1dbd7
feat: Implement AutoStream for dyn Write + auto traits8a57dcc
Merge pull request #223 from DaniPopes/raw-stream-refmuta1cbc88
refactor: Implement RawStream for Box<T> genericallyUpdates
anstyle-wincon
from 3.0.4 to 3.0.6Commits
5628f47
chore: Release42d4175
chore: Release924fc50
chore: Release313e16a
docs: Update changelog2bbc343
Merge pull request #225 from DaniPopes/as-locked-write-impls8639e08
feat: Implement AsLockedWrite generically toof4a1f98
Merge pull request #224 from DaniPopes/raw-stream-autotraitsed1dbd7
feat: Implement AutoStream for dyn Write + auto traits8a57dcc
Merge pull request #223 from DaniPopes/raw-stream-refmuta1cbc88
refactor: Implement RawStream for Box<T> genericallyUpdates
autocfg
from 1.3.0 to 1.4.0Commits
d07df66
Merge pull request #73 from cuviper/release-1.4.0f6066f0
Release 1.4.08af60ec
Merge pull request #70 from Techcable/feature/rustc-check-cfg52a995b
Apply suggestions from code reviewa8703c1
Attempt rust 1.0 compat for ci/verify-check-cfgac78be8
Add ci test crate for check-cfg0b4a761
Have emit_has methods delegate wherever possible546f7c6
Fix minor doc issuese0e0f18
Automatically emitrustc-check-cfg
directives for AutoCfg1953a17
Merge pull request #72 from cuviper/pretty-wayUpdates
colorchoice
from 1.0.2 to 1.0.3Commits
5628f47
chore: Release42d4175
chore: Release924fc50
chore: Release313e16a
docs: Update changelog2bbc343
Merge pull request #225 from DaniPopes/as-locked-write-impls8639e08
feat: Implement AsLockedWrite generically tooSuperseded by #101.