Update Rust crate serde_yaml to 0.9.4 #29

Merged
pierre merged 1 commits from renovate/serde_yaml-0.x into master 2022-08-13 07:24:23 +00:00
Owner

This PR contains the following updates:

Package Type Update Change
serde_yaml dependencies minor 0.8.23 -> 0.9.4

Release Notes

dtolnay/serde-yaml

v0.9.4

Compare Source

  • Add serde_yaml::with::singleton_map for serialization of enums as a 1-entry map (#​300)
  • Reject duplicate keys when deserializing Mapping or Value (#​301)

v0.9.3

Compare Source

  • Add categories to crates.io metadata
  • Add keywords to crates.io metadata

v0.9.2

Compare Source

  • Improve Debug representation of serde_yaml::Error

v0.9.1

Compare Source

  • Fix panic on some documents containing syntax error (#​293)
  • Improve error messages that used to contain duplicative line/column information (#​294)

v0.9.0

Compare Source

API documentation: https://docs.rs/serde_yaml/0.9

Highlights
  • The serde_yaml::Value enum gains a Tagged variant which represents the deserialization of YAML's !Tag syntax. Tagged scalars, sequences, and mappings are all supported.

  • An empty YAML input (or document containing only comments) will deserialize successfully to an empty map, empty sequence, or Serde struct as long as the struct has only optional fields. Previously this would error.

  • A new .apply_merge() method on Value implements YAML's << merge key convention.

  • The Debug representation of serde_yaml::Value has gotten vastly better (https://github.com/dtolnay/serde-yaml/pull/287).

  • Deserialization of borrowed strings now works.

    #[derive(Deserialize, Debug)]
    struct Struct<'a> {
        borrowed: &'a str,
    }
    
    let yaml = "borrowed: 'kölcsönzött'\n";
    let value: Struct = serde_yaml::from_str(yaml)?;
    println!("{:#?}", value);
    
  • Value's and Mapping's methods get and get_mut have been generalized to support a &str argument, as opposed to requiring you to allocate and construct a Value::String for indexing into another existing Value.

  • Mapping exposes more APIs that have become conventional on map data structures, such as .keys(), .values(), .into_keys(), .into_values(), .values_mut(), and .retain(|k, v| …).

Breaking changes
  • Serialization no longer produces leading ---\n on the serialized output. You can prepend this yourself if your use case demands it.

  • Serialization of enum variants is now based on YAML's !Tag syntax, rather than JSON-style singleton maps.

    #[derive(Serialize, Deserialize)]
    enum Enum {
        Newtype(usize),
        Tuple(usize, usize, usize),
        Struct { x: f64, y: f64 },
    }
    
    - !Newtype 1
    - !Tuple [0, 0, 0]
    - !Struct {x: 1.0, y: 2.0}
    
  • A bunch of non-base-10 edge cases in number parsing have been resolved. For example 0x+1 and ++0x1 are now parsed as strings, whereas they used to be incorrectly treated as numbers.

  • Deserializers obtained through iteration can no longer be iterated further:

    let deserializer = serde_yaml::Deserializer::from_str(multiple_documents);
    for de in deserializer {
        // correct:
        let myvalue = T::deserialize(de)?;
    
        // incorrect: used to produce some questionable result, now produces 0 sub-documents
        for questionable in de {
            let wat = T::deserialize(questionable)?;
        }
    }
    
  • The abandoned yaml-rust crate is no longer used as the YAML backend. The new libyaml-based backend surely has different edge cases and quirks than yaml-rust.

  • Some excessive PartialEq impls have been eliminated.

  • The serde_yaml::to_vec function has been removed. Use serde_yaml::to_writer for doing I/O, or use serde_yaml::to_string + .into_bytes() on the resulting String.

  • The serde_yaml::seed module has been removed. Now that a serde_yaml::Deserializer is publicly available, the same use cases can be addressed via seed.deserialize(Deserializer::from_str(…)) instead.

Bugfixes
  • Empty values in a mapping are supported, and deserialize to empty string when the corresponding struct field is of type string. Previously they would deserialize to "~" which makes no sense.

  • 128-bit integer deserialization now supports hex and octal input.

  • Serde_yaml now includes a mitigation against a "billion laughs" attack in which malicious input involving YAML anchors and aliases is used to consume an amount of processing or memory that is exponential in the size of the input document. Serde_yaml will quickly produce an error in this situation instead.

v0.8.26

Compare Source

v0.8.25

Compare Source

  • Add to "encoding" category on crates.io (#​246)

v0.8.24

Compare Source

  • Work around indexmap/autocfg not always properly detecting whether a std sysroot crate is available (#​243, thanks @​cuviper)

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 becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [serde_yaml](https://github.com/dtolnay/serde-yaml) | dependencies | minor | `0.8.23` -> `0.9.4` | --- ### Release Notes <details> <summary>dtolnay/serde-yaml</summary> ### [`v0.9.4`](https://github.com/dtolnay/serde-yaml/releases/tag/0.9.4) [Compare Source](https://github.com/dtolnay/serde-yaml/compare/0.9.3...0.9.4) - Add `serde_yaml::with::singleton_map` for serialization of enums as a 1-entry map ([#&#8203;300](https://github.com/dtolnay/serde-yaml/issues/300)) - Reject duplicate keys when deserializing `Mapping` or `Value` ([#&#8203;301](https://github.com/dtolnay/serde-yaml/issues/301)) ### [`v0.9.3`](https://github.com/dtolnay/serde-yaml/releases/tag/0.9.3) [Compare Source](https://github.com/dtolnay/serde-yaml/compare/0.9.2...0.9.3) - Add categories to crates.io metadata - Add keywords to crates.io metadata ### [`v0.9.2`](https://github.com/dtolnay/serde-yaml/releases/tag/0.9.2) [Compare Source](https://github.com/dtolnay/serde-yaml/compare/0.9.1...0.9.2) - Improve `Debug` representation of `serde_yaml::Error` ### [`v0.9.1`](https://github.com/dtolnay/serde-yaml/releases/tag/0.9.1) [Compare Source](https://github.com/dtolnay/serde-yaml/compare/0.9.0...0.9.1) - Fix panic on some documents containing syntax error ([#&#8203;293](https://github.com/dtolnay/serde-yaml/issues/293)) - Improve error messages that used to contain duplicative line/column information ([#&#8203;294](https://github.com/dtolnay/serde-yaml/issues/294)) ### [`v0.9.0`](https://github.com/dtolnay/serde-yaml/releases/tag/0.9.0) [Compare Source](https://github.com/dtolnay/serde-yaml/compare/0.8.26...0.9.0) *API documentation: https://docs.rs/serde_yaml/0.9* ##### Highlights - The `serde_yaml::Value` enum gains a `Tagged` variant which represents the deserialization of YAML's `!Tag` syntax. Tagged scalars, sequences, and mappings are all supported. - An empty YAML input (or document containing only comments) will deserialize successfully to an empty map, empty sequence, or Serde struct as long as the struct has only optional fields. Previously this would error. - A new `.apply_merge()` method on `Value` implements YAML's `<<` merge key convention. - The `Debug` representation of `serde_yaml::Value` has gotten vastly better (https://github.com/dtolnay/serde-yaml/pull/287). - Deserialization of borrowed strings now works. ```rust #[derive(Deserialize, Debug)] struct Struct<'a> { borrowed: &'a str, } let yaml = "borrowed: 'kölcsönzött'\n"; let value: Struct = serde_yaml::from_str(yaml)?; println!("{:#?}", value); ``` - `Value`'s and `Mapping`'s methods `get` and `get_mut` have been generalized to support a \&str argument, as opposed to requiring you to allocate and construct a `Value::String` for indexing into another existing `Value`. - `Mapping` exposes more APIs that have become conventional on map data structures, such as `.keys()`, `.values()`, `.into_keys()`, `.into_values()`, `.values_mut()`, and `.retain(|k, v| …)`. ##### Breaking changes - Serialization no longer produces leading `---\n` on the serialized output. You can prepend this yourself if your use case demands it. - Serialization of enum variants is now based on YAML's `!Tag` syntax, rather than JSON-style singleton maps. ```rust #[derive(Serialize, Deserialize)] enum Enum { Newtype(usize), Tuple(usize, usize, usize), Struct { x: f64, y: f64 }, } ``` ```yaml - !Newtype 1 - !Tuple [0, 0, 0] - !Struct {x: 1.0, y: 2.0} ``` - A bunch of non-base-10 edge cases in number parsing have been resolved. For example `0x+1` and `++0x1` are now parsed as strings, whereas they used to be incorrectly treated as numbers. - Deserializers obtained through iteration can no longer be iterated further: ```rust let deserializer = serde_yaml::Deserializer::from_str(multiple_documents); for de in deserializer { // correct: let myvalue = T::deserialize(de)?; // incorrect: used to produce some questionable result, now produces 0 sub-documents for questionable in de { let wat = T::deserialize(questionable)?; } } ``` - The abandoned yaml-rust crate is no longer used as the YAML backend. The new libyaml-based backend surely has different edge cases and quirks than yaml-rust. - Some excessive `PartialEq` impls have been eliminated. - The `serde_yaml::to_vec` function has been removed. Use `serde_yaml::to_writer` for doing I/O, or use `serde_yaml::to_string` + `.into_bytes()` on the resulting String. - The `serde_yaml::seed` module has been removed. Now that a `serde_yaml::Deserializer` is publicly available, the same use cases can be addressed via `seed.deserialize(Deserializer::from_str(…))` instead. ##### Bugfixes - Empty values in a mapping are supported, and deserialize to empty string when the corresponding struct field is of type string. Previously they would deserialize to "~" which makes no sense. - 128-bit integer deserialization now supports hex and octal input. - Serde_yaml now includes a mitigation against a ["billion laughs"](https://en.wikipedia.org/wiki/Billion_laughs_attack) attack in which malicious input involving YAML anchors and aliases is used to consume an amount of processing or memory that is exponential in the size of the input document. Serde_yaml will quickly produce an error in this situation instead. ### [`v0.8.26`](https://github.com/dtolnay/serde-yaml/releases/tag/0.8.26) [Compare Source](https://github.com/dtolnay/serde-yaml/compare/0.8.25...0.8.26) - Add `flush` method to Serializer ([#&#8203;251](https://github.com/dtolnay/serde-yaml/issues/251), thanks [@&#8203;jturner314-nrl](https://github.com/jturner314-nrl)) ### [`v0.8.25`](https://github.com/dtolnay/serde-yaml/releases/tag/0.8.25) [Compare Source](https://github.com/dtolnay/serde-yaml/compare/0.8.24...0.8.25) - Add to *"encoding"* category on crates.io ([#&#8203;246](https://github.com/dtolnay/serde-yaml/issues/246)) ### [`v0.8.24`](https://github.com/dtolnay/serde-yaml/releases/tag/0.8.24) [Compare Source](https://github.com/dtolnay/serde-yaml/compare/0.8.23...0.8.24) - Work around `indexmap`/`autocfg` not always properly detecting whether a `std` sysroot crate is available ([#&#8203;243](https://github.com/dtolnay/serde-yaml/issues/243), thanks [@&#8203;cuviper](https://github.com/cuviper)) </details> --- ### 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 becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMzUuMSIsInVwZGF0ZWRJblZlciI6IjMyLjE1NC43In0=-->
pierre changed title from Update Rust crate serde_yaml to 0.9.2 to Update Rust crate serde_yaml to 0.9.4 2022-08-11 00:27:49 +00:00
pierre force-pushed renovate/serde_yaml-0.x from cee342508f to ecfa1a357a 2022-08-11 00:27:51 +00:00 Compare
pierre merged commit c2a5f0a8fd into master 2022-08-13 07:24:23 +00:00
pierre deleted branch renovate/serde_yaml-0.x 2022-08-13 07:24:23 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pierre/BasicOIDC#29
No description provided.