curlz
curlz copied to clipboard
fix(deps): update bump patch versions (patch)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| anyhow | dependencies | patch | 1.0.68 -> 1.0.98 |
| assert_cmd | dev-dependencies | patch | 2.0.8 -> 2.0.17 |
| base64 | dependencies | patch | 0.21.0 -> 0.21.7 |
| chrono | dependencies | patch | 0.4.23 -> 0.4.41 |
| clap | dependencies | patch | 4.2.2 -> 4.2.7 |
| dialoguer | dependencies | patch | 0.10.3 -> 0.10.4 |
| dotenvy | dependencies | patch | 0.15.6 -> 0.15.7 |
| env_logger | dependencies | patch | 0.10.0 -> 0.10.2 |
| filenamify | dependencies | patch | 0.1.0 -> 0.1.2 |
| indoc | dev-dependencies | patch | 2.0.1 -> 2.0.6 |
| log | dependencies | patch | 0.4.17 -> 0.4.27 |
| predicates | dev-dependencies | patch | 3.0.3 -> 3.0.4 |
| serde_json | dependencies | patch | 1.0.91 -> 1.0.140 |
| serde_yaml | dependencies | patch | 0.9.17 -> 0.9.34 |
| wiremock | dev-dependencies | patch | 0.5.17 -> 0.5.22 |
Release Notes
dtolnay/anyhow (anyhow)
v1.0.98
- Add
self.into_boxed_dyn_error()andself.reallocate_into_boxed_dyn_error_without_backtrace()methods for anyhow::Error (#415)
v1.0.97
- Documentation improvements
v1.0.96
- Documentation improvements
v1.0.95
- Add
Error::from_boxed(#401, #402)
v1.0.94
- Documentation improvements
v1.0.93
- Update dev-dependencies to
thiserrorv2
v1.0.92
- Support Rust 1.82's
&raw constand&raw mutsyntax insideensure!(#390)
v1.0.91
- Ensure OUT_DIR is left with deterministic contents after build script execution (#388)
v1.0.90
- Documentation improvements
v1.0.89
- Make anyhow::Error's
UnwindSafeandRefUnwindSafeimpl consistently available between versions of Rust newer and older than 1.72 (#386)
v1.0.88
- Documentation improvements
v1.0.87
- Support more APIs, including
Error::newandError::chain, in no-std mode on Rust 1.81+ (#383)
v1.0.86
- Fix parse error in
ensure!with non-literal after minus sign (#373)
v1.0.85
v1.0.84
- Disallow calling
ensure!through aNotimpl for a type that is notbool(#367)
v1.0.83
- Integrate compile-time checking of cfgs (#363)
v1.0.82
- Documentation improvements
v1.0.81
- Make backtrace support available when using -Dwarnings (#354)
v1.0.80
- Fix unused_imports warnings when compiled by rustc 1.78
v1.0.79
- Work around improperly cached build script result by sccache (#340)
v1.0.78
- Reduce spurious rebuilds under RustRover IDE when using a nightly toolchain (#337)
v1.0.77
- Make
anyhow::Error::backtraceavailable on stable Rust compilers 1.65+ (#293, thanks @LukasKalbertodt)
v1.0.76
- Opt in to
unsafe_op_in_unsafe_fnlint (#329)
v1.0.75
- Partially work around rust-analyzer bug (https://github.com/rust-lang/rust-analyzer/issues/9911)
v1.0.74
- Add bootstrap workaround to allow rustc to depend on anyhow (#320, thanks @RalfJung)
v1.0.73
- Update backtrace support to nightly's new Error::provide API (https://github.com/rust-lang/rust/pull/113464, #319)
v1.0.72
- Documentation improvements
v1.0.71
- Documentation improvements
v1.0.70
- Update syn dependency to 2.x
v1.0.69
- Documentation improvements
assert-rs/assert_cmd (assert_cmd)
v2.0.17
Features
- Add
cargo::cargo_bin!which will work with Cargo'sbuild-dir
v2.0.16
Features
- Add getters to
Commandto mirror those added to the standard library
v2.0.15
Compatibility
- MSRV is now 1.74.0
v2.0.14
Compatibility
- MSRV is now 1.73.0
Features
- Run using the cargo target runner
v2.0.13
Internal
- Dependency update
v2.0.12
Compatibility
- MSRV is now 1.66.0
Fixes
- Fix typo in failure output
v2.0.11
Internal
- Dependency update
v2.0.10
Internal
- Dependency update
v2.0.9
Compatibility
- Update MSRV to 1.64.0
Fixes
- Correctly handle
CLICOLOR=1 - Correctly handle
NO_COLOR= - Auto-enable color on CI
marshallpierce/rust-base64 (base64)
v0.21.7
- Support getting an alphabet's contents as a str via
Alphabet::as_str()
v0.21.6
- Improved introductory documentation and example
v0.21.5
- Add
DebugandCloneimpls for the general purpose Engine
v0.21.4
- Make
encoded_lenconst, allowing the creation of arrays sized to encode compile-time-known data lengths
v0.21.3
- Implement
sourceinstead ofcauseon Error types - Roll back MSRV to 1.48.0 so Debian can continue to live in a time warp
- Slightly faster chunked encoding for short inputs
- Decrease binary size
v0.21.2
- Rollback MSRV to 1.57.0 -- only dev dependencies need 1.60, not the main code
v0.21.1
- Remove the possibility of panicking during decoded length calculations
DecoderReaderno longer sometimes erroneously ignores padding #226
Breaking changes
Engine.internal_decodereturn type changed- Update MSRV to 1.60.0
chronotope/chrono (chrono)
v0.4.41
What's Changed
- Add
subsec_microsandsubsec_millismethods toTimeDeltaby @ggoetz in https://github.com/chronotope/chrono/pull/1668 - Deprecate
NaiveDateTime::UNIX_EPOCHby @robertbastian in https://github.com/chronotope/chrono/pull/1670 - Implement
as_seconds_f32andas_seconds_f64forTimeDeltaby @ggoetz in https://github.com/chronotope/chrono/pull/1671 - chore: fix some comments by @jimmycathy in https://github.com/chronotope/chrono/pull/1677
- Add
num_days_in_monthmethod toDateliketrait by @aslilac in https://github.com/chronotope/chrono/pull/1673 - add
WeekdaySet, a collection ofWeekdaythat isCopyby @Kinrany in https://github.com/chronotope/chrono/pull/1676 - WeekdaySet tweaks by @djc in https://github.com/chronotope/chrono/pull/1680
- Upgrade to windows-bindgen 0.61 by @djc in https://github.com/chronotope/chrono/pull/1682
- Implemented a consistent Eq trait for NaiveWeek by @Splashling1789 in https://github.com/chronotope/chrono/pull/1687
- TimeZone::from_posix_tz: Treat empty TZ variable as UTC by @drinkcat in https://github.com/chronotope/chrono/pull/1691
- Add support for lossy format strings by @Qelxiros in https://github.com/chronotope/chrono/pull/1693
v0.4.40: 0.4.40
What's Changed
- Add Month::num_days() by @djc in https://github.com/chronotope/chrono/pull/1645
- Update Windows dependencies by @kennykerr in https://github.com/chronotope/chrono/pull/1646
- Feature/round_up method on DurationRound trait by @MagnumTrader in https://github.com/chronotope/chrono/pull/1651
- Expose
write_toforDelayedFormatby @tugtugtug in https://github.com/chronotope/chrono/pull/1654 - Update LICENSE.txt by @maximevtush in https://github.com/chronotope/chrono/pull/1656
- docs: fix minor typo by @samfolo in https://github.com/chronotope/chrono/pull/1659
- Use NaiveDateTime for internal tz_info methods. by @AVee in https://github.com/chronotope/chrono/pull/1658
- Upgrade to windows-bindgen 0.60 by @djc in https://github.com/chronotope/chrono/pull/1665
- Add quarter (%q) date string specifier by @drinkcat in https://github.com/chronotope/chrono/pull/1666
v0.4.39: 0.4.39
What's Changed
- #1577: Changed years_since documentation to match its implementation by @Taxalo in https://github.com/chronotope/chrono/pull/1578
- Remove obsolete weird feature guard by @djc in https://github.com/chronotope/chrono/pull/1582
- Fix format::strftime docs link by @frederikhors in https://github.com/chronotope/chrono/pull/1581
- Fix micros (optional) limit in and_hms_micro_opt by @qrilka in https://github.com/chronotope/chrono/pull/1584
- Update windows-bindgen requirement from 0.56 to 0.57 by @dependabot in https://github.com/chronotope/chrono/pull/1589
- native/date: Improve DelayedFormat doc re Panics by @behnam-oneschema in https://github.com/chronotope/chrono/pull/1590
- Fix typo in rustdoc of
from_timestamp_nanos()by @sgoll in https://github.com/chronotope/chrono/pull/1591 - Update windows-bindgen requirement from 0.57 to 0.58 by @dependabot in https://github.com/chronotope/chrono/pull/1594
- docs: document century cutoff for %y by @MarcoGorelli in https://github.com/chronotope/chrono/pull/1598
- Checked
NaiveWeekmethods by @bragov4ik in https://github.com/chronotope/chrono/pull/1600 - Impl serde::Serialize and serde::Deserialize for TimeDelta by @Awpteamoose in https://github.com/chronotope/chrono/pull/1599
- Derive
PartialEq,Eq,Hash,CopyandCloneonNaiveWeekby @DSeeLP in https://github.com/chronotope/chrono/pull/1618 - Support ohos tzdata since ver.oh35 by @MirageLyu in https://github.com/chronotope/chrono/pull/1613
- Use Formatter::pad (instead of write_str) for Weekdays by @horazont in https://github.com/chronotope/chrono/pull/1621
- Fix typos by @szepeviktor in https://github.com/chronotope/chrono/pull/1623
- Fix comment. by @khuey in https://github.com/chronotope/chrono/pull/1624
- chore: add
#[inline]tonum_daysby @CommanderStorm in https://github.com/chronotope/chrono/pull/1627 - fix typo by @futreall in https://github.com/chronotope/chrono/pull/1633
- Update mod.rs by @donatik27 in https://github.com/chronotope/chrono/pull/1638
v0.4.38
This release bring a ca. 20% improvement to the performance of the formatting code, and a convenient days_since method for the Weekday type.
Chrono 0.4.38 also removes the long deprecated rustc-serialize feature. Support for rustc-serialize will be soft-destabilized in the next Rust edition. Removing the feature will not break existing users of the feature; Cargo will just not update dependents that rely on it to newer versions of chrono.
In chrono 0.4.36 we made an accidental breaking change by switching to derive(Copy) for DateTime instead of a manual implementation. It is reverted in this release.
Removals
- Remove
rustc-serializefeature (#1548, thanks @workingjubilee)
Additions
- Add
Weekday::days_since(#1249, based on #216 by @clarfonthey) - Add
TimeDelta::checked_mulandTimeDelta::checked_div(#1565, thanks @Zomtir)
Fixes
- Return error when rounding with a zero duration (#1474, thanks @Dav1dde)
- Manually implement
CopyforDateTimeif offset isCopy(#1573)
Internal
- Inline
test_encodable_jsonandtest_decodable_jsonfunctions (#1550) - CI: Reduce combinations in
cargo hack check(#1553) - Refactor formatting code (#1335)
- Optimize number formatting (#1558)
- Only package files needed for building and testing (#1554)
Thanks to all contributors on behalf of the chrono team, @djc and @pitdicker!
v0.4.37
Version 0.4.36 introduced an unexpected breaking change and was yanked. In it LocalResult was renamed to MappedLocalTime to avoid the impression that it is a Result type were some of the results are errors. For backwards compatibility a type alias with the old name was added.
As it turns out there is one case where a type alias behaves differently from the regular enum: you can't import enum variants from a type alias with use chrono::LocalResult::*. With 0.4.37 we make the new name MappedLocalTime the alias, but keep using it in function signatures and the documentation as much as possible.
See also the release notes of chrono 0.4.36 from yesterday for the yanked release.
v0.4.36
This release un-deprecates the methods on TimeDelta that were deprecated with the 0.4.35 release because of the churn they are causing for the ecosystem.
New is the DateTime::with_time() method. As an example of when it is useful:
use chrono::{Local, NaiveTime};
// Today at 12:00:00
let today_noon = Local::now().with_time(NaiveTime::from_hms_opt(12, 0, 0).unwrap());
Additions
- Add
DateTime::with_time()(#1510)
Deprecations
- Revert
TimeDeltadeprecations (#1543) - Deprecate
TimeStamp::timestamp_subsec_nanos, which was missed in the 0.4.35 release (#1486)
Documentation
- Correct version number of deprecation notices (#1486)
- Fix some typos (#1505)
- Slightly improve serde documentation (#1519)
- Main documentation: simplify links and reflow text (#1535)
Internal
- CI: Lint benchmarks (#1489)
- Remove unnessary
CopyandSendimpls (#1492, thanks @erickt) - Backport streamlined
NaiveDateunit tests (#1500, thanks @Zomtir) - Rename
LocalResulttoTzResolution, add alias (#1501) - Update windows-bindgen to 0.55 (#1504)
- Avoid duplicate imports, which generate warnings on nightly (#1507)
- Add extra debug assertions to
NaiveDate::from_yof(#1518) - Some small simplifications to
DateTime::date_naiveandNaiveDate::diff_months(#1530) - Remove
unwrapin UnixLocaltype (#1533) - Use different method to ignore feature-dependent doctests (#1534)
Thanks to all contributors on behalf of the chrono team, @djc and @pitdicker!
v0.4.35
Most of our efforts have shifted to improving the API for a 0.5 release, for which cleanups and refactorings are landing on the 0.4.x branch.
The most significant changes in this release are two sets of deprecations.
-
We deprecated all timestamp-related methods on
NaiveDateTime. The reason is that a timestamp is defined to be in UTC. TheNaiveDateTimetype doesn't know the offset from UTC, so it was technically wrong to have these methods. The alternative is to use the similar methods on theDateTime<Utc>type, or from theTimeZonetrait.Converting from
NaiveDateTimetoDateTime<Utc>is simple with.and_utc(), and in the other direction with.naive_utc(). -
The panicking constructors of
TimeDelta(the new name of theDurationtype) are deprecated. This was the last part of chrono that defaulted to panicking on error, dating from before rust 1.0. -
A nice change is that
NaiveDatenow includes a niche. So nowOption<NaiveDate>,Option<NaiveDateTime>andOption<DateTime<Tz>>are the same size as their base types. -
format::Numericandformat::Fixedare marked asnon_exhaustive. This will allow us to improve our formatting and parsing support, and we have reason to believe this breaking change will have little to no impact on users.
Additions
Deprecations
- Deprecate timestamp methods on
NaiveDateTime(#1473) - Deprecate panicking constructors of
TimeDelta(#1450)
Changes/fixes
- Use
NonZeroI32insideNaiveDate(#1207) - Mark
format::Numericandformat::Fixedasnon_exhaustive(#1430) Parsedfixes to error values (#1439)- Use
overflowing_naive_localinDateTime::checked_add*(#1333) - Do complete range checks in
Parsed::set_*(#1465)
Documentation
- Rustfmt doctests (#1452)
- Improve docs for crate features (#1455, thanks @edmorley)
- Add more documentation and examples to
Parsed(#1439)
Internal
- Refactor
internalsmodule (#1428, #1429, #1431, #1432, #1433, #1438) - CI: test cross-compiling to
x86_64-unknown-illumosinstead of Solaris (#1437) - CI: lint Windows target, fix clippy warning (#1441)
- CI: only run
cargo hack checkon Linux (#1442) - Update windows-bindgen to 0.54 (#1462, #1483)
- Simplify error value of
parse_internal(#1459) - Simplify
SerdeError(#1458) - Simplify
NaiveDate::from_isoywda bit (#1464)
Thanks to all contributors on behalf of the chrono team, @djc and @pitdicker!
v0.4.34
Notable changes
- In chrono 0.4.34 we finished the work to make all methods const where doing so is supported by rust 1.61.
- We renamed the
Durationtype toTimeDelta. This removes the confusion between chrono's type and the laterDurationtype in the standard library. It will remain available under the old name as a type alias for compatibility. - The Windows implementation of
Localis rewritten. The new version avoids panics when the date is outside of the range supported by windows (the years 1601 to 30828), and gives more accurate results during DST transitions. - The
Displayformat ofTimeDeltais modified to conform better to ISO 8601. Previously it converted all values greater than 24 hours to a value with days. This is not correct, as doing so changes the duration from an 'accurate' to a 'nominal' representation to use ISO 8601 terms.
Fixes
- Add missing range check in
TimeDelta::milliseconds(#1385, thanks @danwilliams) - Remove check for
DurationExceedsTimestampinDurationRound(#1403, thanks @joroKr21) - Fix localized formatting with
%X(https://github.com/chronotope/pure-rust-locales/pull/12, #1420) - Windows: base implementation on
GetTimeZoneInformationForYear(#1017)
Additions
- Add
TimeDelta::try_milliseconds(#1385, thanks @danwilliams) - Add
TimeDelta::new(#1337) - Add
StrftimeItems::{parse, parse_to_owned}and more documentation (#1184) - More standard traits and documentation for
format::Locale(via https://github.com/chronotope/pure-rust-locales/pull/8)
Changes
- Rename
DurationtoTimeDelta, add type alias (#1406) - Make
TimeDeltamethods const (#1337) - Make remaining methods of
NaiveDate,NaiveWeek,NaiveTimeandNaiveDateTimeconst where possible (#1337) - Make methods on
DateTimeconst where possible (#1400) - Make
Displayformat ofTimeDeltaconform better to ISO 8601 (#1328)
Documentation
- Fix the formatting of
timestamp_micros's Example doc (#1338 via #1386, thanks @emikitas) - Specify branch for GitHub Actions badge and fix link (#1388)
- Don't mention some deprecated methods in docs (#1395)
- Remove stray documentation from main (#1397)
- Improved documentation of
TimeDeltaconstructors (#1385, thanks @danwilliams)
Internal
- Switch branch names: 0.4.x releases are the
mainbranch, work on 0.5 happens in the0.5.xbranch (#1390, #1402). - Don't use deprecated method in
impl Arbitrary for DateTimeand set up CI test (#1336) - Remove workaround for Rust < 1.61 (#1393)
- Bump
codecov/codecov-actionfrom 3 to 4 (#1404) - Remove partial support for handling
-0000offset (#1411) - Move
TOO_LONGerror out ofparse_internal(#1419)
Thanks to all contributors on behalf of the chrono team, @djc and @pitdicker!
v0.4.33
This release fixes the broken docrs.rs build of chrono 0.4.32.
What's Changed
- Make
rkyvfeature implysize_32(#1383) - Fixed typo in
Duration::hours()exception (#1384, thanks @danwilliams)
v0.4.32
In this release we shipped part of the effort to reduce the number of methods that could unexpectedly panic, notably for the DateTime and Duration types.
Chrono internally stores the value of a DateTime in UTC, and transparently converts it to the local value as required. For example adding a second to a DateTime needs to be done in UTC to get the correct result, but adding a day needs to be done in local time to be correct. What happens when the value is near the edge of the representable range, and the implicit conversions pushes it beyond the representable range? Many methods could panic on such inputs, including formatting the value for Debug output.
In chrono 0.4.32 the range of NaiveDate, NaiveDateTime and DateTime is made slightly smaller. This allows us to always do the implicit conversion, and in many cases return the expected result. Specifically the range is now from January 1, -262144 until December 31, 262143, one year less on both sides than before. We expect this may trip up tests if you hardcoded the MIN and MAX dates.
Duration had a similar issue. The range of this type was pretty arbitrary picked to match the range of an i64 in milliseconds. Negating an i64::MIN pushes a value out of range, and in the same way negating Duration::MIN could push it out of our defined range and cause a panic. This turns out to be somewhat common and hidden behind many layers of abstraction. We adjusted the type to have a minimum value of -Duration::MAX instead and prevent the panic case.
Other highlights:
Durationgained new fallible initialization methods.- Better support for
rkyv. - Most methods on
NaiveDateTimeare now const. - We had to bump our MSRV to 1.61 to keep building with our dependencies. This will also allow us to make more methods on
DateTimeconst in a future release.
Complete list of changes:
Fixes
- Fix panic in
TimeZone::from_local_datetime(#1071) - Fix out of range panics in
DateTimegetters and setters (#1317, #1329)
Additions
- Add
NaiveDateTime::checked_(add|sub)_offset(#1313) - Add
DateTime::to_utc(#1325) - Derive
DefaultforDuration(#1327) - Add
Duration::subsec_nanos(#1327) - Add
try_*builders toDuration(#1327) - Implement
AddAssignandSubAssignforDuration(#1327) - Make methods on
NaiveDateTimeconst where possible (#1286) - Split
clockfeature intoclockandnow(#1343, thanks @mmastrac) - Add
From<NaiveDate>forNaiveDateTime(#1355, thanks @dcechano) - Add
NaiveDateTime::from_timestamp_nanos(#1357, thanks @Ali-Mirghasemi) - Add
Months::num_months()andnum_years()(#1373, thanks @danwilliams) - Add
DateTime<Utc>::from_timestamp_millis(#1374, thanks @xmakro)
Changes
- Fix panic in
Duration::MIN.abs()(adjustDuration::MINby 1 millisecond) (#1334) - Bump MSRV to 1.61 (#1347)
- Update windows-targets requirement from 0.48 to 0.52 (#1360)
- Update windows-bindgen to 0.52 (#1379)
Deprecations
- Deprecate standalone
formatfunctions (#1306)
Documentation
- Improve doc comment and tests for timestamp_nanos_opt (#1299, thanks @mlegner)
- Switch to
doc_auto_cfg(#1305, #1326) - Document panics in
Add/Subimpls and useexpect(#1316) - Improve types listed in top-level documentation (#1274)
- Improve deprecation note of
TimeZone::datetime_from_str(#1342, thanks @tmccombs) - Fix typos in
Datelikeimpl forDateTime(#1376, thanks @ElectrifyPro)
Rkyv support
- Export
Archived*types inrkyvmodule (#1304) - Duplicate derives on
Archived*types (#1271, thanks @Awpteamoose) - Archive derive of PartialEq for rkyv (#959, thanks @mkatychev)
- Expose rkyv features as features for chrono users (#1368, thanks @gz)
Changes to unstable features
- Don't let
unstable-localesimply theallocfeature (#1307) - Remove
format::{format_localized, format_item_localized}(#1311) - Inline
write_rfc2822_inner, don't localize (#1322)
Internal
- Add benchmark for
DateTime::with_*(#1309) - Fix
*_DAYS_FROM_YEAR_0calculation (#1312) - Add
NaiveTime::overflowing_(add|sub)_offset(#1310) - Rewrite
DateTime::overflowing_(add|sub)_offset(#1069) - Tests calling date command
set env LC_ALL(#1315, thanks @jtmoon79) - Update
deny.toml(#1320) - Bump actions/setup-node from 3 to 4 (#1346)
- test.yml remove errant
with: node-version(#1352, thanks @jtmoon79) - CI Linting: Fix missing sources checkout in
tomljob (#1371, thanks @gibbz00) - Silence clippy lint for test code with Rust 1.74.0 (#1362)
Thanks to all contributors on behalf of the chrono team, @djc and @pitdicker!
v0.4.31
Another maintenance release. It was not a planned effort to improve our support for UNIX timestamps, yet most PRs seem related to this.
Deprecations
- Deprecate
timestamp_nanosin favor of the non-panickingtimestamp_nanos_opt(#1275)
Additions
- Add
DateTime::<Utc>::from_timestamp(#1279, thanks @demurgos) - Add
TimeZone::timestamp_micros(#1285, thanks @emikitas) - Add
DateTime<Tz>::timestamp_nanos_optandNaiveDateTime::timestamp_nanos_opt(#1275) - Add
UNIX_EPOCHconstants (#1291)
Fixes
- Format day of month in RFC 2822 without padding (#1272)
- Don't allow strange leap seconds which are not on a minute boundary initialization methods (#1283)
This makes many methods a little more strict:
NaiveTime::from_hms_milliNaiveTime::from_hms_milli_optNaiveTime::from_hms_microNaiveTime::from_hms_micro_optNaiveTime::from_hms_nanoNaiveTime::from_hms_nano_optNaiveTime::from_num_seconds_from_midnightNaiveTime::from_num_seconds_from_midnight_optNaiveDate::and_hms_milliNaiveDate::and_hms_milli_optNaiveDate::and_hms_microNaiveDate::and_hms_micro_optNaiveDate::and_hms_nanoNaiveDate::and_hms_nano_optNaiveDateTime::from_timestampNaiveDateTime::from_timestamp_optTimeZone::timestampTimeZone::timestamp_opt
- Fix underflow in
NaiveDateTime::timestamp_nanos_opt(#1294, thanks @crepererum)
Documentation
- Add more documentation about the RFC 2822 obsolete date format (#1267)
Internal
- Remove internal
__doctestfeature anddoc_commentdependency (#1276) - CI: Bump
actions/checkoutfrom 3 to 4 (#1280) - Optimize
NaiveDate::add_daysfor small values (#1214) - Upgrade
pure-rust-localesto 0.7.0 (#1288, thanks @jeremija wo did good improvements onpure-rust-locales)
Thanks to all contributors on behalf of the chrono team, @djc and @pitdicker!
v0.4.30
In this release, we have decided to swap out the chrono::Duration type (which has been a re-export of time 0.1 Duration type) with our own definition, which exposes a strict superset of the time::Duration API. This helps avoid warnings about the [CVE-2020-26235] and [RUSTSEC-2020-0071] advisories for downstream users and allows us to improve the Duration API going forward.
While this is technically a SemVer-breaking change, we expect the risk of downstream users experiencing actual incompatibility to be exceedingly limited (see our analysis of public code using a crater-like experiment), and not enough justification for the large ecosystem churn of a 0.5 release. If you have any feedback on these changes, please let us know in #1268.
Additions
- Add
NaiveDate::leap_year(#1261)
Documentation
- Update main documentation from README (#1260, thanks @Stygmates)
- Add history of relation between chrono and time 0.1 to documentation (https://github.com/chronotope/chrono/pull/1264, https://github.com/chronotope/chrono/pull/1266)
- Clarify
Timelike::num_seconds_from_midnightis a simple mapping (#1255)
Relation between chrono and time 0.1
Rust first had a time module added to std in its 0.7 release. It later moved to libextra, and then to a libtime library shipped alongside the standard library. In 2014 work on chrono started in order to provide a full-featured date and time library in Rust. Some improvements from chrono made it into the standard library; notably, chrono::Duration was included as std::time::Duration (rust#15934) in 2014.
In preparation of Rust 1.0 at the end of 2014 libtime was moved out of the Rust distro and into the time crate to eventually be redesigned (rust#18832, rust#18858), like the num and rand crates. Of course chrono kept its dependency on this time crate. time started re-exporting std::time::Duration during this period. Later, the standard library was changed to have a more limited unsigned Duration type (rust#24920, RFC 1040), while the time crate kept the full functionality with time::Duration. time::Duration had been a part of chrono's public API.
By 2016 time 0.1 lived under the rust-lang-deprecated organisation and was not actively maintained (time#136). chrono absorbed the platform functionality and Duration type of the time crate in chrono#478 (the work started in chrono#286). In order to preserve compatibility with downstream crates depending on time and chrono sharing a Duration type, chrono kept depending on time 0.1. chrono offered the option to opt out of the time dependency by disabling the oldtime feature (swapping it out for an effectively similar chrono type). In 2019, @jhpratt took over maintenance on the time crate and released what amounts to a new crate as time 0.2.
Security advisories
In November of 2020 [CVE-2020-26235] and [RUSTSEC-2020-0071] were opened against the time crate. @quininer had found that calls to localtime_r may be unsound ([chrono#499]). Eventually, almost a year later, this was also made into a security advisory against chrono as [RUSTSEC-2020-0159], which had platform code similar to time.
On Unix-like systems a process is given a timezone id or description via the TZ environment variable. We need this timezone data to calculate the current local time from a value that is in UTC, such as the time from the system clock. time 0.1 and chrono used the POSIX function localtime_r to do the conversion to local time, which reads the TZ variable.
Rust assumes the environment to be writable and uses locks to access it from multiple threads. Some other programming languages and libraries use similar locking strategies, but these are typically not shared across languages. More importantly, POSIX declares modifying the environ
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 74.50%. Comparing base (
90b065c) to head (91475b9).
Additional details and impacted files
@@ Coverage Diff @@
## main #147 +/- ##
==========================================
- Coverage 74.52% 74.50% -0.03%
==========================================
Files 37 37
Lines 950 957 +7
==========================================
+ Hits 708 713 +5
- Misses 242 244 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
⚠ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
- any of the package files in this branch needs updating, or
- the branch becomes conflicted, or
- you click the rebase/retry checkbox if found above, or
- you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: curlz/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path curlz/Cargo.toml --package [email protected] --precise 1.0.83
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
error: package ID specification `[email protected]` did not match any packages
Did you mean one of these?
[email protected]
⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
- any of the package files in this branch needs updating, or
- the branch becomes conflicted, or
- you click the rebase/retry checkbox if found above, or
- you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: curlz/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path curlz/Cargo.toml --package [email protected] --precise 1.0.98
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
error: package ID specification `[email protected]` did not match any packages
help: there are similar package ID specifications:
[email protected]