openSUSE Commits
Threads by month
- ----- 2024 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
October 2024
- 1 participants
- 1410 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package busybox-links for openSUSE:Factory checked in at 2024-10-04 17:08:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/busybox-links (Old)
and /work/SRC/openSUSE:Factory/.busybox-links.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "busybox-links"
Fri Oct 4 17:08:42 2024 rev:33 rq:1205683 version:MACRO
Changes:
--------
--- /work/SRC/openSUSE:Factory/busybox-links/busybox-links.changes 2024-02-23 16:40:46.553433254 +0100
+++ /work/SRC/openSUSE:Factory/.busybox-links.new.19354/busybox-links.changes 2024-10-04 17:08:45.992381397 +0200
@@ -1,0 +2,13 @@
+Fri Oct 4 08:39:05 UTC 2024 - Thorsten Kukuk <kukuk(a)suse.com>
+
+- Partly revert changes from Aug 8th 2023 to automatically detect
+ changes in busybox configuration
+- Add getfattr applet to attr filelist
+
+-------------------------------------------------------------------
+Thu Oct 3 14:00:49 UTC 2024 - Dominique Leuenberger <dimstar(a)opensuse.org>
+
+- BuildRequire busybox: as we want to track the version of busybox,
+ we need to ensure busybox is part of the buildroot.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ busybox-links.spec ++++++
--- /var/tmp/diff_new_pack.dfQ6ue/_old 2024-10-04 17:08:51.000590614 +0200
+++ /var/tmp/diff_new_pack.dfQ6ue/_new 2024-10-04 17:08:51.012591115 +0200
@@ -85,6 +85,7 @@
# out ouf WORKDIR into the package directory
Source98: create-filelists.sh
Source99: Dockerfile
+BuildRequires: busybox
Requires: busybox = %{version}
Requires: busybox-adduser = %{version}
Requires: busybox-attr = %{version}
@@ -611,15 +612,17 @@
%build
%if 0%{?suse_version} < 1550
echo "/bin/sh" >> filelist-sh.txt
-echo -e "/sbin/loadkmap" >> filelist-kbd.txt
%endif
-cat filelist-*.txt | sort -u > filelist.txt
-
%install
-mkdir -p %{buildroot}%{_bindir}
bash %{_sourcedir}/busybox.install %{buildroot} --symlinks
-rm %{buildroot}%{_bindir}/busybox
+rm %{buildroot}/bin/busybox %{buildroot}%{_bindir}/[[
+# Move files to correct directories
+mv %{buildroot}%{_sbindir}/{arping,chroot,ifconfig,route,setfont,setlogcons} %{buildroot}%{_bindir}/
+mv %{buildroot}%{_bindir}/{traceroute,traceroute6} %{buildroot}%{_sbindir}/
+ln -sf %{_sbindir}/lsmod %{buildroot}%{_bindir}/lsmod
+ln -sf %{_sbindir}/ip %{buildroot}%{_bindir}/ip
+ln -sf %{_sbindir}/sestatus %{buildroot}%{_bindir}/sestatus
ln -sf %{_bindir}/busybox %{buildroot}%{_bindir}/sh
%if 0%{?suse_version} < 1550
ln -sf %{_bindir}/sh %{buildroot}/bin/sh
++++++ busybox.install ++++++
--- /var/tmp/diff_new_pack.dfQ6ue/_old 2024-10-04 17:08:51.208599304 +0200
+++ /var/tmp/diff_new_pack.dfQ6ue/_new 2024-10-04 17:08:51.212599471 +0200
@@ -15,7 +15,7 @@
# Source the configuration
#. ./.config
-h=`sort filelist.txt | uniq`
+h=`sort /usr/share/busybox/busybox.links | uniq`
sharedlib_dir="0_lib"
@@ -60,8 +60,8 @@
done
fi
-if [ x"$cleanup" = x"1" ] && [ -e "$prefix/usr/bin/busybox" ]; then
- inode=`ls -i "$prefix/usr/bin/busybox" | awk '{print $1}'`
+if [ x"$cleanup" = x"1" ] && [ -e "$prefix/bin/busybox" ]; then
+ inode=`ls -i "$prefix/bin/busybox" | awk '{print $1}'`
sub_shell_it=`
cd "$prefix"
for d in usr/sbin usr/bin sbin bin; do
@@ -76,9 +76,9 @@
exit 0
fi
-rm -f "$prefix/usr/bin/busybox" || exit 1
+rm -f "$prefix/bin/busybox" || exit 1
mkdir -p "$prefix/bin" || exit 1
-install -m 755 /usr/bin/busybox "$prefix/usr/bin/busybox" || exit 1
+install -m 755 /usr/bin/busybox "$prefix/bin/busybox" || exit 1
for i in $h; do
appdir=`dirname "$i"`
@@ -93,7 +93,7 @@
ln $linkopts busybox "$prefix/$i" || exit 1
else
rm -f "$prefix/$i"
- echo "../usr/bin/busybox" >"$prefix/$i"
+ echo "#!/bin/busybox" >"$prefix/$i"
chmod +x "$prefix/$i"
fi
echo " $prefix/$i"
@@ -108,19 +108,16 @@
fi
else
if [ x"$linkopts" = x"-f" ]; then
- bb_path="$prefix/usr/bin/busybox"
+ bb_path="$prefix/bin/busybox"
else
case "$appdir" in
/)
- bb_path="../usr/bin/busybox"
+ bb_path="usr/bin/busybox"
;;
- /bin)
- bb_path="../usr/bin/busybox"
- ;;
- /sbin)
- bb_path="../usr/bin/busybox"
+ /bin | /usr/bin)
+ bb_path="../bin/busybox"
;;
- /usr/bin | /usr/sbin)
+ /sbin | /usr/sbin)
bb_path="../bin/busybox"
;;
*)
++++++ filelist-attr.txt ++++++
--- /var/tmp/diff_new_pack.dfQ6ue/_old 2024-10-04 17:08:51.248600975 +0200
+++ /var/tmp/diff_new_pack.dfQ6ue/_new 2024-10-04 17:08:51.256601309 +0200
@@ -1,2 +1,3 @@
+/usr/bin/getfattr
/usr/bin/setfattr
++++++ filelist-kbd.txt ++++++
--- /var/tmp/diff_new_pack.dfQ6ue/_old 2024-10-04 17:08:51.508611837 +0200
+++ /var/tmp/diff_new_pack.dfQ6ue/_new 2024-10-04 17:08:51.512612004 +0200
@@ -7,4 +7,5 @@
/usr/bin/showkey
/usr/bin/vlock
/usr/sbin/loadfont
+/usr/sbin/loadkmap
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package apparmor-rpm-macros for openSUSE:Factory checked in at 2024-10-04 17:08:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apparmor-rpm-macros (Old)
and /work/SRC/openSUSE:Factory/.apparmor-rpm-macros.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "apparmor-rpm-macros"
Fri Oct 4 17:08:39 2024 rev:9 rq:1205548 version:1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/apparmor-rpm-macros/apparmor-rpm-macros.changes 2024-02-21 17:54:46.491739269 +0100
+++ /work/SRC/openSUSE:Factory/.apparmor-rpm-macros.new.19354/apparmor-rpm-macros.changes 2024-10-04 17:08:45.144345971 +0200
@@ -1,0 +2,5 @@
+Thu Oct 3 09:28:40 UTC 2024 - Georg Pfuetzenreuter <mail+rpm(a)georg-pfuetzenreuter.net>
+
+- Add %apparmor_profilesdir
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ macros.apparmor ++++++
--- /var/tmp/diff_new_pack.1LLx9q/_old 2024-10-04 17:08:45.808373711 +0200
+++ /var/tmp/diff_new_pack.1LLx9q/_new 2024-10-04 17:08:45.812373877 +0200
@@ -1,3 +1,5 @@
+%apparmor_profilesdir %{_sysconfdir}/apparmor.d
+
%apparmor_reload()\
if [ "$YAST_IS_RUNNING" != "instsys" -a -x /usr/bin/systemd-detect-virt -a -x /usr/bin/systemctl ]; then\
systemd-detect-virt --chroot --quiet \
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package saxon10 for openSUSE:Factory checked in at 2024-10-04 17:08:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/saxon10 (Old)
and /work/SRC/openSUSE:Factory/.saxon10.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "saxon10"
Fri Oct 4 17:08:35 2024 rev:3 rq:1205529 version:10.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/saxon10/saxon10.changes 2023-09-29 21:13:06.852753626 +0200
+++ /work/SRC/openSUSE:Factory/.saxon10.new.19354/saxon10.changes 2024-10-04 17:08:41.756204432 +0200
@@ -1,0 +2,5 @@
+Thu Oct 3 13:18:50 UTC 2024 - Fridrich Strba <fstrba(a)suse.com>
+
+- Adapt the scripts to run also with javapackages-tools >= 6.3
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ saxon10.spec ++++++
--- /var/tmp/diff_new_pack.MBs4pg/_old 2024-10-04 17:08:42.956254564 +0200
+++ /var/tmp/diff_new_pack.MBs4pg/_new 2024-10-04 17:08:42.960254731 +0200
@@ -1,7 +1,7 @@
#
-# spec file
+# spec file for package saxon10
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -57,7 +57,7 @@
BuildRequires: xml-commons-resolver
BuildRequires: xom
Requires(post): update-alternatives
-Requires(postun):update-alternatives
+Requires(postun): update-alternatives
Recommends: %{name}-scripts
Provides: jaxp_transform_impl = %{version}
BuildArch: noarch
++++++ saxon10.gizmo.script ++++++
--- /var/tmp/diff_new_pack.MBs4pg/_old 2024-10-04 17:08:43.036257906 +0200
+++ /var/tmp/diff_new_pack.MBs4pg/_new 2024-10-04 17:08:43.040258074 +0200
@@ -3,6 +3,9 @@
# gizmo10 script
# JPackage Project <http://www.jpackage.org/>
+# Set default JAVA_HOME
+export JAVA_HOME="${JAVA_HOME:-%{?java_home}}"
+
. /usr/share/java-utils/java-functions
MAIN_CLASS=net.sf.saxon.Gizmo
++++++ saxon10.saxon.script ++++++
--- /var/tmp/diff_new_pack.MBs4pg/_old 2024-10-04 17:08:43.068259243 +0200
+++ /var/tmp/diff_new_pack.MBs4pg/_new 2024-10-04 17:08:43.072259410 +0200
@@ -3,6 +3,9 @@
# saxon10 script
# JPackage Project <http://www.jpackage.org/>
+# Set default JAVA_HOME
+export JAVA_HOME="${JAVA_HOME:-%{?java_home}}"
+
. /usr/share/java-utils/java-functions
MAIN_CLASS=net.sf.saxon.Transform
++++++ saxon10.saxonq.script ++++++
--- /var/tmp/diff_new_pack.MBs4pg/_old 2024-10-04 17:08:43.104260747 +0200
+++ /var/tmp/diff_new_pack.MBs4pg/_new 2024-10-04 17:08:43.104260747 +0200
@@ -3,6 +3,9 @@
# saxon10q script
# JPackage Project <http://www.jpackage.org/>
+# Set default JAVA_HOME
+export JAVA_HOME="${JAVA_HOME:-%{?java_home}}"
+
. /usr/share/java-utils/java-functions
MAIN_CLASS=net.sf.saxon.Query
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package xmlgraphics-fop for openSUSE:Factory checked in at 2024-10-04 17:08:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xmlgraphics-fop (Old)
and /work/SRC/openSUSE:Factory/.xmlgraphics-fop.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xmlgraphics-fop"
Fri Oct 4 17:08:32 2024 rev:51 rq:1205393 version:2.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/xmlgraphics-fop/xmlgraphics-fop.changes 2024-02-21 17:52:26.614676512 +0100
+++ /work/SRC/openSUSE:Factory/.xmlgraphics-fop.new.19354/xmlgraphics-fop.changes 2024-10-04 17:08:39.772121542 +0200
@@ -1,0 +2,5 @@
+Thu Oct 3 10:53:25 UTC 2024 - Fridrich Strba <fstrba(a)suse.com>
+
+- Adapt the scripts to the new javapackages-tools version
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xmlgraphics-fop-fontlist.script ++++++
--- /var/tmp/diff_new_pack.OoxNoo/_old 2024-10-04 17:08:40.880167833 +0200
+++ /var/tmp/diff_new_pack.OoxNoo/_new 2024-10-04 17:08:40.888168167 +0200
@@ -1,5 +1,8 @@
#!/bin/bash
+# Set default JAVA_HOME
+export JAVA_HOME="${JAVA_HOME:-%{?java_home}}"
+
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
. /usr/share/java-utils/java-functions
++++++ xmlgraphics-fop-fontmetrics.script ++++++
--- /var/tmp/diff_new_pack.OoxNoo/_old 2024-10-04 17:08:40.912169171 +0200
+++ /var/tmp/diff_new_pack.OoxNoo/_new 2024-10-04 17:08:40.916169337 +0200
@@ -1,5 +1,8 @@
#!/bin/bash
+# Set default JAVA_HOME
+export JAVA_HOME="${JAVA_HOME:-%{?java_home}}"
+
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
. /usr/share/java-utils/java-functions
++++++ xmlgraphics-fop.script ++++++
--- /var/tmp/diff_new_pack.OoxNoo/_old 2024-10-04 17:08:40.944170508 +0200
+++ /var/tmp/diff_new_pack.OoxNoo/_new 2024-10-04 17:08:40.948170674 +0200
@@ -4,6 +4,9 @@
# JPackage Project <http://www.jpackage.org/>
# $Id$
+# Set default JAVA_HOME
+export JAVA_HOME="${JAVA_HOME:-%{?java_home}}"
+
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
. /usr/share/java-utils/java-functions
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-lark for openSUSE:Factory checked in at 2024-10-04 17:08:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-lark (Old)
and /work/SRC/openSUSE:Factory/.python-lark.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-lark"
Fri Oct 4 17:08:27 2024 rev:9 rq:1205380 version:1.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-lark/python-lark.changes 2024-01-15 22:11:00.316794908 +0100
+++ /work/SRC/openSUSE:Factory/.python-lark.new.19354/python-lark.changes 2024-10-04 17:08:33.983879725 +0200
@@ -1,0 +2,25 @@
+Thu Oct 3 08:30:59 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 1.2.2:
+ * Bugfix: Earley now respects ambiguity='resolve' again.
+- update to 1.2.1:
+ * Dropped support for Python versions lower than 3.8
+ * Several bugfixes in the Earley algorithm, related to
+ suppressed ambiguities
+ * Improved performance in `InteractiveParser.accepts()`
+ * Give "Shaping the tree" clear sub-headings
+ * Fix for when providing a transformer with a Token
+ * Pin types-regex to a working version
+ * Add Outlines to list of projects using Lark
+ * Code coverage: Update Python version
+ * Attempt to solve performance problems in accepts()
+ * Docs: Added Indenter
+ * Clean up test_parser.py, use xFail instead of skip where
+ appropriate
+ * Update config and drop python < 3.8
+ * BUGFIX Earley: Now yielding a previously repressed ambiguity
+ * Fix SymbolNode.end for completed tokens
+ * Disable ForestToParseTree cache when ambiguity='resolve'
+ * Bugfix for issue #1434
+
+-------------------------------------------------------------------
Old:
----
lark-1.1.9.tar.gz
New:
----
lark-1.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-lark.spec ++++++
--- /var/tmp/diff_new_pack.OmrZCt/_old 2024-10-04 17:08:34.483900614 +0200
+++ /var/tmp/diff_new_pack.OmrZCt/_new 2024-10-04 17:08:34.483900614 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-lark
-Version: 1.1.9
+Version: 1.2.2
Release: 0
Summary: A parsing library for Python
License: MIT
++++++ lark-1.1.9.tar.gz -> lark-1.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/.github/workflows/codecov.yml new/lark-1.2.2/.github/workflows/codecov.yml
--- old/lark-1.1.9/.github/workflows/codecov.yml 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/.github/workflows/codecov.yml 2024-08-13 21:47:06.000000000 +0200
@@ -8,7 +8,7 @@
os: [ubuntu-latest, macos-latest, windows-latest]
env:
OS: ${{ matrix.os }}
- PYTHON: '3.7'
+ PYTHON: '3.8'
steps:
- uses: actions/checkout@v3
name: Download with submodules
@@ -17,7 +17,7 @@
- name: Setup Python
uses: actions/setup-python@v3
with:
- python-version: "3.7"
+ python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@@ -35,6 +35,6 @@
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
- fail_ci_if_error: true
+ fail_ci_if_error: false
path_to_write_report: ./coverage/codecov_report.txt
verbose: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/.github/workflows/tests.yml new/lark-1.2.2/.github/workflows/tests.yml
--- old/lark-1.1.9/.github/workflows/tests.yml 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/.github/workflows/tests.yml 2024-08-13 21:47:06.000000000 +0200
@@ -3,11 +3,10 @@
jobs:
build:
- # runs-on: ubuntu-latest
- runs-on: ubuntu-20.04 # See https://github.com/actions/setup-python/issues/544
+ runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.7"]
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev", "pypy-3.10"]
steps:
- uses: actions/checkout@v3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/README.md new/lark-1.2.2/README.md
--- old/lark-1.1.9/README.md 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/README.md 2024-08-13 21:47:06.000000000 +0200
@@ -125,7 +125,7 @@
Check out the [JSON tutorial](/docs/json_tutorial.md#conclusion) for more details on how the comparison was made.
-For a more thorough and objective comparison, checkout the [Python Parsing Benchmarks](https://github.com/goodmami/python-parsing-benchmarks) repo.
+For thorough 3rd-party benchmarks, checkout the [Python Parsing Benchmarks](https://github.com/goodmami/python-parsing-benchmarks) repo.
#### Feature comparison
@@ -164,6 +164,7 @@
- [harmalysis](https://github.com/napulen/harmalysis) - A language for harmonic analysis and music theory
- [gersemi](https://github.com/BlankSpruce/gersemi) - A CMake code formatter
- [MistQL](https://github.com/evinism/mistql) - A query language for JSON-like structures
+ - [Outlines](https://github.com/outlines-dev/outlines) - Structured generation with Large Language Models
[Full list](https://github.com/lark-parser/lark/network/dependents?package_id=UGF…
@@ -179,8 +180,8 @@
Big thanks to everyone who contributed so far:
-<a href="https://github.com/lark-parser/lark/graphs/contributors">
<img src="https://contributors-img.web.app/image?repo=lark-parser/lark" />
+<a href="https://github.com/lark-parser/lark/graphs/contributors">
</a>
## Sponsor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/docs/classes.rst new/lark-1.2.2/docs/classes.rst
--- old/lark-1.1.9/docs/classes.rst 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/docs/classes.rst 2024-08-13 21:47:06.000000000 +0200
@@ -90,3 +90,9 @@
.. autofunction:: lark.ast_utils.create_transformer
.. _/examples/advanced/create_ast.py: examples/advanced/create_ast.html
+
+Indenter
+--------
+
+.. autoclass:: lark.indenter.Indenter
+.. autoclass:: lark.indenter.PythonIndenter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/docs/parsers.md new/lark-1.2.2/docs/parsers.md
--- old/lark-1.1.9/docs/parsers.md 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/docs/parsers.md 2024-08-13 21:47:06.000000000 +0200
@@ -23,7 +23,7 @@
2) Users may choose to receive the set of all possible parse-trees (using ambiguity='explicit'), and choose the best derivation themselves. While simple and flexible, it comes at the cost of space and performance, and so it isn't recommended for highly ambiguous grammars, or very long inputs.
-3) As an advanced feature, users may use specialized visitors to iterate the SPPF themselves.
+3) As an advanced feature, users may use specialized visitors to iterate the SPPF themselves. There is also [a 3rd party utility for iterating over the SPPF](https://github.com/chanicpanic/lark-ambig-tools).
**lexer="dynamic_complete"**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/docs/tree_construction.md new/lark-1.2.2/docs/tree_construction.md
--- old/lark-1.1.9/docs/tree_construction.md 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/docs/tree_construction.md 2024-08-13 21:47:06.000000000 +0200
@@ -78,8 +78,9 @@
Users can alter the automatic construction of the tree using a collection of grammar features.
+### Inlining rules with `_`
-* Rules whose name begins with an underscore will be inlined into their containing rule.
+Rules whose name begins with an underscore will be inlined into their containing rule.
**Example:**
@@ -94,8 +95,9 @@
"hello"
"world"
+### Conditionally inlining rules with `?`
-* Rules that receive a question mark (?) at the beginning of their definition, will be inlined if they have a single child, after filtering.
+Rules that receive a question mark (?) at the beginning of their definition, will be inlined if they have a single child, after filtering.
**Example:**
@@ -113,7 +115,9 @@
"world"
"planet"
-* Rules that begin with an exclamation mark will keep all their terminals (they won't get filtered).
+### Pinning rule terminals with `!`
+
+Rules that begin with an exclamation mark will keep all their terminals (they won't get filtered).
```perl
!expr: "(" expr ")"
@@ -136,7 +140,9 @@
Using the `!` prefix is usually a "code smell", and may point to a flaw in your grammar design.
-* Aliases - options in a rule can receive an alias. It will be then used as the branch name for the option, instead of the rule name.
+### Aliasing rules
+
+Aliases - options in a rule can receive an alias. It will be then used as the branch name for the option, instead of the rule name.
**Example:**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/__init__.py new/lark-1.2.2/lark/__init__.py
--- old/lark-1.1.9/lark/__init__.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/__init__.py 2024-08-13 21:47:06.000000000 +0200
@@ -14,7 +14,7 @@
from .utils import logger
from .visitors import Discard, Transformer, Transformer_NonRecursive, Visitor, v_args
-__version__: str = "1.1.9"
+__version__: str = "1.2.2"
__all__ = (
"GrammarError",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/common.py new/lark-1.2.2/lark/common.py
--- old/lark-1.1.9/lark/common.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/common.py 2024-08-13 21:47:06.000000000 +0200
@@ -8,10 +8,7 @@
from .lexer import Lexer
from .grammar import Rule
from typing import Union, Type
- if sys.version_info >= (3, 8):
- from typing import Literal
- else:
- from typing_extensions import Literal
+ from typing import Literal
if sys.version_info >= (3, 10):
from typing import TypeAlias
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/indenter.py new/lark-1.2.2/lark/indenter.py
--- old/lark-1.1.9/lark/indenter.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/indenter.py 2024-08-13 21:47:06.000000000 +0200
@@ -13,6 +13,19 @@
pass
class Indenter(PostLex, ABC):
+ """This is a postlexer that "injects" indent/dedent tokens based on indentation.
+
+ It keeps track of the current indentation, as well as the current level of parentheses.
+ Inside parentheses, the indentation is ignored, and no indent/dedent tokens get generated.
+
+ Note: This is an abstract class. To use it, inherit and implement all its abstract methods:
+ - tab_len
+ - NL_type
+ - OPEN_PAREN_types, CLOSE_PAREN_types
+ - INDENT_type, DEDENT_type
+
+ See also: the ``postlex`` option in `Lark`.
+ """
paren_level: int
indent_level: List[int]
@@ -73,35 +86,53 @@
@property
@abstractmethod
def NL_type(self) -> str:
+ "The name of the newline token"
raise NotImplementedError()
@property
@abstractmethod
def OPEN_PAREN_types(self) -> List[str]:
+ "The names of the tokens that open a parenthesis"
raise NotImplementedError()
@property
@abstractmethod
def CLOSE_PAREN_types(self) -> List[str]:
+ """The names of the tokens that close a parenthesis
+ """
raise NotImplementedError()
@property
@abstractmethod
def INDENT_type(self) -> str:
+ """The name of the token that starts an indentation in the grammar.
+
+ See also: %declare
+ """
raise NotImplementedError()
@property
@abstractmethod
def DEDENT_type(self) -> str:
+ """The name of the token that end an indentation in the grammar.
+
+ See also: %declare
+ """
raise NotImplementedError()
@property
@abstractmethod
def tab_len(self) -> int:
+ """How many spaces does a tab equal"""
raise NotImplementedError()
class PythonIndenter(Indenter):
+ """A postlexer that "injects" _INDENT/_DEDENT tokens based on indentation, according to the Python syntax.
+
+ See also: the ``postlex`` option in `Lark`.
+ """
+
NL_type = '_NEWLINE'
OPEN_PAREN_types = ['LPAR', 'LSQB', 'LBRACE']
CLOSE_PAREN_types = ['RPAR', 'RSQB', 'RBRACE']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/lark.py new/lark-1.2.2/lark/lark.py
--- old/lark-1.1.9/lark/lark.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/lark.py 2024-08-13 21:47:06.000000000 +0200
@@ -12,14 +12,11 @@
from .parsers.lalr_interactive_parser import InteractiveParser
from .tree import ParseTree
from .visitors import Transformer
- if sys.version_info >= (3, 8):
- from typing import Literal
- else:
- from typing_extensions import Literal
+ from typing import Literal
from .parser_frontends import ParsingFrontend
from .exceptions import ConfigurationError, assert_config, UnexpectedInput
-from .utils import Serialize, SerializeMemoizer, FS, isascii, logger
+from .utils import Serialize, SerializeMemoizer, FS, logger
from .load_grammar import load_grammar, FromPackageLoader, Grammar, verify_used_files, PackageResource, sha256_digest
from .tree import Tree
from .common import LexerConf, ParserConf, _ParserArgType, _LexerArgType
@@ -303,7 +300,7 @@
if isinstance(grammar, str):
self.source_grammar = grammar
if self.options.use_bytes:
- if not isascii(grammar):
+ if not grammar.isascii():
raise ConfigurationError("Grammar must be ascii only, when use_bytes=True")
if self.options.cache:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/parsers/earley.py new/lark-1.2.2/lark/parsers/earley.py
--- old/lark-1.1.9/lark/parsers/earley.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/parsers/earley.py 2024-08-13 21:47:06.000000000 +0200
@@ -15,7 +15,7 @@
from ..lexer import Token
from ..tree import Tree
from ..exceptions import UnexpectedEOF, UnexpectedToken
-from ..utils import logger, OrderedSet
+from ..utils import logger, OrderedSet, dedup_list
from .grammar_analysis import GrammarAnalyzer
from ..grammar import NonTerminal
from .earley_common import Item
@@ -169,6 +169,7 @@
items.append(new_item)
def _parse(self, lexer, columns, to_scan, start_symbol=None):
+
def is_quasi_complete(item):
if item.is_complete:
return True
@@ -281,7 +282,7 @@
# If the parse was successful, the start
# symbol should have been completed in the last step of the Earley cycle, and will be in
# this column. Find the item for the start_symbol, which is the root of the SPPF tree.
- solutions = [n.node for n in columns[-1] if n.is_complete and n.node is not None and n.s == start_symbol and n.start == 0]
+ solutions = dedup_list(n.node for n in columns[-1] if n.is_complete and n.node is not None and n.s == start_symbol and n.start == 0)
if not solutions:
expected_terminals = [t.expect.name for t in to_scan]
raise UnexpectedEOF(expected_terminals, state=frozenset(i.s for i in to_scan))
@@ -293,16 +294,24 @@
except ImportError:
logger.warning("Cannot find dependency 'pydot', will not generate sppf debug image")
else:
- debug_walker.visit(solutions[0], "sppf.png")
-
+ for i, s in enumerate(solutions):
+ debug_walker.visit(s, f"sppf{i}.png")
- if len(solutions) > 1:
- assert False, 'Earley should not generate multiple start symbol items!'
if self.Tree is not None:
# Perform our SPPF -> AST conversion
- transformer = ForestToParseTree(self.Tree, self.callbacks, self.forest_sum_visitor and self.forest_sum_visitor(), self.resolve_ambiguity)
- return transformer.transform(solutions[0])
+ # Disable the ForestToParseTree cache when ambiguity='resolve'
+ # to prevent a tree construction bug. See issue #1283
+ use_cache = not self.resolve_ambiguity
+ transformer = ForestToParseTree(self.Tree, self.callbacks, self.forest_sum_visitor and self.forest_sum_visitor(), self.resolve_ambiguity, use_cache)
+ solutions = [transformer.transform(s) for s in solutions]
+
+ if len(solutions) > 1 and not self.resolve_ambiguity:
+ t: Tree = self.Tree('_ambig', solutions)
+ t.expand_kids_by_data('_ambig') # solutions may themselves be _ambig nodes
+ return t
+ return solutions[0]
# return the root of the SPPF
+ # TODO return a list of solutions, or join them together somehow
return solutions[0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/parsers/earley_common.py new/lark-1.2.2/lark/parsers/earley_common.py
--- old/lark-1.1.9/lark/parsers/earley_common.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/parsers/earley_common.py 2024-08-13 21:47:06.000000000 +0200
@@ -20,13 +20,13 @@
self.s = (rule, ptr)
self.expect = rule.expansion[ptr]
self.previous = rule.expansion[ptr - 1] if ptr > 0 and len(rule.expansion) else None
- self._hash = hash((self.s, self.start))
+ self._hash = hash((self.s, self.start, self.rule))
def advance(self):
return Item(self.rule, self.ptr + 1, self.start)
def __eq__(self, other):
- return self is other or (self.s == other.s and self.start == other.start)
+ return self is other or (self.s == other.s and self.start == other.start and self.rule == other.rule)
def __hash__(self):
return self._hash
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/parsers/earley_forest.py new/lark-1.2.2/lark/parsers/earley_forest.py
--- old/lark-1.1.9/lark/parsers/earley_forest.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/parsers/earley_forest.py 2024-08-13 21:47:06.000000000 +0200
@@ -38,15 +38,15 @@
Parameters:
s: A Symbol, or a tuple of (rule, ptr) for an intermediate node.
- start: The index of the start of the substring matched by this symbol (inclusive).
- end: The index of the end of the substring matched by this symbol (exclusive).
+ start: For dynamic lexers, the index of the start of the substring matched by this symbol (inclusive).
+ end: For dynamic lexers, the index of the end of the substring matched by this symbol (exclusive).
Properties:
is_intermediate: True if this node is an intermediate node.
priority: The priority of the node's symbol.
"""
Set: Type[AbstractSet] = set # Overridden by StableSymbolNode
- __slots__ = ('s', 'start', 'end', '_children', 'paths', 'paths_loaded', 'priority', 'is_intermediate', '_hash')
+ __slots__ = ('s', 'start', 'end', '_children', 'paths', 'paths_loaded', 'priority', 'is_intermediate')
def __init__(self, s, start, end):
self.s = s
self.start = start
@@ -59,7 +59,6 @@
# unlike None or float('NaN'), and sorts appropriately.
self.priority = float('-inf')
self.is_intermediate = isinstance(s, tuple)
- self._hash = hash((self.s, self.start, self.end))
def add_family(self, lr0, rule, start, left, right):
self._children.add(PackedNode(self, lr0, rule, start, left, right))
@@ -93,14 +92,6 @@
def __iter__(self):
return iter(self._children)
- def __eq__(self, other):
- if not isinstance(other, SymbolNode):
- return False
- return self is other or (type(self.s) == type(other.s) and self.s == other.s and self.start == other.start and self.end is other.end)
-
- def __hash__(self):
- return self._hash
-
def __repr__(self):
if self.is_intermediate:
rule = self.s[0]
@@ -618,9 +609,10 @@
children.append(data.left)
if data.right is not PackedData.NO_DATA:
children.append(data.right)
- if node.parent.is_intermediate:
- return self._cache.setdefault(id(node), children)
- return self._cache.setdefault(id(node), self._call_rule_func(node, children))
+ transformed = children if node.parent.is_intermediate else self._call_rule_func(node, children)
+ if self._use_cache:
+ self._cache[id(node)] = transformed
+ return transformed
def visit_symbol_node_in(self, node):
super(ForestToParseTree, self).visit_symbol_node_in(node)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/parsers/grammar_analysis.py new/lark-1.2.2/lark/parsers/grammar_analysis.py
--- old/lark-1.1.9/lark/parsers/grammar_analysis.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/parsers/grammar_analysis.py 2024-08-13 21:47:06.000000000 +0200
@@ -3,7 +3,7 @@
from collections import Counter, defaultdict
from typing import List, Dict, Iterator, FrozenSet, Set
-from ..utils import bfs, fzset, classify
+from ..utils import bfs, fzset, classify, OrderedSet
from ..exceptions import GrammarError
from ..grammar import Rule, Terminal, NonTerminal, Symbol
from ..common import ParserConf
@@ -177,13 +177,13 @@
self.FIRST, self.FOLLOW, self.NULLABLE = calculate_sets(rules)
- def expand_rule(self, source_rule: NonTerminal, rules_by_origin=None) -> State:
+ def expand_rule(self, source_rule: NonTerminal, rules_by_origin=None) -> OrderedSet[RulePtr]:
"Returns all init_ptrs accessible by rule (recursive)"
if rules_by_origin is None:
rules_by_origin = self.rules_by_origin
- init_ptrs = set()
+ init_ptrs = OrderedSet[RulePtr]()
def _expand_rule(rule: NonTerminal) -> Iterator[NonTerminal]:
assert not rule.is_term, rule
@@ -200,4 +200,4 @@
for _ in bfs([source_rule], _expand_rule):
pass
- return fzset(init_ptrs)
+ return init_ptrs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/parsers/lalr_interactive_parser.py new/lark-1.2.2/lark/parsers/lalr_interactive_parser.py
--- old/lark-1.1.9/lark/parsers/lalr_interactive_parser.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/parsers/lalr_interactive_parser.py 2024-08-13 21:47:06.000000000 +0200
@@ -6,6 +6,7 @@
from lark.exceptions import UnexpectedToken
from lark.lexer import Token, LexerThread
+from .lalr_parser_state import ParserState
###{standalone
@@ -14,7 +15,7 @@
For a simpler interface, see the ``on_error`` argument to ``Lark.parse()``.
"""
- def __init__(self, parser, parser_state, lexer_thread: LexerThread):
+ def __init__(self, parser, parser_state: ParserState, lexer_thread: LexerThread):
self.parser = parser
self.parser_state = parser_state
self.lexer_thread = lexer_thread
@@ -63,15 +64,15 @@
Calls to feed_token() won't affect the old instance, and vice-versa.
"""
+ return self.copy()
+
+ def copy(self, deepcopy_values=True):
return type(self)(
self.parser,
- copy(self.parser_state),
+ self.parser_state.copy(deepcopy_values=deepcopy_values),
copy(self.lexer_thread),
)
- def copy(self):
- return copy(self)
-
def __eq__(self, other):
if not isinstance(other, InteractiveParser):
return False
@@ -109,7 +110,7 @@
conf_no_callbacks.callbacks = {}
for t in self.choices():
if t.isupper(): # is terminal?
- new_cursor = copy(self)
+ new_cursor = self.copy(deepcopy_values=False)
new_cursor.parser_state.parse_conf = conf_no_callbacks
try:
new_cursor.feed_token(self.lexer_thread._Token(t, ''))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/parsers/lalr_parser_state.py new/lark-1.2.2/lark/parsers/lalr_parser_state.py
--- old/lark-1.1.9/lark/parsers/lalr_parser_state.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/parsers/lalr_parser_state.py 2024-08-13 21:47:06.000000000 +0200
@@ -54,16 +54,16 @@
return len(self.state_stack) == len(other.state_stack) and self.position == other.position
def __copy__(self):
+ return self.copy()
+
+ def copy(self, deepcopy_values=True) -> 'ParserState[StateT]':
return type(self)(
self.parse_conf,
self.lexer, # XXX copy
copy(self.state_stack),
- deepcopy(self.value_stack),
+ deepcopy(self.value_stack) if deepcopy_values else copy(self.value_stack),
)
- def copy(self) -> 'ParserState[StateT]':
- return copy(self)
-
def feed_token(self, token: Token, is_end=False) -> Any:
state_stack = self.state_stack
value_stack = self.value_stack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/parsers/xearley.py new/lark-1.2.2/lark/parsers/xearley.py
--- old/lark-1.1.9/lark/parsers/xearley.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/parsers/xearley.py 2024-08-13 21:47:06.000000000 +0200
@@ -104,7 +104,7 @@
token.end_pos = i + 1
new_item = item.advance()
- label = (new_item.s, new_item.start, i)
+ label = (new_item.s, new_item.start, i + 1)
token_node = TokenNode(token, terminals[token.type])
new_item.node = node_cache[label] if label in node_cache else node_cache.setdefault(label, self.SymbolNode(*label))
new_item.node.add_family(new_item.s, item.rule, new_item.start, item.node, token_node)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/tools/__init__.py new/lark-1.2.2/lark/tools/__init__.py
--- old/lark-1.1.9/lark/tools/__init__.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/tools/__init__.py 2024-08-13 21:47:06.000000000 +0200
@@ -28,9 +28,8 @@
lalr_argparser.add_argument('-v', '--verbose', action='count', default=0, help="Increase Logger output level, up to three times")
lalr_argparser.add_argument('-s', '--start', action='append', default=[])
lalr_argparser.add_argument('-l', '--lexer', default='contextual', choices=('basic', 'contextual'))
-encoding: Optional[str] = 'utf-8' if sys.version_info > (3, 4) else None
-lalr_argparser.add_argument('-o', '--out', type=FileType('w', encoding=encoding), default=sys.stdout, help='the output file (default=stdout)')
-lalr_argparser.add_argument('grammar_file', type=FileType('r', encoding=encoding), help='A valid .lark file')
+lalr_argparser.add_argument('-o', '--out', type=FileType('w', encoding='utf-8'), default=sys.stdout, help='the output file (default=stdout)')
+lalr_argparser.add_argument('grammar_file', type=FileType('r', encoding='utf-8'), help='A valid .lark file')
for flag in flags:
if isinstance(flag, tuple):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/tree.py new/lark-1.2.2/lark/tree.py
--- old/lark-1.1.9/lark/tree.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/tree.py 2024-08-13 21:47:06.000000000 +0200
@@ -9,13 +9,9 @@
import rich
except ImportError:
pass
- if sys.version_info >= (3, 8):
- from typing import Literal
- else:
- from typing_extensions import Literal
+ from typing import Literal
###{standalone
-from collections import OrderedDict
class Meta:
@@ -140,11 +136,10 @@
Iterates over all the subtrees, never returning to the same node twice (Lark's parse-tree is actually a DAG).
"""
queue = [self]
- subtrees = OrderedDict()
+ subtrees = dict()
for subtree in queue:
subtrees[id(subtree)] = subtree
- # Reason for type ignore https://github.com/python/mypy/issues/10999
- queue += [c for c in reversed(subtree.children) # type: ignore[misc]
+ queue += [c for c in reversed(subtree.children)
if isinstance(c, Tree) and id(c) not in subtrees]
del queue
@@ -242,7 +237,7 @@
possible attributes, see https://www.graphviz.org/doc/info/attrs.html.
"""
- import pydot # type: ignore[import]
+ import pydot # type: ignore[import-not-found]
graph = pydot.Dot(graph_type='digraph', rankdir=rankdir, **kwargs)
i = [0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/utils.py new/lark-1.2.2/lark/utils.py
--- old/lark-1.1.9/lark/utils.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/utils.py 2024-08-13 21:47:06.000000000 +0200
@@ -68,7 +68,7 @@
res = {f: _serialize(getattr(self, f), memo) for f in fields}
res['__type__'] = type(self).__name__
if hasattr(self, '_serialize'):
- self._serialize(res, memo) # type: ignore[attr-defined]
+ self._serialize(res, memo)
return res
@classmethod
@@ -89,7 +89,7 @@
raise KeyError("Cannot find key for class", cls, e)
if hasattr(inst, '_deserialize'):
- inst._deserialize() # type: ignore[attr-defined]
+ inst._deserialize()
return inst
@@ -141,7 +141,7 @@
regexp_final = expr
try:
# Fixed in next version (past 0.960) of typeshed
- return [int(x) for x in sre_parse.parse(regexp_final).getwidth()] # type: ignore[attr-defined]
+ return [int(x) for x in sre_parse.parse(regexp_final).getwidth()]
except sre_constants.error:
if not _has_regex:
raise ValueError(expr)
@@ -188,11 +188,7 @@
"""Given a list (l) will removing duplicates from the list,
preserving the original order of the list. Assumes that
the list entries are hashable."""
- dedup = set()
- # This returns None, but that's expected
- return [x for x in l if not (x in dedup or dedup.add(x))] # type: ignore[func-returns-value]
- # 2x faster (ordered in PyPy and CPython 3.6+, guaranteed to be ordered in Python 3.7+)
- # return list(dict.fromkeys(l))
+ return list(dict.fromkeys(l))
class Enumerator(Serialize):
@@ -234,8 +230,7 @@
return list(product(*lists))
try:
- # atomicwrites doesn't have type bindings
- import atomicwrites # type: ignore[import]
+ import atomicwrites
_has_atomicwrites = True
except ImportError:
_has_atomicwrites = False
@@ -251,19 +246,6 @@
return open(name, mode, **kwargs)
-
-def isascii(s: str) -> bool:
- """ str.isascii only exists in python3.7+ """
- if sys.version_info >= (3, 7):
- return s.isascii()
- else:
- try:
- s.encode('ascii')
- return True
- except (UnicodeDecodeError, UnicodeEncodeError):
- return False
-
-
class fzset(frozenset):
def __repr__(self):
return '{%s}' % ', '.join(map(repr, self))
@@ -359,3 +341,6 @@
def __len__(self) -> int:
return len(self.d)
+
+ def __repr__(self):
+ return f"{type(self).__name__}({', '.join(map(repr,self))})"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/lark/visitors.py new/lark-1.2.2/lark/visitors.py
--- old/lark-1.1.9/lark/visitors.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/lark/visitors.py 2024-08-13 21:47:06.000000000 +0200
@@ -158,7 +158,11 @@
def transform(self, tree: Tree[_Leaf_T]) -> _Return_T:
"Transform the given tree, and return the final result"
- return self._transform_tree(tree)
+ res = list(self._transform_children([tree]))
+ if not res:
+ return None # type: ignore[return-value]
+ assert len(res) == 1
+ return res[0]
def __mul__(
self: 'Transformer[_Leaf_T, Tree[_Leaf_U]]',
@@ -470,8 +474,7 @@
def __init__(self, func: Callable, visit_wrapper: Callable[[Callable, str, list, Any], Any]):
if isinstance(func, _VArgsWrapper):
func = func.base_func
- # https://github.com/python/mypy/issues/708
- self.base_func = func # type: ignore[assignment]
+ self.base_func = func
self.visit_wrapper = visit_wrapper
update_wrapper(self, func)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/pyproject.toml new/lark-1.2.2/pyproject.toml
--- old/lark-1.1.9/pyproject.toml 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/pyproject.toml 2024-08-13 21:47:06.000000000 +0200
@@ -17,7 +17,7 @@
"Topic :: Text Processing :: Linguistic",
"License :: OSI Approved :: MIT License",
]
-requires-python = ">=3.6"
+requires-python = ">=3.8"
dependencies = []
dynamic = ["version"]
@@ -41,7 +41,7 @@
- Import grammars from Nearley.js
- Extensive test suite
- And much more!
-Since version 1.0, only Python versions 3.6 and up are supported."""
+Since version 1.2, only Python versions 3.8 and up are supported."""
content-type = "text/markdown"
[project.urls]
@@ -76,9 +76,9 @@
[tool.mypy]
files = "lark"
-python_version = "3.6"
+python_version = "3.8"
show_error_codes = true
-enable_error_code = ["ignore-without-code"]
+enable_error_code = ["ignore-without-code", "unused-ignore"]
exclude = [
"^lark/__pyinstaller",
]
@@ -95,3 +95,11 @@
]
[tool.pyright]
include = ["lark"]
+
+[tool.pytest.ini_options]
+minversion = 6.0
+addopts = "-ra -q"
+testpaths =[
+ "tests"
+]
+python_files = "__main__.py"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/pytest.ini new/lark-1.2.2/pytest.ini
--- old/lark-1.1.9/pytest.ini 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/pytest.ini 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-[pytest]
-minversion = 6.0
-addopts = -ra -q
-testpaths =
- tests
-python_files = __main__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/tests/test_cache.py new/lark-1.2.2/tests/test_cache.py
--- old/lark-1.1.9/tests/test_cache.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/tests/test_cache.py 2024-08-13 21:47:06.000000000 +0200
@@ -7,17 +7,14 @@
from lark.lexer import Lexer, Token
import lark.lark as lark_module
-try:
- from StringIO import StringIO
-except ImportError:
- from io import BytesIO as StringIO
+from io import BytesIO
try:
import regex
except ImportError:
regex = None
-class MockFile(StringIO):
+class MockFile(BytesIO):
def close(self):
pass
def __enter__(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/tests/test_logger.py new/lark-1.2.2/tests/test_logger.py
--- old/lark-1.1.9/tests/test_logger.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/tests/test_logger.py 2024-08-13 21:47:06.000000000 +0200
@@ -3,10 +3,7 @@
from lark import Lark, logger
from unittest import TestCase, main, skipIf
-try:
- from StringIO import StringIO
-except ImportError:
- from io import StringIO
+from io import StringIO
try:
import interegular
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/tests/test_parser.py new/lark-1.2.2/tests/test_parser.py
--- old/lark-1.1.9/tests/test_parser.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/tests/test_parser.py 2024-08-13 21:47:06.000000000 +0200
@@ -7,15 +7,8 @@
import sys
from copy import copy, deepcopy
-from lark.utils import isascii
-
from lark import Token, Transformer_NonRecursive, LexError
-try:
- from cStringIO import StringIO as cStringIO
-except ImportError:
- # Available only in Python 2.x, 3.x only has io.StringIO from below
- cStringIO = None
from io import (
StringIO as uStringIO,
BytesIO,
@@ -28,6 +21,7 @@
except ImportError:
regex = None
+
import lark
from lark import logger
from lark.lark import Lark
@@ -399,6 +393,8 @@
self.assertEqual( g.parse('abc').children[0], 'abc')
+
+ @unittest.skipIf(LEXER=='basic', "Requires dynamic lexer")
def test_earley(self):
g = Lark("""start: A "b" c
A: "a"+
@@ -421,8 +417,7 @@
l = Lark(grammar, parser='earley', lexer=LEXER)
l.parse(program)
-
- @unittest.skipIf(LEXER=='dynamic', "Only relevant for the dynamic_complete parser")
+ @unittest.skipIf(LEXER != 'dynamic_complete', "Only relevant for the dynamic_complete parser")
def test_earley3(self):
"""Tests prioritization and disambiguation for pseudo-terminals (there should be only one result)
@@ -758,6 +753,8 @@
self.assertEqual(ambig_tree.data, '_ambig')
self.assertEqual(set(ambig_tree.children), expected)
+
+ @unittest.skipIf(LEXER=='basic', "Requires dynamic lexer")
def test_fruitflies_ambig(self):
grammar = """
start: noun verb noun -> simple
@@ -828,6 +825,27 @@
tree = parser.parse(text)
self.assertEqual(tree.children, ['foo', 'bar'])
+ def test_multiple_start_solutions(self):
+ grammar = r"""
+ !start: a | A
+ !a: A
+ A: "x"
+ """
+
+ l = Lark(grammar, ambiguity='explicit', lexer=LEXER)
+ tree = l.parse('x')
+
+ expected = Tree('_ambig', [
+ Tree('start', ['x']),
+ Tree('start', [Tree('a', ['x'])])]
+ )
+ self.assertEqual(tree, expected)
+
+ l = Lark(grammar, ambiguity='resolve', lexer=LEXER)
+ tree = l.parse('x')
+ assert tree == Tree('start', ['x'])
+
+
def test_cycle(self):
grammar = """
start: start?
@@ -843,16 +861,24 @@
def test_cycle2(self):
grammar = """
- start: _operation
- _operation: value
- value: "b"
- | "a" value
- | _operation
+ start: _recurse
+ _recurse: v
+ v: "b"
+ | "a" v
+ | _recurse
"""
l = Lark(grammar, ambiguity="explicit", lexer=LEXER)
tree = l.parse("ab")
- self.assertEqual(tree, Tree('start', [Tree('value', [Tree('value', [])])]))
+ expected = (
+ Tree('start', [
+ Tree('_ambig', [
+ Tree('v', [Tree('v', [])]),
+ Tree('v', [Tree('v', [Tree('v', [])])])
+ ])
+ ])
+ )
+ self.assertEqual(tree, expected)
def test_cycles(self):
grammar = """
@@ -912,24 +938,60 @@
tree = l.parse('');
self.assertEqual(tree, Tree('a', [Tree('x', [Tree('b', [])])]))
+ @unittest.skipIf(LEXER=='basic', "start/end values work differently for the basic lexer")
+ def test_symbol_node_start_end_dynamic_lexer(self):
+ grammar = """
+ start: "ABC"
+ """
+
+ l = Lark(grammar, ambiguity='forest', lexer=LEXER)
+ node = l.parse('ABC')
+ self.assertEqual(node.start, 0)
+ self.assertEqual(node.end, 3)
+
+ grammar2 = """
+ start: abc
+ abc: "ABC"
+ """
+
+ l = Lark(grammar2, ambiguity='forest', lexer=LEXER)
+ node = l.parse('ABC')
+ self.assertEqual(node.start, 0)
+ self.assertEqual(node.end, 3)
+ def test_resolve_ambiguity_with_shared_node(self):
+ grammar = """
+ start: (a+)*
+ !a.1: "A" |
+ """
+
+ l = Lark(grammar, ambiguity='resolve', lexer=LEXER)
+ tree = l.parse("A")
+ self.assertEqual(tree, Tree('start', [Tree('a', []), Tree('a', []), Tree('a', ['A'])]))
+ def test_resolve_ambiguity_with_shared_node2(self):
+ grammar = """
+ start: _s x _s
+ x: "X"?
+ _s: " "?
+ """
+
+ l = Lark(grammar, ambiguity='resolve', lexer=LEXER)
+ tree = l.parse("")
+ self.assertEqual(tree, Tree('start', [Tree('x', [])]))
- # @unittest.skipIf(LEXER=='dynamic', "Not implemented in Dynamic Earley yet") # TODO
- # def test_not_all_derivations(self):
- # grammar = """
- # start: cd+ "e"
-
- # !cd: "c"
- # | "d"
- # | "cd"
-
- # """
- # l = Lark(grammar, parser='earley', ambiguity='explicit', lexer=LEXER, earley__all_derivations=False)
- # x = l.parse('cde')
- # assert x.data != '_ambig', x
- # assert len(x.children) == 1
+ def test_consistent_derivation_order1(self):
+ # Should return the same result for any hash-seed
+ parser = Lark('''
+ start: a a
+ a: "." | b
+ b: "."
+ ''', lexer=LEXER)
+
+ tree = parser.parse('..')
+ n = Tree('a', [Tree('b', [])])
+ assert tree == Tree('start', [n, n])
_NAME = "TestFullEarley" + LEXER.capitalize()
_TestFullEarley.__name__ = _NAME
@@ -987,7 +1049,7 @@
def __init__(self, g, *args, **kwargs):
self.text_lexer = Lark(g, *args, use_bytes=False, **kwargs)
g = self.text_lexer.grammar_source.lower()
- if '\\u' in g or not isascii(g):
+ if '\\u' in g or not g.isascii():
# Bytes re can't deal with uniode escapes
self.bytes_lark = None
else:
@@ -996,7 +1058,7 @@
def parse(self, text, start=None):
# TODO: Easy workaround, more complex checks would be beneficial
- if not isascii(text) or self.bytes_lark is None:
+ if not text.isascii() or self.bytes_lark is None:
return self.text_lexer.parse(text, start)
try:
rv = self.text_lexer.parse(text, start)
@@ -1086,11 +1148,6 @@
assert x.data == 'start' and x.children == ['12', '2'], x
- @unittest.skipIf(cStringIO is None, "cStringIO not available")
- def test_stringio_bytes(self):
- """Verify that a Lark can be created from file-like objects other than Python's standard 'file' object"""
- _Lark(cStringIO(b'start: a+ b a* "b" a*\n b: "b"\n a: "a" '))
-
def test_stringio_unicode(self):
"""Verify that a Lark can be created from file-like objects other than Python's standard 'file' object"""
_Lark(uStringIO(u'start: a+ b a* "b" a*\n b: "b"\n a: "a" '))
@@ -1140,7 +1197,7 @@
""")
g.parse('abc')
- @unittest.skipIf(sys.version_info < (3, 3), "re package did not support 32bit unicode escape sequence before Python 3.3")
+
def test_unicode_literal_range_escape2(self):
g = _Lark(r"""start: A+
A: "\U0000FFFF".."\U00010002"
@@ -1153,8 +1210,7 @@
""")
g.parse('\x01\x02\x03')
- @unittest.skipIf(sys.version_info[0]==2 or sys.version_info[:2]==(3, 4),
- "bytes parser isn't perfect in Python2, exceptions don't work correctly")
+
def test_bytes_utf8(self):
g = r"""
start: BOM? char+
@@ -1305,49 +1361,6 @@
[list] = r.children
self.assertSequenceEqual([item.data for item in list.children], ())
- @unittest.skipIf(True, "Flattening list isn't implemented (and may never be)")
- def test_single_item_flatten_list(self):
- g = _Lark(r"""start: list
- list: | item "," list
- item : A
- A: "a"
- """)
- r = g.parse("a,")
-
- # Because 'list' is a flatten rule it's top-level element should *never* be expanded
- self.assertSequenceEqual([subtree.data for subtree in r.children], ('list',))
-
- # Sanity check: verify that 'list' contains exactly the one 'item' we've given it
- [list] = r.children
- self.assertSequenceEqual([item.data for item in list.children], ('item',))
-
- @unittest.skipIf(True, "Flattening list isn't implemented (and may never be)")
- def test_multiple_item_flatten_list(self):
- g = _Lark(r"""start: list
- #list: | item "," list
- item : A
- A: "a"
- """)
- r = g.parse("a,a,")
-
- # Because 'list' is a flatten rule it's top-level element should *never* be expanded
- self.assertSequenceEqual([subtree.data for subtree in r.children], ('list',))
-
- # Sanity check: verify that 'list' contains exactly the two 'item's we've given it
- [list] = r.children
- self.assertSequenceEqual([item.data for item in list.children], ('item', 'item'))
-
- @unittest.skipIf(True, "Flattening list isn't implemented (and may never be)")
- def test_recurse_flatten(self):
- """Verify that stack depth doesn't get exceeded on recursive rules marked for flattening."""
- g = _Lark(r"""start: a | start a
- a : A
- A : "a" """)
-
- # Force PLY to write to the debug log, but prevent writing it to the terminal (uses repr() on the half-built
- # STree data structures, which uses recursion).
- g.parse("a" * (sys.getrecursionlimit() // 4))
-
def test_token_collision(self):
g = _Lark(r"""start: "Hello" NAME
NAME: /\w/+
@@ -1459,20 +1472,6 @@
x1 = g.parse("ABBc")
x2 = g.parse("abdE")
- # def test_string_priority(self):
- # g = _Lark("""start: (A | /a?bb/)+
- # A: "a" """)
- # x = g.parse('abb')
- # self.assertEqual(len(x.children), 2)
-
- # # This parse raises an exception because the lexer will always try to consume
- # # "a" first and will never match the regular expression
- # # This behavior is subject to change!!
- # # This won't happen with ambiguity handling.
- # g = _Lark("""start: (A | /a?ab/)+
- # A: "a" """)
- # self.assertRaises(LexError, g.parse, 'aab')
-
def test_rule_collision(self):
g = _Lark("""start: "a"+ "b"
| "a"+ """)
@@ -1561,13 +1560,6 @@
""")
x = g.parse('\n')
-
- # def test_token_recurse(self):
- # g = _Lark("""start: A
- # A: B
- # B: A
- # """)
-
@unittest.skipIf(PARSER == 'cyk', "No empty rules")
def test_empty(self):
# Fails an Earley implementation without special handling for empty rules,
@@ -1649,13 +1641,6 @@
tree = l.parse('aA')
self.assertEqual(tree.children, ['a', 'A'])
- # g = """!start: "a"i "a"
- # """
- # self.assertRaises(GrammarError, _Lark, g)
-
- # g = """!start: /a/i /a/
- # """
- # self.assertRaises(GrammarError, _Lark, g)
g = """start: NAME "," "a"
NAME: /[a-z_]/i /[a-z0-9_]/i*
@@ -1666,6 +1651,25 @@
tree = l.parse('AB,a')
self.assertEqual(tree.children, ['AB'])
+ @unittest.skipIf(LEXER in ('basic', 'custom_old', 'custom_new'), "Requires context sensitive terminal selection")
+ def test_token_flags_collision(self):
+
+ g = """!start: "a"i "a"
+ """
+ l = _Lark(g)
+ self.assertEqual(l.parse('aa').children, ['a', 'a'])
+ self.assertEqual(l.parse('Aa').children, ['A', 'a'])
+ self.assertRaises(UnexpectedInput, l.parse, 'aA')
+ self.assertRaises(UnexpectedInput, l.parse, 'AA')
+
+ g = """!start: /a/i /a/
+ """
+ l = _Lark(g)
+ self.assertEqual(l.parse('aa').children, ['a', 'a'])
+ self.assertEqual(l.parse('Aa').children, ['A', 'a'])
+ self.assertRaises(UnexpectedInput, l.parse, 'aA')
+ self.assertRaises(UnexpectedInput, l.parse, 'AA')
+
def test_token_flags3(self):
l = _Lark("""!start: ABC+
ABC: "abc"i
@@ -1754,7 +1758,7 @@
self.assertEqual(len(tree.children), 2)
- @unittest.skipIf(LEXER != 'basic', "basic lexer prioritization differs from dynamic lexer prioritization")
+ @unittest.skipIf('dynamic' in LEXER, "basic lexer prioritization differs from dynamic lexer prioritization")
def test_lexer_prioritization(self):
"Tests effect of priority on result"
@@ -2274,7 +2278,6 @@
- @unittest.skipIf(PARSER=='earley', "Priority not handled correctly right now") # TODO XXX
def test_priority_vs_embedded(self):
g = """
A.2: "a"
@@ -2407,7 +2410,7 @@
parser = _Lark(grammar)
- @unittest.skipIf(PARSER!='lalr' or 'custom' in LEXER, "Serialize currently only works for LALR parsers without custom lexers (though it should be easy to extend)")
+ @unittest.skipIf(PARSER!='lalr' or LEXER == 'custom_old', "Serialize currently only works for LALR parsers without custom lexers (though it should be easy to extend)")
def test_serialize(self):
grammar = """
start: _ANY b "C"
@@ -2512,7 +2515,7 @@
"""
self.assertRaises((GrammarError, LexError, re.error), _Lark, g, regex=True)
- @unittest.skipIf(PARSER!='lalr', "interactive_parser is only implemented for LALR at the moment")
+ @unittest.skipIf(PARSER != 'lalr', "interactive_parser is only implemented for LALR at the moment")
def test_parser_interactive_parser(self):
g = _Lark(r'''
@@ -2549,7 +2552,7 @@
res = ip_copy.feed_eof()
self.assertEqual(res, Tree('start', ['a', 'b', 'b']))
- @unittest.skipIf(PARSER!='lalr', "interactive_parser error handling only works with LALR for now")
+ @unittest.skipIf(PARSER != 'lalr', "interactive_parser error handling only works with LALR for now")
def test_error_with_interactive_parser(self):
def ignore_errors(e):
if isinstance(e, UnexpectedCharacters):
@@ -2584,10 +2587,10 @@
s = "[0 1, 2,@, 3,,, 4, 5 6 ]$"
tree = g.parse(s, on_error=ignore_errors)
- @unittest.skipIf(PARSER!='lalr', "interactive_parser error handling only works with LALR for now")
+ @unittest.skipIf(PARSER != 'lalr', "interactive_parser error handling only works with LALR for now")
def test_iter_parse(self):
ab_grammar = '!start: "a"* "b"*'
- parser = Lark(ab_grammar, parser="lalr")
+ parser = _Lark(ab_grammar)
ip = parser.parse_interactive("aaabb")
i = ip.iter_parse()
assert next(i) == 'a'
@@ -2595,7 +2598,7 @@
assert next(i) == 'a'
assert next(i) == 'b'
- @unittest.skipIf(PARSER!='lalr', "interactive_parser is only implemented for LALR at the moment")
+ @unittest.skipIf(PARSER != 'lalr', "interactive_parser is only implemented for LALR at the moment")
def test_interactive_treeless_transformer(self):
grammar = r"""
start: SYM+
@@ -2617,7 +2620,7 @@
res = ip.feed_eof()
self.assertEqual(res.children, [1, 2, 1])
- @unittest.skipIf(PARSER!='lalr', "Tree-less mode is only supported in lalr")
+ @unittest.skipIf(PARSER == 'earley', "Tree-less mode is not supported in earley")
def test_default_in_treeless_mode(self):
grammar = r"""
start: expr
@@ -2643,7 +2646,7 @@
b = parser.parse(s)
assert a == b
- @unittest.skipIf(PARSER!='lalr', "strict mode is only supported in lalr for now")
+ @unittest.skipIf(PARSER != 'lalr', "strict mode is only supported in lalr for now")
def test_strict(self):
# Test regex collision
grammar = r"""
@@ -2687,7 +2690,7 @@
for _LEXER, _PARSER in _TO_TEST:
_make_parser_test(_LEXER, _PARSER)
-for _LEXER in ('dynamic', 'dynamic_complete'):
+for _LEXER in ('basic', 'dynamic', 'dynamic_complete'):
_make_full_earley_test(_LEXER)
if __name__ == '__main__':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/tests/test_reconstructor.py new/lark-1.2.2/tests/test_reconstructor.py
--- old/lark-1.1.9/tests/test_reconstructor.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/tests/test_reconstructor.py 2024-08-13 21:47:06.000000000 +0200
@@ -154,7 +154,6 @@
for code in examples:
self.assert_reconstruct(g, code, keep_all_tokens=True)
- @unittest.skipIf(sys.version_info < (3, 0), "Python 2 does not play well with Unicode.")
def test_switch_grammar_unicode_terminal(self):
"""
This test checks that a parse tree built with a grammar containing only ascii characters can be reconstructed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/tests/test_trees.py new/lark-1.2.2/tests/test_trees.py
--- old/lark-1.1.9/tests/test_trees.py 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/tests/test_trees.py 2024-08-13 21:47:06.000000000 +0200
@@ -447,5 +447,20 @@
with self.assertRaises(AttributeError):
merge_transformers(T1(), module=T3())
+ def test_transform_token(self):
+ class MyTransformer(Transformer):
+ def INT(self, value):
+ return int(value)
+
+ t = Token('INT', '123')
+ assert MyTransformer().transform(t) == 123
+
+ class MyTransformer(Transformer):
+ def INT(self, value):
+ return Discard
+
+ assert MyTransformer().transform(t) is None
+
+
if __name__ == '__main__':
unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lark-1.1.9/tox.ini new/lark-1.2.2/tox.ini
--- old/lark-1.1.9/tox.ini 2024-01-10 09:30:23.000000000 +0100
+++ new/lark-1.2.2/tox.ini 2024-08-13 21:47:06.000000000 +0200
@@ -1,5 +1,5 @@
[tox]
-envlist = lint, type, py36, py37, py38, py39, py310, py311, py312, pypy3
+envlist = lint, type, py38, py39, py310, py311, py312, py313, pypy3
skip_missing_interpreters = true
[testenv]
@@ -25,8 +25,8 @@
skip_install = true
recreate = false
deps =
- mypy==0.950
- interegular>=0.2.4
+ mypy==1.10
+ interegular>=0.3.1,<0.4.0
types-atomicwrites
types-regex
rich<=13.4.1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package libproxy for openSUSE:Factory checked in at 2024-10-04 17:08:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libproxy (Old)
and /work/SRC/openSUSE:Factory/.libproxy.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libproxy"
Fri Oct 4 17:08:24 2024 rev:92 rq:1205372 version:0.5.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/libproxy/libproxy.changes 2024-06-20 16:46:37.764426314 +0200
+++ /work/SRC/openSUSE:Factory/.libproxy.new.19354/libproxy.changes 2024-10-04 17:08:30.627739514 +0200
@@ -1,0 +2,15 @@
+Wed Oct 2 14:24:50 UTC 2024 - Dominique Leuenberger <dimstar(a)opensuse.org>
+
+- Update to version 0.5.9:
+ + Ignore invalid proxy URL.
+ + Memleak fixes.
+ + kde: Add ReversedException support.
+ + Fix memory leak using PX_FORCE_CONFIG.
+ + Update msys2 build steps.
+ + Remove white space in key value.
+- Changes from version 0.5.8:
+ + Update repology list.
+ + Properly handle empty proxy ignore entry.
+ + Add support for direct keyword in PAC.
+
+-------------------------------------------------------------------
Old:
----
libproxy-0.5.7.obscpio
New:
----
libproxy-0.5.9.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libproxy.spec ++++++
--- /var/tmp/diff_new_pack.uBdF4w/_old 2024-10-04 17:08:31.727785472 +0200
+++ /var/tmp/diff_new_pack.uBdF4w/_new 2024-10-04 17:08:31.727785472 +0200
@@ -32,7 +32,7 @@
%define _name libproxy
Name: libproxy%{?dash}%{?name_suffix}
-Version: 0.5.7
+Version: 0.5.9
Release: 0
Summary: Automatic proxy configuration management for applications
License: GPL-2.0-or-later AND LGPL-2.1-or-later
++++++ _service ++++++
--- /var/tmp/diff_new_pack.uBdF4w/_old 2024-10-04 17:08:31.779787644 +0200
+++ /var/tmp/diff_new_pack.uBdF4w/_new 2024-10-04 17:08:31.783787811 +0200
@@ -3,7 +3,7 @@
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://github.com/libproxy/libproxy.git</param>
- <param name="revision">0.5.7</param>
+ <param name="revision">0.5.9</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">v?(.*)\+0</param>
<param name="versionrewrite-replacement">\1</param>
++++++ libproxy-0.5.7.obscpio -> libproxy-0.5.9.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.5.7/README.md new/libproxy-0.5.9/README.md
--- old/libproxy-0.5.7/README.md 2024-06-18 09:16:59.000000000 +0200
+++ new/libproxy-0.5.9/README.md 2024-10-02 16:22:15.000000000 +0200
@@ -41,15 +41,15 @@
## Repology
[![Arch package](https://repology.org/badge/version-for-repo/arch/libproxy.svg)](ht…
-[![Debian 12 package](https://repology.org/badge/version-for-repo/debian_12/libproxy.svg…
-[![Fedora 39 package](https://repology.org/badge/version-for-repo/fedora_39/libproxy.svg…
+[![Debian 13 package](https://repology.org/badge/version-for-repo/debian_13/libproxy.svg…
+[![Fedora 40 package](https://repology.org/badge/version-for-repo/fedora_40/libproxy.svg…
[![Fedora Rawhide package](https://repology.org/badge/version-for-repo/fedora_rawhide/libprox…
[![FreeBSD port](https://repology.org/badge/version-for-repo/freebsd/libproxy.svg)](ht…
[![Gentoo package](https://repology.org/badge/version-for-repo/gentoo/libproxy.svg)](…
[![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/libproxy.svg)…
[![Manjaro Stable package](https://repology.org/badge/version-for-repo/manjaro_stable/libprox…
[![MSYS2 mingw package](https://repology.org/badge/version-for-repo/msys2_mingw/libproxy.s…
-[![openSUSE Leap 15.5 package](https://repology.org/badge/version-for-repo/opensuse_leap_15_5/lib…
+[![openSUSE Leap 15.6 package](https://repology.org/badge/version-for-repo/opensuse_leap_15_6/lib…
[![openSUSE Tumbleweed package](https://repology.org/badge/version-for-repo/opensuse_tumbleweed/li…
-[![Ubuntu 23.10 package](https://repology.org/badge/version-for-repo/ubuntu_23_10/libproxy.…
+[![Ubuntu 24.04 package](https://repology.org/badge/version-for-repo/ubuntu_24_04/libproxy.…
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.5.7/docs/build-steps.md new/libproxy-0.5.9/docs/build-steps.md
--- old/libproxy-0.5.7/docs/build-steps.md 2024-06-18 09:16:59.000000000 +0200
+++ new/libproxy-0.5.9/docs/build-steps.md 2024-10-02 16:22:15.000000000 +0200
@@ -61,7 +61,7 @@
### Dependencies
```
-pacman -S base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-ccache mingw-w64-x86_64-pkg-config mingw-w64-x86_64-gobject-introspection mingw-w64-x86_64-python-gobject mingw-w64-x86_64-meson mingw-w64-x86_64-glib mingw-w64-x86_64-duktape mingw-w64-x86_64-gi-docgen mingw-w64-x86_64-curl mingw-w64-x86_64-vala
+pacman -S base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-ccache mingw-w64-x86_64-pkg-config mingw-w64-x86_64-gobject-introspection mingw-w64-x86_64-python-gobject mingw-w64-x86_64-meson mingw-w64-x86_64-glib2 mingw-w64-x86_64-duktape mingw-w64-x86_64-gi-docgen mingw-w64-x86_64-curl mingw-w64-x86_64-vala mingw-w64-x86_64-gsettings-desktop-schemas
```
### Build Setup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.5.7/meson.build new/libproxy-0.5.9/meson.build
--- old/libproxy-0.5.7/meson.build 2024-06-18 09:16:59.000000000 +0200
+++ new/libproxy-0.5.9/meson.build 2024-10-02 16:22:15.000000000 +0200
@@ -1,5 +1,5 @@
project('libproxy', 'c',
- version: '0.5.7',
+ version: '0.5.9',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2', 'werror=false', 'c_std=gnu11', ],
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.5.7/src/backend/plugins/config-kde/config-kde.c new/libproxy-0.5.9/src/backend/plugins/config-kde/config-kde.c
--- old/libproxy-0.5.7/src/backend/plugins/config-kde/config-kde.c 2024-06-18 09:16:59.000000000 +0200
+++ new/libproxy-0.5.9/src/backend/plugins/config-kde/config-kde.c 2024-10-02 16:22:15.000000000 +0200
@@ -50,6 +50,7 @@
char *socks_proxy;
KdeProxyType proxy_type;
char *pac_script;
+ gboolean reversed_exception;
};
G_DEFINE_FINAL_TYPE_WITH_CODE (PxConfigKde,
@@ -149,6 +150,8 @@
self->pac_script = g_strdup (value->str);
} else if (strcmp (kv[0], "ProxyType") == 0) {
self->proxy_type = atoi (value->str);
+ } else if (strcmp (kv[0], "ReversedException") == 0) {
+ self->reversed_exception = !!atoi (value->str);
}
}
} while (line);
@@ -245,8 +248,14 @@
if (self->proxy_type == KDE_PROXY_TYPE_NONE)
return;
- if (px_manager_is_ignore (uri, self->no_proxy))
- return;
+ if (self->reversed_exception) {
+ /* ReversedException flips the meaning of the ignore list */
+ if (!px_manager_is_ignore (uri, self->no_proxy))
+ return;
+ } else {
+ if (px_manager_is_ignore (uri, self->no_proxy))
+ return;
+ }
scheme = g_uri_get_scheme (uri);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.5.7/src/backend/plugins/config-sysconfig/config-sysconfig.c new/libproxy-0.5.9/src/backend/plugins/config-sysconfig/config-sysconfig.c
--- old/libproxy-0.5.7/src/backend/plugins/config-sysconfig/config-sysconfig.c 2024-06-18 09:16:59.000000000 +0200
+++ new/libproxy-0.5.9/src/backend/plugins/config-sysconfig/config-sysconfig.c 2024-10-02 16:22:15.000000000 +0200
@@ -114,6 +114,7 @@
value = g_string_new (kv[1]);
g_string_replace (value, "\"", "", 0);
g_string_replace (value, "\r", "", 0);
+ g_string_replace (value, " ", "", 0);
if (strcmp (kv[0], "PROXY_ENABLED") == 0) {
self->proxy_enabled = g_ascii_strncasecmp (value->str, "yes", 3) == 0;
@@ -183,6 +184,7 @@
g_clear_object (&self->monitor);
g_clear_pointer (&self->no_proxy, g_strfreev);
+ g_clear_pointer (&self->config_file, g_free);
G_OBJECT_CLASS (px_config_sysconfig_parent_class)->dispose (object);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.5.7/src/backend/px-manager.c new/libproxy-0.5.9/src/backend/px-manager.c
--- old/libproxy-0.5.7/src/backend/px-manager.c 2024-06-18 09:16:59.000000000 +0200
+++ new/libproxy-0.5.9/src/backend/px-manager.c 2024-10-02 16:22:15.000000000 +0200
@@ -141,13 +141,13 @@
px_manager_add_config_plugin (PxManager *self,
GType type)
{
- PxConfig *config = g_object_new (type, "config-option", self->config_option, NULL);
+ g_autoptr (PxConfig) config = g_object_new (type, "config-option", self->config_option, NULL);
PxConfigInterface *ifc = PX_CONFIG_GET_IFACE (config);
const char *env = g_getenv ("PX_FORCE_CONFIG");
const char *force_config = self->config_plugin ? self->config_plugin : env;
if (!force_config || g_strcmp0 (ifc->name, force_config) == 0)
- self->config_plugins = g_list_insert_sorted (self->config_plugins, config, config_order_compare);
+ self->config_plugins = g_list_insert_sorted (self->config_plugins, g_steal_pointer (&config), config_order_compare);
}
static void
@@ -235,11 +235,8 @@
{
PxManager *self = PX_MANAGER (object);
- for (GList *list = self->config_plugins; list && list->data; list = list->next)
- g_clear_object (&list->data);
-
- for (GList *list = self->pacrunner_plugins; list && list->data; list = list->next)
- g_clear_object (&list->data);
+ g_clear_list (&self->config_plugins, g_object_unref);
+ g_clear_list (&self->pacrunner_plugins, g_object_unref);
g_clear_pointer (&self->config_plugin, g_free);
#ifdef HAVE_CURL
@@ -525,6 +522,8 @@
if (test_uri)
px_strv_builder_add_proxy (builder, proxy_string);
}
+ } else if (g_strv_length (word_split) == 1 && g_ascii_strncasecmp (word_split[0], "direct", 6) == 0) {
+ px_strv_builder_add_proxy (builder, "direct://");
}
}
}
@@ -667,6 +666,10 @@
g_debug ("%s: Config[%d] = %s", __FUNCTION__, idx, config[idx]);
+ /* Ignore invalid proxy URL, so we won't call GUri API on NULL. */
+ if (!conf_url)
+ continue;
+
if (px_manager_expand_wpad (self, conf_url) || px_manager_expand_pac (self, conf_url)) {
GList *list;
@@ -716,7 +719,7 @@
if (g_strcmp0 (ignore, "*") == 0)
return TRUE;
- if (!host || !ignore)
+ if (!host || !ignore || strlen (ignore) == 0)
return FALSE;
ignore_split = g_strsplit (ignore, ":", -1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.5.7/tests/data/px-manager-sample.pac new/libproxy-0.5.9/tests/data/px-manager-sample.pac
--- old/libproxy-0.5.7/tests/data/px-manager-sample.pac 2024-06-18 09:16:59.000000000 +0200
+++ new/libproxy-0.5.9/tests/data/px-manager-sample.pac 2024-10-02 16:22:15.000000000 +0200
@@ -26,12 +26,12 @@
alert("DEFAULT")
+ if (dnsDomainIs(host, "www.example.com"))
+ return "PROXY 127.0.0.1:1984; DIRECT"
+
/* Don't send non-FQDN or private IP auths to us */
if (isPlainHostName(host) || isInNet(resolved_ip, "192.0.2.0","255.255.255.0") || privateIP.test(resolved_ip))
return "DIRECT";
- if (dnsDomainIs(host, "www.example.com"))
- return "PROXY 127.0.0.1:1984"
-
/* Return nothing to check wrong output */
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libproxy-0.5.7/tests/px-manager-test.c new/libproxy-0.5.9/tests/px-manager-test.c
--- old/libproxy-0.5.7/tests/px-manager-test.c 2024-06-18 09:16:59.000000000 +0200
+++ new/libproxy-0.5.9/tests/px-manager-test.c 2024-10-02 16:22:15.000000000 +0200
@@ -234,6 +234,7 @@
config = px_manager_get_proxies_sync (self->manager, "https://www.example.com");
g_assert_nonnull (config);
g_assert_cmpstr (config[0], ==, "http://127.0.0.1:1984");
+ g_assert_cmpstr (config[1], ==, "direct://");
config = px_manager_get_proxies_sync (self->manager, "https://192.168.10.4");
g_assert_nonnull (config);
++++++ libproxy.obsinfo ++++++
--- /var/tmp/diff_new_pack.uBdF4w/_old 2024-10-04 17:08:32.187804689 +0200
+++ /var/tmp/diff_new_pack.uBdF4w/_new 2024-10-04 17:08:32.191804857 +0200
@@ -1,5 +1,5 @@
name: libproxy
-version: 0.5.7
-mtime: 1718695019
-commit: 2686d35cfa5db970d4ba65e2951ebc8183b1be82
+version: 0.5.9
+mtime: 1727878935
+commit: 77e2a2b88a319974cf099c8eaaaa03030bc4c0d4
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package livecd-openSUSE for openSUSE:Factory checked in at 2024-10-04 10:57:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/livecd-openSUSE (Old)
and /work/SRC/openSUSE:Factory/.livecd-openSUSE.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "livecd-openSUSE"
Fri Oct 4 10:57:13 2024 rev:257 rq: version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/livecd-openSUSE/livecd-openSUSE.changes 2024-09-10 13:36:41.429633864 +0200
+++ /work/SRC/openSUSE:Factory/.livecd-openSUSE.new.19354/livecd-openSUSE.changes 2024-10-04 10:57:15.276001745 +0200
@@ -1,0 +2,5 @@
+Fri Oct 4 08:56:26 UTC 2024 - Dominique Leuenberger <dleuenberger(a)suse.com>
+
+- Do not add libatm1: linux-atm was dropped.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ livecd-leap-gnome.kiwi ++++++
--- /var/tmp/diff_new_pack.s0WolY/_old 2024-10-04 10:57:17.880109183 +0200
+++ /var/tmp/diff_new_pack.s0WolY/_new 2024-10-04 10:57:17.884109348 +0200
@@ -378,7 +378,6 @@
<package name="efibootmgr"/>
<package name="ipw-firmware"/>
<package name="iw"/>
- <package name="libatm1"/>
<package name="lsb-release"/>
<package name="lvm2"/>
<package name="memtest86+" arch="i686,x86_64"/>
livecd-leap-kde.kiwi: same change
livecd-leap-x11.kiwi: same change
livecd-leap-xfce.kiwi: same change
++++++ livecd-tumbleweed-gnome.kiwi ++++++
--- /var/tmp/diff_new_pack.s0WolY/_old 2024-10-04 10:57:17.968112814 +0200
+++ /var/tmp/diff_new_pack.s0WolY/_new 2024-10-04 10:57:17.972112978 +0200
@@ -378,7 +378,6 @@
<package name="efibootmgr"/>
<package name="ipw-firmware"/>
<package name="iw"/>
- <package name="libatm1"/>
<package name="lsb-release"/>
<package name="lvm2"/>
<package name="memtest86+" arch="i686,x86_64"/>
livecd-tumbleweed-kde.kiwi: same change
livecd-tumbleweed-x11.kiwi: same change
livecd-tumbleweed-xfce.kiwi: same change
++++++ list-common.sh ++++++
--- /var/tmp/diff_new_pack.s0WolY/_old 2024-10-04 10:57:18.644140705 +0200
+++ /var/tmp/diff_new_pack.s0WolY/_new 2024-10-04 10:57:18.700143016 +0200
@@ -257,7 +257,6 @@
install efibootmgr
install ipw-firmware
install iw
-install libatm1
install lsb-release
install lvm2
install memtest86+ i686,x86_64
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package 000update-repos for openSUSE:Factory checked in at 2024-10-03 21:01:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/000update-repos (Old)
and /work/SRC/openSUSE:Factory/.000update-repos.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "000update-repos"
Thu Oct 3 21:01:57 2024 rev:2600 rq: version:unknown
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
New:
----
factory:non-oss_4158.2.packages.zst
factory_20241002.packages.zst
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package 000release-packages for openSUSE:Factory checked in at 2024-10-03 18:41:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/000release-packages (Old)
and /work/SRC/openSUSE:Factory/.000release-packages.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "000release-packages"
Thu Oct 3 18:41:31 2024 rev:3135 rq: version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/000release-packages/Aeon-release.changes 2024-10-03 02:16:58.594224197 +0200
+++ /work/SRC/openSUSE:Factory/.000release-packages.new.19354/Aeon-release.changes 2024-10-03 18:41:33.121113405 +0200
@@ -2 +2 @@
-Thu Oct 03 00:16:55 UTC 2024 - openSUSE <packaging(a)lists.opensuse.org>
+Thu Oct 03 16:41:29 UTC 2024 - openSUSE <packaging(a)lists.opensuse.org>
Kalpa-release.changes: same change
MicroOS-release.changes: same change
openSUSE-Addon-NonOss-release.changes: same change
openSUSE-release.changes: same change
stub.changes: same change
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ Aeon-release.spec ++++++
--- /var/tmp/diff_new_pack.kVuY7K/_old 2024-10-03 18:41:34.809183448 +0200
+++ /var/tmp/diff_new_pack.kVuY7K/_new 2024-10-03 18:41:34.813183614 +0200
@@ -17,7 +17,7 @@
Name: Aeon-release
-Version: 20241002
+Version: 20241003
Release: 0
Summary: Aeon
License: GPL-2.0-or-later
@@ -174,9 +174,9 @@
%include %{SOURCE100}
Provides: %name-%version
Provides: product() = Aeon
-Provides: product(Aeon) = 20241002-0
+Provides: product(Aeon) = 20241003-0
Provides: product-label() = Aeon
-Provides: product-cpeid() = cpe%3A%2Fo%3Aopensuse%3Aaeon%3A20241002
+Provides: product-cpeid() = cpe%3A%2Fo%3Aopensuse%3Aaeon%3A20241003
Provides: product-url(releasenotes) = http%3A%2F%2Fdoc.opensuse.org%2Frelease%2Dnotes%2Fx86_64%2FopenSUSE%2FTumbleweed%2Frelease%2Dnotes%2DopenSUSE.rpm
Provides: product-endoflife()
Requires: product_flavor(Aeon)
@@ -192,7 +192,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance)
-Provides: product_flavor(Aeon) = 20241002-0
+Provides: product_flavor(Aeon) = 20241003-0
Summary: Aeon%{?betaversion: %{betaversion}}
%description appliance
@@ -257,11 +257,11 @@
<product schemeversion="0">
<vendor>openSUSE</vendor>
<name>Aeon</name>
- <version>20241002</version>
+ <version>20241003</version>
<release>0</release>
<endoflife></endoflife>
<arch>%{_target_cpu}</arch>
- <cpeid>cpe:/o:opensuse:aeon:20241002</cpeid>
+ <cpeid>cpe:/o:opensuse:aeon:20241003</cpeid>
<productline>Aeon</productline>
<register>
<pool>
++++++ Kalpa-release.spec ++++++
--- /var/tmp/diff_new_pack.kVuY7K/_old 2024-10-03 18:41:34.837184610 +0200
+++ /var/tmp/diff_new_pack.kVuY7K/_new 2024-10-03 18:41:34.841184776 +0200
@@ -17,7 +17,7 @@
Name: Kalpa-release
-Version: 20241002
+Version: 20241003
Release: 0
Summary: openSUSE Kalpa
License: GPL-2.0-or-later
@@ -174,9 +174,9 @@
%include %{SOURCE100}
Provides: %name-%version
Provides: product() = Kalpa
-Provides: product(Kalpa) = 20241002-0
+Provides: product(Kalpa) = 20241003-0
Provides: product-label() = openSUSE%20Kalpa
-Provides: product-cpeid() = cpe%3A%2Fo%3Aopensuse%3Akalpa%3A20241002
+Provides: product-cpeid() = cpe%3A%2Fo%3Aopensuse%3Akalpa%3A20241003
Provides: product-url(releasenotes) = http%3A%2F%2Fdoc.opensuse.org%2Frelease%2Dnotes%2Fx86_64%2FopenSUSE%2FTumbleweed%2Frelease%2Dnotes%2DopenSUSE.rpm
Provides: product-endoflife()
Requires: product_flavor(Kalpa)
@@ -192,7 +192,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance)
-Provides: product_flavor(Kalpa) = 20241002-0
+Provides: product_flavor(Kalpa) = 20241003-0
Summary: openSUSE Kalpa%{?betaversion: %{betaversion}}
%description appliance
@@ -257,11 +257,11 @@
<product schemeversion="0">
<vendor>openSUSE</vendor>
<name>Kalpa</name>
- <version>20241002</version>
+ <version>20241003</version>
<release>0</release>
<endoflife></endoflife>
<arch>%{_target_cpu}</arch>
- <cpeid>cpe:/o:opensuse:kalpa:20241002</cpeid>
+ <cpeid>cpe:/o:opensuse:kalpa:20241003</cpeid>
<productline>Kalpa</productline>
<register>
<pool>
++++++ MicroOS-release.spec ++++++
--- /var/tmp/diff_new_pack.kVuY7K/_old 2024-10-03 18:41:34.869185938 +0200
+++ /var/tmp/diff_new_pack.kVuY7K/_new 2024-10-03 18:41:34.873186104 +0200
@@ -17,7 +17,7 @@
Name: MicroOS-release
-Version: 20241002
+Version: 20241003
Release: 0
Summary: openSUSE MicroOS
License: GPL-2.0-or-later
@@ -179,9 +179,9 @@
%include %{SOURCE100}
Provides: %name-%version
Provides: product() = MicroOS
-Provides: product(MicroOS) = 20241002-0
+Provides: product(MicroOS) = 20241003-0
Provides: product-label() = openSUSE%20MicroOS
-Provides: product-cpeid() = cpe%3A%2Fo%3Aopensuse%3Amicroos%3A20241002
+Provides: product-cpeid() = cpe%3A%2Fo%3Aopensuse%3Amicroos%3A20241003
Provides: product-url(releasenotes) = http%3A%2F%2Fdoc.opensuse.org%2Frelease%2Dnotes%2Fx86_64%2FopenSUSE%2FTumbleweed%2Frelease%2Dnotes%2DopenSUSE.rpm
Provides: product-endoflife()
Requires: product_flavor(MicroOS)
@@ -197,7 +197,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(dvd)
-Provides: product_flavor(MicroOS) = 20241002-0
+Provides: product_flavor(MicroOS) = 20241003-0
Summary: openSUSE MicroOS%{?betaversion: %{betaversion}}
%description dvd
@@ -213,7 +213,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance)
-Provides: product_flavor(MicroOS) = 20241002-0
+Provides: product_flavor(MicroOS) = 20241003-0
Summary: openSUSE MicroOS%{?betaversion: %{betaversion}}
%description appliance
@@ -278,11 +278,11 @@
<product schemeversion="0">
<vendor>openSUSE</vendor>
<name>MicroOS</name>
- <version>20241002</version>
+ <version>20241003</version>
<release>0</release>
<endoflife></endoflife>
<arch>%{_target_cpu}</arch>
- <cpeid>cpe:/o:opensuse:microos:20241002</cpeid>
+ <cpeid>cpe:/o:opensuse:microos:20241003</cpeid>
<productline>MicroOS</productline>
<register>
<pool>
++++++ openSUSE-Addon-NonOss-release.spec ++++++
--- /var/tmp/diff_new_pack.kVuY7K/_old 2024-10-03 18:41:34.901187265 +0200
+++ /var/tmp/diff_new_pack.kVuY7K/_new 2024-10-03 18:41:34.905187431 +0200
@@ -18,7 +18,7 @@
Name: openSUSE-Addon-NonOss-release
%define product openSUSE-Addon-NonOss
-Version: 20241002
+Version: 20241003
#!BcntSyncTag: openSUSE-Addon-NonOss
Release: 0
Summary: openSUSE NonOSS Addon
@@ -26,9 +26,9 @@
Group: System/Fhs
Provides: %name-%version
Provides: product() = openSUSE%2DAddon%2DNonOss
-Provides: product(openSUSE-Addon-NonOss) = 20241002-0
+Provides: product(openSUSE-Addon-NonOss) = 20241003-0
Provides: product-label() = non%20oss%20addon
-Provides: product-cpeid() = cpe%3A%2Fo%3Aopensuse%3Aopensuse%2Daddon%2Dnonoss%3A20241002
+Provides: product-cpeid() = cpe%3A%2Fo%3Aopensuse%3Aopensuse%2Daddon%2Dnonoss%3A20241003
@@ -48,10 +48,10 @@
<product schemeversion="0">
<vendor>openSUSE</vendor>
<name>openSUSE-Addon-NonOss</name>
- <version>20241002</version>
+ <version>20241003</version>
<release>0</release>
<arch>%{_target_cpu}</arch>
- <cpeid>cpe:/o:opensuse:opensuse-addon-nonoss:20241002</cpeid>
+ <cpeid>cpe:/o:opensuse:opensuse-addon-nonoss:20241003</cpeid>
<register>
<pool>
</pool>
++++++ openSUSE-release.spec ++++++
--- /var/tmp/diff_new_pack.kVuY7K/_old 2024-10-03 18:41:34.933188593 +0200
+++ /var/tmp/diff_new_pack.kVuY7K/_new 2024-10-03 18:41:34.933188593 +0200
@@ -20,7 +20,7 @@
#define betaversion %{nil}
%define codename Tumbleweed
Name: openSUSE-release
-Version: 20241002
+Version: 20241003
Release: 0
# 0 is the product release, not the build release of this package
Summary: openSUSE Tumbleweed
@@ -185,7 +185,7 @@
%include %{SOURCE100}
Provides: %name-%version
Provides: product() = openSUSE
-Provides: product(openSUSE) = 20241002-0
+Provides: product(openSUSE) = 20241003-0
%ifarch x86_64
Provides: product-register-target() = openSUSE%2DTumbleweed%2Dx86_64
%endif
@@ -199,7 +199,7 @@
Provides: product-register-target() = openSUSE%2DTumbleweed%2Daarch64
%endif
Provides: product-label() = openSUSE
-Provides: product-cpeid() = cpe%3A%2Fo%3Aopensuse%3Aopensuse%3A20241002
+Provides: product-cpeid() = cpe%3A%2Fo%3Aopensuse%3Aopensuse%3A20241003
Provides: product-url(releasenotes) = http%3A%2F%2Fdoc.opensuse.org%2Frelease%2Dnotes%2Fx86_64%2FopenSUSE%2FTumbleweed%2Frelease%2Dnotes%2DopenSUSE.rpm
Provides: product-url(repository) = http%3A%2F%2Fdownload.opensuse.org%2Ftumbleweed%2Frepo%2Foss%2F
Requires: product_flavor(openSUSE)
@@ -213,7 +213,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(ftp)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description ftp
@@ -228,7 +228,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(mini)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description mini
@@ -243,7 +243,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(dvd)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description dvd
@@ -258,7 +258,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(livecd-kde)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description livecd-kde
@@ -273,7 +273,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(livecd-x11)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description livecd-x11
@@ -288,7 +288,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(livecd-gnome)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description livecd-gnome
@@ -303,7 +303,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(livecd-xfce)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description livecd-xfce
@@ -318,7 +318,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(usb-kde)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description usb-kde
@@ -333,7 +333,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(usb-gnome)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description usb-gnome
@@ -348,7 +348,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(usb-x11)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description usb-x11
@@ -363,7 +363,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description appliance
@@ -378,7 +378,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance-docker)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description appliance-docker
@@ -393,7 +393,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance-kvm)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description appliance-kvm
@@ -408,7 +408,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance-vmware)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description appliance-vmware
@@ -423,7 +423,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance-openstack)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description appliance-openstack
@@ -438,7 +438,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance-hyperv)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description appliance-hyperv
@@ -453,7 +453,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance-vagrant)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description appliance-vagrant
@@ -468,7 +468,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance-wsl)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description appliance-wsl
@@ -483,7 +483,7 @@
Group: System/Fhs
Provides: product_flavor()
Provides: flavor(appliance-custom)
-Provides: product_flavor(openSUSE) = 20241002-0
+Provides: product_flavor(openSUSE) = 20241003-0
Summary: openSUSE Tumbleweed%{?betaversion: %{betaversion}}
%description appliance-custom
@@ -566,10 +566,10 @@
<product schemeversion="0">
<vendor>openSUSE</vendor>
<name>openSUSE</name>
- <version>20241002</version>
+ <version>20241003</version>
<release>0</release>
<arch>%{_target_cpu}</arch>
- <cpeid>cpe:/o:opensuse:opensuse:20241002</cpeid>
+ <cpeid>cpe:/o:opensuse:opensuse:20241003</cpeid>
<productline>openSUSE</productline>
<register>
<target>openSUSE-Tumbleweed-x86_64</target>
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package qt6-webview for openSUSE:Factory checked in at 2024-10-03 18:02:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qt6-webview (Old)
and /work/SRC/openSUSE:Factory/.qt6-webview.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-webview"
Thu Oct 3 18:02:40 2024 rev:19 rq:1205158 version:6.7.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/qt6-webview/qt6-webview.changes 2024-06-24 20:50:40.110550451 +0200
+++ /work/SRC/openSUSE:Factory/.qt6-webview.new.19354/qt6-webview.changes 2024-10-03 18:03:34.390162591 +0200
@@ -1,0 +2,6 @@
+Sat Sep 28 08:23:13 UTC 2024 - Christophe Marin <christophe(a)krop.fr>
+
+- Update to 6.7.3
+ * https://www.qt.io/blog/qt-6.7.3-released
+
+-------------------------------------------------------------------
Old:
----
qtwebview-everywhere-src-6.7.2.tar.xz
New:
----
qtwebview-everywhere-src-6.7.3.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qt6-webview.spec ++++++
--- /var/tmp/diff_new_pack.gl3gJt/_old 2024-10-03 18:03:34.962186398 +0200
+++ /var/tmp/diff_new_pack.gl3gJt/_new 2024-10-03 18:03:34.966186564 +0200
@@ -16,7 +16,7 @@
#
-%define real_version 6.7.2
+%define real_version 6.7.3
%define short_version 6.7
%define tar_name qtwebview-everywhere-src
%define tar_suffix %{nil}
@@ -27,7 +27,7 @@
%endif
#
Name: qt6-webview%{?pkg_suffix}
-Version: 6.7.2
+Version: 6.7.3
Release: 0
Summary: Qt 6 WebView library
License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later)
++++++ qtwebview-everywhere-src-6.7.2.tar.xz -> qtwebview-everywhere-src-6.7.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwebview-everywhere-src-6.7.2/.cmake.conf new/qtwebview-everywhere-src-6.7.3/.cmake.conf
--- old/qtwebview-everywhere-src-6.7.2/.cmake.conf 2024-06-10 21:19:50.000000000 +0200
+++ new/qtwebview-everywhere-src-6.7.3/.cmake.conf 2024-09-20 04:11:30.000000000 +0200
@@ -1,4 +1,4 @@
-set(QT_REPO_MODULE_VERSION "6.7.2")
+set(QT_REPO_MODULE_VERSION "6.7.3")
set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1")
list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwebview-everywhere-src-6.7.2/.tag new/qtwebview-everywhere-src-6.7.3/.tag
--- old/qtwebview-everywhere-src-6.7.2/.tag 2024-06-10 21:19:50.000000000 +0200
+++ new/qtwebview-everywhere-src-6.7.3/.tag 2024-09-20 04:11:30.000000000 +0200
@@ -1 +1 @@
-3dbe4104cac53d4f1a3801faa75c75127e5cbaba
+94977f0f6222cab08b8906d9d54452fe1d6a324c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwebview-everywhere-src-6.7.2/dependencies.yaml new/qtwebview-everywhere-src-6.7.3/dependencies.yaml
--- old/qtwebview-everywhere-src-6.7.2/dependencies.yaml 2024-06-10 21:19:50.000000000 +0200
+++ new/qtwebview-everywhere-src-6.7.3/dependencies.yaml 2024-09-20 04:11:30.000000000 +0200
@@ -1,7 +1,7 @@
dependencies:
../qtdeclarative:
- ref: 12533cc0bd83a2076efb4af0bc1832b0db9568fc
+ ref: 34ffe0c15a9564fefcf01a738eb0bde370399959
required: true
../qtwebengine:
- ref: 445cd4e7784d294a3df8ad3f7b85a7a4988c0bbd
+ ref: d29628dfd9f78da12afe8d6072e8e6358cded301
required: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwebview-everywhere-src-6.7.2/examples/webview/minibrowser/main.cpp new/qtwebview-everywhere-src-6.7.3/examples/webview/minibrowser/main.cpp
--- old/qtwebview-everywhere-src-6.7.2/examples/webview/minibrowser/main.cpp 2024-06-10 21:19:50.000000000 +0200
+++ new/qtwebview-everywhere-src-6.7.3/examples/webview/minibrowser/main.cpp 2024-09-20 04:11:30.000000000 +0200
@@ -11,20 +11,25 @@
#include <QtQml/QQmlContext>
#include <QtWebView/QtWebView>
+using namespace Qt::StringLiterals;
+
// Workaround: As of Qt 5.4 QtQuick does not expose QUrl::fromUserInput.
-class Utils : public QObject {
+class Utils : public QObject
+{
Q_OBJECT
public:
- Utils(QObject *parent = nullptr) : QObject(parent) { }
- Q_INVOKABLE static QUrl fromUserInput(const QString& userInput);
+ using QObject::QObject;
+
+ Q_INVOKABLE static QUrl fromUserInput(const QString &userInput);
};
-QUrl Utils::fromUserInput(const QString& userInput)
+QUrl Utils::fromUserInput(const QString &userInput)
{
- if (userInput.isEmpty())
- return QUrl::fromUserInput("about:blank");
- const QUrl result = QUrl::fromUserInput(userInput);
- return result.isValid() ? result : QUrl::fromUserInput("about:blank");
+ if (!userInput.isEmpty()) {
+ if (const QUrl result = QUrl::fromUserInput(userInput); result.isValid())
+ return result;
+ }
+ return QUrl::fromUserInput("about:blank"_L1);
}
#include "main.moc"
@@ -42,17 +47,16 @@
parser.setApplicationDescription(QGuiApplication::applicationDisplayName());
parser.addHelpOption();
parser.addVersionOption();
- parser.addPositionalArgument("url", "The initial URL to open.");
- QStringList arguments = app.arguments();
- parser.process(arguments);
- const QString initialUrl = parser.positionalArguments().isEmpty() ?
- QStringLiteral("https://www.qt.io") : parser.positionalArguments().first();
+ parser.addPositionalArgument("url"_L1, "The initial URL to open."_L1);
+ parser.process(QCoreApplication::arguments());
+ const QString initialUrl = parser.positionalArguments().value(0, "https://www.qt.io"_L1);
QQmlApplicationEngine engine;
QQmlContext *context = engine.rootContext();
- context->setContextProperty(QStringLiteral("utils"), new Utils(&engine));
- context->setContextProperty(QStringLiteral("initialUrl"),
+ context->setContextProperty("utils"_L1, new Utils(&engine));
+ context->setContextProperty("initialUrl"_L1,
Utils::fromUserInput(initialUrl));
+
QRect geometry = QGuiApplication::primaryScreen()->availableGeometry();
if (!QGuiApplication::styleHints()->showIsFullScreen()) {
const QSize size = geometry.size() * 4 / 5;
@@ -60,12 +64,13 @@
const QPoint pos = geometry.topLeft() + QPoint(offset.width(), offset.height());
geometry = QRect(pos, size);
}
- context->setContextProperty(QStringLiteral("initialX"), geometry.x());
- context->setContextProperty(QStringLiteral("initialY"), geometry.y());
- context->setContextProperty(QStringLiteral("initialWidth"), geometry.width());
- context->setContextProperty(QStringLiteral("initialHeight"), geometry.height());
- engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+ engine.setInitialProperties(QVariantMap{{"x"_L1, geometry.x()},
+ {"y"_L1, geometry.y()},
+ {"width"_L1, geometry.width()},
+ {"height"_L1, geometry.height()}});
+
+ engine.load(QUrl("qrc:/main.qml"_L1));
if (engine.rootObjects().isEmpty())
return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwebview-everywhere-src-6.7.2/examples/webview/minibrowser/main.qml new/qtwebview-everywhere-src-6.7.3/examples/webview/minibrowser/main.qml
--- old/qtwebview-everywhere-src-6.7.2/examples/webview/minibrowser/main.qml 2024-06-10 21:19:50.000000000 +0200
+++ new/qtwebview-everywhere-src-6.7.3/examples/webview/minibrowser/main.qml 2024-09-20 04:11:30.000000000 +0200
@@ -10,10 +10,6 @@
ApplicationWindow {
id: window
visible: true
- x: initialX
- y: initialY
- width: initialWidth
- height: initialHeight
title: webView.title
menuBar: ToolBar {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwebview-everywhere-src-6.7.2/src/plugins/darwin/qdarwinwebview.mm new/qtwebview-everywhere-src-6.7.3/src/plugins/darwin/qdarwinwebview.mm
--- old/qtwebview-everywhere-src-6.7.2/src/plugins/darwin/qdarwinwebview.mm 2024-06-10 21:19:50.000000000 +0200
+++ new/qtwebview-everywhere-src-6.7.3/src/plugins/darwin/qdarwinwebview.mm 2024-09-20 04:11:30.000000000 +0200
@@ -17,6 +17,8 @@
#include <CoreFoundation/CoreFoundation.h>
#include <WebKit/WebKit.h>
+#include <QtCore/qjsondocument.h>
+
#ifdef Q_OS_IOS
#import <UIKit/UIKit.h>
#import <UIKit/UIGestureRecognizerSubclass.h>
@@ -528,7 +530,29 @@
if ([result isKindOfClass:[NSDate class]])
return QDateTime::fromNSDate(static_cast<NSDate *>(result));
- // JSValue also supports arrays and dictionaries, but we don't handle that yet
+ if ([result isKindOfClass:[NSArray class]]
+ || [result isKindOfClass:[NSDictionary class]]) {
+ @try {
+ // Round-trip via JSON, so we don't have to implement conversion
+ // from NSArray and NSDictionary manually.
+
+ // FIXME: NSJSONSerialization requires that any nested object
+ // is NSString, NSNumber, NSArray, NSDictionary, or NSNull, so
+ // nested NSDates are not supported -- meaning we support plain
+ // NSDate (above), but not in an array or dict. To handle this
+ // use-case we'd need a manual conversion.
+ auto jsonData = QByteArray::fromNSData(
+ [NSJSONSerialization dataWithJSONObject:result options:0 error:nil]);
+
+ QJsonParseError parseError;
+ auto jsonDocument = QJsonDocument::fromJson(jsonData, &parseError);
+ if (parseError.error == QJsonParseError::NoError)
+ return jsonDocument.toVariant();
+ } @catch (NSException *) {
+ return QVariant();
+ }
+ }
+
return QVariant();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtwebview-everywhere-src-6.7.2/tests/auto/qml/qquickwebview/tst_qquickwebview.cpp new/qtwebview-everywhere-src-6.7.3/tests/auto/qml/qquickwebview/tst_qquickwebview.cpp
--- old/qtwebview-everywhere-src-6.7.2/tests/auto/qml/qquickwebview/tst_qquickwebview.cpp 2024-06-10 21:19:50.000000000 +0200
+++ new/qtwebview-everywhere-src-6.7.3/tests/auto/qml/qquickwebview/tst_qquickwebview.cpp 2024-09-20 04:11:30.000000000 +0200
@@ -444,7 +444,7 @@
webView()->settings()->setJavaScriptEnabled(jsEnabled);
webView()->setUrl(testUrl);
QVERIFY(waitForLoadSucceeded(webView()));
- QCOMPARE(webView()->title(), expectedTitle);
+ QTRY_COMPARE(webView()->title(), expectedTitle);
webView()->settings()->setJavaScriptEnabled(wasJsEnabled);
}
1
0