openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- 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
January 2024
- 1 participants
- 1743 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-yacron for openSUSE:Factory checked in at 2024-01-03 12:24:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-yacron (Old)
and /work/SRC/openSUSE:Factory/.python-yacron.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-yacron"
Wed Jan 3 12:24:28 2024 rev:7 rq:1135636 version:0.19.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-yacron/python-yacron.changes 2022-09-01 22:13:15.044577049 +0200
+++ /work/SRC/openSUSE:Factory/.python-yacron.new.28375/python-yacron.changes 2024-01-03 12:24:34.638576919 +0100
@@ -1,0 +2,13 @@
+Fri Dec 29 10:21:16 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 0.19.0:
+ * Add ability to configure yacron's own logging (#81 #82 #83,
+ * Add config value for SMTP(validate_certs=False) (David
+ Batley)
+ * fixes "Job is always executed immediately on yacron start"
+ (#67)
+ * add an `enabled` option in jobs (#73)
+ * give a better error message when no configuration file is
+ provided or exists (#72)
+
+-------------------------------------------------------------------
Old:
----
yacron-0.17.0.tar.gz
New:
----
yacron-0.19.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-yacron.spec ++++++
--- /var/tmp/diff_new_pack.RQdHOa/_old 2024-01-03 12:24:35.326602057 +0100
+++ /var/tmp/diff_new_pack.RQdHOa/_new 2024-01-03 12:24:35.330602203 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-yacron
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
%define skip_python2 1
%define skip_python36 1
Name: python-yacron
-Version: 0.17.0
+Version: 0.19.0
Release: 0
Summary: Docker-friendly Cron replacement
License: MIT
++++++ yacron-0.17.0.tar.gz -> yacron-0.19.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/HISTORY.rst new/yacron-0.19.0/HISTORY.rst
--- old/yacron-0.17.0/HISTORY.rst 2022-06-26 15:01:52.000000000 +0200
+++ new/yacron-0.19.0/HISTORY.rst 2023-03-11 14:38:45.000000000 +0100
@@ -2,6 +2,19 @@
History
=======
+0.19.0 (2023-03-11)
+-------------------
+
+* Add ability to configure yacron's own logging (#81 #82 #83, gjcarneiro, bdamian)
+* Add config value for SMTP(validate_certs=False) (David Batley)
+
+0.18.0 (2023-01-01)
+-------------------
+
+* fixes "Job is always executed immediately on yacron start" (#67)
+* add an `enabled` option in jobs (#73)
+* give a better error message when no configuration file is provided or exists (#72)
+
0.17.0 (2022-06-26)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/PKG-INFO new/yacron-0.19.0/PKG-INFO
--- old/yacron-0.17.0/PKG-INFO 2022-06-26 15:02:52.030362400 +0200
+++ new/yacron-0.19.0/PKG-INFO 2023-03-11 14:54:57.224146000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: yacron
-Version: 0.17.0
+Version: 0.19.0
Summary: A modern Cron replacement that is Docker-friendly
Home-page: https://github.com/gjcarneiro/yacron
Author: Gustavo Carneiro
@@ -134,9 +134,9 @@
schedule: "*/5 * * * *"
-The `schedule` option can be a string in the traditional crontab format
-(including @reboot, which will only run the job when yacron is initially
-executed), or can be an object with properties. The following configuration
+The `schedule` option can be a string in a crontab format specified by https://github.com/josiahcarlson/parse-crontab (this module is used by yacron).
+Additionally @reboot can be included , which will only run the job when yacron is initially
+executed. Further `schedule` can be an object with properties. The following configuration
runs a command every 5 minutes, but only on the specific date 2017-07-19, and
doesn't run it in any other date:
@@ -767,11 +767,75 @@
sentry:
...
+Custom logging
+++++++++++++++
+
+It's possible to provide a custom logging configuration, via the ``logging``
+configuration section. For example, the following configuration displays log lines with
+an embedded timestamp for each message.
+
+.. code-block:: yaml
+
+ logging:
+ # In the format of:
+ # https://docs.python.org/3/library/logging.config.html#dictionary-schema-det…
+ version: 1
+ disable_existing_loggers: false
+ formatters:
+ simple:
+ format: '%(asctime)s [%(processName)s/%(threadName)s] %(levelname)s (%(name)s): %(message)s'
+ handlers:
+ console:
+ class: logging.StreamHandler
+ level: DEBUG
+ formatter: simple
+ stream: ext://sys.stdout
+ root:
+ level: INFO
+ handlers:
+ - console
+
+Obscure configuration options
++++++++++++++++++++++++++++++
+
+enabled: true|false (default true)
+##################################
+
+(new in yacron 0.18)
+
+It is possible to disable a specific cron job by adding a `enabled: false` option. Jobs
+with `enabled: false` will simply be skipped, as if they aren't there, apart from
+validating the configuration.
+
+.. code-block:: yaml
+
+ jobs:
+ - name: test-01
+ enabled: false # this cron job will not run until you change this to `true`
+ command: echo "foobar"
+ shell: /bin/bash
+ schedule: "* * * * *"
+
+
+
=======
History
=======
+0.19.0 (2023-03-11)
+-------------------
+
+* Add ability to configure yacron's own logging (#81 #82 #83, gjcarneiro, bdamian)
+* Add config value for SMTP(validate_certs=False) (David Batley)
+
+0.18.0 (2023-01-01)
+-------------------
+
+* fixes "Job is always executed immediately on yacron start" (#67)
+* add an `enabled` option in jobs (#73)
+* give a better error message when no configuration file is provided or exists (#72)
+
0.17.0 (2022-06-26)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/README.rst new/yacron-0.19.0/README.rst
--- old/yacron-0.17.0/README.rst 2022-03-30 12:06:01.000000000 +0200
+++ new/yacron-0.19.0/README.rst 2023-03-11 14:54:45.000000000 +0100
@@ -110,9 +110,9 @@
schedule: "*/5 * * * *"
-The `schedule` option can be a string in the traditional crontab format
-(including @reboot, which will only run the job when yacron is initially
-executed), or can be an object with properties. The following configuration
+The `schedule` option can be a string in a crontab format specified by https://github.com/josiahcarlson/parse-crontab (this module is used by yacron).
+Additionally @reboot can be included , which will only run the job when yacron is initially
+executed. Further `schedule` can be an object with properties. The following configuration
runs a command every 5 minutes, but only on the specific date 2017-07-19, and
doesn't run it in any other date:
@@ -742,3 +742,54 @@
report:
sentry:
...
+
+Custom logging
+++++++++++++++
+
+It's possible to provide a custom logging configuration, via the ``logging``
+configuration section. For example, the following configuration displays log lines with
+an embedded timestamp for each message.
+
+.. code-block:: yaml
+
+ logging:
+ # In the format of:
+ # https://docs.python.org/3/library/logging.config.html#dictionary-schema-det…
+ version: 1
+ disable_existing_loggers: false
+ formatters:
+ simple:
+ format: '%(asctime)s [%(processName)s/%(threadName)s] %(levelname)s (%(name)s): %(message)s'
+ handlers:
+ console:
+ class: logging.StreamHandler
+ level: DEBUG
+ formatter: simple
+ stream: ext://sys.stdout
+ root:
+ level: INFO
+ handlers:
+ - console
+
+Obscure configuration options
++++++++++++++++++++++++++++++
+
+enabled: true|false (default true)
+##################################
+
+(new in yacron 0.18)
+
+It is possible to disable a specific cron job by adding a `enabled: false` option. Jobs
+with `enabled: false` will simply be skipped, as if they aren't there, apart from
+validating the configuration.
+
+.. code-block:: yaml
+
+ jobs:
+ - name: test-01
+ enabled: false # this cron job will not run until you change this to `true`
+ command: echo "foobar"
+ shell: /bin/bash
+ schedule: "* * * * *"
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/example/adhoc.yacron.d/_inc.yaml new/yacron-0.19.0/example/adhoc.yacron.d/_inc.yaml
--- old/yacron-0.17.0/example/adhoc.yacron.d/_inc.yaml 2021-10-01 20:24:06.000000000 +0200
+++ new/yacron-0.19.0/example/adhoc.yacron.d/_inc.yaml 2023-03-11 14:36:36.000000000 +0100
@@ -46,3 +46,21 @@
host: localhost
port: 8125
prefix: my.cron.jobs.prefix.test01
+
+
+logging:
+ version: 1
+ disable_existing_loggers: false
+ formatters:
+ simple:
+ format: '%(asctime)s [%(processName)s/%(threadName)s] %(levelname)s (%(name)s): %(message)s'
+ handlers:
+ console:
+ class: logging.StreamHandler
+ level: DEBUG
+ formatter: simple
+ stream: ext://sys.stdout
+ root:
+ level: INFO
+ handlers:
+ - console
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/pyinstaller/requirements.txt new/yacron-0.19.0/pyinstaller/requirements.txt
--- old/yacron-0.17.0/pyinstaller/requirements.txt 2022-06-26 12:27:14.000000000 +0200
+++ new/yacron-0.19.0/pyinstaller/requirements.txt 2023-03-11 11:29:20.000000000 +0100
@@ -4,7 +4,7 @@
appdirs==1.4.4
async-timeout==4.0.2
attrs==21.2.0
-certifi==2021.5.30
+certifi==2022.12.7
chardet==3.0.4
coverage==5.5
crontab==0.22.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/requirements_dev.txt new/yacron-0.19.0/requirements_dev.txt
--- old/yacron-0.17.0/requirements_dev.txt 2022-06-26 12:24:45.000000000 +0200
+++ new/yacron-0.19.0/requirements_dev.txt 2023-03-11 11:29:20.000000000 +0100
@@ -1,33 +1,10 @@
-aiohttp==3.8.1
-appdirs==1.4.4
-async-timeout==4.0.2
-attrs==21.2.0
-chardet==3.0.4
-coverage==5.5
-distlib==0.3.2
-filelock==3.0.12
-flake8==3.9.2
-idna==3.2
-iniconfig==1.1.1
-mccabe==0.6.1
-multidict==5.1.0
+aiohttp~=3.8
+flake8
mypy==0.910
-mypy-extensions==0.4.3
-packaging==20.9
-pluggy==0.13.1
-py==1.10.0
-pycodestyle==2.7.0
-pyflakes==2.3.1
-pyparsing==2.4.7
-pytest==7.1.1
-pytest-cov==2.12.1
-pytz==2021.1
-six==1.16.0
-toml==0.10.2
-tomli==2.0.1
-tox==3.23.1
-typing-extensions==3.10.0.0
-virtualenv==20.4.7
-yarl==1.6.3
-types-pytz==2021.1.0
-pytest-asyncio==0.18.3
+mypy-extensions
+pytest
+pytest-asyncio
+pytest-cov
+tox
+types-pytz
+pytest-asyncio~=0.18
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/tests/test_config.py new/yacron-0.19.0/tests/test_config.py
--- old/yacron-0.17.0/tests/test_config.py 2021-11-10 11:42:42.000000000 +0100
+++ new/yacron-0.19.0/tests/test_config.py 2023-03-11 14:36:36.000000000 +0100
@@ -31,7 +31,7 @@
def test_simple_config1():
- jobs, web_config, _ = config.parse_config_string(
+ conf = config.parse_config_string(
"""
defaults:
shell: /bin/bash
@@ -51,9 +51,9 @@
""",
"",
)
- assert web_config is None
- assert len(jobs) == 1
- job = jobs[0]
+ assert conf.web_config is None
+ assert len(conf.jobs) == 1
+ job = conf.jobs[0]
assert job.name == "test-03"
assert job.command == (
"trap \"echo '(ignoring SIGTERM)'\" TERM\n"
@@ -69,7 +69,7 @@
def test_config_default_report():
- jobs, _, _ = config.parse_config_string(
+ conf = config.parse_config_string(
"""
defaults:
onFailure:
@@ -89,8 +89,8 @@
""",
"",
)
- assert len(jobs) == 1
- job = jobs[0]
+ assert len(conf.jobs) == 1
+ job = conf.jobs[0]
assert job.onFailure == (
{
"report": {
@@ -117,6 +117,7 @@
},
"tls": False,
"starttls": False,
+ "validate_certs": False,
"html": False,
},
"sentry": (
@@ -137,7 +138,7 @@
def test_config_default_report_override():
# even if the default says send email on error, it should be possible for
# specific jobs to override the default and disable sending email.
- jobs, _, _ = config.parse_config_string(
+ conf = config.parse_config_string(
"""
defaults:
onFailure:
@@ -162,8 +163,8 @@
""",
"",
)
- assert len(jobs) == 1
- job = jobs[0]
+ assert len(conf.jobs) == 1
+ job = conf.jobs[0]
assert job.onFailure == (
{
"report": {
@@ -190,6 +191,7 @@
},
"tls": False,
"starttls": False,
+ "validate_certs": False,
"html": False,
},
"sentry": (
@@ -208,13 +210,13 @@
def test_empty_config1():
- jobs, web_config, _ = config.parse_config_string("", "")
- assert len(jobs) == 0
- assert web_config is None
+ conf = config.parse_config_string("", "")
+ assert len(conf.jobs) == 0
+ assert conf.web_config is None
def test_environ_file():
- jobs, _, _ = config.parse_config_string(
+ conf = config.parse_config_string(
"""
defaults:
shell: /bin/bash
@@ -237,7 +239,7 @@
""",
"",
)
- job = jobs[0]
+ job = conf.jobs[0]
# NOTE: the file format implicitly verifies that the parsing is being
# done correctly on these fronts:
@@ -261,7 +263,7 @@
def test_invalid_environ_file():
# invalid file (no key-value)
with pytest.raises(ConfigError) as exc:
- jobs, _, _ = config.parse_config_string(
+ config.parse_config_string(
"""
defaults:
shell: /bin/bash
@@ -289,7 +291,7 @@
# non-existent file should raise ConfigError, not OSError
with pytest.raises(ConfigError) as exc:
- jobs, _, _ = config.parse_config_string(
+ config.parse_config_string(
"""
defaults:
shell: /bin/bash
@@ -317,12 +319,39 @@
def test_config_include():
- jobs, _ = config.parse_config(
+ conf = config.parse_config(
os.path.join(os.path.dirname(__file__), "test_include_parent.yaml")
)
- assert len(jobs) == 2
- job1, job2 = jobs
+ assert len(conf.jobs) == 2
+ job1, job2 = conf.jobs
assert job1.name == "common-task"
assert job2.name == "test-03"
assert job1.shell == "/bin/ksh"
assert job2.shell == "/bin/ksh"
+
+
+def test_logging_config():
+ conf = config.parse_config_string(
+ """
+logging:
+ version: 1
+ incremental: false
+ disable_existing_loggers: false
+ formatters: one
+ filters: two
+ handlers: three
+ loggers: four
+ root: five
+ """,
+ "",
+ )
+ assert conf.logging_config == {
+ "version": 1,
+ "incremental": False,
+ "disable_existing_loggers": False,
+ "formatters": "one",
+ "filters": "two",
+ "handlers": "three",
+ "loggers": "four",
+ "root": "five",
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/tests/test_cron.py new/yacron-0.19.0/tests/test_cron.py
--- old/yacron-0.17.0/tests/test_cron.py 2022-04-03 17:21:22.000000000 +0200
+++ new/yacron-0.19.0/tests/test_cron.py 2023-03-11 11:29:20.000000000 +0100
@@ -79,7 +79,7 @@
- name: test
command: |
echo "foobar"
- schedule: "* * * * *"
+ schedule: "@reboot"
"""
JOB_THAT_FAILS = """
@@ -88,7 +88,7 @@
command: |
echo "foobar"
exit 2
- schedule: "* * * * *"
+ schedule: "@reboot"
"""
@@ -143,7 +143,7 @@
command: |
echo "foobar"
exit 2
- schedule: "* * * * *"
+ schedule: "@reboot"
onFailure:
retry:
maximumRetries: 2
@@ -153,6 +153,7 @@
"""
+(a)pytest.mark.asyncio
async def test_fail_retry(tracing_running_job):
cron = yacron.cron.Cron(None, config_yaml=RETRYING_JOB_THAT_FAILS)
@@ -211,13 +212,14 @@
echo "starting..."
sleep 10
echo "all done."
- schedule: "* * * * *"
+ schedule: "@reboot"
captureStdout: true
executionTimeout: 0.25
killTimeout: 0.25
"""
+(a)pytest.mark.asyncio
async def test_execution_timeout(tracing_running_job):
cron = yacron.cron.Cron(None, config_yaml=JOB_THAT_HANGS)
@@ -266,7 +268,7 @@
echo "starting..."
sleep 0.5
echo "all done."
- schedule: "* * * * *"
+ schedule: "@reboot"
captureStdout: true
concurrencyPolicy: {policy}
"""
@@ -277,6 +279,7 @@
"policy,expected_numjobs,expected_max_running",
[("Allow", 2, 2), ("Forbid", 1, 1), ("Replace", 2, 1)],
)
+(a)pytest.mark.asyncio
async def test_concurrency_policy(
monkeypatch,
tracing_running_job,
@@ -366,7 +369,7 @@
command: |
echo "foobar"
exit 2
- schedule: "* * * * *"
+ schedule: "@reboot"
onFailure:
retry:
maximumRetries: 1
@@ -376,7 +379,7 @@
"""
-# @pytest.mark.xfail
+(a)pytest.mark.asyncio
async def test_concurrency_and_backoff(monkeypatch, tracing_running_job):
START_TIME = datetime.datetime(
year=1999,
@@ -483,7 +486,7 @@
@pytest.mark.parametrize(
- "schedule, timezone, utc, now, reboot, result",
+ "schedule, timezone, utc, now, startup, enabled, result",
[
(
"* * * * *",
@@ -491,6 +494,7 @@
"",
DT(2020, 7, 20, 14, 59, 1, tzinfo=UTC),
False,
+ "",
True,
),
(
@@ -499,14 +503,25 @@
"",
DT(2020, 7, 20, 14, 59, 1, tzinfo=UTC),
False,
+ "",
True,
),
(
+ "59 14 * * *",
+ "",
+ "",
+ DT(2020, 7, 20, 14, 59, 1, tzinfo=UTC),
+ True, # startup
+ "",
+ False,
+ ),
+ (
"49 14 * * *",
"",
"",
DT(2020, 7, 20, 14, 59, 1, tzinfo=UTC),
False,
+ "",
False,
),
(
@@ -515,6 +530,7 @@
"utc: true",
DT(2020, 7, 20, 14, 59, 1, tzinfo=UTC),
False,
+ "",
True,
),
(
@@ -523,6 +539,7 @@
"utc: true", # London is UTC+1 during DST
DT(2020, 7, 20, 14, 59, 1, tzinfo=UTC).astimezone(LONDON),
False,
+ "",
True,
),
(
@@ -531,6 +548,7 @@
"utc: false", # London is UTC+1 during DST
DT(2020, 7, 20, 14, 59, 1, tzinfo=UTC).astimezone(LONDON),
False,
+ "",
False,
),
(
@@ -539,6 +557,7 @@
"",
DT(2020, 7, 20, 15, 1, 1, tzinfo=UTC),
False,
+ "",
True,
),
(
@@ -547,6 +566,7 @@
"",
DT(2020, 7, 20, 15, 1, 1, tzinfo=UTC),
False,
+ "",
False,
),
(
@@ -555,6 +575,7 @@
"",
DT(2020, 7, 20, 15, 1, 1, tzinfo=UTC),
False,
+ "",
False,
),
(
@@ -563,12 +584,24 @@
"",
DT(2020, 7, 20, 15, 1, 1, tzinfo=UTC),
True,
+ "",
True,
),
+
+ # enabled: false
+ (
+ "* * * * *",
+ "",
+ "",
+ DT(2020, 7, 20, 14, 59, 1, tzinfo=UTC),
+ False,
+ "enabled: false",
+ False,
+ ),
],
)
def test_job_should_run(
- monkeypatch, schedule, timezone, utc, now, reboot, result
+ monkeypatch, schedule, timezone, utc, now, startup, enabled, result
):
def get_now(timezone):
print("timezone: ", timezone)
@@ -580,7 +613,7 @@
monkeypatch.setattr("yacron.cron.get_now", get_now)
- config_yaml = """
+ config_yaml = f"""
jobs:
- name: test
command: |
@@ -588,10 +621,9 @@
schedule: "{schedule}"
{timezone}
{utc}
- """.format(
- schedule=schedule, timezone=timezone, utc=utc
- )
+ {enabled}
+ """
print(config_yaml)
cron = yacron.cron.Cron(None, config_yaml=config_yaml)
job = list(cron.cron_jobs.values())[0]
- assert cron.job_should_run(reboot, job) == result
+ assert cron.job_should_run(startup, job) == result
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/tests/test_job.py new/yacron-0.19.0/tests/test_job.py
--- old/yacron-0.17.0/tests/test_job.py 2022-06-26 12:35:27.000000000 +0200
+++ new/yacron-0.19.0/tests/test_job.py 2023-03-11 14:36:36.000000000 +0100
@@ -42,7 +42,7 @@
"cronjob-1", "stderr", fake_stream, "", save_limit
)
- config, _, _ = yacron.config.parse_config_string(
+ conf = yacron.config.parse_config_string(
"""
jobs:
- name: test
@@ -52,7 +52,7 @@
""",
"",
)
- job_config = config[0]
+ job_config = conf.jobs[0]
job = yacron.job.RunningJob(job_config, None)
async def producer(fake_stream):
@@ -76,7 +76,7 @@
"cronjob-1", "stderr", fake_stream, "", 500
)
- config, _, _ = yacron.config.parse_config_string(
+ conf = yacron.config.parse_config_string(
"""
jobs:
- name: test
@@ -86,7 +86,7 @@
""",
"",
)
- job_config = config[0]
+ job_config = conf.jobs[0]
job = yacron.job.RunningJob(job_config, None)
async def producer(fake_stream):
@@ -173,8 +173,8 @@
)
@pytest.mark.asyncio
async def test_report_mail(success, stdout, stderr, subject, body):
- config, _, _ = yacron.config.parse_config_string(A_JOB, "")
- job_config = config[0]
+ conf = yacron.config.parse_config_string(A_JOB, "")
+ job_config = conf.jobs[0]
print(job_config.onSuccess["report"])
job = Mock(
config=job_config,
@@ -226,7 +226,12 @@
assert smtp_init_args == (
(),
- {"hostname": "smtp1", "port": 1025, "use_tls": False},
+ {
+ "hostname": "smtp1",
+ "port": 1025,
+ "use_tls": False,
+ "validate_certs": False,
+ },
)
assert len(connect_calls) == 1
assert len(start_tls_calls) == 1
@@ -309,8 +314,8 @@
tmpdir,
monkeypatch,
):
- config, _, _ = yacron.config.parse_config_string(A_JOB, "")
- job_config = config[0]
+ conf = yacron.config.parse_config_string(A_JOB, "")
+ job_config = conf.jobs[0]
p = tmpdir.join("sentry-secret-dsn")
p.write("http://xxx:yyy@sentry/2")
@@ -430,7 +435,7 @@
with tempfile.TemporaryDirectory() as tmp:
out_file_path = os.path.join(tmp, "unit_test_file")
- config, _, _ = yacron.config.parse_config_string(
+ conf = yacron.config.parse_config_string(
f"""
jobs:
- name: test
@@ -446,7 +451,7 @@
""",
"",
)
- job_config = config[0]
+ job_config = conf.jobs[0]
job = Mock(
config=job_config,
@@ -526,7 +531,7 @@
else:
command_snippet = " command: " + command
- config, _, _ = yacron.config.parse_config_string(
+ conf = yacron.config.parse_config_string(
"""
jobs:
- name: test
@@ -543,7 +548,7 @@
),
"",
)
- job_config = config[0]
+ job_config = conf.jobs[0]
job = yacron.job.RunningJob(job_config, None)
@@ -568,7 +573,7 @@
@pytest.mark.asyncio
async def test_execution_timeout():
- config, _, _ = yacron.config.parse_config_string(
+ conf = yacron.config.parse_config_string(
"""
jobs:
- name: test
@@ -583,7 +588,7 @@
""",
"",
)
- job_config = config[0]
+ job_config = conf.jobs[0]
job = yacron.job.RunningJob(job_config, None)
await job.start()
await job.wait()
@@ -592,7 +597,7 @@
@pytest.mark.asyncio
async def test_error1():
- config, _, _ = yacron.config.parse_config_string(
+ conf = yacron.config.parse_config_string(
"""
jobs:
- name: test
@@ -601,7 +606,7 @@
""",
"",
)
- job_config = config[0]
+ job_config = conf.jobs[0]
job = yacron.job.RunningJob(job_config, None)
await job.start()
@@ -612,7 +617,7 @@
@pytest.mark.asyncio
async def test_error2():
- config, _, _ = yacron.config.parse_config_string(
+ conf = yacron.config.parse_config_string(
"""
jobs:
- name: test
@@ -621,7 +626,7 @@
""",
"",
)
- job_config = config[0]
+ job_config = conf.jobs[0]
job = yacron.job.RunningJob(job_config, None)
with pytest.raises(RuntimeError):
@@ -630,7 +635,7 @@
@pytest.mark.asyncio
async def test_error3():
- config, _, _ = yacron.config.parse_config_string(
+ conf = yacron.config.parse_config_string(
"""
jobs:
- name: test
@@ -639,7 +644,7 @@
""",
"",
)
- job_config = config[0]
+ job_config = conf.jobs[0]
job = yacron.job.RunningJob(job_config, None)
with pytest.raises(RuntimeError):
@@ -673,7 +678,7 @@
host, port = transport.get_extra_info("sockname")
print("Listening UDP on %s:%s" % (host, port))
- config, _, _ = yacron.config.parse_config_string(
+ conf = yacron.config.parse_config_string(
"""
jobs:
- name: test
@@ -688,7 +693,7 @@
),
"",
)
- job_config = config[0]
+ job_config = conf.jobs[0]
job = yacron.job.RunningJob(job_config, None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/yacron/__main__.py new/yacron-0.19.0/yacron/__main__.py
--- old/yacron-0.17.0/yacron/__main__.py 2022-06-25 16:25:07.000000000 +0200
+++ new/yacron-0.19.0/yacron/__main__.py 2023-03-11 11:29:20.000000000 +0100
@@ -4,18 +4,27 @@
import logging
import signal
import sys
+import os
from yacron.cron import Cron, ConfigError
import yacron.version
+CONFIG_DEFAULT = "/etc/yacron.d"
+
def main_loop(loop):
- parser = argparse.ArgumentParser()
+ parser = argparse.ArgumentParser(prog="yacron")
parser.add_argument(
- "-c", "--config", default="/etc/yacron.d", metavar="FILE-OR-DIR"
+ "-c",
+ "--config",
+ default=CONFIG_DEFAULT,
+ metavar="FILE-OR-DIR",
+ help="configuration file, or directory containing configuration files",
)
parser.add_argument("-l", "--log-level", default="INFO")
- parser.add_argument("-v", "--validate-config", default=False, action="store_true")
+ parser.add_argument(
+ "-v", "--validate-config", default=False, action="store_true"
+ )
parser.add_argument("--version", default=False, action="store_true")
args = parser.parse_args()
@@ -27,6 +36,15 @@
print(yacron.version.version)
sys.exit(0)
+ if args.config == CONFIG_DEFAULT and not os.path.exists(args.config):
+ print(
+ "yacron error: configuration file not found, please provide one "
+ "with the --config option",
+ file=sys.stderr,
+ )
+ parser.print_help(sys.stderr)
+ sys.exit(1)
+
try:
cron = Cron(args.config)
except ConfigError as err:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/yacron/config.py new/yacron-0.19.0/yacron/config.py
--- old/yacron-0.17.0/yacron/config.py 2021-12-05 14:34:57.000000000 +0100
+++ new/yacron-0.19.0/yacron/config.py 2023-03-11 14:36:36.000000000 +0100
@@ -1,14 +1,16 @@
+from dataclasses import dataclass
from pwd import getpwnam
from grp import getgrnam
import logging
import os.path
from typing import Union # noqa
-from typing import List, Optional, Any, Dict, NewType, Tuple
+from typing import List, Optional, Any, Dict, NewType
import datetime
import pytz
import strictyaml
from strictyaml import Optional as Opt, EmptyDict
+from strictyaml import Any as YamlAny
from strictyaml import (
Bool,
EmptyNone,
@@ -27,6 +29,7 @@
logger = logging.getLogger("yacron.config")
WebConfig = NewType("WebConfig", Dict[str, Any])
JobDefaults = NewType("JobDefaults", Dict[str, Any])
+LoggingConfig = NewType("LoggingConfig", Dict[str, Any])
class ConfigError(Exception):
@@ -73,6 +76,7 @@
"smtpPort": 25,
"tls": False,
"starttls": False,
+ "validate_certs": False,
"html": False,
"subject": DEFAULT_SUBJECT_TEMPLATE,
"body": DEFAULT_BODY_TEMPLATE,
@@ -92,7 +96,7 @@
"captureStderr": True,
"captureStdout": False,
"saveLimit": 4096,
- "maxLineLength": 16*1024*1024,
+ "maxLineLength": 16 * 1024 * 1024,
"utc": True,
"timezone": None,
"failsWhen": {
@@ -118,6 +122,7 @@
"killTimeout": 30,
"statsd": None,
"streamPrefix": "[{job_name} {stream_name}] ",
+ "enabled": True,
}
@@ -158,6 +163,7 @@
),
Opt("tls"): Bool(),
Opt("starttls"): Bool(),
+ Opt("validate_certs"): Bool(),
Opt("html"): Bool(),
}
),
@@ -210,6 +216,7 @@
Opt("user"): Str() | Int(),
Opt("group"): Str() | Int(),
Opt("streamPrefix"): Str(),
+ Opt("enabled"): Bool(),
}
_job_schema_dict = dict(_job_defaults_common)
@@ -237,6 +244,18 @@
Opt("jobs"): Seq(Map(_job_schema_dict)),
Opt("web"): Map({"listen": Seq(Str())}),
Opt("include"): Seq(Str()),
+ Opt("logging"): Map(
+ {
+ "version": Int(),
+ Opt("incremental"): Bool(),
+ Opt("disable_existing_loggers"): Bool(),
+ Opt("formatters"): YamlAny(),
+ Opt("filters"): YamlAny(),
+ Opt("handlers"): YamlAny(),
+ Opt("loggers"): YamlAny(),
+ Opt("root"): YamlAny(),
+ }
+ ),
}
)
@@ -292,6 +311,7 @@
self.saveLimit = config.pop("saveLimit")
self.maxLineLength = config.pop("maxLineLength")
self.utc = config.pop("utc")
+ self.enabled: bool = config.pop("enabled")
self.timezone = None # type: Optional[datetime.tzinfo]
if config["timezone"] is not None:
try:
@@ -397,9 +417,15 @@
return environ
-def parse_config_string(
- data: str, path: str
-) -> Tuple[List[JobConfig], Optional[WebConfig], JobDefaults]:
+@dataclass
+class YacronConfig:
+ jobs: List[JobConfig]
+ web_config: Optional[WebConfig]
+ job_defaults: JobDefaults
+ logging_config: Optional[LoggingConfig]
+
+
+def parse_config_string(data: str, path: str) -> YacronConfig:
try:
doc = strictyaml.load(data, CONFIG_SCHEMA, label=path).data
except YAMLError as ex:
@@ -408,36 +434,44 @@
inc_defaults_merged: dict = {}
jobs = []
webconf = WebConfig(doc["web"]) if "web" in doc else None
+ logging_conf = LoggingConfig(doc["logging"]) if "logging" in doc else None
for include in doc.get("include", ()):
inc_path = os.path.join(os.path.dirname(path), include)
- inc_jobs, inc_webconf, inc_defaults = parse_config_file(inc_path)
+ inc_config = parse_config_file(inc_path)
inc_defaults_merged = dict(
- mergedicts(inc_defaults_merged, inc_defaults)
+ mergedicts(inc_defaults_merged, inc_config.job_defaults)
)
- jobs.extend(inc_jobs)
- if inc_webconf:
+ jobs.extend(inc_config.jobs)
+ if inc_config.web_config:
if webconf:
- raise ConfigError("multiple web config")
- webconf = inc_webconf
+ raise ConfigError("multiple web configs")
+ webconf = inc_config.web_config
+ if inc_config.logging_config:
+ if logging_conf:
+ raise ConfigError("multiple logging configs")
+ logging_conf = inc_config.logging_config
defaults = dict(mergedicts(DEFAULT_CONFIG, inc_defaults_merged))
defaults = dict(mergedicts(defaults, doc.get("defaults", {})))
for config_job in doc.get("jobs", []):
job_dict = dict(mergedicts(defaults, config_job))
jobs.append(JobConfig(job_dict))
- return jobs, webconf, JobDefaults(defaults)
+ return YacronConfig(
+ jobs=jobs,
+ web_config=webconf,
+ job_defaults=JobDefaults(defaults),
+ logging_config=logging_conf,
+ )
def parse_config_file(
path: str,
-) -> Tuple[List[JobConfig], Optional[WebConfig], JobDefaults]:
+) -> YacronConfig:
with open(path, "rt", encoding="utf-8") as stream:
data = stream.read()
return parse_config_string(data, path)
-def parse_config(
- config_arg: str,
-) -> Tuple[List[JobConfig], Optional[WebConfig]]:
+def parse_config(config_arg: str) -> YacronConfig:
jobs = []
config_errors = {}
web_config = None
@@ -449,16 +483,16 @@
continue
if ext in {".yml", ".yaml"}:
try:
- config, webconf, _ = parse_config_file(direntry.path)
+ config = parse_config_file(direntry.path)
except ConfigError as err:
config_errors[direntry.path] = str(err)
except OSError as ex:
config_errors[config_arg] = str(ex)
else:
- jobs.extend(config)
- if webconf is not None:
+ jobs.extend(config.jobs)
+ if config.web_config is not None:
if web_config is None:
- web_config = webconf
+ web_config = config.web_config
web_config_source_fname = direntry.path
else:
raise ConfigError(
@@ -469,11 +503,16 @@
)
else:
try:
- config, web_config, _ = parse_config_file(config_arg)
+ config = parse_config_file(config_arg)
except OSError as ex:
config_errors[config_arg] = str(ex)
else:
- jobs.extend(config)
+ jobs.extend(config.jobs)
if config_errors:
raise ConfigError("\n---".join(config_errors.values()))
- return jobs, web_config
+ return YacronConfig(
+ jobs=jobs,
+ web_config=config.web_config,
+ job_defaults=config.job_defaults,
+ logging_config=config.logging_config,
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/yacron/cron.py new/yacron-0.19.0/yacron/cron.py
--- old/yacron-0.17.0/yacron/cron.py 2022-06-26 11:35:49.000000000 +0200
+++ new/yacron-0.19.0/yacron/cron.py 2023-03-11 14:36:36.000000000 +0100
@@ -1,3 +1,4 @@
+import logging.config
import asyncio
import asyncio.subprocess
import datetime
@@ -13,6 +14,8 @@
ConfigError,
parse_config_string,
WebConfig,
+ YacronConfig,
+ JobDefaults,
)
from yacron.job import RunningJob, JobRetryState
from crontab import CronTab # noqa
@@ -82,8 +85,10 @@
self.update_config()
if config_yaml is not None:
# config_yaml is for unit testing
- config, _, _ = parse_config_string(config_yaml, "")
- self.cron_jobs = OrderedDict((job.name, job) for job in config)
+ config = parse_config_string(config_yaml, "")
+ self.cron_jobs = OrderedDict(
+ (job.name, job) for job in config.jobs
+ )
self._wait_for_running_jobs_task = None # type: Optional[asyncio.Task]
self._stop_event = asyncio.Event()
@@ -98,10 +103,11 @@
)
startup = True
+ logging_configured = False
while not self._stop_event.is_set():
try:
- web_config = self.update_config()
- await self.start_stop_web_app(web_config)
+ config = self.update_config()
+ await self.start_stop_web_app(config.web_config)
except ConfigError as err:
logger.error(
"Error in configuration file(s), so not updating "
@@ -110,6 +116,19 @@
)
except Exception: # pragma: nocover
logger.exception("please report this as a bug (1)")
+ if config.logging_config is not None and not logging_configured:
+ logging_configured = True
+ try:
+ logging.config.dictConfig(config.logging_config)
+ except Exception as ex:
+ logger.error(
+ "Error while configuring logging: %s\n"
+ "Check for correct format at "
+ "https://docs.python.org/3/library/logging.config.html"
+ "#dictionary-schema-details\n%s",
+ ex,
+ config.logging_config,
+ )
await self.spawn_jobs(startup)
startup = False
sleep_interval = next_sleep_interval()
@@ -135,12 +154,17 @@
logger.debug("Signalling shutdown")
self._stop_event.set()
- def update_config(self) -> Optional[WebConfig]:
+ def update_config(self) -> YacronConfig:
if self.config_arg is None:
- return None
- config, web_config = parse_config(self.config_arg)
- self.cron_jobs = OrderedDict((job.name, job) for job in config)
- return web_config
+ return YacronConfig(
+ jobs=[],
+ web_config=None,
+ job_defaults=JobDefaults({}),
+ logging_config=None,
+ )
+ config = parse_config(self.config_arg)
+ self.cron_jobs = OrderedDict((job.name, job) for job in config.jobs)
+ return config
async def _web_get_version(self, request: web.Request) -> web.Response:
return web.Response(text=yacron.version.version)
@@ -250,18 +274,24 @@
@staticmethod
def job_should_run(startup: bool, job: JobConfig) -> bool:
- if (
- startup
- and isinstance(job.schedule, str)
- and job.schedule == "@reboot"
- ):
+ if not job.enabled:
logger.debug(
- "Job %s (%s) is scheduled for startup (@reboot)",
+ "Job %s (%s) is disabled in the config",
job.name,
job.schedule_unparsed,
)
- return True
- elif isinstance(job.schedule, CronTab):
+ return False
+ if startup:
+ if isinstance(job.schedule, str) and job.schedule == "@reboot":
+ logger.debug(
+ "Job %s (%s) is scheduled for startup (@reboot)",
+ job.name,
+ job.schedule_unparsed,
+ )
+ return True
+ else:
+ return False
+ if isinstance(job.schedule, CronTab):
crontab = job.schedule # type: CronTab
if crontab.test(get_now(job.timezone).replace(second=0)):
logger.debug(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/yacron/job.py new/yacron-0.19.0/yacron/job.py
--- old/yacron-0.17.0/yacron/job.py 2022-06-26 12:35:04.000000000 +0200
+++ new/yacron-0.19.0/yacron/job.py 2023-03-11 11:29:20.000000000 +0100
@@ -43,8 +43,8 @@
stream_prefix: str,
save_limit: int,
) -> None:
- self.save_top = [] # type: List[str]
- self.save_bottom = [] # type: List[str]
+ self.save_top: List[str] = []
+ self.save_bottom: List[str] = []
self.job_name = job_name
self.save_limit = save_limit
self.stream_name = stream_name
@@ -207,7 +207,10 @@
else:
message.set_content(body)
smtp = aiosmtplib.SMTP(
- hostname=smtp_host, port=smtp_port, use_tls=mail["tls"]
+ hostname=smtp_host,
+ port=smtp_port,
+ use_tls=mail["tls"],
+ validate_certs=mail["validate_certs"],
)
await smtp.connect()
if mail["starttls"]:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/yacron/version.py new/yacron-0.19.0/yacron/version.py
--- old/yacron-0.17.0/yacron/version.py 2022-06-26 15:02:51.000000000 +0200
+++ new/yacron-0.19.0/yacron/version.py 2023-03-11 14:54:57.000000000 +0100
@@ -1,5 +1,5 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-__version__ = version = '0.17.0'
-__version_tuple__ = version_tuple = (0, 17, 0)
+__version__ = version = '0.19.0'
+__version_tuple__ = version_tuple = (0, 19, 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yacron-0.17.0/yacron.egg-info/PKG-INFO new/yacron-0.19.0/yacron.egg-info/PKG-INFO
--- old/yacron-0.17.0/yacron.egg-info/PKG-INFO 2022-06-26 15:02:52.000000000 +0200
+++ new/yacron-0.19.0/yacron.egg-info/PKG-INFO 2023-03-11 14:54:57.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: yacron
-Version: 0.17.0
+Version: 0.19.0
Summary: A modern Cron replacement that is Docker-friendly
Home-page: https://github.com/gjcarneiro/yacron
Author: Gustavo Carneiro
@@ -134,9 +134,9 @@
schedule: "*/5 * * * *"
-The `schedule` option can be a string in the traditional crontab format
-(including @reboot, which will only run the job when yacron is initially
-executed), or can be an object with properties. The following configuration
+The `schedule` option can be a string in a crontab format specified by https://github.com/josiahcarlson/parse-crontab (this module is used by yacron).
+Additionally @reboot can be included , which will only run the job when yacron is initially
+executed. Further `schedule` can be an object with properties. The following configuration
runs a command every 5 minutes, but only on the specific date 2017-07-19, and
doesn't run it in any other date:
@@ -767,11 +767,75 @@
sentry:
...
+Custom logging
+++++++++++++++
+
+It's possible to provide a custom logging configuration, via the ``logging``
+configuration section. For example, the following configuration displays log lines with
+an embedded timestamp for each message.
+
+.. code-block:: yaml
+
+ logging:
+ # In the format of:
+ # https://docs.python.org/3/library/logging.config.html#dictionary-schema-det…
+ version: 1
+ disable_existing_loggers: false
+ formatters:
+ simple:
+ format: '%(asctime)s [%(processName)s/%(threadName)s] %(levelname)s (%(name)s): %(message)s'
+ handlers:
+ console:
+ class: logging.StreamHandler
+ level: DEBUG
+ formatter: simple
+ stream: ext://sys.stdout
+ root:
+ level: INFO
+ handlers:
+ - console
+
+Obscure configuration options
++++++++++++++++++++++++++++++
+
+enabled: true|false (default true)
+##################################
+
+(new in yacron 0.18)
+
+It is possible to disable a specific cron job by adding a `enabled: false` option. Jobs
+with `enabled: false` will simply be skipped, as if they aren't there, apart from
+validating the configuration.
+
+.. code-block:: yaml
+
+ jobs:
+ - name: test-01
+ enabled: false # this cron job will not run until you change this to `true`
+ command: echo "foobar"
+ shell: /bin/bash
+ schedule: "* * * * *"
+
+
+
=======
History
=======
+0.19.0 (2023-03-11)
+-------------------
+
+* Add ability to configure yacron's own logging (#81 #82 #83, gjcarneiro, bdamian)
+* Add config value for SMTP(validate_certs=False) (David Batley)
+
+0.18.0 (2023-01-01)
+-------------------
+
+* fixes "Job is always executed immediately on yacron start" (#67)
+* add an `enabled` option in jobs (#73)
+* give a better error message when no configuration file is provided or exists (#72)
+
0.17.0 (2022-06-26)
-------------------
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-weasyprint for openSUSE:Factory checked in at 2024-01-03 12:24:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-weasyprint (Old)
and /work/SRC/openSUSE:Factory/.python-weasyprint.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-weasyprint"
Wed Jan 3 12:24:25 2024 rev:10 rq:1135635 version:60.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-weasyprint/python-weasyprint.changes 2023-06-20 16:48:29.467409296 +0200
+++ /work/SRC/openSUSE:Factory/.python-weasyprint.new.28375/python-weasyprint.changes 2024-01-03 12:24:32.766508518 +0100
@@ -1,0 +2,31 @@
+Fri Dec 29 10:19:12 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 60.2:
+ * Fix SVG markers size, position and drawing
+ * Draw background behind absolutely positioned replaced boxes
+ * Don’t crash with bitmap fonts with no "glyf" table
+ * Improve SVG text-anchor attribute
+ * Fix crash caused by wrong UTF-8 indices
+ * Print form fields
+ * Add support for textLength and lengthAdjust in SVG text
+ elements
+ * Handle <wbr> tag
+ * Handle y offset of glyphs
+ * Add a --timeout option
+ * Bug fixes:
+ * Fix footnote-call displayed incorrectly for some fonts
+ * Fix page-margin boxes layout algorithm
+ * Fix IndexError when rendering PDF version 1.4
+ * Apply text transformations to first-letter pseudo elements
+ * Avoid footnote appearing before its call
+ * Fix balance before "column-span: all"
+ * Only draw required glyph with OpenType-SVG fonts
+ * Don’t draw clipPath when defined after reference
+ * Don’t ignore min-width when computing cell size
+ * Fix named pages inheritance
+ * Avoid page breaks caused by children of overflow hidden boxes
+ * Use bleed area for page’s painting area
+ * Use margin box of children to define available width for
+ leaders
+
+-------------------------------------------------------------------
Old:
----
weasyprint-59.0.tar.gz
New:
----
weasyprint-60.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-weasyprint.spec ++++++
--- /var/tmp/diff_new_pack.QDRJxn/_old 2024-01-03 12:24:33.442533218 +0100
+++ /var/tmp/diff_new_pack.QDRJxn/_new 2024-01-03 12:24:33.446533364 +0100
@@ -28,7 +28,7 @@
%global zopfli_min_version 0.1.4
Name: python-weasyprint
-Version: 59.0
+Version: 60.2
Release: 0
Summary: Python module to convert web documents to PDF
License: BSD-3-Clause
++++++ weasyprint-59.0.tar.gz -> weasyprint-60.2.tar.gz ++++++
++++ 2657 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-specfile for openSUSE:Factory checked in at 2024-01-03 12:24:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-specfile (Old)
and /work/SRC/openSUSE:Factory/.python-specfile.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-specfile"
Wed Jan 3 12:24:23 2024 rev:19 rq:1135634 version:0.26.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-specfile/python-specfile.changes 2023-11-23 21:43:31.173836981 +0100
+++ /work/SRC/openSUSE:Factory/.python-specfile.new.28375/python-specfile.changes 2024-01-03 12:24:30.718433686 +0100
@@ -1,0 +2,12 @@
+Fri Dec 29 10:17:19 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 0.26.0:
+ * When accessing tags or macro definitions by name, specfile
+ now takes validity into account when looking for the best
+ match. For example if there are two instances of `Version`
+ tag, one in the true and one in the false branch of a
+ condition, `Specfile.version` will always access the one that
+ is in the true branch. (#328)
+ * Third pre-release for testing Packit support.
+
+-------------------------------------------------------------------
Old:
----
specfile-0.25.0.tar.gz
New:
----
specfile-0.26.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-specfile.spec ++++++
--- /var/tmp/diff_new_pack.h9mIww/_old 2024-01-03 12:24:31.522463063 +0100
+++ /var/tmp/diff_new_pack.h9mIww/_new 2024-01-03 12:24:31.526463210 +0100
@@ -17,7 +17,7 @@
Name: python-specfile
-Version: 0.25.0
+Version: 0.26.0
Release: 0
Summary: A library for parsing and manipulating RPM spec files
License: MIT
++++++ specfile-0.25.0.tar.gz -> specfile-0.26.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/.github/workflows/prepare-release.yml new/specfile-0.26.0/.github/workflows/prepare-release.yml
--- old/specfile-0.25.0/.github/workflows/prepare-release.yml 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/.github/workflows/prepare-release.yml 2023-12-11 11:24:25.000000000 +0100
@@ -20,10 +20,12 @@
with:
fetch-depth: 0
- name: Prepare release content
- uses: packit/prepare-release@v1
+ uses: packit/prepare-release@v3
with:
version: ${{ inputs.version }}
specfiles: fedora/python-specfile.spec,epel8/python-specfile.spec
+ prerelease_suffix_pattern: "([.\\-_]?)(a(lpha)?|b(eta)?|r?c|pre(view)?)([.\\-_]?\\d+)?"
+ prerelease_suffix_macro: prerelease
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/.packit.yaml new/specfile-0.26.0/.packit.yaml
--- old/specfile-0.25.0/.packit.yaml 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/.packit.yaml 2023-12-11 11:24:25.000000000 +0100
@@ -5,8 +5,8 @@
issue_repository: https://github.com/packit/specfile
# PEP440
-#prerelease_suffix_pattern: "([.\\-_]?)(a(lpha)?|b(eta)?|r?c|pre(view)?)([.\\-_]?\\d+)?"
-#prerelease_suffix_macro: prerelease
+prerelease_suffix_pattern: "([.\\-_]?)(a(lpha)?|b(eta)?|r?c|pre(view)?)([.\\-_]?\\d+)?"
+prerelease_suffix_macro: prerelease
copy_upstream_release_description: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/.pre-commit-config.yaml new/specfile-0.26.0/.pre-commit-config.yaml
--- old/specfile-0.25.0/.pre-commit-config.yaml 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/.pre-commit-config.yaml 2023-12-11 11:24:25.000000000 +0100
@@ -8,11 +8,11 @@
hooks:
- id: pyupgrade
- repo: https://github.com/psf/black
- rev: 23.10.1
+ rev: 23.11.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
- rev: v3.0.3
+ rev: v3.1.0
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -44,14 +44,14 @@
- id: isort
args: [--profile, black]
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v1.6.1
+ rev: v1.7.1
hooks:
- id: mypy
args: [--show-error-codes, --ignore-missing-imports]
additional_dependencies:
[types-pkg_resources, types-requests, types-python-dateutil]
- repo: https://github.com/teemtee/tmt.git
- rev: 1.28.2
+ rev: 1.29.0
hooks:
- id: tmt-lint
# linting of the reverse-dependency tests requires internet access
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/CHANGELOG.md new/specfile-0.26.0/CHANGELOG.md
--- old/specfile-0.25.0/CHANGELOG.md 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/CHANGELOG.md 2023-12-11 11:24:25.000000000 +0100
@@ -1,3 +1,11 @@
+# 0.26.0
+
+- When accessing tags or macro definitions by name, specfile now takes validity into account when looking for the best match. For example if there are two instances of `Version` tag, one in the true and one in the false branch of a condition, `Specfile.version` will always access the one that is in the true branch. (#328)
+
+# 0.25.1rc1
+
+- Third pre-release for testing Packit support.
+
# 0.25.0
- There is a new method, `Specfile.update_version()`, that allows updating spec file version even if it is a pre-release. (#317)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/PKG-INFO new/specfile-0.26.0/PKG-INFO
--- old/specfile-0.25.0/PKG-INFO 2023-11-20 15:56:01.348562000 +0100
+++ new/specfile-0.26.0/PKG-INFO 2023-12-11 11:24:32.313039300 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: specfile
-Version: 0.25.0
+Version: 0.26.0
Summary: A library for parsing and manipulating RPM spec files.
Home-page: https://github.com/packit/specfile
Author: Red Hat
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/epel8/python-specfile.spec new/specfile-0.26.0/epel8/python-specfile.spec
--- old/specfile-0.25.0/epel8/python-specfile.spec 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/epel8/python-specfile.spec 2023-12-11 11:24:25.000000000 +0100
@@ -4,8 +4,8 @@
in a minimal diff.}
-%global base_version 0.25.0
-#global prerelease rc2
+%global base_version 0.26.0
+#%global prerelease rc1
%global package_version %{base_version}%{?prerelease:~%{prerelease}}
%global pypi_version %{base_version}%{?prerelease}
@@ -68,6 +68,12 @@
%changelog
+* Fri Dec 08 2023 Packit Team <hello(a)packit.dev> - 0.26.0-1
+- New upstream release 0.26.0
+
+* Mon Nov 20 2023 Packit Team <hello(a)packit.dev> - 0.25.1~rc1-1
+- New upstream release 0.25.1rc1
+
* Mon Nov 20 2023 Packit Team <hello(a)packit.dev> - 0.25.0-1
- New upstream release 0.25.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/fedora/python-specfile.spec new/specfile-0.26.0/fedora/python-specfile.spec
--- old/specfile-0.25.0/fedora/python-specfile.spec 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/fedora/python-specfile.spec 2023-12-11 11:24:25.000000000 +0100
@@ -7,8 +7,8 @@
in a minimal diff.}
-%global base_version 0.25.0
-#global prerelease rc2
+%global base_version 0.26.0
+#%global prerelease rc1
%global package_version %{base_version}%{?prerelease:~%{prerelease}}
%global pypi_version %{base_version}%{?prerelease}
@@ -77,6 +77,12 @@
%changelog
+* Fri Dec 08 2023 Packit Team <hello(a)packit.dev> - 0.26.0-1
+- New upstream release 0.26.0
+
+* Mon Nov 20 2023 Packit Team <hello(a)packit.dev> - 0.25.1~rc1-1
+- New upstream release 0.25.1rc1
+
* Mon Nov 20 2023 Packit Team <hello(a)packit.dev> - 0.25.0-1
- New upstream release 0.25.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/specfile/macro_definitions.py new/specfile-0.26.0/specfile/macro_definitions.py
--- old/specfile-0.25.0/specfile/macro_definitions.py 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/specfile/macro_definitions.py 2023-12-11 11:24:25.000000000 +0100
@@ -219,11 +219,36 @@
return self.data[self.find(name, position)]
def find(self, name: str, position: Optional[int] = None) -> int:
+ """
+ Finds a macro definition with the specified name. If position is not specified,
+ returns the first valid matching macro definiton. If there is no such macro
+ definition, returns the first match, if any. If position is specified and there is
+ a matching macro definition at that position, it is returned, otherwise
+ ValueError is raised.
+
+ Args:
+ name: Name of the tag to find.
+ position: Optional position in the spec file.
+
+ Returns:
+ Index of the matching tag.
+
+ Raises:
+ ValueError if there is no match.
+ """
+ first_match = None
for i, macro_definition in enumerate(self.data):
if macro_definition.name == name:
- if position is None or macro_definition.get_position(self) == position:
+ if position is None:
+ if first_match is None:
+ first_match = i
+ if macro_definition.valid:
+ return i
+ elif macro_definition.get_position(self) == position:
return i
- raise ValueError
+ if first_match is None or position is not None:
+ raise ValueError
+ return first_match
@classmethod
def _parse(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/specfile/options.py new/specfile-0.26.0/specfile/options.py
--- old/specfile-0.25.0/specfile/options.py 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/specfile/options.py 2023-12-11 11:24:25.000000000 +0100
@@ -9,7 +9,7 @@
from specfile.exceptions import OptionsException
from specfile.formatter import formatted
-from specfile.value_parser import Node, StringLiteral, ValueParser
+from specfile.value_parser import StringLiteral, ValueParser
class TokenType(Enum):
@@ -476,79 +476,67 @@
OptionsException if the option string is untokenizable.
"""
result: List[Token] = []
-
- def append_default(s):
- if result and result[-1].type == TokenType.DEFAULT:
- result[-1].value += s
- else:
- result.append(Token(TokenType.DEFAULT, s))
-
- token_nodes: List[Node] = []
+ token = ""
+ quote = None
+ inp = []
for node in ValueParser.parse(option_string):
if isinstance(node, StringLiteral):
- if token_nodes:
- append_default("".join(str(n) for n in token_nodes))
- token_nodes = []
- token = ""
+ inp.extend(list(str(node)))
+ continue
+ inp.append(str(node))
+ while inp:
+ c = inp.pop(0)
+ if c == quote:
+ if token:
+ result.append(
+ Token(
+ TokenType.QUOTED
+ if quote == "'"
+ else TokenType.DOUBLE_QUOTED,
+ token,
+ )
+ )
+ token = ""
quote = None
- inp = list(str(node))
+ continue
+ if quote:
+ if c == "\\":
+ if not inp:
+ raise OptionsException("No escaped character")
+ c = inp.pop(0)
+ if c != quote:
+ token += "\\"
+ token += c
+ continue
+ if c.isspace():
+ if token:
+ result.append(Token(TokenType.DEFAULT, token))
+ token = ""
+ whitespace = c
while inp:
c = inp.pop(0)
- if c == quote:
- if token:
- result.append(
- Token(
- TokenType.QUOTED
- if quote == "'"
- else TokenType.DOUBLE_QUOTED,
- token,
- )
- )
- token = ""
- quote = None
- continue
- if quote:
- if c == "\\":
- if not inp:
- raise OptionsException("No escaped character")
- c = inp.pop(0)
- if c != quote:
- token += "\\"
- token += c
- continue
- if c.isspace():
- if token:
- append_default(token)
- token = ""
- whitespace = c
- while inp:
- c = inp.pop(0)
- if not c.isspace():
- break
- whitespace += c
- else:
- result.append(Token(TokenType.WHITESPACE, whitespace))
- break
- inp.insert(0, c)
- result.append(Token(TokenType.WHITESPACE, whitespace))
- continue
- if c in ('"', "'"):
- if token:
- append_default(token)
- token = ""
- quote = c
- continue
- if c == "\\":
- if not inp:
- raise OptionsException("No escaped character")
- c = inp.pop(0)
- token += c
- if quote:
- raise OptionsException("No closing quotation")
+ if not c.isspace():
+ break
+ whitespace += c
+ else:
+ result.append(Token(TokenType.WHITESPACE, whitespace))
+ break
+ inp.insert(0, c)
+ result.append(Token(TokenType.WHITESPACE, whitespace))
+ continue
+ if c in ('"', "'"):
if token:
- append_default(token)
- else:
- token_nodes.append(node)
- if token_nodes:
- append_default("".join(str(n) for n in token_nodes))
+ result.append(Token(TokenType.DEFAULT, token))
+ token = ""
+ quote = c
+ continue
+ if c == "\\":
+ if not inp:
+ raise OptionsException("No escaped character")
+ c = inp.pop(0)
+ token += c
+ if quote:
+ raise OptionsException("No closing quotation")
+ if token:
+ result.append(Token(TokenType.DEFAULT, token))
return result
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/specfile/specfile.py new/specfile-0.26.0/specfile/specfile.py
--- old/specfile-0.25.0/specfile/specfile.py 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/specfile/specfile.py 2023-12-11 11:24:25.000000000 +0100
@@ -354,7 +354,9 @@
try:
yield Sources(
tags,
- list(zip(*sourcelists))[1] if sourcelists else [],
+ cast(List[Sourcelist], list(zip(*sourcelists))[1])
+ if sourcelists
+ else [],
allow_duplicates,
default_to_implicit_numbering,
default_source_number_digits,
@@ -391,7 +393,9 @@
try:
yield Patches(
tags,
- list(zip(*patchlists))[1] if patchlists else [],
+ cast(List[Sourcelist], list(zip(*patchlists))[1])
+ if patchlists
+ else [],
allow_duplicates,
default_to_implicit_numbering,
default_source_number_digits,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/specfile/tags.py new/specfile-0.26.0/specfile/tags.py
--- old/specfile-0.25.0/specfile/tags.py 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/specfile/tags.py 2023-12-11 11:24:25.000000000 +0100
@@ -441,11 +441,35 @@
return self.data[self.find(name, position)]
def find(self, name: str, position: Optional[int] = None) -> int:
+ """
+ Finds a tag with the specified name. If position is not specified,
+ returns the first valid matching tag. If there is no such tag, returns
+ the first match, if any. If position is specified and there is a matching
+ tag at that position, it is returned, otherwise ValueError is raised.
+
+ Args:
+ name: Name of the tag to find.
+ position: Optional position in the spec file.
+
+ Returns:
+ Index of the matching tag.
+
+ Raises:
+ ValueError if there is no match.
+ """
+ first_match = None
for i, tag in enumerate(self.data):
if tag.name.capitalize() == name.capitalize():
- if position is None or tag.get_position(self) == position:
+ if position is None:
+ if first_match is None:
+ first_match = i
+ if tag.valid:
+ return i
+ elif tag.get_position(self) == position:
return i
- raise ValueError
+ if first_match is None or position is not None:
+ raise ValueError
+ return first_match
def insert(self, i: int, item: Tag) -> None:
if i > len(self.data):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/specfile.egg-info/PKG-INFO new/specfile-0.26.0/specfile.egg-info/PKG-INFO
--- old/specfile-0.25.0/specfile.egg-info/PKG-INFO 2023-11-20 15:56:01.000000000 +0100
+++ new/specfile-0.26.0/specfile.egg-info/PKG-INFO 2023-12-11 11:24:32.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: specfile
-Version: 0.25.0
+Version: 0.26.0
Summary: A library for parsing and manipulating RPM spec files.
Home-page: https://github.com/packit/specfile
Author: Red Hat
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/specfile.egg-info/SOURCES.txt new/specfile-0.26.0/specfile.egg-info/SOURCES.txt
--- old/specfile-0.25.0/specfile.egg-info/SOURCES.txt 2023-11-20 15:56:01.000000000 +0100
+++ new/specfile-0.26.0/specfile.egg-info/SOURCES.txt 2023-12-11 11:24:32.000000000 +0100
@@ -96,6 +96,11 @@
tests/data/spec_commented_patches/test-0.1.tar.xz
tests/data/spec_commented_patches/test.spec
tests/data/spec_conditionalized_changelog/test.spec
+tests/data/spec_conditionalized_version/patch0.patch
+tests/data/spec_conditionalized_version/patch1.patch
+tests/data/spec_conditionalized_version/patch2.patch
+tests/data/spec_conditionalized_version/test-0.1.2.tar.xz
+tests/data/spec_conditionalized_version/test.spec
tests/data/spec_includes/description1.inc
tests/data/spec_includes/description2.inc
tests/data/spec_includes/macros1.inc
@@ -132,7 +137,7 @@
tests/data/spec_prerelease/patch0.patch
tests/data/spec_prerelease/patch1.patch
tests/data/spec_prerelease/patch2.patch
-tests/data/spec_prerelease/test-v0.1.2~rc2.tar.xz
+tests/data/spec_prerelease/test-v0.1.2-rc2.tar.xz
tests/data/spec_prerelease/test.spec
tests/data/spec_rpmautospec/test.spec
tests/data/spec_shell_expansions/test.spec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/tests/constants.py new/specfile-0.26.0/tests/constants.py
--- old/specfile-0.25.0/tests/constants.py 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/tests/constants.py 2023-12-11 11:24:25.000000000 +0100
@@ -18,5 +18,6 @@
SPEC_COMMENTED_PATCHES = DATA_DIR / "spec_commented_patches"
SPEC_SHELL_EXPANSIONS = DATA_DIR / "spec_shell_expansions"
SPEC_CONDITIONALIZED_CHANGELOG = DATA_DIR / "spec_conditionalized_changelog"
+SPEC_CONDITIONALIZED_VERSION = DATA_DIR / "spec_conditionalized_version"
SPECFILE = "test.spec"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/tests/data/spec_conditionalized_version/patch0.patch new/specfile-0.26.0/tests/data/spec_conditionalized_version/patch0.patch
--- old/specfile-0.25.0/tests/data/spec_conditionalized_version/patch0.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/specfile-0.26.0/tests/data/spec_conditionalized_version/patch0.patch 2023-12-11 11:24:25.000000000 +0100
@@ -0,0 +1,18 @@
+From b7af0b9194585c6d208de3a0e9978d5ad9c5d97b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro(a)redhat.com>
+Date: Wed, 16 Mar 2022 10:29:59 +0100
+Subject: [PATCH 1/3] patch0
+
+---
+ test.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test.txt b/test.txt
+index 9daeafb..dec2cbe 100644
+--- a/test.txt
++++ b/test.txt
+@@ -1 +1,2 @@
+ test
++test
+--
+2.35.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/tests/data/spec_conditionalized_version/patch1.patch new/specfile-0.26.0/tests/data/spec_conditionalized_version/patch1.patch
--- old/specfile-0.25.0/tests/data/spec_conditionalized_version/patch1.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/specfile-0.26.0/tests/data/spec_conditionalized_version/patch1.patch 2023-12-11 11:24:25.000000000 +0100
@@ -0,0 +1,19 @@
+From 6d5d1561b3ccf2df9d001a7af011144acc352361 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro(a)redhat.com>
+Date: Wed, 16 Mar 2022 10:30:15 +0100
+Subject: [PATCH 2/3] patch1
+
+---
+ test.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test.txt b/test.txt
+index dec2cbe..0867e73 100644
+--- a/test.txt
++++ b/test.txt
+@@ -1,2 +1,3 @@
+ test
+ test
++test
+--
+2.35.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/tests/data/spec_conditionalized_version/patch2.patch new/specfile-0.26.0/tests/data/spec_conditionalized_version/patch2.patch
--- old/specfile-0.25.0/tests/data/spec_conditionalized_version/patch2.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/specfile-0.26.0/tests/data/spec_conditionalized_version/patch2.patch 2023-12-11 11:24:25.000000000 +0100
@@ -0,0 +1,20 @@
+From ae1d3bbca0caf1cce1842ceab4c6d7252c0a7bd8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro(a)redhat.com>
+Date: Wed, 16 Mar 2022 10:30:29 +0100
+Subject: [PATCH 3/3] patch2
+
+---
+ test.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test.txt b/test.txt
+index 0867e73..d0c7fbe 100644
+--- a/test.txt
++++ b/test.txt
+@@ -1,3 +1,4 @@
+ test
+ test
+ test
++test
+--
+2.35.1
Binary files old/specfile-0.25.0/tests/data/spec_conditionalized_version/test-0.1.2.tar.xz and new/specfile-0.26.0/tests/data/spec_conditionalized_version/test-0.1.2.tar.xz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/tests/data/spec_conditionalized_version/test.spec new/specfile-0.26.0/tests/data/spec_conditionalized_version/test.spec
--- old/specfile-0.25.0/tests/data/spec_conditionalized_version/test.spec 1970-01-01 01:00:00.000000000 +0100
+++ new/specfile-0.26.0/tests/data/spec_conditionalized_version/test.spec 2023-12-11 11:24:25.000000000 +0100
@@ -0,0 +1,41 @@
+%dnl %global commit 202ab7e698a34154129bb9ded589db58996eeb53
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+%global upstream_version 0.1.2
+
+Name: test
+%if 0%{?commit:1}
+Version: %{upstream_version}^git%{shortcommit}
+%else
+Version: %{upstream_version}
+%endif
+Release: 1%{?dist}
+Summary: Test package
+
+License: MIT
+
+%if 0%{?commit:1}
+Source0: https://example.com/archive/%{name}/%{commit}/%{name}-%{shortcommit}.tar.xz
+%else
+Source0: https://example.com/archive/%{name}/v%{version}/%{name}-%{version}.tar.xz
+%endif
+Patch0: patch0.patch
+Patch1: patch1.patch
+Patch2: patch2.patch
+
+
+%description
+Test package
+
+
+%prep
+%if 0%{?commit:1}
+%autosetup -p1 -n %{name}-%{shortcommit}
+%else
+%autosetup -p1 -n %{name}-%{version}
+%endif
+
+
+%changelog
+* Thu Jun 07 2018 Nikola Forró <nforro(a)redhat.com> - 0.1.2-1
+- first version
Binary files old/specfile-0.25.0/tests/data/spec_prerelease/test-v0.1.2-rc2.tar.xz and new/specfile-0.26.0/tests/data/spec_prerelease/test-v0.1.2-rc2.tar.xz differ
Binary files old/specfile-0.25.0/tests/data/spec_prerelease/test-v0.1.2~rc2.tar.xz and new/specfile-0.26.0/tests/data/spec_prerelease/test-v0.1.2~rc2.tar.xz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/tests/integration/conftest.py new/specfile-0.26.0/tests/integration/conftest.py
--- old/specfile-0.25.0/tests/integration/conftest.py 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/tests/integration/conftest.py 2023-12-11 11:24:25.000000000 +0100
@@ -10,6 +10,7 @@
SPEC_AUTOSETUP,
SPEC_COMMENTED_PATCHES,
SPEC_CONDITIONALIZED_CHANGELOG,
+ SPEC_CONDITIONALIZED_VERSION,
SPEC_INCLUDES,
SPEC_MACROS,
SPEC_MINIMAL,
@@ -112,3 +113,10 @@
specfile_path = tmp_path / SPECFILE
shutil.copyfile(SPEC_CONDITIONALIZED_CHANGELOG / SPECFILE, specfile_path)
return specfile_path
+
+
+(a)pytest.fixture(scope="function")
+def spec_conditionalized_version(tmp_path):
+ specfile_path = tmp_path / SPECFILE
+ shutil.copyfile(SPEC_CONDITIONALIZED_VERSION / SPECFILE, specfile_path)
+ return specfile_path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/tests/integration/test_specfile.py new/specfile-0.26.0/tests/integration/test_specfile.py
--- old/specfile-0.25.0/tests/integration/test_specfile.py 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/tests/integration/test_specfile.py 2023-12-11 11:24:25.000000000 +0100
@@ -575,7 +575,7 @@
rpm.__version__ < "4.16",
reason="condition expression evaluation requires rpm 4.16 or higher",
)
-def test_update_version(spec_prerelease):
+def test_update_version(spec_prerelease, spec_conditionalized_version):
spec = Specfile(spec_prerelease)
prerelease_suffix_pattern = r"(-)rc\d+"
prerelease_suffix_macro = "prerel"
@@ -609,3 +609,20 @@
assert md.prerel.body == "rc2"
assert md.prerel.commented_out
assert spec.version == "%{pkgver}"
+ spec = Specfile(spec_conditionalized_version)
+ version = "0.1.3"
+ assert spec.version == "%{upstream_version}"
+ spec.update_version(version, prerelease_suffix_pattern)
+ with spec.macro_definitions() as md:
+ assert md.upstream_version.body == version
+ assert spec.version == "%{upstream_version}"
+ assert spec.expanded_version == version
+ spec = Specfile(spec_conditionalized_version)
+ with spec.macro_definitions() as md:
+ md.commit.commented_out = False
+ assert spec.version == "%{upstream_version}^git%{shortcommit}"
+ spec.update_version(version, prerelease_suffix_pattern)
+ with spec.macro_definitions() as md:
+ assert md.upstream_version.body != version
+ assert spec.version == version
+ assert spec.expanded_version == version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.25.0/tests/unit/test_options.py new/specfile-0.26.0/tests/unit/test_options.py
--- old/specfile-0.25.0/tests/unit/test_options.py 2023-11-20 15:55:51.000000000 +0100
+++ new/specfile-0.26.0/tests/unit/test_options.py 2023-12-11 11:24:25.000000000 +0100
@@ -258,6 +258,36 @@
Token(TokenType.DEFAULT, '%{name}-%{version}%[%{rc}?"-rc":""]'),
],
),
+ (
+ "-q -n '%{name}-%{version}'",
+ [
+ Token(TokenType.DEFAULT, "-q"),
+ Token(TokenType.WHITESPACE, " "),
+ Token(TokenType.DEFAULT, "-n"),
+ Token(TokenType.WHITESPACE, " "),
+ Token(TokenType.QUOTED, "%{name}-%{version}"),
+ ],
+ ),
+ (
+ '-q -n "%{name}-%{version}"',
+ [
+ Token(TokenType.DEFAULT, "-q"),
+ Token(TokenType.WHITESPACE, " "),
+ Token(TokenType.DEFAULT, "-n"),
+ Token(TokenType.WHITESPACE, " "),
+ Token(TokenType.DOUBLE_QUOTED, "%{name}-%{version}"),
+ ],
+ ),
+ (
+ '-q -n \'%{name}-%{version}%[%{rc}?"-rc":""]\'',
+ [
+ Token(TokenType.DEFAULT, "-q"),
+ Token(TokenType.WHITESPACE, " "),
+ Token(TokenType.DEFAULT, "-n"),
+ Token(TokenType.WHITESPACE, " "),
+ Token(TokenType.QUOTED, '%{name}-%{version}%[%{rc}?"-rc":""]'),
+ ],
+ ),
],
)
def test_options_tokenize(option_string, result):
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-QtAwesome for openSUSE:Factory checked in at 2024-01-03 12:24:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-QtAwesome (Old)
and /work/SRC/openSUSE:Factory/.python-QtAwesome.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-QtAwesome"
Wed Jan 3 12:24:21 2024 rev:14 rq:1135633 version:1.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-QtAwesome/python-QtAwesome.changes 2023-12-09 22:57:22.768701972 +0100
+++ /work/SRC/openSUSE:Factory/.python-QtAwesome.new.28375/python-QtAwesome.changes 2024-01-03 12:24:28.630357392 +0100
@@ -1,0 +2,14 @@
+Fri Dec 29 10:13:47 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 1.3.0:
+ * Update Codicons (`msc`) to 0.0.35
+ * Update Material Design Icons (`mdi6`) to 6.9.96
+ * Improvements to the icon browser application
+ * Update `readthedocs` config to version 2
+ * Add API to start/stop animations to the Spin
+ class
+ * Provide icon size when creating an `IconWidget`
+ * Remove usage of deprecated codecov package and
+ move to GitHub Action variant
+
+-------------------------------------------------------------------
Old:
----
QtAwesome-1.2.3.tar.gz
New:
----
QtAwesome-1.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-QtAwesome.spec ++++++
--- /var/tmp/diff_new_pack.NJySU0/_old 2024-01-03 12:24:29.350383701 +0100
+++ /var/tmp/diff_new_pack.NJySU0/_new 2024-01-03 12:24:29.354383846 +0100
@@ -19,7 +19,7 @@
%{?sle15_python_module_pythons}
%define skip_python2 1
Name: python-QtAwesome
-Version: 1.2.3
+Version: 1.3.0
Release: 0
Summary: FontAwesome icons in PyQt and PySide applications
License: MIT
++++++ QtAwesome-1.2.3.tar.gz -> QtAwesome-1.3.0.tar.gz ++++++
++++ 4482 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-translation-finder for openSUSE:Factory checked in at 2024-01-03 12:24:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-translation-finder (Old)
and /work/SRC/openSUSE:Factory/.python-translation-finder.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-translation-finder"
Wed Jan 3 12:24:19 2024 rev:14 rq:1135631 version:2.16
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-translation-finder/python-translation-finder.changes 2023-03-21 17:44:57.226812852 +0100
+++ /work/SRC/openSUSE:Factory/.python-translation-finder.new.28375/python-translation-finder.changes 2024-01-03 12:24:26.230269700 +0100
@@ -1,0 +2,8 @@
+Fri Dec 29 10:10:49 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 2.16:
+ * Fixed detection UTF-16 Strings files.
+ * Fixed detection of files with some special chars.
+ * Added support for Mobile Kotlin resources.
+
+-------------------------------------------------------------------
Old:
----
translation-finder-2.15.tar.gz
New:
----
translation-finder-2.16.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-translation-finder.spec ++++++
--- /var/tmp/diff_new_pack.N1661T/_old 2024-01-03 12:24:27.694323193 +0100
+++ /var/tmp/diff_new_pack.N1661T/_new 2024-01-03 12:24:27.694323193 +0100
@@ -21,7 +21,7 @@
%define modname translation-finder
%define skip_python2 1
Name: python-translation-finder
-Version: 2.15
+Version: 2.16
Release: 0
Summary: Translation Files Finder
License: GPL-3.0-or-later
++++++ translation-finder-2.15.tar.gz -> translation-finder-2.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.deepsource.toml new/translation-finder-2.16/.deepsource.toml
--- old/translation-finder-2.15/.deepsource.toml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.deepsource.toml 2023-12-20 13:21:31.000000000 +0100
@@ -2,14 +2,17 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
-version = 1
test_patterns = [
"**/test_*.py"
]
+version = 1
[[analyzers]]
-name = "python"
enabled = true
+name = "python"
+
+[[analyzers]]
+name = "test-coverage"
[analyzers.meta]
runtime_version = "3.x.x"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/ISSUE_TEMPLATE/bug_report.yml new/translation-finder-2.16/.github/ISSUE_TEMPLATE/bug_report.yml
--- old/translation-finder-2.15/.github/ISSUE_TEMPLATE/bug_report.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/ISSUE_TEMPLATE/bug_report.yml 2023-12-20 13:21:31.000000000 +0100
@@ -10,12 +10,18 @@
- type: markdown
attributes:
value: |
- Thank you for reporting an issue on Weblate! This form will guide you to create a useful issue report.
+ Thank you for reporting an issue.
+ This form guides you in creating a useful issue report.
+
+ Want your answer quickly and guaranteed? Visit https://weblate.org/support/ to reach our dedicated support team. As a subscriber, you will always have priority and help Weblate growing.
- type: textarea
id: what-happened
attributes:
label: Describe the issue
- description: A clear and concise description of the problem you are facing.
+ description: >
+ A clear and concise description of the problem you are facing.
+
+ Please include important information, like the file format you are using and installed add-ons.
placeholder: Tell us what you see!
validations:
required: true
@@ -23,26 +29,30 @@
id: tried
attributes:
label: I already tried
- description: If you didn’t try already, try to search the documentation and existing issues what you wrote above.
+ description: If you didn’t try already, try searching the documentation and existing issues.
options:
- label: I've read and searched [the documentation](https://docs.weblate.org/).
required: true
- - label: I've searched for similar issues in this repository.
+ - label: I've searched for similar filed issues in this repository.
required: true
- type: textarea
id: reproducer
attributes:
label: Steps to reproduce the behavior
- value: |
- 1. Go to '...'
- 2. Scroll down to '...'
- 3. Click on '...'
- 4. See error
+ description: What did you do before the problem appeared?
+ placeholder: |
+ 1. Go to '…'
+ 2. Scroll down to '…'
+ 3. Click on '…'
+ 4. The error occurs
+ validations:
+ required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
+ placeholder: Tell us what you want to see!
- type: textarea
id: screenshots
attributes:
@@ -53,14 +63,14 @@
attributes:
label: Exception traceback
description: >
- In case you observed server error or crash, please see
+ In case you observed a server error or crash, please read
[the debugging documentation](https://docs.weblate.org/en/latest/contributing/debugging.ht…
- for information how to obtain that.
+ for information on obtaining the relevant logs.
- This will be rendered as Python traceback automatically.
+ This field will be rendered as a Python traceback automatically.
render: pytb
- type: textarea
id: additional
attributes:
label: Additional context
- description: Add any other context about the problem here.
+ description: Add any other contextual info about the problem here.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/ISSUE_TEMPLATE/config.yml new/translation-finder-2.16/.github/ISSUE_TEMPLATE/config.yml
--- old/translation-finder-2.15/.github/ISSUE_TEMPLATE/config.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/ISSUE_TEMPLATE/config.yml 2023-12-20 13:21:31.000000000 +0100
@@ -5,12 +5,12 @@
# This file is maintained in https://github.com/WeblateOrg/meta/
# and generated using update-issue-config there.
contact_links:
-- name: Read our clear, thorough and localized Docs
+- name: Read our clear, thorough and localized docs
url: https://docs.weblate.org/
about: Save your time! There is an instant solution for many issues in the docs appreciated by numerous users. And it might be in your preferred language.
-- name: Get Professional support
+- name: Get professional support
url: https://weblate.org/support/
about: As a subscriber, you will always receive fast and helpful replies from our dedicated support team. More responsible and faster for your business, also makes Weblate stronger.
-- name: Ask a Question
+- name: Ask the community
url: https://github.com/WeblateOrg/weblate/discussions
about: Want to discuss something with a community? Do it in discussions!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/ISSUE_TEMPLATE/feature_request.yml new/translation-finder-2.16/.github/ISSUE_TEMPLATE/feature_request.yml
--- old/translation-finder-2.15/.github/ISSUE_TEMPLATE/feature_request.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/ISSUE_TEMPLATE/feature_request.yml 2023-12-20 13:21:31.000000000 +0100
@@ -10,7 +10,10 @@
- type: markdown
attributes:
value: |
- Thank you for reporting an issue on Weblate! This form will guide you to create a useful issue report.
+ Thank you for requesting a change.
+ This form guides you in creating a useful feature request.
+
+ Want your answer quickly and guaranteed? Visit https://weblate.org/support/ to reach our dedicated support team. As a subscriber, you will always have priority and help Weblate growing.
- type: textarea
id: describe
attributes:
@@ -18,21 +21,23 @@
description: >
Is your feature request related to a problem? If so, please provide
a clear and concise description of what the problem is.
- Ex. I'm always frustrated when [...]
+ placeholder: I'm always frustrated when…
validations:
required: true
- type: textarea
- id: solition
+ id: solution
attributes:
- label: Describe the solution you'd like
+ label: Describe the solution you would like
description: A clear and concise description of what the new feature should do.
+ placeholder: I'd like to get…
validations:
required: true
- type: textarea
id: alternatives
attributes:
- label: Describe alternatives you've considered
- description: A clear and concise description of any alternative solutions or features you've considered.
+ label: Describe alternatives you have considered
+ description: A clear and concise description of any alternative solutions or features you have considered.
+ placeholder: The issue can also be addressed by…
- type: textarea
id: screenshots
attributes:
@@ -42,4 +47,4 @@
id: additional
attributes:
label: Additional context
- description: Add any other context about the problem here.
+ description: Add any other contextual info about the problem here.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/ISSUE_TEMPLATE/support_question.yml new/translation-finder-2.16/.github/ISSUE_TEMPLATE/support_question.yml
--- old/translation-finder-2.15/.github/ISSUE_TEMPLATE/support_question.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/ISSUE_TEMPLATE/support_question.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,70 +0,0 @@
-# Copyright © Michal Čihař <michal(a)weblate.org>
-#
-# SPDX-License-Identifier: CC0-1.0
-
-# This file is maintained in https://github.com/WeblateOrg/meta/
-# and generated from .github/ISSUE_TEMPLATE/snippets there.
-name: Support question
-description: Help with configuration or deployment
-labels:
-- question
-body:
-- type: markdown
- attributes:
- value: |
- Thank you for reporting an issue on Weblate! This form will guide you to create a useful issue report.
-
- Want your answer quickly and guaranteed? Visit https://weblate.org/support/ to reach our dedicated support team. As a subscriber, you will always have priority and help Weblate growing.
-- type: textarea
- id: what-happened
- attributes:
- label: Describe the issue
- description: A clear and concise description of the problem you are facing.
- placeholder: Tell us what you see!
- validations:
- required: true
-- type: checkboxes
- id: tried
- attributes:
- label: I already tried
- description: If you didn’t try already, try to search the documentation and existing issues what you wrote above.
- options:
- - label: I've read and searched [the documentation](https://docs.weblate.org/).
- required: true
- - label: I've searched for similar issues in this repository.
- required: true
-- type: textarea
- id: reproducer
- attributes:
- label: Steps to reproduce the behavior
- value: |
- 1. Go to '...'
- 2. Scroll down to '...'
- 3. Click on '...'
- 4. See error
-- type: textarea
- id: expected
- attributes:
- label: Expected behavior
- description: A clear and concise description of what you expected to happen.
-- type: textarea
- id: screenshots
- attributes:
- label: Screenshots
- description: If applicable, add screenshots to better explain your problem.
-- type: textarea
- id: traceback
- attributes:
- label: Exception traceback
- description: >
- In case you observed server error or crash, please see
- [the debugging documentation](https://docs.weblate.org/en/latest/contributing/debugging.ht…
- for information how to obtain that.
-
- This will be rendered as Python traceback automatically.
- render: pytb
-- type: textarea
- id: additional
- attributes:
- label: Additional context
- description: Add any other context about the problem here.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/labels.yml new/translation-finder-2.16/.github/labels.yml
--- old/translation-finder-2.15/.github/labels.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/labels.yml 2023-12-20 13:21:31.000000000 +0100
@@ -32,7 +32,7 @@
# Automated dependency updates
- color: e3f49c
name: dependencies
- description: Pull requests that update a dependency file.
+ description: Third-party library dependencies.
# Hacktoberfest
- color: 7057ff
name: hacktoberfest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/matchers/flake8.json new/translation-finder-2.16/.github/matchers/flake8.json
--- old/translation-finder-2.15/.github/matchers/flake8.json 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/matchers/flake8.json 1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-{
- "problemMatcher": [
- {
- "owner": "flake8",
- "pattern": [
- {
- "code": 4,
- "column": 3,
- "file": 1,
- "line": 2,
- "message": 5,
- "regexp": "^([^:]*):(\\d+):(\\d+): (\\w+\\d\\d\\d) (.*)$"
- }
- ]
- }
- ]
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/matchers/flake8.json.license new/translation-finder-2.16/.github/matchers/flake8.json.license
--- old/translation-finder-2.15/.github/matchers/flake8.json.license 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/matchers/flake8.json.license 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-Copyright © Michal Čihař <michal(a)weblate.org>
-
-SPDX-License-Identifier: CC0-1.0
-
-This file is maintained in https://github.com/WeblateOrg/meta/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/renovate.json new/translation-finder-2.16/.github/renovate.json
--- old/translation-finder-2.15/.github/renovate.json 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/renovate.json 2023-12-20 13:21:31.000000000 +0100
@@ -28,10 +28,35 @@
"schedule": "on the last day of the month"
},
{
+ "matchDatasources": [
+ "helm"
+ ],
+ "automerge": false,
+ "schedule": "on the last day of the month"
+ },
+ {
"matchPaths": [
"**/package.json"
],
"automerge": false
+ },
+ {
+ "matchPackageNames": [
+ "shellcheck-py/shellcheck-py"
+ ],
+ "versioning": "loose"
+ },
+ {
+ "matchPackageNames": [
+ "python"
+ ],
+ "matchDatasources": [
+ "docker"
+ ],
+ "separateMinorPatch": true,
+ "minor": {
+ "dependencyDashboardApproval": true
+ }
}
],
"regexManagers": [
@@ -54,6 +79,44 @@
],
"datasourceTemplate": "npm",
"versioningTemplate": "npm"
+ },
+ {
+ "fileMatch": [
+ "^Dockerfile$"
+ ],
+ "matchStrings": [
+ "ENV WEBLATE_VERSION (?<currentValue>.*?)\\n"
+ ],
+ "depNameTemplate": "Weblate",
+ "datasourceTemplate": "pypi",
+ "versioningTemplate": "pep440"
+ },
+ {
+ "fileMatch": [
+ "(^|/)Chart\\.yaml$"
+ ],
+ "matchStrings": [
+ "renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+appVersion: (?<currentValue>.*)\\s"
+ ]
+ },
+ {
+ "fileMatch": [
+ "^\\.github/workflows/[^/]+\\.ya?ml$"
+ ],
+ "matchStrings": [
+ "renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+version: (?<currentValue>.*)\\s"
+ ]
+ },
+ {
+ "fileMatch": [
+ "weblate_web/data.py"
+ ],
+ "matchStrings": [
+ "VERSION = \"(?<currentValue>.*?)\""
+ ],
+ "depNameTemplate": "Weblate",
+ "datasourceTemplate": "pypi",
+ "versioningTemplate": "pep440"
}
]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/workflows/closing.yml new/translation-finder-2.16/.github/workflows/closing.yml
--- old/translation-finder-2.15/.github/workflows/closing.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/workflows/closing.yml 2023-12-20 13:21:31.000000000 +0100
@@ -20,7 +20,7 @@
runs-on: ubuntu-22.04
steps:
- name: Add closed question comment
- uses: peter-evans/create-or-update-comment@v2
+ uses: peter-evans/create-or-update-comment@v3
if: |
github.actor != 'renovate[bot]' &&
github.event.issue.state_reason == 'completed' &&
@@ -34,7 +34,7 @@
* In case you see a similar problem, please open a separate issue.
* If you are happy with the outcome, don’t hesitate to support Weblate by making a [donation](https://weblate.org/donate/).
- name: Add closed issue comment
- uses: peter-evans/create-or-update-comment@v2
+ uses: peter-evans/create-or-update-comment@v3
if: |
github.actor != 'renovate[bot]' &&
github.event.issue.state_reason == 'completed' &&
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/workflows/codeql-analysis.yml new/translation-finder-2.16/.github/workflows/codeql-analysis.yml
--- old/translation-finder-2.15/.github/workflows/codeql-analysis.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/workflows/codeql-analysis.yml 2023-12-20 13:21:31.000000000 +0100
@@ -18,22 +18,22 @@
jobs:
analyze:
name: Analyze
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
language: [python]
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
- uses: github/codeql-action/autobuild@v2
+ uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ uses: github/codeql-action/analyze@v3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/workflows/flake8.yml new/translation-finder-2.16/.github/workflows/flake8.yml
--- old/translation-finder-2.15/.github/workflows/flake8.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/workflows/flake8.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-# Copyright © Michal Čihař <michal(a)weblate.org>
-#
-# SPDX-License-Identifier: CC0-1.0
-
-# This file is maintained in https://github.com/WeblateOrg/meta/
-name: Flake8
-
-on:
- push:
- branches-ignore:
- - deepsource-fix-**
- - renovate/**
- - weblate
- pull_request:
-
-permissions:
- contents: read
-
-jobs:
- flake8:
- runs-on: ubuntu-22.04
-
- steps:
- - uses: actions/checkout@v3
- - uses: actions/cache@v3
- with:
- path: |
- ~/.cache/pip
- ~/.cache/pre-commit
- key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }}
- - name: Setup Python
- uses: actions/setup-python@v4
- with:
- python-version: '3.11'
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip wheel
- pip install -r requirements-lint.txt
- - name: Run flake8
- run: |
- echo "::add-matcher::.github/matchers/flake8.json"
- pre-commit run flake8 --all
- echo "::remove-matcher owner=flake8::"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/workflows/label-sync.yml new/translation-finder-2.16/.github/workflows/label-sync.yml
--- old/translation-finder-2.15/.github/workflows/label-sync.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/workflows/label-sync.yml 2023-12-20 13:21:31.000000000 +0100
@@ -14,17 +14,14 @@
- .github/workflows/label-sync.yml
permissions:
- contents: read
+ issues: write
jobs:
build:
name: Sync labels
runs-on: ubuntu-22.04
steps:
- - uses: actions/checkout@v3
- - uses: micnncim/action-label-syncer(a)v1.3.0
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- GITHUB_REPOSITORY: ${{ github.repository }}
+ - uses: actions/checkout@v4
+ - uses: srealmoreno/label-sync-action@v1
with:
- manifest: .github/labels.yml
+ clean-labels: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/workflows/labels.yml new/translation-finder-2.16/.github/workflows/labels.yml
--- old/translation-finder-2.15/.github/workflows/labels.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/workflows/labels.yml 2023-12-20 13:21:31.000000000 +0100
@@ -20,7 +20,7 @@
runs-on: ubuntu-22.04
steps:
- name: Add backlog comment
- uses: peter-evans/create-or-update-comment@v2
+ uses: peter-evans/create-or-update-comment@v3
if: ${{ github.event.label.name == 'backlog' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
@@ -33,7 +33,7 @@
In case you need this feature soon, please consider helping
or push it by [funding the development](https://weblate.org/support/).
- name: Add undecided comment
- uses: peter-evans/create-or-update-comment@v2
+ uses: peter-evans/create-or-update-comment@v3
if: ${{ github.event.label.name == 'undecided' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
@@ -46,21 +46,24 @@
Please try to clarify the use case or consider proposing something more generic to make it useful to more users.
- name: Add question comment
- uses: peter-evans/create-or-update-comment@v2
+ uses: peter-evans/create-or-update-comment@v3
if: ${{ github.event.label.name == 'question' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: >
- This issue looks more like a support question than an
- issue. We strive to answer these reasonably fast, but
+ This issue has been marked as a question by a Weblate team member.
+ Why? Because it belongs more to the professional [Weblate Care](https://care.weblate.org/)
+ or community [Discussions](https://github.com/WeblateOrg/weblate/discussions) than here.
+ We strive to answer these reasonably fast here, too, but
[purchasing the support subscription](https://weblate.org/support/)
- is not only more responsible and faster for your business but also makes Weblate stronger.
+ is more responsible and faster for your business.
+ And it makes Weblate stronger as well. Thanks!
In case your question is already answered, [making a donation](https://weblate.org/donate/) is the right way to say thank you!
- name: Add translate-toolkit comment
- uses: peter-evans/create-or-update-comment@v2
+ uses: peter-evans/create-or-update-comment@v3
if: ${{ github.event.label.name == 'translate-toolkit' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
@@ -69,7 +72,7 @@
The issue you've reported needs to be addressed in the [translate-toolkit](https://github.com/translate/translate/).
Please file the issue there, and include links to any relevant specifications about the formats (if applicable).
- name: Add good first issue comment
- uses: peter-evans/create-or-update-comment@v2
+ uses: peter-evans/create-or-update-comment@v3
if: ${{ github.event.label.name == 'good first issue' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/workflows/pre-commit.yml new/translation-finder-2.16/.github/workflows/pre-commit.yml
--- old/translation-finder-2.15/.github/workflows/pre-commit.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/workflows/pre-commit.yml 2023-12-20 13:21:31.000000000 +0100
@@ -21,20 +21,25 @@
runs-on: ubuntu-22.04
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.cache/pre-commit
- key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }}
+ key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('pyproject.toml') }}
- name: Setup Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: '3.11'
+ - name: Update pip
+ run: python -m pip install --upgrade pip wheel
- name: Install dependencies
run: |
- python -m pip install --upgrade pip wheel
- pip install -r requirements-lint.txt
+ if [ -f requirements-lint.txt ] ; then
+ pip install -r requirements-lint.txt
+ else
+ pip install -e .[lint]
+ fi
- name: pre-commit
run: pre-commit run --all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/workflows/pull_requests.yaml new/translation-finder-2.16/.github/workflows/pull_requests.yaml
--- old/translation-finder-2.15/.github/workflows/pull_requests.yaml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/workflows/pull_requests.yaml 2023-12-20 13:21:31.000000000 +0100
@@ -22,7 +22,7 @@
name: Weblate automerge
if: github.actor == 'weblate'
steps:
- - uses: peter-evans/enable-pull-request-automerge@v2
+ - uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ github.event.pull_request.number }}
merge-method: rebase
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/workflows/setup.yml new/translation-finder-2.16/.github/workflows/setup.yml
--- old/translation-finder-2.15/.github/workflows/setup.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/workflows/setup.yml 2023-12-20 13:21:31.000000000 +0100
@@ -8,18 +8,18 @@
jobs:
setup:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-setup-${{ hashFiles('**/requirements*.txt') }}
- name: Setup Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
- python-version: '3.10'
+ python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/workflows/stale.yml new/translation-finder-2.16/.github/workflows/stale.yml
--- old/translation-finder-2.15/.github/workflows/stale.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/workflows/stale.yml 2023-12-20 13:21:31.000000000 +0100
@@ -26,13 +26,14 @@
pull-requests: write
steps:
- - uses: actions/stale@v7
+ - uses: actions/stale@v9
with:
days-before-pr-stale: 30
days-before-pr-close: 14
- days-before-stale: 10
- days-before-close: 4
- exempt-issue-labels: bug,enhancement,documentation,security
+ days-before-stale: 14
+ days-before-close: 5
+ exempt-issue-labels: bug,enhancement,documentation,security,dependencies
+ exempt-pr-labels: backlog
stale-issue-label: wontfix
stale-pr-label: wontfix
repo-token: ${{ secrets.GITHUB_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.github/workflows/test.yml new/translation-finder-2.16/.github/workflows/test.yml
--- old/translation-finder-2.15/.github/workflows/test.yml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.github/workflows/test.yml 2023-12-20 13:21:31.000000000 +0100
@@ -11,39 +11,42 @@
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-20.04, windows-latest, macos-latest]
+ os:
+ - ubuntu-latest
+ - windows-latest
+ - macos-latest
python-version:
- - '3.7'
- - '3.8'
- '3.9'
- '3.10'
+ - '3.11'
+ - '3.12'
exclude:
- os: windows-latest
- python-version: 3.8
- - os: windows-latest
- python-version: 3.9
+ python-version: '3.10'
- os: macos-latest
- python-version: 3.8
+ python-version: '3.10'
+ - os: windows-latest
+ python-version: '3.11'
- os: macos-latest
- python-version: 3.9
+ python-version: '3.11'
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip wheel
pip install --upgrade https://github.com/WeblateOrg/language-data/archive/main.zip
- pip install -r requirements-dev.txt
+ pip install -r requirements-test.txt
- name: Test
run: |
py.test --cov=translation_finder translation_finder README.rst
@@ -56,10 +59,10 @@
flags: unittests
name: Python ${{ matrix.python-version }}, ${{ matrix.os }}
- name: DeepSource
- if: matrix.os == 'ubuntu-20.04'
+ if: matrix.os == 'ubuntu-latest'
continue-on-error: true
env:
- DEEPSOURCE_DSN: https://9685c29f2360413798cabd14223060ad@deepsource.io
+ DEEPSOURCE_DSN: ${{secrets.DEEPSOURCE_DSN}}
run: |
curl https://deepsource.io/cli | sh
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/.pre-commit-config.yaml new/translation-finder-2.16/.pre-commit-config.yaml
--- old/translation-finder-2.15/.pre-commit-config.yaml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/.pre-commit-config.yaml 2023-12-20 13:21:31.000000000 +0100
@@ -5,41 +5,8 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
-- repo: https://github.com/PyCQA/isort
- rev: 5.11.4
- hooks:
- - id: isort
-- repo: https://github.com/asottile/pyupgrade
- rev: v3.3.1
- hooks:
- - id: pyupgrade
- args: [--py37-plus]
-- repo: https://github.com/psf/black
- rev: 22.12.0
- hooks:
- - id: black
-- repo: https://github.com/PyCQA/flake8
- rev: 5.0.4
- hooks:
- - id: flake8
- additional_dependencies:
- - flake8-bugbear==22.12.6
- - flake8-builtins==2.1.0
- - flake8-comprehensions==3.10.1
- - flake8-django==1.1.5
- - flake8-docstrings==1.6.0
- - flake8-eradicate==1.4.0
- - flake8-executable==2.1.2
- - flake8-logging-format==0.9.0
- - flake8-mutable==1.2.0
- - flake8-polyfill==1.0.2
- - flake8-print==5.0.0
- - flake8-return==1.2.0
- - flake8-self==0.2.2
- - flake8-assertive==2.1.0
- - pep8-naming==0.13.3
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.4.0
+ rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@@ -48,17 +15,23 @@
- id: requirements-txt-fixer
- id: check-merge-conflict
- id: check-json
+ - id: debug-statements
- id: mixed-line-ending
args: [--fix=lf]
- - id: debug-statements
- id: pretty-format-json
args: [--no-sort-keys, --autofix, --no-ensure-ascii]
- repo: https://github.com/adrienverge/yamllint
- rev: v1.29.0
+ rev: v1.33.0
hooks:
- id: yamllint
+- repo: https://github.com/astral-sh/ruff-pre-commit
+ rev: v0.1.8
+ hooks:
+ - id: ruff
+ args: [--fix, --exit-non-zero-on-fix]
+ - id: ruff-format
- repo: https://github.com/asottile/blacken-docs
- rev: v1.12.1
+ rev: 1.16.0
hooks:
- id: blacken-docs
- repo: meta
@@ -66,24 +39,28 @@
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
- rev: v2.5.0
+ rev: v2.11.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
+ - id: pretty-format-toml
+ args: [--autofix]
- repo: https://github.com/executablebooks/mdformat
- rev: 0.7.16
+ rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
- - mdformat-gfm
- - mdformat-black
- - mdformat-shfmt
+ - mdformat-gfm==0.3.5
+ - mdformat-black==0.1.1
+ - mdformat-shfmt==0.1.0
- repo: https://github.com/igorshubovych/markdownlint-cli
- rev: v0.33.0
+ rev: v0.38.0
hooks:
- id: markdownlint
- repo: https://github.com/fsfe/reuse-tool
- rev: v1.1.0
+ rev: v2.1.0
hooks:
- id: reuse
exclude: ^.*\.(properties)|translation_finder/test_data/app/src/res/main/values-it/strings.xml|translation_finder/test_data/app/src/res/main/values/strings.xml|translation_finder/test_data/json/bom-en.json|translation_finder/test_data/yaml/en/corrupt.yml$
+ci:
+ autoupdate_schedule: quarterly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/CHANGES.rst new/translation-finder-2.16/CHANGES.rst
--- old/translation-finder-2.15/CHANGES.rst 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/CHANGES.rst 2023-12-20 13:21:31.000000000 +0100
@@ -1,6 +1,14 @@
Changelog
=========
+2.16
+----
+
+* Released on 20th December 2023.
+* Fixed detection UTF-16 Strings files.
+* Fixed detection of files with some special chars.
+* Added support for Mobile Kotlin resources.
+
2.15
----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/README.rst new/translation-finder-2.16/README.rst
--- old/translation-finder-2.15/README.rst 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/README.rst 2023-12-20 13:21:31.000000000 +0100
@@ -3,7 +3,7 @@
:target: https://weblate.org/
:height: 80px
-**Weblate is a copylefted libre software web-based continuous localization system,
+**Weblate is libre software web-based continuous localization system,
used by over 2500 libre projects and companies in more than 165 countries.**
A translation file finder for `Weblate`_, translation tool with tight version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/SECURITY.md new/translation-finder-2.16/SECURITY.md
--- old/translation-finder-2.15/SECURITY.md 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/SECURITY.md 2023-12-20 13:21:31.000000000 +0100
@@ -6,13 +6,15 @@
This file is maintained in https://github.com/WeblateOrg/meta/
-->
-# Weblate Security
+# Weblate security
-We take security very seriously at Weblate. We welcome any peer review of our
-100% open source code to ensure nobody's Weblate is ever compromised or hacked.
+The Weblate team takes security and related transparency very seriously.
+We welcome any peer review of our 100% open-source code to ensure nobody's Weblate
+is ever compromised or hacked.
-You can find more information on reporting security issues in
-[our documentation][1] and on [our page at HackerOne][2].
+Information about practices for reporting and fixing security issues is described
+in [our documentation][1] and on [our page at HackerOne][2]. This ensures all
+vulnerabilities are solved securely, quickly, and transparently.
[1]: https://docs.weblate.org/en/latest/contributing/issues.html#security
[2]: https://hackerone.com/weblate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/pyproject.toml new/translation-finder-2.16/pyproject.toml
--- old/translation-finder-2.15/pyproject.toml 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/pyproject.toml 2023-12-20 13:21:31.000000000 +0100
@@ -1,2 +1,54 @@
[tool.black]
-target-version = ['py37']
+target-version = ['py39']
+
+[tool.isort]
+profile = "black"
+
+[tool.ruff]
+ignore = [
+ "D10", # TODO: we are missing many docstrings
+ "D203", # CONFIG: incompatible with D211
+ "D212", # CONFIG: incompatible with D213
+ "D401", # TODO: many strings need rephrasing
+ "RUF012", # TODO: Mutable class attributes should be annotated with `typing.ClassVar`
+ "PLW2901" # TODO: overwriting variables inside loop
+]
+output-format = "github"
+select = [
+ "E",
+ "F",
+ "B",
+ "T10",
+ "A",
+ "C4",
+ "C90",
+ "YTT",
+ "DJ",
+ "UP",
+ "D",
+ "PD",
+ "PGH",
+ "PL",
+ "TRY",
+ "RUF",
+ "ERA",
+ "ICN",
+ "ISC",
+ "EXE",
+ "INP",
+ "PIE",
+ "G",
+ "PYI",
+ "Q",
+ "SIM",
+ "TID",
+ "RSE",
+ "T20",
+ "RET",
+ "SLF",
+ "N"
+]
+target-version = "py39"
+
+[tool.ruff.mccabe]
+max-complexity = 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/requirements-lint.txt new/translation-finder-2.16/requirements-lint.txt
--- old/translation-finder-2.15/requirements-lint.txt 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/requirements-lint.txt 2023-12-20 13:21:31.000000000 +0100
@@ -1 +1 @@
-pre-commit==2.21.0
+pre-commit==3.6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/setup.cfg new/translation-finder-2.16/setup.cfg
--- old/translation-finder-2.15/setup.cfg 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/setup.cfg 2023-12-20 13:21:31.000000000 +0100
@@ -1,6 +1,6 @@
[metadata]
name = translation-finder
-version = 2.15
+version = 2.16
description = A translation file finder used in Weblate.
long_description = file: README.rst
long_description_content_type = text/x-rst
@@ -18,10 +18,6 @@
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
- Programming Language :: Python :: 3.7
- Programming Language :: Python :: 3.8
- Programming Language :: Python :: 3.9
- Programming Language :: Python :: 3.10
Topic :: Software Development :: Internationalization
Topic :: Software Development :: Localization
Topic :: Utilities
@@ -36,7 +32,7 @@
[options]
packages = translation_finder,translation_finder.discovery
-python_requires = >=3.7
+python_requires = >=3.9
package_dir = translation_finder=translation_finder
include_package_data = 1
@@ -62,11 +58,3 @@
extend-select = E,W1,W2,W3,W504,W505,W6
exclude = migrations,settings.py,settings_test.py,.git,data,data-test,settings_test_nose.py,docs,.venv,build,node_modules,.eggs
max-line-length = 88
-
-[isort]
-multi_line_output = 3
-include_trailing_comma = True
-force_grid_wrap = 0
-use_parentheses = True
-line_length = 88
-known_third_party = weblate_language_data,ruamel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/translation_finder/discovery/base.py new/translation-finder-2.16/translation_finder/discovery/base.py
--- old/translation-finder-2.15/translation_finder/discovery/base.py 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/translation_finder/discovery/base.py 2023-12-20 13:21:31.000000000 +0100
@@ -7,13 +7,14 @@
import fnmatch
import re
from itertools import chain
-from typing import Dict, Optional
+from typing import Optional
from charset_normalizer import detect
from weblate_language_data.country_codes import COUNTRIES
from weblate_language_data.language_codes import LANGUAGES
-from ..data import LANGUAGES_BLACKLIST
+from translation_finder.data import LANGUAGES_BLACKLIST
+
from .result import DiscoveryResult
TOKEN_SPLIT = re.compile(r"([_.-])")
@@ -100,9 +101,11 @@
return ""
def get_wildcard(self, part: str):
- """Generate language wilcard for a path part.
+ """
+ Generate language wilcard for a path part.
- Retruns None if not possible."""
+ Retruns None if not possible.
+ """
if self.is_language_code(part):
return "*"
if "." in part:
@@ -134,7 +137,7 @@
)
return None
- def fill_in_new_base(self, result: Dict[str, str]):
+ def fill_in_new_base(self, result: dict[str, str]):
if not self.new_base_mask:
return
path = result["filemask"]
@@ -144,9 +147,7 @@
basename = basename.replace(match, replacement)
new_name = self.new_base_mask.replace("*", basename).lower()
- new_regex = "{}|{}".format(
- re.escape(new_name), fnmatch.translate(self.new_base_mask)
- )
+ new_regex = f"{re.escape(new_name)}|{fnmatch.translate(self.new_base_mask)}"
best_result = None
@@ -183,7 +184,7 @@
yield mask.replace(match, replacement)
def fill_in_template(
- self, result: Dict[str, str], source_language: Optional[str] = None
+ self, result: dict[str, str], source_language: Optional[str] = None
):
if "template" not in result:
if source_language is None:
@@ -195,12 +196,12 @@
result["template"] = template
break
- def fill_in_file_format(self, result: Dict[str, str]):
+ def fill_in_file_format(self, result: dict[str, str]):
if "file_format" not in result:
result["file_format"] = self.file_format
@staticmethod
- def adjust_format(result: Dict[str, str]):
+ def adjust_format(result: dict[str, str]):
return
def discover(self, eager: bool = False, hint: Optional[str] = None):
@@ -233,9 +234,11 @@
)
def get_masks(self, eager: bool = False, hint: Optional[str] = None):
- """Return all file masks found in the directory.
+ """
+ Return all file masks found in the directory.
- It is expected to contain duplicates."""
+ It is expected to contain duplicates.
+ """
if hint:
for mask in self.masks_list:
if fnmatch.fnmatch(hint, mask):
@@ -270,7 +273,7 @@
uses_template = True
- def fill_in_new_base(self, result: Dict[str, str]):
+ def fill_in_new_base(self, result: dict[str, str]):
if "new_base" not in result and "template" in result:
result["new_base"] = result["template"]
@@ -280,7 +283,7 @@
encoding_map = {}
- def adjust_format(self, result: Dict[str, str]):
+ def adjust_format(self, result: dict[str, str]):
encoding = None
matches = [self.finder.mask_matches(result["filemask"])]
if "template" in result:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/translation_finder/discovery/files.py new/translation-finder-2.16/translation_finder/discovery/files.py
--- old/translation-finder-2.15/translation_finder/discovery/files.py 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/translation_finder/discovery/files.py 2023-12-20 13:21:31.000000000 +0100
@@ -6,12 +6,13 @@
import json
import re
-from typing import Dict, Optional
+from typing import Optional
from ruamel.yaml import YAML
from ruamel.yaml.error import YAMLError, YAMLFutureWarning
-from ..api import register_discovery
+from translation_finder.api import register_discovery
+
from .base import BaseDiscovery, EncodingDiscovery, MonoTemplateDiscovery
LARAVEL_RE = re.compile(r"=>.*\|")
@@ -69,13 +70,10 @@
file_format = "xliff"
mask = ("*.xliff", "*.xlf", "*.sdlxliff", "*.mxliff", "*.poxliff")
- def adjust_format(self, result: Dict[str, str]):
- if "template" in result:
- base = result["template"]
- else:
- base = result["filemask"]
+ def adjust_format(self, result: dict[str, str]):
+ base = result["template"] if "template" in result else result["filemask"]
- path = list(self.finder.mask_matches(base))[0]
+ path = next(iter(self.finder.mask_matches(base)))
if not hasattr(path, "open"):
return
@@ -119,9 +117,11 @@
file_format = "aresource"
def get_masks(self, eager: bool = False, hint: Optional[str] = None):
- """Return all file masks found in the directory.
+ """
+ Return all file masks found in the directory.
- It is expected to contain duplicates."""
+ It is expected to contain duplicates.
+ """
for path in self.finder.filter_files(r"strings.*\.xml", ".*/values"):
mask = list(path.parts)
mask[-2] = "values-*"
@@ -130,18 +130,41 @@
@register_discovery
+class MOKODiscovery(BaseDiscovery):
+ """Mobile Kotlin resources discovery."""
+
+ file_format = "moko-resource"
+
+ def get_masks(self, eager: bool = False, hint: Optional[str] = None):
+ """
+ Return all file masks found in the directory.
+
+ It is expected to contain duplicates.
+ """
+ for path in self.finder.filter_files(
+ r"(strings|plurals)\.xml", ".*/resources/mr/base"
+ ):
+ mask = list(path.parts)
+ mask[-2] = "*"
+
+ yield {"filemask": "/".join(mask), "template": path.as_posix()}
+
+
+@register_discovery
class OSXDiscovery(EncodingDiscovery):
"""OSX string properties files discovery."""
file_format = "strings-utf8"
encoding_map = {
- "utf-16": "strings-utf16",
+ "utf-16": "strings",
}
def get_masks(self, eager: bool = False, hint: Optional[str] = None):
- """Return all file masks found in the directory.
+ """
+ Return all file masks found in the directory.
- It is expected to contain duplicates."""
+ It is expected to contain duplicates.
+ """
for path in self.finder.filter_files(r".*\.strings", r".*/(base|en)\.lproj"):
mask = list(path.parts)
mask[-2] = "*.lproj"
@@ -162,9 +185,11 @@
file_format = "stringsdict"
def get_masks(self, eager: bool = False, hint: Optional[str] = None):
- """Return all file masks found in the directory.
+ """
+ Return all file masks found in the directory.
- It is expected to contain duplicates."""
+ It is expected to contain duplicates.
+ """
for path in self.finder.filter_files(
r".*\.stringsdict", r".*/(base|en)\.lproj"
):
@@ -202,9 +227,11 @@
yield from super().possible_templates(language, mask)
def get_masks(self, eager: bool = False, hint: Optional[str] = None):
- """Return all file masks found in the directory.
+ """
+ Return all file masks found in the directory.
- It is expected to contain duplicates."""
+ It is expected to contain duplicates.
+ """
for path in self.finder.filter_files(r".*\..*\.res[xw]"):
mask = list(path.parts)
base, code, ext = mask[-1].rsplit(".", 2)
@@ -281,9 +308,7 @@
detected = self.detect_dict(value, level + 1)
i18next |= detected == "i18next"
i18nextv4 |= detected == "i18nextv4"
- elif (
- key.endswith("_one") or key.endswith("_many") or key.endswith("_other")
- ):
+ elif key.endswith(("_one", "_many", "_other")):
i18nextv4 = True
elif key.endswith("_plural") or "{{" in value:
i18next = True
@@ -296,11 +321,11 @@
return "json"
return None
- def adjust_format(self, result: Dict[str, str]):
+ def adjust_format(self, result: dict[str, str]):
if "template" not in result:
return
- path = list(self.finder.mask_matches(result["template"]))[0]
+ path = next(iter(self.finder.mask_matches(result["template"])))
if not hasattr(path, "open"):
return
@@ -344,11 +369,11 @@
file_format = "yaml"
mask = ("*.yml", "*.yaml")
- def adjust_format(self, result: Dict[str, str]):
+ def adjust_format(self, result: dict[str, str]):
if "template" not in result:
return
- path = list(self.finder.mask_matches(result["template"]))[0]
+ path = next(iter(self.finder.mask_matches(result["template"])))
if not hasattr(path, "open"):
return
@@ -360,7 +385,7 @@
except (YAMLError, YAMLFutureWarning):
return
if isinstance(data, dict) and len(data) == 1:
- key = list(data.keys())[0]
+ key = next(iter(data.keys()))
if "filemask" in result:
if result["filemask"].replace("*", key) == result["template"]:
result["file_format"] = "ruby-yaml"
@@ -407,11 +432,11 @@
file_format = "php"
mask = "*.php"
- def adjust_format(self, result: Dict[str, str]):
+ def adjust_format(self, result: dict[str, str]):
if "template" not in result:
return
- path = list(self.finder.mask_matches(result["template"]))[0]
+ path = next(iter(self.finder.mask_matches(result["template"])))
if not hasattr(path, "open"):
return
@@ -503,7 +528,7 @@
file_format = "arb"
mask = "*.arb"
- def fill_in_new_base(self, result: Dict[str, str]):
+ def fill_in_new_base(self, result: dict[str, str]):
super().fill_in_new_base(result)
if "intermediate" not in result:
# Flutter intermediate files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/translation_finder/discovery/result.py new/translation-finder-2.16/translation_finder/discovery/result.py
--- old/translation-finder-2.15/translation_finder/discovery/result.py 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/translation_finder/discovery/result.py 2023-12-20 13:21:31.000000000 +0100
@@ -9,8 +9,7 @@
"""
Discovery result class.
- This is essentially a dict with meta dict containing additional
- information.
+ Subclass of a dict with meta dict containing additional information.
"""
def __init__(self, *args, **kwargs):
@@ -26,8 +25,8 @@
return dict(self)
def __lt__(self, other):
- """This is only method needed for sort."""
- return self._sort_key < other._sort_key # noqa:SF01,SLF001
+ """Only method needed for sort."""
+ return self._sort_key < other._sort_key
def __eq__(self, other):
return super().__eq__(other) and (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/translation_finder/discovery/transifex.py new/translation-finder-2.16/translation_finder/discovery/transifex.py
--- old/translation-finder-2.15/translation_finder/discovery/transifex.py 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/translation_finder/discovery/transifex.py 2023-12-20 13:21:31.000000000 +0100
@@ -7,7 +7,8 @@
from configparser import RawConfigParser
from typing import Optional
-from ..api import register_discovery
+from translation_finder.api import register_discovery
+
from .base import BaseDiscovery
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/translation_finder/finder.py new/translation-finder-2.16/translation_finder/finder.py
--- old/translation-finder-2.15/translation_finder/finder.py 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/translation_finder/finder.py 2023-12-20 13:21:31.000000000 +0100
@@ -70,10 +70,11 @@
return (path, relative, relative.as_posix())
def list_files(self, root, files, dirs):
- """Recursively list files and dirs in a path.
-
- It skips excluded files."""
+ """
+ Recursively list files and dirs in a path.
+ It skips excluded files.
+ """
with scandir(root) as matches:
for path in matches:
if path.is_symlink():
@@ -101,6 +102,8 @@
def mask_matches(self, mask: str):
"""Return all mask matches."""
+ # Avoid dealing [ as a special char
+ mask = mask.replace("[", "[[]").replace("?", "[?]")
for name, path in self.files:
if fnmatch(name, mask):
yield path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translation-finder-2.15/translation_finder/test_discovery.py new/translation-finder-2.16/translation_finder/test_discovery.py
--- old/translation-finder-2.15/translation_finder/test_discovery.py 2023-01-13 13:43:37.000000000 +0100
+++ new/translation-finder-2.16/translation_finder/test_discovery.py 2023-12-20 13:21:31.000000000 +0100
@@ -8,6 +8,7 @@
from .discovery.base import DiscoveryResult
from .discovery.files import (
AndroidDiscovery,
+ MOKODiscovery,
AppStoreDiscovery,
ARBDiscovery,
CSVDiscovery,
@@ -567,6 +568,36 @@
)
+class MOKOTest(DiscoveryTestCase):
+ def test_basic(self):
+ discovery = MOKODiscovery(
+ self.get_finder(
+ [
+ "app/src/res/main/values/strings.xml",
+ "app/src/res/main/values-it/strings.xml",
+ "app/src/res/main/values-it/strings-other.xml",
+ "src/commonMain/resources/MR/base/strings.xml",
+ "src/commonMain/resources/MR/base/plurals.xml",
+ ]
+ )
+ )
+ self.assert_discovery(
+ discovery.discover(),
+ [
+ {
+ "filemask": "src/commonMain/resources/MR/*/plurals.xml",
+ "template": "src/commonMain/resources/MR/base/plurals.xml",
+ "file_format": "moko-resource",
+ },
+ {
+ "filemask": "src/commonMain/resources/MR/*/strings.xml",
+ "template": "src/commonMain/resources/MR/base/strings.xml",
+ "file_format": "moko-resource",
+ },
+ ],
+ )
+
+
class OSXTest(DiscoveryTestCase):
def test_basic(self):
discovery = OSXDiscovery(
@@ -894,6 +925,27 @@
},
],
)
+
+ def test_shell_chars(self):
+ discovery = JSONDiscovery(
+ self.get_finder(
+ [
+ "src/app/[locale]/_translations/en.json",
+ "src/app/[locale]/_translations/de.json",
+ "src/app/[locale]/_translations/cs.json",
+ ]
+ )
+ )
+ self.assert_discovery(
+ discovery.discover(),
+ [
+ {
+ "filemask": "src/app/[locale]/_translations/*.json",
+ "file_format": "json-nested",
+ "template": "src/app/[locale]/_translations/en.json",
+ },
+ ],
+ )
def test_json_data(self):
"""
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-xsge_path for openSUSE:Factory checked in at 2024-01-03 12:24:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-xsge_path (Old)
and /work/SRC/openSUSE:Factory/.python-xsge_path.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-xsge_path"
Wed Jan 3 12:24:17 2024 rev:3 rq:1135630 version:1.0.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-xsge_path/python-xsge_path.changes 2021-06-01 10:37:50.524851898 +0200
+++ /work/SRC/openSUSE:Factory/.python-xsge_path.new.28375/python-xsge_path.changes 2024-01-03 12:24:23.582172945 +0100
@@ -1,0 +2,6 @@
+Fri Dec 29 10:09:19 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 1.0.3:
+ * relicense to LGPL
+
+-------------------------------------------------------------------
Old:
----
xsge_path-1.0.2.tar.gz
New:
----
xsge_path-1.0.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-xsge_path.spec ++++++
--- /var/tmp/diff_new_pack.sIjjU7/_old 2024-01-03 12:24:24.618210798 +0100
+++ /var/tmp/diff_new_pack.sIjjU7/_new 2024-01-03 12:24:24.622210945 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-xsge_path
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,15 +16,13 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define skip_python2 1
-%define skip_python36 1
+%{?sle15_python_module_pythons}
Name: python-xsge_path
-Version: 1.0.2
+Version: 1.0.3
Release: 0
Summary: xSGE Path
-License: GPL-3.0-or-later
-URL: http://xsge.nongnu.org
+License: LGPL-3.0-or-later
+URL: https://python-sge.github.io/
Source: https://files.pythonhosted.org/packages/source/x/xsge_path/xsge_path-%{vers…
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
++++++ xsge_path-1.0.2.tar.gz -> xsge_path-1.0.3.tar.gz ++++++
++++ 6236 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-sounddevice for openSUSE:Factory checked in at 2024-01-03 12:24:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sounddevice (Old)
and /work/SRC/openSUSE:Factory/.python-sounddevice.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sounddevice"
Wed Jan 3 12:24:16 2024 rev:12 rq:1136463 version:0.4.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sounddevice/python-sounddevice.changes 2022-10-08 01:26:34.274414915 +0200
+++ /work/SRC/openSUSE:Factory/.python-sounddevice.new.28375/python-sounddevice.changes 2024-01-03 12:24:21.606100744 +0100
@@ -1,0 +2,6 @@
+Fri Dec 29 09:41:04 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 0.4.6:
+ * Redirect stderr with os.dup2() instead of CFFI calls
+
+-------------------------------------------------------------------
Old:
----
sounddevice-0.4.5.tar.gz
New:
----
sounddevice-0.4.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-sounddevice.spec ++++++
--- /var/tmp/diff_new_pack.Itz9Qp/_old 2024-01-03 12:24:22.378128951 +0100
+++ /var/tmp/diff_new_pack.Itz9Qp/_new 2024-01-03 12:24:22.378128951 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-sounddevice
#
-# Copyright (c) 2022 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
@@ -16,11 +16,9 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define skip_python2 1
-%define skip_python36 1
+%{?sle15_python_module_pythons}
Name: python-sounddevice
-Version: 0.4.5
+Version: 0.4.6
Release: 0
Summary: Module to play and record sound with Python
License: MIT
@@ -28,7 +26,9 @@
Source: https://files.pythonhosted.org/packages/source/s/sounddevice/sounddevice-%{…
BuildRequires: %{python_module cffi >= 1.0}
BuildRequires: %{python_module numpy}
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: portaudio
BuildRequires: python-rpm-macros
@@ -47,16 +47,19 @@
%build
chmod 644 examples/*
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%doc NEWS.rst README.rst examples
%license LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/{_sounddevice.py,sounddevice.py}
+%pycache_only %{python_sitelib}/__pycache__/{sounddevice,_sounddevice}*
+
+%{python_sitelib}/sounddevice-%{version}.dist-info
%check
# no upstream tests, examples needs devices
++++++ sounddevice-0.4.5.tar.gz -> sounddevice-0.4.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.5/LICENSE new/sounddevice-0.4.6/LICENSE
--- old/sounddevice-0.4.5/LICENSE 2022-08-21 17:22:18.000000000 +0200
+++ new/sounddevice-0.4.6/LICENSE 2023-02-19 12:38:35.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2015-2022 Matthias Geier
+Copyright (c) 2015-2023 Matthias Geier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.5/NEWS.rst new/sounddevice-0.4.6/NEWS.rst
--- old/sounddevice-0.4.5/NEWS.rst 2022-08-21 17:24:03.000000000 +0200
+++ new/sounddevice-0.4.6/NEWS.rst 2023-02-19 12:38:54.000000000 +0100
@@ -1,3 +1,6 @@
+0.4.6 (2023-02-19):
+ * Redirect stderr with os.dup2() instead of CFFI calls
+
0.4.5 (2022-08-21):
* Add ``index`` field to device dict
* Require Python >= 3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.5/PKG-INFO new/sounddevice-0.4.6/PKG-INFO
--- old/sounddevice-0.4.5/PKG-INFO 2022-08-21 17:36:27.595208600 +0200
+++ new/sounddevice-0.4.6/PKG-INFO 2023-02-19 12:44:24.703644000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: sounddevice
-Version: 0.4.5
+Version: 0.4.6
Summary: Play and Record Sound with Python
Home-page: http://python-sounddevice.readthedocs.io/
Author: Matthias Geier
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.5/sounddevice.egg-info/PKG-INFO new/sounddevice-0.4.6/sounddevice.egg-info/PKG-INFO
--- old/sounddevice-0.4.5/sounddevice.egg-info/PKG-INFO 2022-08-21 17:36:27.000000000 +0200
+++ new/sounddevice-0.4.6/sounddevice.egg-info/PKG-INFO 2023-02-19 12:44:24.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: sounddevice
-Version: 0.4.5
+Version: 0.4.6
Summary: Play and Record Sound with Python
Home-page: http://python-sounddevice.readthedocs.io/
Author: Matthias Geier
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.5/sounddevice.py new/sounddevice-0.4.6/sounddevice.py
--- old/sounddevice-0.4.5/sounddevice.py 2022-08-21 17:21:44.000000000 +0200
+++ new/sounddevice-0.4.6/sounddevice.py 2023-02-19 12:38:38.000000000 +0100
@@ -1,4 +1,4 @@
-# Copyright (c) 2015-2021 Matthias Geier
+# Copyright (c) 2015-2023 Matthias Geier
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -48,7 +48,7 @@
https://python-sounddevice.readthedocs.io/
"""
-__version__ = '0.4.5'
+__version__ = '0.4.6'
import atexit as _atexit
import os as _os
@@ -2825,27 +2825,20 @@
"""
old_stderr = None
try:
- stdio = _ffi.dlopen(None)
+ old_stderr = _os.dup(2)
+ devnull = _os.open(_os.devnull, _os.O_WRONLY)
+ _os.dup2(devnull, 2)
+ _os.close(devnull)
except OSError:
pass
- else:
- for stderr_name in 'stderr', '__stderrp':
- try:
- old_stderr = getattr(stdio, stderr_name)
- except _ffi.error:
- continue
- else:
- devnull = stdio.fopen(_os.devnull.encode(), b'w')
- setattr(stdio, stderr_name, devnull)
- break
try:
_check(_lib.Pa_Initialize(), 'Error initializing PortAudio')
global _initialized
_initialized += 1
finally:
if old_stderr is not None:
- setattr(stdio, stderr_name, old_stderr)
- stdio.fclose(devnull)
+ _os.dup2(old_stderr, 2)
+ _os.close(old_stderr)
def _terminate():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.5/sounddevice_build.py new/sounddevice-0.4.6/sounddevice_build.py
--- old/sounddevice-0.4.5/sounddevice_build.py 2022-03-03 20:40:29.000000000 +0100
+++ new/sounddevice-0.4.6/sounddevice_build.py 2023-01-25 11:29:46.000000000 +0100
@@ -311,13 +311,5 @@
int PaWasapi_IsLoopback( PaDeviceIndex device );
""")
-ffibuilder.cdef("""
- /* from stdio.h */
- FILE* fopen(const char* path, const char* mode);
- int fclose(FILE* fp);
- extern FILE* stderr; /* GNU C library */
- extern FILE* __stderrp; /* macOS */
-""")
-
if __name__ == '__main__':
ffibuilder.compile(verbose=True)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-testflo for openSUSE:Factory checked in at 2024-01-03 12:24:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-testflo (Old)
and /work/SRC/openSUSE:Factory/.python-testflo.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-testflo"
Wed Jan 3 12:24:14 2024 rev:11 rq:1136318 version:1.4.15
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-testflo/python-testflo.changes 2023-12-13 18:36:29.289786536 +0100
+++ /work/SRC/openSUSE:Factory/.python-testflo.new.28375/python-testflo.changes 2024-01-03 12:24:19.246014512 +0100
@@ -1,0 +2,6 @@
+Fri Dec 29 09:44:57 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 1.4.15:
+ * handle python 3.12.1 change to skip behavior
+
+-------------------------------------------------------------------
Old:
----
testflo-1.4.14.tar.gz
New:
----
testflo-1.4.15.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-testflo.spec ++++++
--- /var/tmp/diff_new_pack.tzd1JO/_old 2024-01-03 12:24:20.734068881 +0100
+++ /var/tmp/diff_new_pack.tzd1JO/_new 2024-01-03 12:24:20.734068881 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-testflo
#
-# 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
@@ -16,16 +16,18 @@
#
-%define skip_python36 1
+%{?sle15_python_module_pythons}
Name: python-testflo
-Version: 1.4.14
+Version: 1.4.15
Release: 0
Summary: A flow-based testing framework
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/OpenMDAO/testflo
Source: https://files.pythonhosted.org/packages/source/t/testflo/testflo-%{version}…
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-setuptools
@@ -53,10 +55,10 @@
%setup -q -n testflo-%{version}
%build
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/testflo
@@ -75,5 +77,5 @@
%doc README.md
%python_alternative %{_bindir}/testflo
%{python_sitelib}/testflo
-%{python_sitelib}/testflo-*.egg-info
+%{python_sitelib}/testflo-%{version}.dist-info
++++++ testflo-1.4.14.tar.gz -> testflo-1.4.15.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/testflo-1.4.14/PKG-INFO new/testflo-1.4.15/PKG-INFO
--- old/testflo-1.4.14/PKG-INFO 2023-11-13 17:21:00.157166200 +0100
+++ new/testflo-1.4.15/PKG-INFO 2023-12-28 19:25:25.970558400 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: testflo
-Version: 1.4.14
+Version: 1.4.15
Summary: A simple flow-based testing framework
License: Apache 2.0
Classifier: Development Status :: 4 - Beta
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/testflo-1.4.14/testflo/__init__.py new/testflo-1.4.15/testflo/__init__.py
--- old/testflo-1.4.14/testflo/__init__.py 2023-11-13 17:19:24.000000000 +0100
+++ new/testflo-1.4.15/testflo/__init__.py 2023-12-28 19:24:57.000000000 +0100
@@ -1 +1 @@
-__version__ = '1.4.14'
+__version__ = '1.4.15'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/testflo-1.4.14/testflo/utresult.py new/testflo-1.4.15/testflo/utresult.py
--- old/testflo-1.4.14/testflo/utresult.py 2023-10-23 21:57:00.000000000 +0200
+++ new/testflo-1.4.15/testflo/utresult.py 2023-12-28 19:15:59.000000000 +0100
@@ -76,7 +76,12 @@
def addSkip(self, test, reason):
"""Called when a test is skipped."""
- resdata = self._tests[test.id()]
+ # as of Python 3.12.1, startTest is not called before processing skips, so we
+ # add the test to our list without having called the super() startTest method
+ if test.id() not in self._tests:
+ resdata = self._tests[test.id()] = _ResultData(test)
+ else:
+ resdata = self._tests[test.id()]
resdata.status = 'SKIP'
resdata.error = reason
super().addSkip(test, reason)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/testflo-1.4.14/testflo.egg-info/PKG-INFO new/testflo-1.4.15/testflo.egg-info/PKG-INFO
--- old/testflo-1.4.14/testflo.egg-info/PKG-INFO 2023-11-13 17:21:00.000000000 +0100
+++ new/testflo-1.4.15/testflo.egg-info/PKG-INFO 2023-12-28 19:25:25.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: testflo
-Version: 1.4.14
+Version: 1.4.15
Summary: A simple flow-based testing framework
License: Apache 2.0
Classifier: Development Status :: 4 - Beta
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-texttable for openSUSE:Factory checked in at 2024-01-03 12:24:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-texttable (Old)
and /work/SRC/openSUSE:Factory/.python-texttable.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-texttable"
Wed Jan 3 12:24:13 2024 rev:10 rq:1135624 version:1.7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-texttable/python-texttable.changes 2023-06-27 23:18:18.319970218 +0200
+++ /work/SRC/openSUSE:Factory/.python-texttable.new.28375/python-texttable.changes 2024-01-03 12:24:16.957930912 +0100
@@ -1,0 +2,6 @@
+Fri Dec 29 09:57:42 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 1.7.0:
+ * Add boolean formatting option
+
+-------------------------------------------------------------------
Old:
----
texttable-1.6.7.tar.gz
New:
----
texttable-1.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-texttable.spec ++++++
--- /var/tmp/diff_new_pack.6FlHEK/_old 2024-01-03 12:24:18.081971981 +0100
+++ /var/tmp/diff_new_pack.6FlHEK/_new 2024-01-03 12:24:18.081971981 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-texttable
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,16 @@
%{?sle15_python_module_pythons}
Name: python-texttable
-Version: 1.6.7
+Version: 1.7.0
Release: 0
Summary: Module for creating simple ASCII tables
License: MIT
Group: Development/Languages/Python
URL: https://github.com/foutaise/texttable/
Source: https://files.pythonhosted.org/packages/source/t/texttable/texttable-%{vers…
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
-BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-base
@@ -42,10 +43,10 @@
%setup -q -n texttable-%{version}
%build
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@@ -54,5 +55,7 @@
%files %{python_files}
%license LICENSE
%doc README.md CHANGELOG.md
-%{python_sitelib}/*
+%{python_sitelib}/texttable.py
+%pycache_only %{python_sitelib}/__pycache__/texttable*
+%{python_sitelib}/texttable-%{version}.dist-info
++++++ texttable-1.6.7.tar.gz -> texttable-1.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.7/.gitignore new/texttable-1.7.0/.gitignore
--- old/texttable-1.6.7/.gitignore 2018-06-12 19:37:11.000000000 +0200
+++ new/texttable-1.7.0/.gitignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-/.cache/
-/.coverage
-/.tox/
-/MANIFEST
-/__pycache__/
-*.egg-info/
-*.pyc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.7/CHANGELOG.md new/texttable-1.7.0/CHANGELOG.md
--- old/texttable-1.6.7/CHANGELOG.md 2022-11-23 08:11:53.000000000 +0100
+++ new/texttable-1.7.0/CHANGELOG.md 2023-10-03 11:40:32.000000000 +0200
@@ -1,5 +1,8 @@
# Version History
+v1.7.0 (2023-10-03)
+* Add boolean formatting option (https://github.com/foutaise/texttable/pull/89)
+
v1.6.7 (2022-11-23)
* Get rid of stub file in wheel package (https://github.com/foutaise/texttable/issues/84)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.7/PKG-INFO new/texttable-1.7.0/PKG-INFO
--- old/texttable-1.6.7/PKG-INFO 2022-11-23 08:17:52.513803200 +0100
+++ new/texttable-1.7.0/PKG-INFO 2023-10-03 11:40:45.542220600 +0200
@@ -1,9 +1,9 @@
Metadata-Version: 2.1
Name: texttable
-Version: 1.6.7
+Version: 1.7.0
Summary: module to create simple ASCII tables
Home-page: https://github.com/foutaise/texttable/
-Download-URL: https://github.com/foutaise/texttable/archive/v1.6.7.tar.gz
+Download-URL: https://github.com/foutaise/texttable/archive/v1.7.0.tar.gz
Author: Gerome Fournier
Author-email: jef(a)foutaise.org
License: MIT
@@ -177,6 +177,7 @@
| * "f": treat as float in decimal format
| * "e": treat as float in exponential format
| * "i": treat as int
+ | * "b": treat as boolean
| * a callable: should return formatted string for any value given
|
| - by default, automatic datatyping is used for each column
@@ -252,10 +253,10 @@
__author__ = 'Gerome Fournier <jef(at)foutaise.org>'
__credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at...
__license__ = 'MIT'
- __version__ = '1.6.7'
+ __version__ = '1.7.0'
VERSION
- 1.6.7
+ 1.7.0
AUTHOR
Gerome Fournier <jef(at)foutaise.org>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.7/README.md new/texttable-1.7.0/README.md
--- old/texttable-1.6.7/README.md 2022-11-23 08:12:19.000000000 +0100
+++ new/texttable-1.7.0/README.md 2023-10-03 11:40:32.000000000 +0200
@@ -144,6 +144,7 @@
| * "f": treat as float in decimal format
| * "e": treat as float in exponential format
| * "i": treat as int
+ | * "b": treat as boolean
| * a callable: should return formatted string for any value given
|
| - by default, automatic datatyping is used for each column
@@ -219,10 +220,10 @@
__author__ = 'Gerome Fournier <jef(at)foutaise.org>'
__credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at...
__license__ = 'MIT'
- __version__ = '1.6.7'
+ __version__ = '1.7.0'
VERSION
- 1.6.7
+ 1.7.0
AUTHOR
Gerome Fournier <jef(at)foutaise.org>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.7/setup.py new/texttable-1.7.0/setup.py
--- old/texttable-1.6.7/setup.py 2022-11-23 08:10:39.000000000 +0100
+++ new/texttable-1.7.0/setup.py 2023-10-03 11:40:32.000000000 +0200
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#
# texttable - module to create simple ASCII tables
-# Copyright (C) 2003-2022 Gerome Fournier <jef(at)foutaise.org>
+# Copyright (C) 2003-2023 Gerome Fournier <jef(at)foutaise.org>
from setuptools import setup
@@ -12,11 +12,11 @@
setup(
name="texttable",
- version="1.6.7",
+ version="1.7.0",
author="Gerome Fournier",
author_email="jef(a)foutaise.org",
url="https://github.com/foutaise/texttable/",
- download_url="https://github.com/foutaise/texttable/archive/v1.6.7.tar.gz",
+ download_url="https://github.com/foutaise/texttable/archive/v1.7.0.tar.gz",
license="MIT",
py_modules=["texttable"],
description=DESCRIPTION,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.7/tests.py new/texttable-1.7.0/tests.py
--- old/texttable-1.6.7/tests.py 2019-06-24 14:19:02.000000000 +0200
+++ new/texttable-1.7.0/tests.py 2023-10-03 11:40:32.000000000 +0200
@@ -303,3 +303,25 @@
| NaN |
+-------+
''')
+
+def test_bool():
+ table = Texttable()
+ table.set_cols_align(["l", "l"])
+ table.set_cols_dtype(["a", "b"])
+ table.set_deco(0)
+ table.add_rows([
+ [True, True],
+ [False, False],
+ ["test", 0],
+ [12, "true"],
+ [12, ""],
+ [34.2, 1.0],
+ ], header=False)
+ assert clean(table.draw()) == u_dedent('''\
+ True True
+ False False
+ test False
+ 12 True
+ 12 False
+ 34.200 True
+ ''')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.7/texttable.egg-info/PKG-INFO new/texttable-1.7.0/texttable.egg-info/PKG-INFO
--- old/texttable-1.6.7/texttable.egg-info/PKG-INFO 2022-11-23 08:17:52.000000000 +0100
+++ new/texttable-1.7.0/texttable.egg-info/PKG-INFO 2023-10-03 11:40:45.000000000 +0200
@@ -1,9 +1,9 @@
Metadata-Version: 2.1
Name: texttable
-Version: 1.6.7
+Version: 1.7.0
Summary: module to create simple ASCII tables
Home-page: https://github.com/foutaise/texttable/
-Download-URL: https://github.com/foutaise/texttable/archive/v1.6.7.tar.gz
+Download-URL: https://github.com/foutaise/texttable/archive/v1.7.0.tar.gz
Author: Gerome Fournier
Author-email: jef(a)foutaise.org
License: MIT
@@ -177,6 +177,7 @@
| * "f": treat as float in decimal format
| * "e": treat as float in exponential format
| * "i": treat as int
+ | * "b": treat as boolean
| * a callable: should return formatted string for any value given
|
| - by default, automatic datatyping is used for each column
@@ -252,10 +253,10 @@
__author__ = 'Gerome Fournier <jef(at)foutaise.org>'
__credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at...
__license__ = 'MIT'
- __version__ = '1.6.7'
+ __version__ = '1.7.0'
VERSION
- 1.6.7
+ 1.7.0
AUTHOR
Gerome Fournier <jef(at)foutaise.org>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.7/texttable.egg-info/SOURCES.txt new/texttable-1.7.0/texttable.egg-info/SOURCES.txt
--- old/texttable-1.6.7/texttable.egg-info/SOURCES.txt 2022-11-23 08:17:52.000000000 +0100
+++ new/texttable-1.7.0/texttable.egg-info/SOURCES.txt 2023-10-03 11:40:45.000000000 +0200
@@ -1,9 +1,7 @@
.coveragerc
-.gitignore
CHANGELOG.md
LICENSE
MANIFEST.in
-PKG-INFO
README.md
setup.py
tests.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.7/texttable.py new/texttable-1.7.0/texttable.py
--- old/texttable-1.6.7/texttable.py 2022-11-23 08:12:09.000000000 +0100
+++ new/texttable-1.7.0/texttable.py 2023-10-03 11:40:32.000000000 +0200
@@ -1,5 +1,5 @@
# texttable - module to create simple ASCII tables
-# Copyright (C) 2003-2022 Gerome Fournier <jef(at)foutaise.org>
+# Copyright (C) 2003-2023 Gerome Fournier <jef(at)foutaise.org>
"""module to create simple ASCII tables
@@ -63,7 +63,7 @@
__author__ = 'Gerome Fournier <jef(at)foutaise.org>'
__license__ = 'MIT'
-__version__ = '1.6.7'
+__version__ = '1.7.0'
__credits__ = """\
Jeff Kowalczyk:
- textwrap improved import
@@ -311,13 +311,14 @@
"""Set the desired columns datatype for the cols.
- the elements of the array should be either a callable or any of
- "a", "t", "f", "e" or "i":
+ "a", "t", "f", "e", "i" or "b":
* "a": automatic (try to use the most appropriate datatype)
* "t": treat as text
* "f": treat as float in decimal format
* "e": treat as float in exponential format
* "i": treat as int
+ * "b": treat as boolean
* a callable: should return formatted string for any value given
- by default, automatic datatyping is used for each column
@@ -481,6 +482,11 @@
return obj2unicode(x)
@classmethod
+ def _fmt_bool(cls, x, **kw):
+ """Boolean formatting class-method"""
+ return str(bool(x))
+
+ @classmethod
def _fmt_auto(cls, x, **kw):
"""auto formatting class-method."""
f = cls._to_float(x)
@@ -489,7 +495,7 @@
elif f != f: # NaN
fn = cls._fmt_text
elif f - round(f) == 0:
- fn = cls._fmt_int
+ fn = cls._fmt_bool if isinstance(x, bool) else cls._fmt_int
else:
fn = cls._fmt_float
return fn(x, **kw)
@@ -503,6 +509,7 @@
FMT = {
'a':self._fmt_auto,
'i':self._fmt_int,
+ 'b':self._fmt_bool,
'f':self._fmt_float,
'e':self._fmt_exp,
't':self._fmt_text,
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-unidiff for openSUSE:Factory checked in at 2024-01-03 12:24:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-unidiff (Old)
and /work/SRC/openSUSE:Factory/.python-unidiff.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-unidiff"
Wed Jan 3 12:24:11 2024 rev:11 rq:1135623 version:0.7.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-unidiff/python-unidiff.changes 2022-06-28 15:23:10.858014815 +0200
+++ /work/SRC/openSUSE:Factory/.python-unidiff.new.28375/python-unidiff.changes 2024-01-03 12:24:15.989895542 +0100
@@ -1,0 +2,8 @@
+Fri Dec 29 09:56:02 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 0.7.5:
+ * Fixed issue with spaces in filename when using custom git
+ prefix.
+ * Support binary patch format.
+
+-------------------------------------------------------------------
Old:
----
v0.7.4.tar.gz
New:
----
v0.7.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-unidiff.spec ++++++
--- /var/tmp/diff_new_pack.cgc39Z/_old 2024-01-03 12:24:16.633919072 +0100
+++ /var/tmp/diff_new_pack.cgc39Z/_new 2024-01-03 12:24:16.633919072 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-unidiff
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,16 +16,17 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%{?sle15_python_module_pythons}
Name: python-unidiff
-Version: 0.7.4
+Version: 0.7.5
Release: 0
Summary: Unified diff parsing/metadata extraction library
License: MIT
Group: Development/Languages/Python
URL: https://github.com/matiasb/python-unidiff
Source: https://github.com/matiasb/python-unidiff/archive/v%{version}.tar.gz
-BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module pip}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
@@ -43,10 +44,10 @@
%setup -q -n python-unidiff-%{version}
%build
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/unidiff
%python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -63,5 +64,6 @@
%doc HISTORY README.rst
%license LICENSE
%python_alternative %{_bindir}/unidiff
-%{python_sitelib}/*
+%{python_sitelib}/unidiff
+%{python_sitelib}/unidiff-%{version}.dist-info
++++++ v0.7.4.tar.gz -> v0.7.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-unidiff-0.7.4/.travis.yml new/python-unidiff-0.7.5/.travis.yml
--- old/python-unidiff-0.7.4/.travis.yml 2022-06-26 22:11:08.000000000 +0200
+++ new/python-unidiff-0.7.5/.travis.yml 2023-03-10 02:03:38.000000000 +0100
@@ -1,8 +1,8 @@
language: python
python:
- - "2.7"
- - "3.6"
- "3.7"
- "3.8"
- "3.9"
+ - "3.10"
+ - "3.11"
script: ./run_tests.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-unidiff-0.7.4/AUTHORS new/python-unidiff-0.7.5/AUTHORS
--- old/python-unidiff-0.7.4/AUTHORS 2022-06-26 22:11:08.000000000 +0200
+++ new/python-unidiff-0.7.5/AUTHORS 2023-03-10 02:03:38.000000000 +0100
@@ -32,3 +32,5 @@
* Ronuk Raval (`@rraval`)
* anthony sottile (`@asottile-sentry`)
* (`@cpackham-atlnz`)
+ * David Leen (`@dleen`)
+ * Martin Liška (`@marxin`)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-unidiff-0.7.4/HISTORY new/python-unidiff-0.7.5/HISTORY
--- old/python-unidiff-0.7.4/HISTORY 2022-06-26 22:11:08.000000000 +0200
+++ new/python-unidiff-0.7.5/HISTORY 2023-03-10 02:03:38.000000000 +0100
@@ -1,6 +1,12 @@
History
-------
+0.7.5 - 2023-03-09
+------------------
+
+* Fixed issue with spaces in filename when using custom git prefix.
+* Support binary patch format.
+
0.7.4 - 2022-06-26
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-unidiff-0.7.4/setup.py new/python-unidiff-0.7.5/setup.py
--- old/python-unidiff-0.7.4/setup.py 2022-06-26 22:11:08.000000000 +0200
+++ new/python-unidiff-0.7.5/setup.py 2023-03-10 02:03:38.000000000 +0100
@@ -45,12 +45,11 @@
classifiers=[
'Intended Audience :: Developers',
'Development Status :: 4 - Beta',
- "Programming Language :: Python :: 2",
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
],
test_suite='tests',
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-unidiff-0.7.4/tests/samples/binary.diff new/python-unidiff-0.7.5/tests/samples/binary.diff
--- old/python-unidiff-0.7.4/tests/samples/binary.diff 1970-01-01 01:00:00.000000000 +0100
+++ new/python-unidiff-0.7.5/tests/samples/binary.diff 2023-03-10 02:03:38.000000000 +0100
@@ -0,0 +1,23 @@
+From 62ea0eaf7e00170a8fca79f665442f9f44725956 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska(a)suse.cz>
+Date: Fri, 9 Dec 2022 12:05:32 +0100
+Subject: [PATCH] add pixel
+
+---
+ 1x1.png | Bin 0 -> 95 bytes
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 1x1.png
+
+diff --git a/1x1.png b/1x1.png
+new file mode 100644
+index 0000000000000000000000000000000000000000..1914264c08781d1f30ee0b8482bccf44586f2dc1
+GIT binary patch
+literal 95
+zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga%mF?ju0VQumF+E%TuG2$FoVOh
+l8)-lem#2$k2*>s01R$G<f$@>z9%CSj!PC{xWt~$(697H@6ZHT9
+
+literal 0
+HcmV?d00001
+
+--
+2.38.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-unidiff-0.7.4/tests/samples/git_filenames_with_spaces_prefix.diff new/python-unidiff-0.7.5/tests/samples/git_filenames_with_spaces_prefix.diff
--- old/python-unidiff-0.7.4/tests/samples/git_filenames_with_spaces_prefix.diff 1970-01-01 01:00:00.000000000 +0100
+++ new/python-unidiff-0.7.5/tests/samples/git_filenames_with_spaces_prefix.diff 2023-03-10 02:03:38.000000000 +0100
@@ -0,0 +1,7 @@
+diff --git src://foo bar/baz dst://foo bar/baz
+new file mode 100644
+index 00000000000..0a72e5064c8
+--- /dev/null
++++ dst://foo bar/baz
+@@ -0,0 +1,1 @@
++blah
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-unidiff-0.7.4/tests/test_parser.py new/python-unidiff-0.7.5/tests/test_parser.py
--- old/python-unidiff-0.7.4/tests/test_parser.py 2022-06-26 22:11:08.000000000 +0200
+++ new/python-unidiff-0.7.5/tests/test_parser.py 2023-03-10 02:03:38.000000000 +0100
@@ -325,6 +325,18 @@
self.assertTrue(res[0].is_added_file)
self.assertEqual(res[0].path, 'has spaces/t.sql')
+ def test_parse_filename_prefix_with_spaces(self):
+ filename = os.path.join(self.samples_dir, 'samples/git_filenames_with_spaces_prefix.diff')
+ with open(filename) as f:
+ res = PatchSet(f)
+
+ self.assertEqual(len(res), 1)
+
+ self.assertEqual(res[0].source_file, '/dev/null')
+ self.assertEqual(res[0].target_file, 'dst://foo bar/baz')
+ self.assertTrue(res[0].is_added_file)
+ self.assertEqual(res[0].path, 'dst://foo bar/baz')
+
def test_deleted_file(self):
filename = os.path.join(self.samples_dir, 'samples/git_delete.diff')
with open(filename) as f:
@@ -422,6 +434,16 @@
self.assertEqual(hunk_positions, expected_hunk_positions)
+ def test_binary_patch(self):
+ utf8_file = os.path.join(self.samples_dir, 'samples/binary.diff')
+ with open(utf8_file, 'r') as diff_file:
+ res = PatchSet(diff_file)
+ self.assertEqual(len(res), 1)
+ patch = res[0]
+ self.assertEqual(patch.source_file, '/dev/null')
+ self.assertEqual(patch.target_file, 'b/1x1.png')
+ self.assertTrue(patch.is_binary_file)
+ self.assertTrue(patch.is_added_file)
class TestVCSSamples(unittest.TestCase):
"""Tests for real examples from VCS."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-unidiff-0.7.4/unidiff/__version__.py new/python-unidiff-0.7.5/unidiff/__version__.py
--- old/python-unidiff-0.7.4/unidiff/__version__.py 2022-06-26 22:11:08.000000000 +0200
+++ new/python-unidiff-0.7.5/unidiff/__version__.py 2023-03-10 02:03:38.000000000 +0100
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# The MIT License (MIT)
-# Copyright (c) 2014-2022 Matias Bordese
+# Copyright (c) 2014-2023 Matias Bordese
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -21,4 +21,4 @@
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
# OR OTHER DEALINGS IN THE SOFTWARE.
-__version__ = '0.7.4'
+__version__ = '0.7.5'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-unidiff-0.7.4/unidiff/constants.py new/python-unidiff-0.7.5/unidiff/constants.py
--- old/python-unidiff-0.7.4/unidiff/constants.py 2022-06-26 22:11:08.000000000 +0200
+++ new/python-unidiff-0.7.5/unidiff/constants.py 2023-03-10 02:03:38.000000000 +0100
@@ -38,6 +38,8 @@
# check diff git line for git renamed files support
RE_DIFF_GIT_HEADER = re.compile(
r'^diff --git (?P<source>a/[^\t\n]+) (?P<target>b/[^\t\n]+)')
+RE_DIFF_GIT_HEADER_URI_LIKE = re.compile(
+ r'^diff --git (?P<source>.*://[^\t\n]+) (?P<target>.*://[^\t\n]+)')
RE_DIFF_GIT_HEADER_NO_PREFIX = re.compile(
r'^diff --git (?P<source>[^\t\n]+) (?P<target>[^\t\n]+)')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-unidiff-0.7.4/unidiff/patch.py new/python-unidiff-0.7.5/unidiff/patch.py
--- old/python-unidiff-0.7.4/unidiff/patch.py 2022-06-26 22:11:08.000000000 +0200
+++ new/python-unidiff-0.7.5/unidiff/patch.py 2023-03-10 02:03:38.000000000 +0100
@@ -40,6 +40,7 @@
LINE_VALUE_NO_NEWLINE,
RE_DIFF_GIT_DELETED_FILE,
RE_DIFF_GIT_HEADER,
+ RE_DIFF_GIT_HEADER_URI_LIKE,
RE_DIFF_GIT_HEADER_NO_PREFIX,
RE_DIFF_GIT_NEW_FILE,
RE_HUNK_BODY_LINE,
@@ -479,7 +480,9 @@
line = line.decode(encoding)
# check for a git file rename
- is_diff_git_header = RE_DIFF_GIT_HEADER.match(line) or RE_DIFF_GIT_HEADER_NO_PREFIX.match(line)
+ is_diff_git_header = RE_DIFF_GIT_HEADER.match(line) or \
+ RE_DIFF_GIT_HEADER_URI_LIKE.match(line) or \
+ RE_DIFF_GIT_HEADER_NO_PREFIX.match(line)
if is_diff_git_header:
patch_info = PatchInfo()
source_file = is_diff_git_header.group('source')
@@ -581,6 +584,12 @@
patch_info = None
current_file = None
continue
+
+ if line == 'GIT binary patch\n':
+ current_file.is_binary_file = True
+ patch_info = None
+ current_file = None
+ continue
patch_info.append(line)
1
0