1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
|
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-31
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -60,7 +60,7 @@
pkg-config = "0.3.25"
predicates = ">=2.0, <4.0"
pyo3 = "0.25"
-quick-xml = "0.37"
+quick-xml = "0.36.1"
rand = "0.8"
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;
@@ -248,7 +247,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(())
}
@@ -382,7 +381,7 @@
#[allow(clippy::match_wildcard_for_single_variants, unreachable_patterns)]
match triple.subject {
SubjectRef::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())),
SubjectRef::BlankNode(node) => {
description_open.push_attribute(("rdf:nodeID", node.as_str()))
}
@@ -414,7 +413,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) => {
@@ -427,7 +426,7 @@
} else if !literal.is_plain() {
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())
@@ -510,7 +509,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
@@ -11,7 +11,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};
@@ -19,7 +18,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())
}
@@ -87,7 +86,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(())
}
@@ -955,7 +954,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,8 +12,7 @@
"oxhttp",
"rustc-hash",
"geo",
- "wkt",
- "quick-xml"
+ "wkt"
}
base_path = Path(__file__).parent.parent
|