Description: use older minor version of crate quick-xml
 This essentially reverts upstream git commit 6cdffd8.
Author: Jonas Smedegaard <dr@jones.dk>
Bug-Debian: https://bugs.debian.org/1086507
Forwarded: not-needed
Last-Update: 2025-08-28
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -61,7 +61,7 @@
 pkg-config = "0.3.25"
 predicates = ">=2.0, <4.0"
 pyo3 = "0.26"
-quick-xml = "0.37"
+quick-xml = "0.36.1"
 rand = "0.9"
 rayon = "1.8.1"
 rayon-core = "1.12.1"
--- a/lib/oxrdfxml/src/error.rs
+++ b/lib/oxrdfxml/src/error.rs
@@ -1,7 +1,5 @@
 use oxilangtag::LanguageTagParseError;
 use oxiri::IriParseError;
-use quick_xml::encoding::EncodingError;
-use quick_xml::events::attributes::AttrError;
 use std::io;
 use std::sync::Arc;
 
@@ -39,20 +37,6 @@
     }
 }
 
-#[doc(hidden)]
-impl From<EncodingError> for RdfXmlParseError {
-    fn from(error: EncodingError) -> Self {
-        quick_xml::Error::from(error).into()
-    }
-}
-
-#[doc(hidden)]
-impl From<AttrError> for RdfXmlParseError {
-    fn from(error: AttrError) -> Self {
-        quick_xml::Error::from(error).into()
-    }
-}
-
 /// An error in the syntax of the parsed file.
 #[derive(Debug, thiserror::Error)]
 #[error(transparent)]
--- a/lib/oxrdfxml/src/serializer.rs
+++ b/lib/oxrdfxml/src/serializer.rs
@@ -8,7 +8,6 @@
 use std::collections::BTreeMap;
 use std::io;
 use std::io::Write;
-#[cfg(feature = "async-tokio")]
 use std::sync::Arc;
 #[cfg(feature = "async-tokio")]
 use tokio::io::AsyncWrite;
@@ -246,7 +245,7 @@
 
     fn flush_buffer(&mut self, buffer: &mut Vec<Event<'_>>) -> io::Result<()> {
         for event in buffer.drain(0..) {
-            self.writer.write_event(event)?;
+            self.writer.write_event(event).map_err(map_err)?;
         }
         Ok(())
     }
@@ -384,7 +383,7 @@
             )]
             match triple.subject {
                 NamedOrBlankNodeRef::NamedNode(node) => description_open
-                    .push_attribute(("rdf:about", relative_iri(node.as_str(), &self.base_iri))),
+                    .push_attribute(("rdf:about", relative_iri(node.as_str(), &self.base_iri).as_ref())),
                 NamedOrBlankNodeRef::BlankNode(node) => {
                     description_open.push_attribute(("rdf:nodeID", node.as_str()))
                 }
@@ -420,7 +419,7 @@
         let content = match triple.object {
             TermRef::NamedNode(node) => {
                 property_open
-                    .push_attribute(("rdf:resource", relative_iri(node.as_str(), &self.base_iri)));
+                    .push_attribute(("rdf:resource", relative_iri(node.as_str(), &self.base_iri).as_ref()));
                 None
             }
             TermRef::BlankNode(node) => {
@@ -433,7 +432,7 @@
                 } else if literal.datatype() != xsd::STRING {
                     property_open.push_attribute((
                         "rdf:datatype",
-                        relative_iri(literal.datatype().as_str(), &self.base_iri),
+                        relative_iri(literal.datatype().as_str(), &self.base_iri).as_ref(),
                     ));
                 }
                 Some(literal.value())
@@ -516,7 +515,6 @@
     }
 }
 
-#[cfg(feature = "async-tokio")]
 fn map_err(error: quick_xml::Error) -> io::Error {
     if let quick_xml::Error::Io(error) = error {
         Arc::try_unwrap(error).unwrap_or_else(|error| io::Error::new(error.kind(), error))
--- a/lib/sparesults/src/error.rs
+++ b/lib/sparesults/src/error.rs
@@ -1,6 +1,5 @@
 use json_event_parser::{JsonParseError, JsonSyntaxError};
 use oxrdf::TermParseError;
-use quick_xml::encoding::EncodingError;
 use std::io;
 use std::ops::Range;
 use std::sync::Arc;
@@ -156,13 +155,6 @@
     }
 }
 
-#[doc(hidden)]
-impl From<EncodingError> for QueryResultsParseError {
-    fn from(error: EncodingError) -> Self {
-        quick_xml::Error::from(error).into()
-    }
-}
-
 /// A position in a text i.e. a `line` number starting from 0, a `column` number starting from 0 (in number of code points) and a global file `offset` starting from 0 (in number of bytes).
 #[derive(Eq, PartialEq, Debug, Clone, Copy)]
 pub struct TextPosition {
--- a/lib/sparesults/src/xml.rs
+++ b/lib/sparesults/src/xml.rs
@@ -13,7 +13,6 @@
 use std::collections::HashMap;
 use std::io::{self, BufReader, Read, Write};
 use std::mem::take;
-#[cfg(feature = "async-tokio")]
 use std::sync::Arc;
 #[cfg(feature = "async-tokio")]
 use tokio::io::{AsyncRead, AsyncWrite, BufReader as AsyncBufReader};
@@ -21,7 +20,7 @@
 pub fn write_boolean_xml_result<W: Write>(writer: W, value: bool) -> io::Result<W> {
     let mut writer = Writer::new(writer);
     for event in inner_write_boolean_xml_result(value) {
-        writer.write_event(event)?;
+        writer.write_event(event).map_err(map_xml_error)?;
     }
     Ok(writer.into_inner())
 }
@@ -89,7 +88,7 @@
 
     fn do_write(writer: &mut Writer<W>, output: Vec<Event<'_>>) -> io::Result<()> {
         for event in output {
-            writer.write_event(event)?;
+            writer.write_event(event).map_err(map_xml_error)?;
         }
         Ok(())
     }
@@ -1025,7 +1024,6 @@
     output.into()
 }
 
-#[cfg(feature = "async-tokio")]
 fn map_xml_error(error: Error) -> io::Error {
     match error {
         Error::Io(error) => {
--- a/lints/test_debian_compatibility.py
+++ b/lints/test_debian_compatibility.py
@@ -12,7 +12,6 @@
     "rustc-hash",
     "geo",
     "wkt",
-    "quick-xml",
     "getrandom",
     "rand",
 }
