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
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.
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
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)
Remove DimensionalityError and TypeError from the public API as they never used directly. (#315)
Remove the deprecated PyArrayDescr::get_type which was replaced by PyArrayDescr::typeobj in the last cycle. (#308)
Fix returning invalid slices from PyArray::{strides,shape} for rank zero arrays. (#303)
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).
Remove non-additive unicode feature. The library now uses char::is_alphanumeric
instead of the unicode-segmentation library to determine word boundaries in all cases.
Bumps the dependencies group with 21 updates in the / directory:
1.0.89
1.0.91
1.40.0
1.41.0
0.21.0
0.22.0
0.2.22
0.2.25
1.0.86
1.0.89
1.0.210
1.0.213
0.6.15
0.6.17
1.0.8
1.0.9
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.91Release notes
Sourced from anyhow's releases.
Commits
6c52daa
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 documentation8ce4560
Ignore needless_lifetimes clippy lintbe64707
Resolve used_underscore_items pedantic clippy lintUpdates
insta
from 1.40.0 to 1.41.0Release notes
Sourced from insta's releases.
Changelog
Sourced from insta's changelog.
Commits
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)10db5b0
Changelog refinements (#649)6a37645
Better error message ifcargo metadata
fails (#661)Updates
numpy
from 0.21.0 to 0.22.0Release notes
Sourced from numpy's releases.
Changelog
Sourced from numpy's changelog.
... (truncated)
Commits
9095a77
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 martrices340433a
test 3.7 on 22.04dc85cae
ci: updates for ubuntu 24.04ca3299f
Update the dependency range505a79c
restore allow deprecatedf46bd07
restore deprecation messagesUpdates
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.213Release notes
Sourced from serde's releases.
Commits
58a8d22
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.2121ac054b
Merge pull request #2845 from dtolnay/withlocal1e36ef5
Fix hygiene of macro-generated local variable accesses in serde(with) wrappers0058c72
Add regression test for issue 2844Updates
syn
from 2.0.77 to 2.0.85Release notes
Sourced from syn's releases.
Commits
293d7c9
Release 2.0.85c94df74
Merge pull request #1773 from dtolnay/unsafestatic8d7814a
Preserve extern static unsafety in ForeignItem::Verbatim2e159bc
Release 2.0.84058e7d0
Merge pull request #1772 from dtolnay/selfcapture2a9e9fb
Parse self captures:impl Sized + use\<Self>
e478e03
Merge pull request #1771 from dtolnay/up19baaa6
Categorize newly failing rust repo source filesf89eca2
Update test suite to nightly-2024-10-2383e3b08
Merge pull request #1768 from dtolnay/safeUpdates
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.9Commits
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-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 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
heck
from 0.4.1 to 0.5.0Changelog
Sourced from heck's changelog.
Commits
Updates
indexmap
from 2.5.0 to 2.6.0Changelog
Sourced from indexmap's changelog.
Commits
bf0362b
Merge pull request #354 from cuviper/release-2.6.0bd0b4f7
Add all release dates5340049
Release 2.6.07f80229
Merge pull request #343 from cuviper/hash_tablee577bf2
Usehashbrown::HashTable
instead ofRawTable
09b48ec
Merge pull request #353 from cuviper/move_index267b83d
Add an explicit bounds check inmove_index
d74a4da
Merge pull request #349 from waywardmonkeys/improve-doc-formattingSuperseded by #100.