Update Rust crate quick-xml to 0.32.0 #88

Merged
pierre merged 1 commits from renovate/quick-xml-0.x into master 2024-06-12 00:55:57 +00:00
Owner

This PR contains the following updates:

Package Type Update Change
quick-xml dependencies minor 0.31.0 -> 0.32.0

Release Notes

tafia/quick-xml (quick-xml)

v0.32.0

Compare Source

The way to configure parser is changed. Now all configuration is contained in the
Config struct and can be applied at once. When serde-types feature is enabled,
configuration is serializable.

The method of reporting positions of errors has changed - use error_position()
to get an offset of the error position. For SyntaxErrors the range
error_position()..buffer_position() also will represent a span of error.

The way of resolve entities with unescape_with are changed. Those methods no longer
resolve predefined entities.

New Features
  • #​513: Allow to continue parsing after getting new Error::IllFormed.
  • #​677: Added methods config() and config_mut() to inspect and change the parser
    configuration. Previous builder methods on Reader / NsReader was replaced by
    direct access to fields of config using reader.config_mut().<...>.
  • #​684: Added a method Config::enable_all_checks to turn on or off all
    well-formedness checks.
  • #​362: Added escape::minimal_escape() which escapes only & and <.
  • #​362: Added BytesCData::minimal_escape() which escapes only & and <.
  • #​362: Added Serializer::set_quote_level() which allow to set desired level of escaping.
  • #​705: Added NsReader::prefixes() to list all the prefixes currently declared.
  • #​629: Added a default case to impl_deserialize_for_internally_tagged_enum macro so that
    it can handle every attribute that does not match existing cases within an enum variant.
  • #​722: Allow to pass owned strings to Writer::create_element. This is breaking change!
  • #​275: Added ElementWriter::new_line() which enables pretty printing elements with multiple attributes.
  • #​743: Added Deserializer::get_ref() to get XML Reader from serde Deserializer
  • #​734: Added helper functions to resolve predefined XML and HTML5 entities:
    • quick_xml::escape::resolve_predefined_entity
    • quick_xml::escape::resolve_xml_entity
    • quick_xml::escape::resolve_html5_entity
  • #​753: Added parser for processing instructions: quick_xml::reader::PiParser.
  • #​754: Added parser for elements: quick_xml::reader::ElementParser.
Bug Fixes
  • #​622: Fix wrong disregarding of not closed markup, such as lone <.
  • #​684: Fix incorrect position reported for Error::IllFormed(DoubleHyphenInComment).
  • #​684: Fix incorrect position reported for Error::IllFormed(MissingDoctypeName).
  • #​704: Fix empty tags with attributes not being expanded when expand_empty_elements is set to true.
  • #​683: Use local tag name when check tag name against possible names for field.
  • #​753: Correctly determine end of processing instructions and XML declaration.
Misc Changes
  • #​675: Minimum supported version of serde raised to 1.0.139
  • #​675: Rework the quick_xml::Error type to provide more accurate information:
    • Error::EndEventMismatch replaced by IllFormedError::MismatchedEndTag in some cases
    • Error::EndEventMismatch replaced by IllFormedError::UnmatchedEndTag in some cases
    • Error::TextNotFound was removed because not used
    • Error::UnexpectedBang replaced by SyntaxError
    • Error::UnexpectedEof replaced by SyntaxError in some cases
    • Error::UnexpectedEof replaced by IllFormedError in some cases
    • Error::UnexpectedToken replaced by IllFormedError::DoubleHyphenInComment
    • Error::XmlDeclWithoutVersion replaced by IllFormedError::MissingDeclVersion (in #​684)
    • Error::EmptyDocType replaced by IllFormedError::MissingDoctypeName (in #​684)
  • #​684: Changed positions reported for SyntaxErrors: now they are always points
    to the start of markup (i. e. to the < character) with error. Use error_position()
    for that.
  • #​684: Now <??> parsed as Event::PI with empty content instead of raising
    syntax error.
  • #​684: Now <?xml?> parsed as Event::Decl instead of Event::PI.
  • #​362: Now default quote level is QuoteLevel::Partial when using serde serializer.
  • #​689: buffer_position() now always report the position the parser last seen.
    To get an error position use error_position().
  • #​738: Add an example of how to deserialize XML elements into Rust enums using an
    intermediate custom deserializer.
  • #​748: Implement Clone for [DeEvent][DeEvent], [PayloadEvent][PayloadEvent] and [Text][Text].
  • #​734: Rename NoEntityResolver to PredefinedEntityResolver.
  • #​734: No longer resolve predefined entities (lt, gt, apos, quot, amp)
    in unescape_with family of methods. You should do that by yourself using the methods
    listed above.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [quick-xml](https://github.com/tafia/quick-xml) | dependencies | minor | `0.31.0` -> `0.32.0` | --- ### Release Notes <details> <summary>tafia/quick-xml (quick-xml)</summary> ### [`v0.32.0`](https://github.com/tafia/quick-xml/blob/HEAD/Changelog.md#0320----2024-06-10) [Compare Source](https://github.com/tafia/quick-xml/compare/v0.31.0...v0.32.0) The way to configure parser is changed. Now all configuration is contained in the `Config` struct and can be applied at once. When `serde-types` feature is enabled, configuration is serializable. The method of reporting positions of errors has changed - use `error_position()` to get an offset of the error position. For `SyntaxError`s the range `error_position()..buffer_position()` also will represent a span of error. The way of resolve entities with `unescape_with` are changed. Those methods no longer resolve predefined entities. ##### New Features - [#&#8203;513]: Allow to continue parsing after getting new `Error::IllFormed`. - [#&#8203;677]: Added methods `config()` and `config_mut()` to inspect and change the parser configuration. Previous builder methods on `Reader` / `NsReader` was replaced by direct access to fields of config using `reader.config_mut().<...>`. - [#&#8203;684]: Added a method `Config::enable_all_checks` to turn on or off all well-formedness checks. - [#&#8203;362]: Added `escape::minimal_escape()` which escapes only `&` and `<`. - [#&#8203;362]: Added `BytesCData::minimal_escape()` which escapes only `&` and `<`. - [#&#8203;362]: Added `Serializer::set_quote_level()` which allow to set desired level of escaping. - [#&#8203;705]: Added `NsReader::prefixes()` to list all the prefixes currently declared. - [#&#8203;629]: Added a default case to `impl_deserialize_for_internally_tagged_enum` macro so that it can handle every attribute that does not match existing cases within an enum variant. - [#&#8203;722]: Allow to pass owned strings to `Writer::create_element`. This is breaking change! - [#&#8203;275]: Added `ElementWriter::new_line()` which enables pretty printing elements with multiple attributes. - [#&#8203;743]: Added `Deserializer::get_ref()` to get XML Reader from serde Deserializer - [#&#8203;734]: Added helper functions to resolve predefined XML and HTML5 entities: - `quick_xml::escape::resolve_predefined_entity` - `quick_xml::escape::resolve_xml_entity` - `quick_xml::escape::resolve_html5_entity` - [#&#8203;753]: Added parser for processing instructions: `quick_xml::reader::PiParser`. - [#&#8203;754]: Added parser for elements: `quick_xml::reader::ElementParser`. ##### Bug Fixes - [#&#8203;622]: Fix wrong disregarding of not closed markup, such as lone `<`. - [#&#8203;684]: Fix incorrect position reported for `Error::IllFormed(DoubleHyphenInComment)`. - [#&#8203;684]: Fix incorrect position reported for `Error::IllFormed(MissingDoctypeName)`. - [#&#8203;704]: Fix empty tags with attributes not being expanded when `expand_empty_elements` is set to true. - [#&#8203;683]: Use local tag name when check tag name against possible names for field. - [#&#8203;753]: Correctly determine end of processing instructions and XML declaration. ##### Misc Changes - [#&#8203;675]: Minimum supported version of serde raised to 1.0.139 - [#&#8203;675]: Rework the `quick_xml::Error` type to provide more accurate information: - `Error::EndEventMismatch` replaced by `IllFormedError::MismatchedEndTag` in some cases - `Error::EndEventMismatch` replaced by `IllFormedError::UnmatchedEndTag` in some cases - `Error::TextNotFound` was removed because not used - `Error::UnexpectedBang` replaced by `SyntaxError` - `Error::UnexpectedEof` replaced by `SyntaxError` in some cases - `Error::UnexpectedEof` replaced by `IllFormedError` in some cases - `Error::UnexpectedToken` replaced by `IllFormedError::DoubleHyphenInComment` - `Error::XmlDeclWithoutVersion` replaced by `IllFormedError::MissingDeclVersion` (in [#&#8203;684]) - `Error::EmptyDocType` replaced by `IllFormedError::MissingDoctypeName` (in [#&#8203;684]) - [#&#8203;684]: Changed positions reported for `SyntaxError`s: now they are always points to the start of markup (i. e. to the `<` character) with error. Use `error_position()` for that. - [#&#8203;684]: Now `<??>` parsed as `Event::PI` with empty content instead of raising syntax error. - [#&#8203;684]: Now `<?xml?>` parsed as `Event::Decl` instead of `Event::PI`. - [#&#8203;362]: Now default quote level is `QuoteLevel::Partial` when using serde serializer. - [#&#8203;689]: `buffer_position()` now always report the position the parser last seen. To get an error position use `error_position()`. - [#&#8203;738]: Add an example of how to deserialize XML elements into Rust enums using an intermediate custom deserializer. - [#&#8203;748]: Implement `Clone` for [`DeEvent`][DeEvent], [`PayloadEvent`][PayloadEvent] and [`Text`][Text]. - [#&#8203;734]: Rename `NoEntityResolver` to `PredefinedEntityResolver`. - [#&#8203;734]: No longer resolve predefined entities (`lt`, `gt`, `apos`, `quot`, `amp`) in `unescape_with` family of methods. You should do that by yourself using the methods listed above. [#&#8203;275]: https://github.com/tafia/quick-xml/issues/275 [#&#8203;362]: https://github.com/tafia/quick-xml/issues/362 [#&#8203;513]: https://github.com/tafia/quick-xml/issues/513 [#&#8203;622]: https://github.com/tafia/quick-xml/issues/622 [#&#8203;629]: https://github.com/tafia/quick-xml/issues/629 [#&#8203;675]: https://github.com/tafia/quick-xml/pull/675 [#&#8203;677]: https://github.com/tafia/quick-xml/pull/677 [#&#8203;683]: https://github.com/tafia/quick-xml/issues/683 [#&#8203;684]: https://github.com/tafia/quick-xml/pull/684 [#&#8203;689]: https://github.com/tafia/quick-xml/pull/689 [#&#8203;704]: https://github.com/tafia/quick-xml/pull/704 [#&#8203;705]: https://github.com/tafia/quick-xml/pull/705 [#&#8203;722]: https://github.com/tafia/quick-xml/pull/722 [#&#8203;734]: https://github.com/tafia/quick-xml/pull/734 [#&#8203;738]: https://github.com/tafia/quick-xml/pull/738 [#&#8203;743]: https://github.com/tafia/quick-xml/pull/743 [#&#8203;748]: https://github.com/tafia/quick-xml/pull/748 [#&#8203;753]: https://github.com/tafia/quick-xml/pull/753 [#&#8203;754]: https://github.com/tafia/quick-xml/pull/754 [`DeEvent`]: https://docs.rs/quick-xml/latest/quick_xml/de/enum.DeEvent.html [`PayloadEvent`]: https://docs.rs/quick-xml/latest/quick_xml/de/enum.PayloadEvent.html [`Text`]: https://docs.rs/quick-xml/latest/quick_xml/de/struct.Text.html </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **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, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDQuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQwNC4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
pierre added 1 commit 2024-06-12 00:13:58 +00:00
Update Rust crate quick-xml to 0.32.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
78a7274d18
pierre scheduled this pull request to auto merge when all checks succeed 2024-06-12 00:13:58 +00:00
pierre merged commit 272763bdc3 into master 2024-06-12 00:55:57 +00:00
Author
Owner

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (0.32.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

### Renovate Ignore Notification Because you closed this PR without merging, Renovate will ignore this update (`0.32.0`). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the `ignoreDeps` array of your Renovate config. If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.
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/VirtWeb#88
No description provided.