Skip to content

Update Rust crate quick-xml to v0.35.0 #8952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 3, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 29, 2024

Mend Renovate

This PR contains the following updates:

Package Type Update Change
quick-xml dependencies minor =0.31.0 -> =0.35.0

Release Notes

tafia/quick-xml (quick-xml)

v0.35.0

Compare Source

New Features
  • #​772: Add reader::Config::allow_unmatched_ends to permit dangling end tags
Bug Fixes
  • #​773: Fixed reporting incorrect end position in Reader::read_to_end family
    of methods and trimming of the trailing spaces in Reader::read_text when
    trim_text_start is set and the last event is not a Text event.
  • #​771: Character references now allow any number of leading zeroes as it should.
    As a result, the following variants of quick_xml::escape::EscapeError are removed:
    • TooLongDecimal
    • TooLongHexadecimal
  • #​771: Fixed Attribute::unescape_value which does not unescape predefined values since 0.32.0.
  • #​774: Fixed regression since 0.33.0: Text event may be skipped in read_event_into()
    and read_event_into_async() in some circumstances.
Misc Changes
  • #​771: EscapeError::UnrecognizedSymbol renamed to EscapeError::UnrecognizedEntity.
  • #​771: Implemented PartialEq for EscapeError.
  • #​771: Replace the following variants of EscapeError by InvalidCharRef variant
    with a new ParseCharRefError inside:
    • EntityWithNull
    • InvalidDecimal
    • InvalidHexadecimal
    • InvalidCodepoint

v0.34.0

Compare Source

Bug Fixes
  • #​751: Fix internal overflow when read 4GB+ files on 32-bit targets using Reader<impl BufRead> readers.
Misc Changes
  • #​760: Attribute::decode_and_unescape_value and Attribute::decode_and_unescape_value_with now
    accepts Decoder instead of Reader. Use Reader::decoder() to get it.
  • #​760: Writer::write_event now consumes event. Use Event::borrow() if you want to keep ownership.
  • #​751: Type of Reader::error_position() and Reader::buffer_position() changed from usize to u64.
  • #​751: Type alias Span changed from Range<usize> to Range<u64>.

v0.33.0

Compare Source

New Features
  • #​758: Implemented From<QName> for BytesStart and BytesEnd.
Bug Fixes
  • #​755: Fix incorrect missing of trimming all-space text events when
    trim_text_start = false and trim_text_end = true.
Misc Changes
  • #​650: Change the type of Event::PI to a new dedicated BytesPI type.
  • #​759: Make const as much functions as possible:
    • resolve_html5_entity()
    • resolve_predefined_entity()
    • resolve_xml_entity()
    • Attr::key()
    • Attr::value()
    • Attributes::html()
    • Attributes::new()
    • BytesDecl::from_start()
    • Decoder::encoding()
    • Deserializer::get_ref()
    • IoReader::get_ref()
    • LocalName::into_inner()
    • Namespace::into_inner()
    • NsReader::config()
    • NsReader::prefixes()
    • Prefix::into_inner()
    • QName::into_inner()
    • Reader::buffer_position()
    • Reader::config()
    • Reader::decoder()
    • Reader::error_position()
    • Reader::get_ref()
    • SliceReader::get_ref()
    • Writer::get_ref()
    • Writer::new()
  • #​763: Hide quick_xml::escape::resolve_html5_entity under escape-html feature again.
    This function has significant influence to the compilation time (10+ seconds or 5x times)

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

This PR has been generated by Mend Renovate. View repository job log here.

Copy link
Contributor Author

renovate bot commented Jun 29, 2024

⚠️ 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: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path Cargo.toml --package [email protected] --precise 0.35.0
    Updating crates.io index
error: failed to select a version for the requirement `quick-xml = "^0.31.0"`
candidate versions found which didn't match: 0.35.0
location searched: crates.io index
required by package `object_store v0.10.1`
    ... which satisfies dependency `object_store = "=0.10.1"` (locked to 0.10.1) of package `crates_io v0.0.0 (/tmp/renovate/repos/github/rust-lang/crates.io)`
perhaps a crate was updated and forgotten to be re-vendored?

Copy link

codecov bot commented Jun 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.99%. Comparing base (21258e7) to head (02c58f6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8952   +/-   ##
=======================================
  Coverage   88.99%   88.99%           
=======================================
  Files         277      277           
  Lines       27841    27841           
=======================================
+ Hits        24776    24777    +1     
+ Misses       3065     3064    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Turbo87 Turbo87 force-pushed the renovate/quick-xml-0.x branch from 02c58f6 to af79e19 Compare July 3, 2024 10:24
@Turbo87 Turbo87 enabled auto-merge (squash) July 3, 2024 10:25
Copy link
Contributor Author

renovate bot commented Jul 3, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@Turbo87 Turbo87 merged commit 5fff6f6 into main Jul 3, 2024
7 checks passed
@Turbo87 Turbo87 deleted the renovate/quick-xml-0.x branch July 3, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant