Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-sievelib for openSUSE:Factory
checked in at 2025-01-28 15:00:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sievelib (Old)
and /work/SRC/openSUSE:Factory/.python-sievelib.new.2316 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sievelib"
Tue Jan 28 15:00:03 2025 rev:9 rq:1240808 version:1.4.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sievelib/python-sievelib.changes
2024-08-13 13:25:17.111349134 +0200
+++
/work/SRC/openSUSE:Factory/.python-sievelib.new.2316/python-sievelib.changes
2025-01-28 15:00:51.894240833 +0100
@@ -1,0 +2,6 @@
+Tue Jan 28 11:20:13 UTC 2025 - John Paul Adrian Glaubitz
<[email protected]>
+
+- Update to 1.4.2
+ * Assorted fixes
+
+-------------------------------------------------------------------
Old:
----
sievelib-1.4.1.tar.gz
New:
----
sievelib-1.4.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-sievelib.spec ++++++
--- /var/tmp/diff_new_pack.2ZHAdv/_old 2025-01-28 15:00:52.334259025 +0100
+++ /var/tmp/diff_new_pack.2ZHAdv/_new 2025-01-28 15:00:52.334259025 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-sievelib
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2016 Aeneas Jaissle <[email protected]>
#
# All modifications and additions to the file contributed by third parties
@@ -19,7 +19,7 @@
%define modname sievelib
Name: python-%{modname}
-Version: 1.4.1
+Version: 1.4.2
Release: 0
Summary: Client-side Sieve and Managesieve library written in Python
License: MIT
++++++ sievelib-1.4.1.tar.gz -> sievelib-1.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sievelib-1.4.1/PKG-INFO new/sievelib-1.4.2/PKG-INFO
--- old/sievelib-1.4.1/PKG-INFO 2024-07-18 10:53:01.172111700 +0200
+++ new/sievelib-1.4.2/PKG-INFO 2025-01-08 10:26:07.744957700 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: sievelib
-Version: 1.4.1
+Version: 1.4.2
Summary: Client-side SIEVE library
Home-page: https://github.com/tonioo/sievelib
Author: Antoine Nguyen
@@ -176,5 +176,5 @@
.. |latest-version| image:: https://badge.fury.io/py/sievelib.svg
:target: https://badge.fury.io/py/sievelib
.. |workflow| image::
https://github.com/tonioo/sievelib/workflows/Sievelib/badge.svg
-.. |codecov| image::
http://codecov.io/github/tonioo/sievelib/coverage.svg?branch=master
- :target: http://codecov.io/github/tonioo/sievelib?branch=master
+.. |codecov| image::
https://codecov.io/github/tonioo/sievelib/graph/badge.svg?token=B1FWNSY60d
+ :target: https://codecov.io/github/tonioo/sievelib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sievelib-1.4.1/README.rst
new/sievelib-1.4.2/README.rst
--- old/sievelib-1.4.1/README.rst 2024-07-18 10:52:58.000000000 +0200
+++ new/sievelib-1.4.2/README.rst 2025-01-08 10:26:03.000000000 +0100
@@ -157,5 +157,5 @@
.. |latest-version| image:: https://badge.fury.io/py/sievelib.svg
:target: https://badge.fury.io/py/sievelib
.. |workflow| image::
https://github.com/tonioo/sievelib/workflows/Sievelib/badge.svg
-.. |codecov| image::
http://codecov.io/github/tonioo/sievelib/coverage.svg?branch=master
- :target: http://codecov.io/github/tonioo/sievelib?branch=master
+.. |codecov| image::
https://codecov.io/github/tonioo/sievelib/graph/badge.svg?token=B1FWNSY60d
+ :target: https://codecov.io/github/tonioo/sievelib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sievelib-1.4.1/sievelib/commands.py
new/sievelib-1.4.2/sievelib/commands.py
--- old/sievelib-1.4.1/sievelib/commands.py 2024-07-18 10:52:58.000000000
+0200
+++ new/sievelib-1.4.2/sievelib/commands.py 2025-01-08 10:26:03.000000000
+0100
@@ -39,7 +39,7 @@
self.name = name
def __str__(self):
- return "unknown command %s" % self.name
+ return "unknown command '%s'" % self.name
class BadArgument(CommandError):
@@ -224,7 +224,7 @@
if not value.startswith('"') and not value.startswith("["):
target.write("\n")
else:
- target.write(value)
+ target.write(str(value))
if not self.accept_children:
if self.get_type() != "test":
@@ -998,6 +998,7 @@
class VacationCommand(ActionCommand):
+ extension = "vacation"
args_definition = [
{
"name": "subject",
@@ -1093,11 +1094,14 @@
"""
cname = "%sCommand" % name.lower().capitalize()
gl = globals()
- condition = cname not in gl or (
+ condition = cname not in gl
+ if condition:
+ raise UnknownCommand(name)
+ condition = (
checkexists
and gl[cname].extension
and gl[cname].extension not in RequireCommand.loaded_extensions
)
if condition:
- raise UnknownCommand(name)
+ raise ExtensionNotLoaded(gl[cname].extension)
return gl[cname](parent)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sievelib-1.4.1/sievelib/factory.py
new/sievelib-1.4.2/sievelib/factory.py
--- old/sievelib-1.4.1/sievelib/factory.py 2024-07-18 10:52:58.000000000
+0200
+++ new/sievelib-1.4.2/sievelib/factory.py 2025-01-08 10:26:03.000000000
+0100
@@ -153,8 +153,14 @@
tag = condition[1]
cmd = commands.get_command_instance("header", parent)
cmd.check_next_arg("tag", tag)
- cmd.check_next_arg("string", self.__quote_if_necessary(condition[0]))
- cmd.check_next_arg("string", self.__quote_if_necessary(condition[2]))
+ if isinstance(condition[0], list):
+ cmd.check_next_arg("stringlist", [self.__quote_if_necessary(c) for
c in condition[0]])
+ else:
+ cmd.check_next_arg("string",
self.__quote_if_necessary(condition[0]))
+ if isinstance(condition[2], list):
+ cmd.check_next_arg("stringlist", [self.__quote_if_necessary(c) for
c in condition[2]])
+ else:
+ cmd.check_next_arg("string",
self.__quote_if_necessary(condition[2]))
return cmd
def __create_filter(
@@ -188,7 +194,7 @@
ifcontrol = commands.get_command_instance("if")
mtypeobj = commands.get_command_instance(matchtype, ifcontrol)
for c in conditions:
- if c[0].startswith("not"):
+ if not isinstance(c[0], list) and c[0].startswith("not"):
negate = True
cname = c[0].replace("not", "", 1)
else:
@@ -281,7 +287,11 @@
self.require(action.extension)
for arg in actdef[1:]:
self.check_if_arg_is_extension(arg)
- if arg.startswith(":"):
+ if isinstance(arg, int):
+ atype = "number"
+ elif isinstance(arg, list):
+ atype = "stringlist"
+ elif arg.startswith(":"):
atype = "tag"
else:
atype = "string"
@@ -563,7 +573,7 @@
cpt += 1
return False # raise not found
- def dump(self):
+ def dump(self, target=sys.stdout):
"""Dump this object
Available for debugging purposes
@@ -572,13 +582,14 @@
cmd = self.__gen_require_command()
if cmd:
print("Dumping requirements")
- cmd.dump()
- print
+ cmd.dump(target=target)
+ target.write("\n")
for f in self.filters:
- print("Filter Name: %s" % f["name"])
- print("Filter Description: %s" % f["description"])
- f["content"].dump()
+ target.write("Filter Name: %s\n" % f["name"])
+ if "description" in f:
+ target.write("Filter Description: %s\n" % f["description"])
+ f["content"].dump(target=target)
def tosieve(self, target=sys.stdout):
"""Generate the sieve syntax corresponding to this filters set
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sievelib-1.4.1/sievelib/tests/test_factory.py
new/sievelib-1.4.2/sievelib/tests/test_factory.py
--- old/sievelib-1.4.1/sievelib/tests/test_factory.py 2024-07-18
10:52:58.000000000 +0200
+++ new/sievelib-1.4.2/sievelib/tests/test_factory.py 2025-01-08
10:26:03.000000000 +0100
@@ -573,6 +573,69 @@
""",
)
+ def test_vacation(self):
+ self.fs.addfilter(
+ "test",
+ [("Subject", ":matches", "*")],
+ [("vacation", ":subject", "Example Autoresponder Subject",
":days", 7, ":mime", "Example Autoresponder Body")],
+ )
+ output = io.StringIO()
+ self.fs.tosieve(output)
+ self.assertEqual(
+ output.getvalue(),
+ """require ["vacation"];
+
+# Filter: test
+if anyof (header :matches "Subject" "*") {
+ vacation :subject "Example Autoresponder Subject" :days 7 :mime "Example
Autoresponder Body";
+}
+""",
+ )
+
+ def test_dump(self):
+ self.fs.addfilter(
+ "test",
+ [("Subject", ":matches", "*")], [("vacation", ":subject", "Example
Autoresponder Subject", ":days", 7, ":mime", "Example Autoresponder Body")]
+ )
+ output = io.StringIO()
+ self.fs.dump(output)
+ self.assertEqual(
+ output.getvalue(),
+ """require (type: control)
+ [vacation]
+
+Filter Name: test
+if (type: control)
+ anyof (type: test)
+ header (type: test)
+ :matches
+ "Subject"
+ "*"
+ vacation (type: action)
+ :subject
+ "Example Autoresponder Subject"
+ :days
+ 7
+ :mime
+ "Example Autoresponder Body"
+""",
+ )
+
+ def test_stringlist_condition(self):
+ self.fs.addfilter(
+ "test",
+ [(["X-Foo", "X-Bar"], ":contains", ["bar", "baz"])],
+ [],
+ )
+ output = io.StringIO()
+ self.fs.tosieve(output)
+ self.assertEqual(
+ output.getvalue(),
+ """# Filter: test
+if anyof (header :contains ["X-Foo", "X-Bar"] ["bar", "baz"]) {
+}
+"""
+ )
if __name__ == "__main__":
unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sievelib-1.4.1/sievelib/tests/test_parser.py
new/sievelib-1.4.2/sievelib/tests/test_parser.py
--- old/sievelib-1.4.1/sievelib/tests/test_parser.py 2024-07-18
10:52:58.000000000 +0200
+++ new/sievelib-1.4.2/sievelib/tests/test_parser.py 2025-01-08
10:26:03.000000000 +0100
@@ -950,7 +950,18 @@
}
"""
)
- self.assertEqual(self.parser.error, "line 4: unknown command fileinto")
+ self.assertEqual(self.parser.error, "line 4: extension 'fileinto' not
loaded")
+
+ def test_unknown_command(self):
+ self.compilation_ko(
+ b"""require ["mailbox"];
+if header :is "Sender" "[email protected]"
+ {
+ foobar :create "filter"; # move to "filter" mailbox
+ }
+"""
+ )
+ self.assertEqual(self.parser.error, "line 4: unknown command 'foobar'")
def test_exists_get_string_or_list(self):
self.compilation_ok(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sievelib-1.4.1/sievelib.egg-info/PKG-INFO
new/sievelib-1.4.2/sievelib.egg-info/PKG-INFO
--- old/sievelib-1.4.1/sievelib.egg-info/PKG-INFO 2024-07-18
10:53:01.000000000 +0200
+++ new/sievelib-1.4.2/sievelib.egg-info/PKG-INFO 2025-01-08
10:26:07.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: sievelib
-Version: 1.4.1
+Version: 1.4.2
Summary: Client-side SIEVE library
Home-page: https://github.com/tonioo/sievelib
Author: Antoine Nguyen
@@ -176,5 +176,5 @@
.. |latest-version| image:: https://badge.fury.io/py/sievelib.svg
:target: https://badge.fury.io/py/sievelib
.. |workflow| image::
https://github.com/tonioo/sievelib/workflows/Sievelib/badge.svg
-.. |codecov| image::
http://codecov.io/github/tonioo/sievelib/coverage.svg?branch=master
- :target: http://codecov.io/github/tonioo/sievelib?branch=master
+.. |codecov| image::
https://codecov.io/github/tonioo/sievelib/graph/badge.svg?token=B1FWNSY60d
+ :target: https://codecov.io/github/tonioo/sievelib