Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pycrdt for openSUSE:Factory checked in at 2025-07-14 10:52:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pycrdt (Old) and /work/SRC/openSUSE:Factory/.python-pycrdt.new.7373 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pycrdt" Mon Jul 14 10:52:16 2025 rev:11 rq:1292509 version:0.12.25 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pycrdt/python-pycrdt.changes 2025-07-03 12:12:46.331464296 +0200 +++ /work/SRC/openSUSE:Factory/.python-pycrdt.new.7373/python-pycrdt.changes 2025-07-14 10:58:03.952459760 +0200 @@ -1,0 +2,8 @@ +Sun Jul 13 13:27:43 UTC 2025 - Ben Greiner <c...@bnavigator.de> + +- Update to 0.12.25 + * Allow XML attributes to be of any type. + * Upgrade `yrs` to v0.24.0. +- Bump trio test requirement gh#y-crdt/pycrdt#277 + +------------------------------------------------------------------- Old: ---- pycrdt-0.12.23.tar.xz New: ---- pycrdt-0.12.25.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pycrdt.spec ++++++ --- /var/tmp/diff_new_pack.USwJo0/_old 2025-07-14 10:58:04.836496407 +0200 +++ /var/tmp/diff_new_pack.USwJo0/_new 2025-07-14 10:58:04.836496407 +0200 @@ -17,7 +17,7 @@ Name: python-pycrdt -Version: 0.12.23 +Version: 0.12.25 Release: 0 Summary: Python bindings for Yrs License: MIT @@ -38,7 +38,7 @@ BuildRequires: %{python_module anyio >= 4.4.0 with %python-anyio < 5} BuildRequires: %{python_module exceptiongroup if %python-base < 3.11} BuildRequires: %{python_module importlib-metadata >= 3.6 if %python-base < 3.10} -BuildRequires: %{python_module trio >= 0.25.1 with %python-trio < 0.30} +BuildRequires: %{python_module trio >= 0.25.1 with %python-trio < 0.31} BuildRequires: %{python_module typing_extensions >= 4.14.0 if %python-base < 3.11} # /SECTION %python_subpackages ++++++ pycrdt-0.12.23.tar.xz -> pycrdt-0.12.25.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pycrdt-0.12.23/CHANGELOG.md new/pycrdt-0.12.25/CHANGELOG.md --- old/pycrdt-0.12.23/CHANGELOG.md 2025-06-28 11:45:32.000000000 +0200 +++ new/pycrdt-0.12.25/CHANGELOG.md 2025-07-09 14:57:07.000000000 +0200 @@ -1,5 +1,13 @@ # Version history +## 0.12.25 + +- Allow XML attributes to be of any type. + +## 0.12.24 + +- Upgrade `yrs` to v0.24.0. + ## 0.12.23 - Support sticky index. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pycrdt-0.12.23/Cargo.toml new/pycrdt-0.12.25/Cargo.toml --- old/pycrdt-0.12.23/Cargo.toml 2025-06-28 11:45:32.000000000 +0200 +++ new/pycrdt-0.12.25/Cargo.toml 2025-07-09 14:57:07.000000000 +0200 @@ -1,6 +1,6 @@ [package] name = "pycrdt" -version = "0.12.23" +version = "0.12.25" edition = "2021" [lib] @@ -9,7 +9,7 @@ [dependencies] serde_json = "1.0.140" -yrs = "0.23.5" +yrs = "0.24.0" [dependencies.pyo3] version = "0.25.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pycrdt-0.12.23/src/xml.rs new/pycrdt-0.12.25/src/xml.rs --- old/pycrdt-0.12.23/src/xml.rs 2025-06-28 11:45:32.000000000 +0200 +++ new/pycrdt-0.12.25/src/xml.rs 2025-07-09 14:57:07.000000000 +0200 @@ -79,24 +79,27 @@ )? $( - fn attributes(&self, txn: &mut Transaction) -> Vec<(String, String)> { + fn attributes<'py>(&self, py: Python<'py>, txn: &mut Transaction) -> Vec<(String, Bound<'py, PyAny>)> { let mut t0 = txn.transaction(); let t1 = t0.as_mut().unwrap(); let t = t1.as_ref(); - self.$xinner.attributes(t).map(|(k,v)| (String::from(k), v)).collect() + self.$xinner + .attributes(t) + .map(|(k, v)| (String::from(k), v.into_py(py))) + .collect() } - fn attribute(&self, txn: &mut Transaction, name: &str) -> Option<String> { + fn attribute<'py>(&self, py: Python<'py>, txn: &mut Transaction, name: &str) -> Option<Bound<'py, PyAny>> { let mut t0 = txn.transaction(); let t1 = t0.as_mut().unwrap(); let t = t1.as_ref(); - self.$xinner.get_attribute(t, name) + Some(self.$xinner.get_attribute(t, name)?.into_py(py)) } - - fn insert_attribute(&self, txn: &mut Transaction, name: &str, value: &str) { + + fn insert_attribute(&self, txn: &mut Transaction, name: &str, value: Bound<'_, PyAny>) { let mut _t = txn.transaction(); let mut t = _t.as_mut().unwrap().as_mut(); - self.$xinner.insert_attribute(&mut t, name, value); + self.$xinner.insert_attribute(&mut t, name, py_to_any(&value)); } fn remove_attribute(&self, txn: &mut Transaction, name: &str) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pycrdt-0.12.23/tests/test_xml.py new/pycrdt-0.12.25/tests/test_xml.py --- old/pycrdt-0.12.23/tests/test_xml.py 2025-06-28 11:45:32.000000000 +0200 +++ new/pycrdt-0.12.25/tests/test_xml.py 2025-07-09 14:57:07.000000000 +0200 @@ -151,6 +151,18 @@ doc["test2"] = XmlFragment([XmlText()]) +def test_element_with_any_attribute(): + doc = Doc() + + doc["test"] = frag = XmlFragment() + el = XmlElement("div") + frag.children.append(el) + el.attributes["class"] = {"a": True} + assert el.attributes["class"] == {"a": True} + assert list(el.attributes) == [("class", {"a": True})] + assert len(el.attributes) == 1 + + def test_element(): doc = Doc() ++++++ pycrdt.obsinfo ++++++ --- /var/tmp/diff_new_pack.USwJo0/_old 2025-07-14 10:58:04.996503041 +0200 +++ /var/tmp/diff_new_pack.USwJo0/_new 2025-07-14 10:58:05.000503207 +0200 @@ -1,5 +1,5 @@ name: pycrdt -version: 0.12.23 -mtime: 1751103932 -commit: f90ce75164a6f76e8935ccc7fbb8e24b0b826caf +version: 0.12.25 +mtime: 1752065827 +commit: 9ca34f49574bb056655e0cb459fb9f0135e07be4 ++++++ vendor.tar.xz ++++++ /work/SRC/openSUSE:Factory/python-pycrdt/vendor.tar.xz /work/SRC/openSUSE:Factory/.python-pycrdt.new.7373/vendor.tar.xz differ: char 15, line 1