openSUSE Commits
Threads by month
- ----- 2024 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
June 2024
- 2 participants
- 1220 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package obs-service-docker_label_helper for openSUSE:Factory checked in at 2024-06-10 17:38:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-docker_label_helper (Old)
and /work/SRC/openSUSE:Factory/.obs-service-docker_label_helper.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-docker_label_helper"
Mon Jun 10 17:38:38 2024 rev:7 rq:1179700 version:0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-service-docker_label_helper/obs-service-docker_label_helper.changes 2023-03-01 16:14:59.782892795 +0100
+++ /work/SRC/openSUSE:Factory/.obs-service-docker_label_helper.new.19518/obs-service-docker_label_helper.changes 2024-06-10 17:38:58.285923157 +0200
@@ -1,0 +2,5 @@
+Fri Jun 7 08:31:35 UTC 2024 - Andrea Mazzotti <andrea.mazzotti(a)suse.com>
+
+- Support Docker.FLAVOR in _multibuild (boo#1225985)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ docker_label_helper ++++++
--- /var/tmp/diff_new_pack.X1TjxN/_old 2024-06-10 17:38:58.925946833 +0200
+++ /var/tmp/diff_new_pack.X1TjxN/_new 2024-06-10 17:38:58.929946980 +0200
@@ -1,6 +1,8 @@
#!/bin/bash
set -eu
+file="Dockerfile"
+
if [ "${BUILD_DIST+x}" != "x" ]; then
echo "Not running in an OBS build container"
exit 1
@@ -11,10 +13,10 @@
. "${BUILD_DATA}"
# The build script renames the recipe (to strip _service:foo:), but doesn't update .data
- RECIPEFILE="${RECIPEFILE##*:}"
+ file="${RECIPEFILE##*:}"
- if [ "${RECIPEFILE}" != "Dockerfile" ]; then
- echo "Recipe is not a Dockerfile - exiting"
+ if [[ ! "${file}" =~ ^Dockerfile.* ]]; then
+ echo "Recipe ${file} is not a Dockerfile - exiting"
exit 0
fi
fi
@@ -24,5 +26,6 @@
match($0, /^# labelprefix=(.*)$/, m) { labelprefix=m[1]; next }
labelprefix != "" && match($0, /^(PREFIXED)?LABEL[[:space:]]+[^=]*\.([^.=]*)=(.*)$/, m) { printf "LABEL %s.%s=%s\n", labelprefix, m[2], m[3]; gsub(/^PREFIXEDLABEL/, "LABEL") }
match($0, /^# endlabelprefix/) { labelprefix=""; next }
- 1' Dockerfile
+ 1' "${file}"
+(No newline at EOF)
++++++ test.sh ++++++
--- /var/tmp/diff_new_pack.X1TjxN/_old 2024-06-10 17:38:58.969948460 +0200
+++ /var/tmp/diff_new_pack.X1TjxN/_new 2024-06-10 17:38:58.977948756 +0200
@@ -58,3 +58,42 @@
LABEL not.expanded.label="example"
EOF
+# Test _multibuild
+cat >Dockerfile.FLAVOR <<EOF
+# labelprefix=org.opensuse.nano
+LABEL org.opencontainers.image.title="Example container."
+# endlabelprefix
+EOF
+
+export BUILD_DIST="$tmpdir/test_multibuild/.build/build.dist"
+mkdir -p "$tmpdir/test_multibuild/.build"
+cat >"$tmpdir/test_multibuild/.build/build.data" <<EOF
+RECIPEFILE=_service:obs_scm:Dockerfile.FLAVOR
+EOF
+sh "${script}"
+
+diff -u Dockerfile.FLAVOR - <<EOF
+LABEL org.opensuse.nano.title="Example container."
+LABEL org.opencontainers.image.title="Example container."
+EOF
+
+# Test _multibuild when not a Dockerfile.*
+cat >NotADockerfile <<EOF
+# labelprefix=org.opensuse.nano
+LABEL org.opencontainers.image.title="Example container."
+# endlabelprefix
+EOF
+
+export BUILD_DIST="$tmpdir/test_multibuild/.build/build.dist"
+mkdir -p "$tmpdir/test_multibuild/.build"
+cat >"$tmpdir/test_multibuild/.build/build.data" <<EOF
+RECIPEFILE=_service:obs_scm:NotADockerfile
+EOF
+sh "${script}"
+
+diff -u NotADockerfile - <<EOF
+# labelprefix=org.opensuse.nano
+LABEL org.opencontainers.image.title="Example container."
+# endlabelprefix
+EOF
+
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package jrnl for openSUSE:Factory checked in at 2024-06-10 17:38:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jrnl (Old)
and /work/SRC/openSUSE:Factory/.jrnl.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jrnl"
Mon Jun 10 17:38:35 2024 rev:2 rq:1179696 version:4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/jrnl/jrnl.changes 2023-08-22 08:56:49.182635562 +0200
+++ /work/SRC/openSUSE:Factory/.jrnl.new.19518/jrnl.changes 2024-06-10 17:38:54.193771778 +0200
@@ -1,0 +2,15 @@
+Wed May 22 15:43:14 UTC 2024 - malcolmlewis(a)opensuse.org
+
+- Updated to version 4.1:
+ + Add Python 3.12 support, (gh#jrnl-org/jrnl#1761).
+ + Set new required build fields in the ReadTheDocs config file,
+ (gh#jrnl-org/jrnl#1803).
+ + Replace flake8 and isort with ruff linter and add black --check
+ to linting step, (gh#jrnl-org/jrnl#1763).
+ + Add note about messages going to stderr and the implication for
+ piping, (gh#jrnl-org/jrnl#1768).
+- Drop requires on ansiwrap.
+- Add note about using the keyring to encrypt, (boo#1223003,
+ gh#jrnl-org/jrnl#1883 and gh#marcus-h/python-keyring-keyutils#1).
+
+-------------------------------------------------------------------
Old:
----
jrnl-4.0.1.tar.gz
New:
----
jrnl-4.1.tar.gz
keyring_note.md
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ jrnl.spec ++++++
--- /var/tmp/diff_new_pack.S0vcBy/_old 2024-06-10 17:38:54.937799301 +0200
+++ /var/tmp/diff_new_pack.S0vcBy/_new 2024-06-10 17:38:54.937799301 +0200
@@ -1,7 +1,7 @@
#
# spec file for package jrnl
#
-# 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
@@ -15,28 +15,29 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+
%define pythons python3
Name: jrnl
-Version: 4.0.1
+Version: 4.1
Release: 0
Summary: Collect your thoughts and notes without leaving the command line
License: GPL-3.0-only
URL: https://jrnl.sh
Source0: https://files.pythonhosted.org/packages/source/j/jrnl/jrnl-%{version}.tar.gz
+Source99: keyring_note.md
#PATCH-FIX-OPENSUSE jrnl-dateutil.patch malcolmlewis(a)opensuse.org -- Fix dateutil naming convention.
Patch0: jrnl-dateutil.patch
+BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-pip
BuildRequires: python3-poetry-core >= 1.0.0
-BuildRequires: fdupes
## MANUAL BEGIN
-Requires: python3-ansiwrap
Requires: python3-colorama
Requires: python3-cryptography
+Requires: python3-dateutil
Requires: python3-keyring
Requires: python3-parsedatetime
-Requires: python3-dateutil
Requires: python3-pyxdg
Requires: python3-rich
Requires: python3-ruamel.yaml
@@ -52,6 +53,7 @@
%prep
%autosetup -p1
+cp %{S:99} .
%build
%pyproject_wheel
@@ -61,7 +63,7 @@
%fdupes %{buildroot}%{python_sitelib}
%files
-%doc README.md
+%doc README.md keyring_note.md
%license LICENSE.md
%{_bindir}/jrnl
%{python_sitelib}/jrnl
++++++ jrnl-4.0.1.tar.gz -> jrnl-4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/PKG-INFO new/jrnl-4.1/PKG-INFO
--- old/jrnl-4.0.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
+++ new/jrnl-4.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: jrnl
-Version: 4.0.1
+Version: 4.1
Summary: Collect your thoughts and notes without leaving the command line.
Home-page: https://jrnl.sh
License: GPL-3.0-only
@@ -15,8 +15,8 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: News/Diary
-Requires-Dist: ansiwrap (>=0.8.4,<0.9.0)
Requires-Dist: colorama (>=0.4)
Requires-Dist: cryptography (>=3.0)
Requires-Dist: keyring (>=21.0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/__version__.py new/jrnl-4.1/jrnl/__version__.py
--- old/jrnl-4.0.1/jrnl/__version__.py 2023-06-21 01:39:40.212125000 +0200
+++ new/jrnl-4.1/jrnl/__version__.py 2023-11-04 20:35:55.613247900 +0100
@@ -1 +1 @@
-__version__ = "v4.0.1"
+__version__ = "v4.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/args.py new/jrnl-4.1/jrnl/args.py
--- old/jrnl-4.0.1/jrnl/args.py 2023-06-21 01:39:27.671273700 +0200
+++ new/jrnl-4.1/jrnl/args.py 2023-11-04 20:35:48.929271700 +0100
@@ -78,7 +78,7 @@
"""
We gratefully thank all contributors!
Come see the whole list of code and financial contributors at https://github.com/jrnl-org/jrnl
- And special thanks to Bad Lip Reading for the Yoda joke in the Writing section above :)"""
+ And special thanks to Bad Lip Reading for the Yoda joke in the Writing section above :)""" # noqa: E501
),
)
@@ -214,7 +214,8 @@
composing.add_argument(
"--template",
dest="template",
- help="Path to template file. Can be a local path, absolute path, or a path relative to $XDG_DATA_HOME/jrnl/templates/",
+ help="Path to template file. Can be a local path, absolute path, or a path "
+ "relative to $XDG_DATA_HOME/jrnl/templates/",
)
read_msg = (
@@ -265,13 +266,15 @@
"-contains",
dest="contains",
metavar="TEXT",
- help="Show entries containing specific text (put quotes around text with spaces)",
+ help="Show entries containing specific text (put quotes around text with "
+ "spaces)",
)
reading.add_argument(
"-and",
dest="strict",
action="store_true",
- help='Show only entries that match all conditions, like saying "x AND y" (default: OR)',
+ help='Show only entries that match all conditions, like saying "x AND y" '
+ "(default: OR)",
)
reading.add_argument(
"-starred",
@@ -290,7 +293,8 @@
dest="limit",
default=None,
metavar="NUMBER",
- help="Show a maximum of NUMBER entries (note: '-n 3' and '-3' have the same effect)",
+ help="Show a maximum of NUMBER entries (note: '-n 3' and '-3' have the same "
+ "effect)",
nargs="?",
type=int,
)
@@ -308,8 +312,12 @@
),
)
- search_options_msg = """ These help you do various tasks with the selected entries from your search.
- If used on their own (with no search), they will act on your entire journal"""
+ search_options_msg = (
+ " " # Preserves indentation
+ """
+ These help you do various tasks with the selected entries from your search.
+ If used on their own (with no search), they will act on your entire journal"""
+ )
exporting = parser.add_argument_group(
"Searching Options", textwrap.dedent(search_options_msg)
)
@@ -360,7 +368,8 @@
"--tags",
dest="tags",
action="store_true",
- help="Alias for '--format tags'. Returns a list of all tags and number of occurrences",
+ help="Alias for '--format tags'. Returns a list of all tags and number of "
+ "occurrences",
)
exporting.add_argument(
"--short",
@@ -400,7 +409,7 @@
\t jrnl --config-override editor "nano" \n
\t - Override color selections\n
\t jrnl --config-override colors.body blue --config-override colors.title green
- """,
+ """, # noqa: E501
)
config_overrides.add_argument(
"--co",
@@ -430,7 +439,7 @@
\t jrnl --config-file /home/user1/work_config.yaml
\t - Use a personal config file stored on a thumb drive: \n
\t jrnl --config-file /media/user1/my-thumb-drive/personal_config.yaml
- """,
+ """, # noqa: E501
)
alternate_config.add_argument(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/commands.py new/jrnl-4.1/jrnl/commands.py
--- old/jrnl-4.0.1/jrnl/commands.py 2023-06-21 01:39:27.671273700 +0200
+++ new/jrnl-4.1/jrnl/commands.py 2023-11-04 20:35:48.929271700 +0100
@@ -142,7 +142,7 @@
def postconfig_decrypt(
args: argparse.Namespace, config: dict, original_config: dict
) -> int:
- """Decrypts into new file. If filename is not set, we encrypt the journal file itself."""
+ """Decrypts to file. If filename is not set, we encrypt the journal file itself."""
from jrnl.config import update_config
from jrnl.install import save_config
from jrnl.journals import open_journal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/config.py new/jrnl-4.1/jrnl/config.py
--- old/jrnl-4.0.1/jrnl/config.py 2023-06-21 01:39:27.671273700 +0200
+++ new/jrnl-4.1/jrnl/config.py 2023-11-04 20:35:48.929271700 +0100
@@ -37,9 +37,10 @@
The dict is created through the yaml loader, with the assumption that
"input[0]: input[1]" is valid yaml.
- :param input: list of configuration keys in dot-notation and their respective values.
+ :param input: list of configuration keys in dot-notation and their respective values
:type input: list
- :return: A single level dict of the configuration keys in dot-notation and their respective desired values
+ :return: A single level dict of the configuration keys in dot-notation and their
+ respective desired values
:rtype: dict
"""
@@ -105,7 +106,7 @@
return config
config = config.copy()
journal_conf = config["journals"].get(journal_name)
- if type(journal_conf) is dict:
+ if isinstance(journal_conf, dict):
# We can override the default config on a by-journal basis
logging.debug(
"Updating configuration with specific journal overrides:\n%s",
@@ -180,7 +181,7 @@
"""Updates a config dict with new values - either global if scope is None
or config['journals'][scope] is just a string pointing to a journal file,
or within the scope"""
- if scope and type(config["journals"][scope]) is dict: # Update to journal specific
+ if scope and isinstance(config["journals"][scope], dict):
config["journals"][scope].update(new_config)
elif scope and force_local: # Convert to dict
config["journals"][scope] = {"journal": config["journals"][scope]}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/controller.py new/jrnl-4.1/jrnl/controller.py
--- old/jrnl-4.0.1/jrnl/controller.py 2023-06-21 01:39:27.671273700 +0200
+++ new/jrnl-4.1/jrnl/controller.py 2023-11-04 20:35:48.929271700 +0100
@@ -34,9 +34,9 @@
def run(args: "Namespace"):
"""
Flow:
- 1. Run standalone command if it doesn't require config (help, version, etc), then exit
+ 1. Run standalone command if it doesn't need config (help, version, etc), then exit
2. Load config
- 3. Run standalone command if it does require config (encrypt, decrypt, etc), then exit
+ 3. Run standalone command if it does need config (encrypt, decrypt, etc), then exit
4. Load specified journal
5. Start append mode, or search mode
6. Perform actions with results from search mode (if needed)
@@ -181,7 +181,9 @@
def _get_template(args, config) -> str:
# Read template file and pass as raw text into the composer
logging.debug(
- f"Get template:\n--template: {args.template}\nfrom config: {config.get('template')}"
+ "Get template:\n"
+ f"--template: {args.template}\n"
+ f"from config: {config.get('template')}"
)
template_path = args.template or config.get("template")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/editor.py new/jrnl-4.1/jrnl/editor.py
--- old/jrnl-4.0.1/jrnl/editor.py 2023-06-21 01:39:27.671273700 +0200
+++ new/jrnl-4.1/jrnl/editor.py 2023-11-04 20:35:48.929271700 +0100
@@ -81,7 +81,8 @@
actual_template_path = os.path.join(jrnl_template_dir, template_path)
if not os.path.exists(actual_template_path):
logging.debug(
- f"Couldn't open {actual_template_path}. Treating template path like a local / abs path."
+ f"Couldn't open {actual_template_path}. "
+ "Treating template path like a local / abs path."
)
actual_template_path = absolute_path(template_path)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/install.py new/jrnl-4.1/jrnl/install.py
--- old/jrnl-4.0.1/jrnl/install.py 2023-06-21 01:39:27.671273700 +0200
+++ new/jrnl-4.1/jrnl/install.py 2023-11-04 20:35:48.929271700 +0100
@@ -31,11 +31,11 @@
def upgrade_config(config_data: dict, alt_config_path: str | None = None) -> None:
- """Checks if there are keys missing in a given config dict, and if so, updates the config file accordingly.
- This essentially automatically ports jrnl installations if new config parameters are introduced in later
- versions.
- Also checks for existence of and difference in version number between config dict and current jrnl version,
- and if so, update the config file accordingly.
+ """Checks if there are keys missing in a given config dict, and if so, updates the
+ config file accordingly. This essentially automatically ports jrnl installations
+ if new config parameters are introduced in later versions. Also checks for
+ existence of and difference in version number between config dict
+ and current jrnl version, and if so, update the config file accordingly.
Supply alt_config_path if using an alternate config through --config-file."""
default_config = get_default_config()
missing_keys = set(default_config).difference(config_data)
@@ -167,7 +167,7 @@
def _initialize_autocomplete() -> None:
- # readline is not included in Windows Active Python and perhaps some other distributions
+ # readline is not included in Windows Active Python and perhaps some other distss
if sys.modules.get("readline"):
import readline
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/journals/Entry.py new/jrnl-4.1/jrnl/journals/Entry.py
--- old/jrnl-4.0.1/jrnl/journals/Entry.py 2023-06-21 01:39:27.671273700 +0200
+++ new/jrnl-4.1/jrnl/journals/Entry.py 2023-11-04 20:35:48.933271600 +0100
@@ -7,10 +7,9 @@
import re
from typing import TYPE_CHECKING
-import ansiwrap
-
from jrnl.color import colorize
from jrnl.color import highlight_tags_with_background_color
+from jrnl.output import wrap_with_ansi_colors
if TYPE_CHECKING:
from .Journal import Journal
@@ -89,7 +88,7 @@
}
def __str__(self):
- """Returns a string representation of the entry to be written into a journal file."""
+ """Returns string representation of the entry to be written to journal file."""
date_str = self.date.strftime(self.journal.config["timeformat"])
title = "[{}] {}".format(date_str, self.title.rstrip("\n "))
if self.starred:
@@ -129,7 +128,7 @@
columns = 79
# Color date / title and bold title
- title = ansiwrap.fill(
+ title = wrap_with_ansi_colors(
date_str
+ " "
+ highlight_tags_with_background_color(
@@ -143,35 +142,17 @@
body = highlight_tags_with_background_color(
self, self.body.rstrip(" \n"), self.journal.config["colors"]["body"]
)
- body_text = [
- colorize(
- ansiwrap.fill(
- line,
- columns,
- initial_indent=indent,
- subsequent_indent=indent,
- drop_whitespace=True,
- ),
- self.journal.config["colors"]["body"],
- )
- or indent
- for line in body.rstrip(" \n").splitlines()
- ]
-
- # ansiwrap doesn't handle lines with only the "\n" character and some
- # ANSI escapes properly, so we have this hack here to make sure the
- # beginning of each line has the indent character and it's colored
- # properly. textwrap doesn't have this issue, however, it doesn't wrap
- # the strings properly as it counts ANSI escapes as literal characters.
- # TL;DR: I'm sorry.
- body = "\n".join(
- [
+
+ body = wrap_with_ansi_colors(body, columns - len(indent))
+ if indent:
+ # Without explicitly colorizing the indent character, it will lose its
+ # color after a tag appears.
+ body = "\n".join(
colorize(indent, self.journal.config["colors"]["body"]) + line
- if not ansiwrap.strip_color(line).startswith(indent)
- else line
- for line in body_text
- ]
- )
+ for line in body.splitlines()
+ )
+
+ body = colorize(body, self.journal.config["colors"]["body"])
else:
title = (
date_str
@@ -233,7 +214,7 @@
\s+ # AND a sequence of required spaces.
)
|[\uFF01\uFF0E\uFF1F\uFF61\u3002] # CJK full/half width terminals usually do not have following spaces.
- """,
+ """, # noqa: E501
re.VERBOSE,
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/journals/FolderJournal.py new/jrnl-4.1/jrnl/journals/FolderJournal.py
--- old/jrnl-4.0.1/jrnl/journals/FolderJournal.py 2023-06-21 01:39:27.675274000 +0200
+++ new/jrnl-4.1/jrnl/journals/FolderJournal.py 2023-11-04 20:35:48.933271600 +0100
@@ -122,7 +122,8 @@
@staticmethod
def _get_files(journal_path: str) -> list[str]:
- """Searches through sub directories starting with journal_path and find all text files that look like entries"""
+ """Searches through sub directories starting with journal_path and find all text
+ files that look like entries"""
for year_folder in Folder._get_year_folders(pathlib.Path(journal_path)):
for month_folder in Folder._get_month_folders(year_folder):
yield from Folder._get_day_files(month_folder)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/journals/Journal.py new/jrnl-4.1/jrnl/journals/Journal.py
--- old/jrnl-4.0.1/jrnl/journals/Journal.py 2023-06-21 01:39:27.675274000 +0200
+++ new/jrnl-4.1/jrnl/journals/Journal.py 2023-11-04 20:35:48.933271600 +0100
@@ -102,7 +102,7 @@
return self.encryption_method.encrypt(text)
def open(self, filename: str | None = None) -> "Journal":
- """Opens the journal file defined in the config and parses it into a list of Entries.
+ """Opens the journal file and parses it into a list of Entries
Entries have the form (date, title, body)."""
filename = filename or self.config["journal"]
dirname = os.path.dirname(filename)
@@ -144,7 +144,7 @@
self._store(filename, text)
def validate_parsing(self) -> bool:
- """Confirms that the jrnl is still parsed correctly after being dumped to text."""
+ """Confirms that the jrnl is still parsed correctly after conversion to text."""
new_entries = self._parse(self._to_text())
return all(entry == new_entries[i] for i, entry in enumerate(self.entries))
@@ -225,8 +225,9 @@
@property
def tags(self) -> list[Tag]:
"""Returns a set of tuples (count, tag) for all tags present in the journal."""
- # Astute reader: should the following line leave you as puzzled as me the first time
- # I came across this construction, worry not and embrace the ensuing moment of enlightment.
+ # Astute reader: should the following line leave you as puzzled as me the first
+ # time I came across this construction, worry not and embrace the ensuing moment
+ # of enlightment.
tags = [tag for entry in self.entries for tag in set(entry.tags)]
# To be read: [for entry in journal.entries: for tag in set(entry.tags): tag]
tag_counts = {(tags.count(tag), tag) for tag in tags}
@@ -343,7 +344,8 @@
def new_entry(self, raw: str, date=None, sort: bool = True) -> Entry:
"""Constructs a new entry from some raw text input.
- If a date is given, it will parse and use this, otherwise scan for a date in the input first.
+ If a date is given, it will parse and use this, otherwise scan for a date in
+ the input first.
"""
raw = raw.replace("\\n ", "\n").replace("\\n", "\n")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/messages/MsgText.py new/jrnl-4.1/jrnl/messages/MsgText.py
--- old/jrnl-4.0.1/jrnl/messages/MsgText.py 2023-06-21 01:39:27.675274000 +0200
+++ new/jrnl-4.1/jrnl/messages/MsgText.py 2023-11-04 20:35:48.933271600 +0100
@@ -43,8 +43,8 @@
Do you want to encrypt your journal? (You can always change this later)
"""
UseColorsQuestion = """
- Do you want jrnl to use colors when displaying entries? (You can always change this later)
- """
+ Do you want jrnl to use colors to display entries? (You can always change this later)
+ """ # noqa: E501 - the line is still under 88 when dedented
YesOrNoPromptDefaultYes = "[Y/n]"
YesOrNoPromptDefaultNo = "[y/N]"
ContinueUpgrade = "Continue upgrading jrnl?"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/output.py new/jrnl-4.1/jrnl/output.py
--- old/jrnl-4.0.1/jrnl/output.py 2023-06-21 01:39:27.675274000 +0200
+++ new/jrnl-4.1/jrnl/output.py 2023-11-04 20:35:48.933271600 +0100
@@ -131,3 +131,12 @@
text = textwrap.dedent(text)
text = text.strip()
return Text(text)
+
+
+def wrap_with_ansi_colors(text: str, width: int) -> str:
+ richtext = Text.from_ansi(text, no_wrap=False, tab_size=None)
+
+ console = Console(width=width, force_terminal=True)
+ with console.capture() as capture:
+ console.print(richtext, sep="", end="")
+ return capture.get()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/override.py new/jrnl-4.1/jrnl/override.py
--- old/jrnl-4.0.1/jrnl/override.py 2023-06-21 01:39:27.675274000 +0200
+++ new/jrnl-4.1/jrnl/override.py 2023-11-04 20:35:48.933271600 +0100
@@ -56,7 +56,8 @@
Args:
config (dict): Configuration to modify
- nodes (list): Vector of override keys; the length of the vector indicates tree depth
+ nodes (list): Vector of override keys; the length of the vector indicates tree
+ depth
override_value (str): Runtime override passed from the command-line
"""
key = nodes[0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/plugins/fancy_exporter.py new/jrnl-4.1/jrnl/plugins/fancy_exporter.py
--- old/jrnl-4.0.1/jrnl/plugins/fancy_exporter.py 2023-06-21 01:39:27.675274000 +0200
+++ new/jrnl-4.1/jrnl/plugins/fancy_exporter.py 2023-11-04 20:35:48.933271600 +0100
@@ -18,7 +18,7 @@
class FancyExporter(TextExporter):
- """This Exporter can convert entries and journals into text with unicode box drawing characters."""
+ """This Exporter converts entries and journals into text with unicode boxes."""
names = ["fancy", "boxed"]
extension = "txt"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/plugins/tag_exporter.py new/jrnl-4.1/jrnl/plugins/tag_exporter.py
--- old/jrnl-4.0.1/jrnl/plugins/tag_exporter.py 2023-06-21 01:39:27.675274000 +0200
+++ new/jrnl-4.1/jrnl/plugins/tag_exporter.py 2023-11-04 20:35:48.933271600 +0100
@@ -12,7 +12,7 @@
class TagExporter(TextExporter):
- """This Exporter can lists the tags for entries and journals, exported as a plain text file."""
+ """This Exporter lists the tags for entries and journals."""
names = ["tags"]
extension = "tags"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/plugins/util.py new/jrnl-4.1/jrnl/plugins/util.py
--- old/jrnl-4.0.1/jrnl/plugins/util.py 2023-06-21 01:39:27.675274000 +0200
+++ new/jrnl-4.1/jrnl/plugins/util.py 2023-11-04 20:35:48.933271600 +0100
@@ -10,7 +10,8 @@
def get_tags_count(journal: "Journal") -> set[tuple[int, str]]:
"""Returns a set of tuples (count, tag) for all tags present in the journal."""
# Astute reader: should the following line leave you as puzzled as me the first time
- # I came across this construction, worry not and embrace the ensuing moment of enlightment.
+ # I came across this construction, worry not and embrace the ensuing moment of
+ # enlightment.
tags = [tag for entry in journal.entries for tag in set(entry.tags)]
# To be read: [for entry in journal.entries: for tag in set(entry.tags): tag]
tag_counts = {(tags.count(tag), tag) for tag in tags}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/plugins/yaml_exporter.py new/jrnl-4.1/jrnl/plugins/yaml_exporter.py
--- old/jrnl-4.0.1/jrnl/plugins/yaml_exporter.py 2023-06-21 01:39:27.675274000 +0200
+++ new/jrnl-4.1/jrnl/plugins/yaml_exporter.py 2023-11-04 20:35:48.933271600 +0100
@@ -18,14 +18,15 @@
class YAMLExporter(TextExporter):
- """This Exporter can convert entries and journals into Markdown formatted text with YAML front matter."""
+ """This Exporter converts entries and journals into Markdown formatted text with
+ YAML front matter."""
names = ["yaml"]
extension = "md"
@classmethod
def export_entry(cls, entry: "Entry", to_multifile: bool = True) -> str:
- """Returns a markdown representation of a single entry, with YAML front matter."""
+ """Returns a markdown representation of an entry, with YAML front matter."""
if to_multifile is False:
raise JrnlException(Message(MsgText.YamlMustBeDirectory, MsgStyle.ERROR))
@@ -117,7 +118,14 @@
# source directory is entry.journal.config['journal']
# output directory is...?
- return "{start}\ntitle: {title}\ndate: {date}\nstarred: {starred}\ntags: {tags}\n{dayone}body: |{body}{end}".format(
+ return (
+ "{start}\n"
+ "title: {title}\n"
+ "date: {date}\n"
+ "starred: {starred}\n"
+ "tags: {tags}\n"
+ "{dayone}body: |{body}{end}"
+ ).format(
start="---",
date=date_str,
title=entry.title,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/jrnl/time.py new/jrnl-4.1/jrnl/time.py
--- old/jrnl-4.0.1/jrnl/time.py 2023-06-21 01:39:27.675274000 +0200
+++ new/jrnl-4.1/jrnl/time.py 2023-11-04 20:35:48.933271600 +0100
@@ -9,14 +9,11 @@
def __get_pdt_calendar():
- try:
- import parsedatetime.parsedatetime_consts as pdt
- except ImportError:
- import parsedatetime as pdt
+ import parsedatetime as pdt
consts = pdt.Constants(usePyICU=False)
consts.DOWParseStyle = -1 # "Monday" will be either today or the last Monday
- calendar = pdt.Calendar(consts)
+ calendar = pdt.Calendar(consts, version=pdt.VERSION_CONTEXT_STYLE)
return calendar
@@ -34,14 +31,18 @@
elif isinstance(date_str, datetime.datetime):
return date_str
- # Don't try to parse anything with 6 or fewer characters and was parsed from the existing journal.
- # It's probably a markdown footnote
+ # Don't try to parse anything with 6 or fewer characters and was parsed from the
+ # existing journal. It's probably a markdown footnote
if len(date_str) <= 6 and bracketed:
return None
default_date = DEFAULT_FUTURE if inclusive else DEFAULT_PAST
date = None
year_present = False
+
+ hasTime = False
+ hasDate = False
+
while not date:
try:
from dateutil.parser import parse as dateparse
@@ -53,7 +54,8 @@
)
else:
year_present = True
- flag = 1 if date.hour == date.minute == 0 else 2
+ hasTime = not (date.hour == date.minute == 0)
+ hasDate = True
date = date.timetuple()
except Exception as e:
if e.args[0] == "day is out of range for month":
@@ -61,9 +63,11 @@
default_date = datetime.datetime(y, m, d - 1, H, M, S)
else:
calendar = __get_pdt_calendar()
- date, flag = calendar.parse(date_str)
+ date, parse_context = calendar.parse(date_str)
+ hasTime = parse_context.hasTime
+ hasDate = parse_context.hasDate
- if not flag: # Oops, unparsable.
+ if not hasDate and not hasTime:
try: # Try and parse this as a single year
year = int(date_str)
return datetime.datetime(year, 1, 1)
@@ -72,8 +76,8 @@
except TypeError:
return None
- if flag == 1: # Date found, but no time. Use the default time.
- date = datetime.datetime(
+ if hasDate and not hasTime:
+ date = datetime.datetime( # Use the default time
*date[:3],
hour=23 if inclusive else default_hour or 0,
minute=59 if inclusive else default_minute or 0,
@@ -82,9 +86,9 @@
else:
date = datetime.datetime(*date[:6])
- # Ugly heuristic: if the date is more than 4 weeks in the future, we got the year wrong.
- # Rather than this, we would like to see parsedatetime patched so we can tell it to prefer
- # past dates
+ # Ugly heuristic: if the date is more than 4 weeks in the future, we got the year
+ # wrong. Rather than this, we would like to see parsedatetime patched so we can
+ # tell it to prefer past dates
dt = datetime.datetime.now() - date
if dt.days < -28 and not year_present:
date = date.replace(date.year - 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jrnl-4.0.1/pyproject.toml new/jrnl-4.1/pyproject.toml
--- old/jrnl-4.0.1/pyproject.toml 2023-06-21 01:39:40.156121300 +0200
+++ new/jrnl-4.1/pyproject.toml 2023-11-04 20:35:55.581247800 +0100
@@ -1,6 +1,6 @@
[tool.poetry]
name = "jrnl"
-version = "v4.0.1"
+version = "v4.1"
description = "Collect your thoughts and notes without leaving the command line."
authors = [
"jrnl contributors <maintainers(a)jrnl.sh>",
@@ -29,7 +29,6 @@
[tool.poetry.dependencies]
python = ">=3.10.0, <3.13"
-ansiwrap = "^0.8.4"
colorama = ">=0.4" # https://github.com/tartley/colorama/blob/master/CHANGELOG.rst
cryptography = ">=3.0" # https://cryptography.io/en/latest/api-stability.html
keyring = ">=21.0" # https://github.com/jaraco/keyring#integration
@@ -44,13 +43,7 @@
[tool.poetry.dev-dependencies]
black = { version = ">=21.5b2", allow-prereleases = true }
-flakeheaven = ">=3.0"
-flake8-black = ">=0.3.3"
-flake8-isort = ">=5.0.0"
-flake8-type-checking = ">=2.2.0"
-flake8-simplify = ">=0.19"
ipdb = "*"
-isort = ">=5.10"
mkdocs = ">=1.4"
parse-type = ">=0.6.0"
poethepoet = "*"
@@ -59,6 +52,7 @@
pytest-clarity = "*"
pytest-xdist = ">=2.5.0"
requests = "*"
+ruff = ">=0.0.276"
toml = ">=0.10"
tox = "*"
xmltodict = "*"
@@ -88,18 +82,18 @@
# Groups of tasks
format.default_item_type = "cmd"
format.sequence = [
- "isort .",
+ "ruff check . --select I --fix", # equivalent to "isort ."
"black .",
]
-lint.env = { FLAKEHEAVEN_CACHE_TIMEOUT = "0" }
lint.default_item_type = "cmd"
lint.sequence = [
"poetry --version",
"poetry check",
- "flakeheaven --version",
- "flakeheaven plugins",
- "flakeheaven lint",
+ "ruff --version",
+ "ruff .",
+ "black --version",
+ "black --check ."
]
test = [
@@ -107,11 +101,6 @@
"test-run",
]
-[tool.isort]
-profile = "black"
-force_single_line = true
-known_first_party = ["jrnl", "tests"]
-
[tool.pytest.ini_options]
minversion = "6.0"
required_plugins = [
@@ -132,34 +121,40 @@
filterwarnings = [
"ignore::DeprecationWarning",
- "ignore:Flag style will be deprecated in.*",
"ignore:[WinError 32].*",
"ignore:[WinError 5].*"
]
-[tool.flakeheaven]
-max_line_length = 88
+[tool.ruff]
+line-length = 88
+target-version = "py310"
+
+# https://beta.ruff.rs/docs/rules/
+select = [
+ 'F', # Pyflakes
+ 'E', # pycodestyle errors
+ 'W', # pycodestyle warnings
+ 'I', # isort
+ 'ASYNC', # flake8-async
+ 'S110', # try-except-pass
+ 'S112', # try-except-continue
+ 'EM', # flake8-errmsg
+ 'ISC', # flake8-implicit-str-concat
+ 'Q', # flake8-quotes
+ 'RSE', # flake8-raise
+ 'TID', # flake8-tidy-imports
+ 'TCH', # flake8-type-checking
+ 'T100', # debugger, don't allow break points
+ 'ICN' # flake8-import-conventions
+]
exclude = [".git", ".tox", ".venv", "node_modules"]
-[tool.flakeheaven.plugins]
-"py*" = ["+*"]
-pycodestyle = [
- "-E101",
- "-E111", "-E114", "-E115", "-E116", "-E117",
- "-E12*",
- "-E13*",
- "-E2*",
- "-E3*",
- "-E401",
- "-E5*",
- "-E70",
- "-W1*", "-W2*", "-W3*", "-W5*",
-]
-"flake8-*" = ["+*"]
-flake8-black = ["-BLK901"]
+[tool.ruff.isort]
+force-single-line = true
+known-first-party = ["jrnl", "tests"]
-[tool.flakeheaven.exceptions."jrnl/journals/__init__.py"]
-pyflakes = ["-F401"]
+[tool.ruff.per-file-ignores]
+"__init__.py" = ["F401"] # unused imports
[build-system]
requires = ["poetry-core>=1.0.0"]
++++++ keyring_note.md ++++++
#### Using jrnl with encryption and keyring
If your reading this, your likely running osc on your system and seeing the following error `AttributeError: '_PasswordRetriever' object has no attribute 'encode'`
This is an upstream issue with `python3{ver}-keyring-keyutils` with an upstream report <sup>Ref 3</sup> created in September 2022 with no action at this time.
Please use either of the following workarounds.
#### Workaround 1
Drop into the python3 interpretor by running `python3` and run;
```bash
import keyring
journal_name = "default" # Should match name in `jrnl --list`
password = "mypassword" # Change to your journal's password
keyring.set_password("jrnl", journal_name, password)
exit()
```
#### Workaround 2
Uninstall python3{ver}-keyring-keyutils, create your password in the keyring for jrnl, then re-install python3{ver}-keyring-keyutils.
---
Ref 1: [openSUSE Bug Report (boo#1223003)](https://bugzilla.suse.com/show_bug.cgi?id=1223003)
Ref 2: [Upstream Bug (gh#jrnl-org/jrnl#1883)](https://github.com/jrnl-org/jrnl/issues/1883)
Ref 3: [python-keyring-keyutils (gh#marcus-h/python-keyring-keyutils#1)](
https://github.com/marcus-h/python-keyring-keyutils/issues/1)
---
(No newline at EOF)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package deepin-file-manager for openSUSE:Factory checked in at 2024-06-10 17:38:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/deepin-file-manager (Old)
and /work/SRC/openSUSE:Factory/.deepin-file-manager.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "deepin-file-manager"
Mon Jun 10 17:38:33 2024 rev:13 rq:1179695 version:5.6.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/deepin-file-manager/deepin-file-manager.changes 2024-03-05 18:50:46.493289024 +0100
+++ /work/SRC/openSUSE:Factory/.deepin-file-manager.new.19518/deepin-file-manager.changes 2024-06-10 17:38:52.209698382 +0200
@@ -1,0 +2,5 @@
+Fri May 31 13:27:50 UTC 2024 - Hillwood Yang <hillwood(a)opensuse.org>
+
+- Add fix-build-on-icu-75.patch, icu 75 needs c++17
+
+-------------------------------------------------------------------
New:
----
fix-build-on-icu-75.patch
BETA DEBUG BEGIN:
New:
- Add fix-build-on-icu-75.patch, icu 75 needs c++17
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ deepin-file-manager.spec ++++++
--- /var/tmp/diff_new_pack.qFJvlu/_old 2024-06-10 17:38:53.245736708 +0200
+++ /var/tmp/diff_new_pack.qFJvlu/_new 2024-06-10 17:38:53.249736856 +0200
@@ -35,7 +35,9 @@
Patch2: gcc-12.patch
# PATCH-FIX-UPSTRAM update-taglib-interface.patch hillwood(a)opensuse.org - fix build on new taglib
Patch3: update-taglib-interface.patch
-Patch4: harden_dde-filemanager-daemon.service.patch
+# PATCH-FIX-UPSTRAM fix-build-on-icu-75.patch hillwood(a)opensuse.org - ICU 75 needs c++17
+Patch4: fix-build-on-icu-75.patch
+Patch99: harden_dde-filemanager-daemon.service.patch
%ifarch ppc ppc64 ppc64le s390 s390x
BuildRequires: deepin-desktop-base
%else
++++++ fix-build-on-icu-75.patch ++++++
diff -Nur dde-file-manager-5.6.4/src/dde-advanced-property-plugin/dde-advanced-property-plugin.pro dde-file-manager-5.6.4-new/src/dde-advanced-property-plugin/dde-advanced-property-plugin.pro
--- dde-file-manager-5.6.4/src/dde-advanced-property-plugin/dde-advanced-property-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-advanced-property-plugin/dde-advanced-property-plugin.pro 2024-05-31 21:17:32.683287466 +0800
@@ -8,7 +8,7 @@
TARGET = dde-advanced-property-plugin
TEMPLATE = lib
-CONFIG += plugin c++11
+CONFIG += plugin c++17
PLUGIN_INSTALL_DIR = $$PLUGINDIR/menu
message($$PLUGIN_INSTALL_DIR)
diff -Nur dde-file-manager-5.6.4/src/dde-desktop/dde-desktop.pri dde-file-manager-5.6.4-new/src/dde-desktop/dde-desktop.pri
--- dde-file-manager-5.6.4/src/dde-desktop/dde-desktop.pri 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-desktop/dde-desktop.pri 2024-05-31 21:17:32.683287466 +0800
@@ -13,7 +13,7 @@
greaterThan(QT_MINOR_VERSION, 7): QT += gui-private
else: QT += platformsupport-private
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
PKGCONFIG += xcb xcb-ewmh xcb-shape dframeworkdbus gio-qt
INCLUDEPATH += $$PWD/../dde-file-manager-lib\
diff -Nur dde-file-manager-5.6.4/src/dde-desktop/dde-desktop.pro dde-file-manager-5.6.4-new/src/dde-desktop/dde-desktop.pro
--- dde-file-manager-5.6.4/src/dde-desktop/dde-desktop.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-desktop/dde-desktop.pro 2024-05-31 21:17:32.683287466 +0800
@@ -33,7 +33,7 @@
TEMPLATE = app
TARGET = dde-desktop
DESTDIR = $$BUILD_DIST
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
PKGCONFIG += xcb xcb-ewmh xcb-shape dframeworkdbus gio-qt
INCLUDEPATH += $$PWD/../dde-file-manager-lib\
diff -Nur dde-file-manager-5.6.4/src/dde-dock-plugins/disk-mount/disk-mount.pro dde-file-manager-5.6.4-new/src/dde-dock-plugins/disk-mount/disk-mount.pro
--- dde-file-manager-5.6.4/src/dde-dock-plugins/disk-mount/disk-mount.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-dock-plugins/disk-mount/disk-mount.pro 2024-05-31 21:17:32.683287466 +0800
@@ -1,7 +1,7 @@
PREFIX = /usr
QT += core widgets concurrent dbus
TEMPLATE = lib
-CONFIG += plugin c++11 link_pkgconfig
+CONFIG += plugin c++17 link_pkgconfig
PKGCONFIG += dtkwidget gio-qt udisks2-qt5
INCLUDEPATH += /usr/include/dde-dock
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager/dde-file-manager.pro dde-file-manager-5.6.4-new/src/dde-file-manager/dde-file-manager.pro
--- dde-file-manager-5.6.4/src/dde-file-manager/dde-file-manager.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager/dde-file-manager.pro 2024-05-31 21:17:32.683287466 +0800
@@ -14,7 +14,7 @@
}
TEMPLATE = app
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
PKGCONFIG += gio-unix-2.0
CONFIG(release, release|debug) {
PKGCONFIG += dtkwidget
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-daemon/dde-file-manager-daemon.pro dde-file-manager-5.6.4-new/src/dde-file-manager-daemon/dde-file-manager-daemon.pro
--- dde-file-manager-5.6.4/src/dde-file-manager-daemon/dde-file-manager-daemon.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-daemon/dde-file-manager-daemon.pro 2024-05-31 21:17:32.683287466 +0800
@@ -18,7 +18,7 @@
} else {
PKGCONFIG += dtkwidget
}
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
LIBS += -L$$OUT_PWD/../dde-file-manager-lib -ldde-file-manager -lKF5Codecs \
-L$$OUT_PWD/../dde-file-manager-extension -ldfm-extension
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-lib/dde-file-manager-lib.pro dde-file-manager-5.6.4-new/src/dde-file-manager-lib/dde-file-manager-lib.pro
--- dde-file-manager-5.6.4/src/dde-file-manager-lib/dde-file-manager-lib.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-lib/dde-file-manager-lib.pro 2024-05-31 21:18:08.833176186 +0800
@@ -35,7 +35,7 @@
PREFIX = /usr
}
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
PKGCONFIG += libsecret-1 gio-unix-2.0 poppler-cpp dtkwidget dtkgui udisks2-qt5 disomaster gio-qt libcrypto Qt5Xdg dframeworkdbus polkit-agent-1 polkit-qt5-1
#DEFINES += QT_NO_DEBUG_OUTPUT
DEFINES += QT_MESSAGELOGCONTEXT
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-lib/fulltextsearch/fulltextsearch.pri dde-file-manager-5.6.4-new/src/dde-file-manager-lib/fulltextsearch/fulltextsearch.pri
--- dde-file-manager-5.6.4/src/dde-file-manager-lib/fulltextsearch/fulltextsearch.pri 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-lib/fulltextsearch/fulltextsearch.pri 2024-05-31 21:18:08.833176186 +0800
@@ -24,7 +24,7 @@
#-------------------------------------------------
QT += widgets
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
PKGCONFIG += liblucene++ liblucene++-contrib docparser
HEADERS += \
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-plugins/ImageMenuPlugin/ImageMenuPlugin.pro dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/ImageMenuPlugin/ImageMenuPlugin.pro
--- dde-file-manager-5.6.4/src/dde-file-manager-plugins/ImageMenuPlugin/ImageMenuPlugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/ImageMenuPlugin/ImageMenuPlugin.pro 2024-05-31 21:18:08.833176186 +0800
@@ -9,7 +9,7 @@
TARGET = ImageMenuPlugin
TEMPLATE = lib
-CONFIG += plugin c++11
+CONFIG += plugin c++17
include(../../common/common.pri)
include(../plugininterfaces/plugininterfaces.pri)
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginPreview/dde-image-preview-plugin/dde-image-preview-plugin.pro dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginPreview/dde-image-preview-plugin/dde-image-preview-plugin.pro
--- dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginPreview/dde-image-preview-plugin/dde-image-preview-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginPreview/dde-image-preview-plugin/dde-image-preview-plugin.pro 2024-05-31 21:18:08.836509510 +0800
@@ -9,7 +9,7 @@
TARGET = dde-image-preview-plugin
TEMPLATE = lib
-CONFIG += plugin c++11 link_pkgconfig
+CONFIG += plugin c++17 link_pkgconfig
PKGCONFIG += dtkwidget dtkgui
include(../../../common/common.pri)
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginPreview/dde-music-preview-plugin/dde-music-preview-plugin.pro dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginPreview/dde-music-preview-plugin/dde-music-preview-plugin.pro
--- dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginPreview/dde-music-preview-plugin/dde-music-preview-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginPreview/dde-music-preview-plugin/dde-music-preview-plugin.pro 2024-05-31 21:18:08.836509510 +0800
@@ -11,7 +11,7 @@
PKGCONFIG += taglib
-CONFIG += c++11 plugin link_pkgconfig
+CONFIG += c++17 plugin link_pkgconfig
include(../../../common/common.pri)
include(dde-music-preview-plugin.pri)
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginPreview/dde-pdf-preview-plugin/dde-pdf-preview-plugin.pro dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginPreview/dde-pdf-preview-plugin/dde-pdf-preview-plugin.pro
--- dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginPreview/dde-pdf-preview-plugin/dde-pdf-preview-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginPreview/dde-pdf-preview-plugin/dde-pdf-preview-plugin.pro 2024-05-31 21:17:32.683287466 +0800
@@ -11,7 +11,7 @@
PKGCONFIG += poppler-cpp
-CONFIG += c++11 plugin link_pkgconfig
+CONFIG += c++17 plugin link_pkgconfig
include(../../../common/common.pri)
include(dde-pdf-preview-plugin.pri)
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginPreview/dde-text-preview-plugin/dde-text-preview-plugin.pro dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginPreview/dde-text-preview-plugin/dde-text-preview-plugin.pro
--- dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginPreview/dde-text-preview-plugin/dde-text-preview-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginPreview/dde-text-preview-plugin/dde-text-preview-plugin.pro 2024-05-31 21:18:08.836509510 +0800
@@ -8,7 +8,7 @@
TARGET = dde-text-preview-plugin
TEMPLATE = lib
-CONFIG += c++11 plugin
+CONFIG += c++17 plugin
include(../../../common/common.pri)
include(dde-text-preview-plugin.pri)
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginPreview/dde-video-preview-plugin/dde-video-preview-plugin.pro dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginPreview/dde-video-preview-plugin/dde-video-preview-plugin.pro
--- dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginPreview/dde-video-preview-plugin/dde-video-preview-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginPreview/dde-video-preview-plugin/dde-video-preview-plugin.pro 2024-05-31 21:18:08.836509510 +0800
@@ -10,7 +10,7 @@
TEMPLATE = lib
PKGCONFIG += libdmr dtkgui
-CONFIG += plugin link_pkgconfig c++11
+CONFIG += plugin link_pkgconfig c++17
include(../../../common/common.pri)
include(dde-video-preview-plugin.pri)
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginView/pluginView.pro dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginView/pluginView.pro
--- dde-file-manager-5.6.4/src/dde-file-manager-plugins/pluginView/pluginView.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/pluginView/pluginView.pro 2024-05-31 21:18:08.833176186 +0800
@@ -9,7 +9,7 @@
TARGET = pluginView
TEMPLATE = lib
-CONFIG += c++11 plugin
+CONFIG += c++17 plugin
include(../../common/common.pri)
include(../plugininterfaces/plugininterfaces.pri)
diff -Nur dde-file-manager-5.6.4/src/dde-file-manager-plugins/showfile/showfile.pro dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/showfile/showfile.pro
--- dde-file-manager-5.6.4/src/dde-file-manager-plugins/showfile/showfile.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-file-manager-plugins/showfile/showfile.pro 2024-05-31 21:18:08.833176186 +0800
@@ -9,7 +9,7 @@
TARGET = showfile
TEMPLATE = lib
-CONFIG += c++11 plugin
+CONFIG += c++17 plugin
include(../../common/common.pri)
include(../plugininterfaces/plugininterfaces.pri)
diff -Nur dde-file-manager-5.6.4/src/dde-select-dialog-wayland/dde-select-dialog-wayland.pro dde-file-manager-5.6.4-new/src/dde-select-dialog-wayland/dde-select-dialog-wayland.pro
--- dde-file-manager-5.6.4/src/dde-select-dialog-wayland/dde-select-dialog-wayland.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-select-dialog-wayland/dde-select-dialog-wayland.pro 2024-05-31 21:17:32.683287466 +0800
@@ -11,7 +11,7 @@
TARGET = dde-select-dialog-wayland
TEMPLATE = app
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
PKGCONFIG += dtkwidget dtkgui dtkcore
include($$PWD/../dde-desktop/dbus/filedialog/filedialog.pri)
diff -Nur dde-file-manager-5.6.4/src/dde-select-dialog-x11/dde-select-dialog-x11.pro dde-file-manager-5.6.4-new/src/dde-select-dialog-x11/dde-select-dialog-x11.pro
--- dde-file-manager-5.6.4/src/dde-select-dialog-x11/dde-select-dialog-x11.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/dde-select-dialog-x11/dde-select-dialog-x11.pro 2024-05-31 21:17:32.683287466 +0800
@@ -11,7 +11,7 @@
TARGET = dde-select-dialog-x11
TEMPLATE = app
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
PKGCONFIG += dtkwidget dtkgui dtkcore
include($$PWD/../dde-desktop/dbus/filedialog/filedialog.pri)
diff -Nur dde-file-manager-5.6.4/src/deepin-anything-server-plugins/dde-anythingmonitor/dde-anythingmonitor.pro dde-file-manager-5.6.4-new/src/deepin-anything-server-plugins/dde-anythingmonitor/dde-anythingmonitor.pro
--- dde-file-manager-5.6.4/src/deepin-anything-server-plugins/dde-anythingmonitor/dde-anythingmonitor.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/src/deepin-anything-server-plugins/dde-anythingmonitor/dde-anythingmonitor.pro 2024-05-31 21:17:32.683287466 +0800
@@ -13,7 +13,7 @@
dbus \
concurrent
-CONFIG += c++11 \
+CONFIG += c++17 \
console \
link_pkgconfig \
plugin
diff -Nur dde-file-manager-5.6.4/tests/cppcheck-prj-running.sh dde-file-manager-5.6.4-new/tests/cppcheck-prj-running.sh
--- dde-file-manager-5.6.4/tests/cppcheck-prj-running.sh 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/cppcheck-prj-running.sh 2024-05-31 21:17:32.683287466 +0800
@@ -18,9 +18,9 @@
# report目录
REPORT_FILE_PATH=$BUILD_DIR/cppcheck_dde-file-manager.xml
# 打印cppcheck命令
-echo "cppcheck --std=c++11 --language=c++ --enable=all --output-file="$REPORT_FILE_PATH "--xml" $SRC_DIR
+echo "cppcheck --std=c++17 --language=c++ --enable=all --output-file="$REPORT_FILE_PATH "--xml" $SRC_DIR
# 执行cppcheck命令
-cppcheck --std=c++11 --language=c++ --enable=all --output-file=$REPORT_FILE_PATH --xml $SRC_DIR
+cppcheck --std=c++17 --language=c++ --enable=all --output-file=$REPORT_FILE_PATH --xml $SRC_DIR
echo "end dde-file-manager cppcheck case"
diff -Nur dde-file-manager-5.6.4/tests/dde-desktop/test-dde-desktop.pro dde-file-manager-5.6.4-new/tests/dde-desktop/test-dde-desktop.pro
--- dde-file-manager-5.6.4/tests/dde-desktop/test-dde-desktop.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-desktop/test-dde-desktop.pro 2024-05-31 21:17:32.683287466 +0800
@@ -39,7 +39,7 @@
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-CONFIG += c++11
+CONFIG += c++17
SOURCES += \
$$PWD/main.cpp
diff -Nur dde-file-manager-5.6.4/tests/dde-dock-plugins/disk-mount/test-disk-mount.pro dde-file-manager-5.6.4-new/tests/dde-dock-plugins/disk-mount/test-disk-mount.pro
--- dde-file-manager-5.6.4/tests/dde-dock-plugins/disk-mount/test-disk-mount.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-dock-plugins/disk-mount/test-disk-mount.pro 2024-05-31 21:17:32.683287466 +0800
@@ -1,6 +1,6 @@
PREFIX = /usr
QT += core widgets concurrent dbus testlib
-CONFIG += plugin c++11 link_pkgconfig
+CONFIG += plugin c++17 link_pkgconfig
PKGCONFIG += dtkwidget gio-unix-2.0 gio-qt udisks2-qt5
SRC_FOLDER = $$PWD/../../../src
diff -Nur dde-file-manager-5.6.4/tests/dde-file-manager/test-dde-file-manager.pro dde-file-manager-5.6.4-new/tests/dde-file-manager/test-dde-file-manager.pro
--- dde-file-manager-5.6.4/tests/dde-file-manager/test-dde-file-manager.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-file-manager/test-dde-file-manager.pro 2024-05-31 21:17:32.683287466 +0800
@@ -13,7 +13,7 @@
TARGET = test-file-manager
TEMPLATE = app
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
PKGCONFIG += gio-unix-2.0
CONFIG(release, release|debug) {
PKGCONFIG += dtkwidget
diff -Nur dde-file-manager-5.6.4/tests/dde-file-manager-daemon/test-dde-file-manager-daemon.pro dde-file-manager-5.6.4-new/tests/dde-file-manager-daemon/test-dde-file-manager-daemon.pro
--- dde-file-manager-5.6.4/tests/dde-file-manager-daemon/test-dde-file-manager-daemon.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-file-manager-daemon/test-dde-file-manager-daemon.pro 2024-05-31 21:17:32.683287466 +0800
@@ -23,7 +23,7 @@
} else {
PKGCONFIG += dtkwidget
}
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
#LIBS += -L$$OUT_PWD/../dde-file-manager-lib -ldde-file-manager #in test sh project
LIBS += -L$$OUT_PWD/../../src/dde-file-manager-lib -ldde-file-manager #in pro project
diff -Nur dde-file-manager-5.6.4/tests/dde-file-manager-lib/test-dde-file-manager-lib.pro dde-file-manager-5.6.4-new/tests/dde-file-manager-lib/test-dde-file-manager-lib.pro
--- dde-file-manager-5.6.4/tests/dde-file-manager-lib/test-dde-file-manager-lib.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-file-manager-lib/test-dde-file-manager-lib.pro 2024-05-31 21:17:32.683287466 +0800
@@ -37,7 +37,7 @@
PREFIX = /usr
}
-CONFIG += c++11 link_pkgconfig
+CONFIG += c++17 link_pkgconfig
PKGCONFIG += x11 libsecret-1 gio-unix-2.0 poppler-cpp dtkwidget dtkgui udisks2-qt5 disomaster gio-qt libcrypto Qt5Xdg xcb xcb-ewmh xcb-shape dframeworkdbus polkit-agent-1 polkit-qt5-1
#DEFINES += QT_NO_DEBUG_OUTPUT
DEFINES += QT_MESSAGELOGCONTEXT
diff -Nur dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginPreview/dde-image-preview-plugin/test-dde-image-preview-plugin.pro dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginPreview/dde-image-preview-plugin/test-dde-image-preview-plugin.pro
--- dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginPreview/dde-image-preview-plugin/test-dde-image-preview-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginPreview/dde-image-preview-plugin/test-dde-image-preview-plugin.pro 2024-05-31 21:17:32.683287466 +0800
@@ -8,7 +8,7 @@
TARGET = test-dde-image-preview-plugin
TEMPLATE = app
-CONFIG += c++11 console link_pkgconfig
+CONFIG += c++17 console link_pkgconfig
PKGCONFIG += dtkwidget dtkgui
diff -Nur dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginPreview/dde-music-preview-plugin/test-dde-music-preview-plugin.pro dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginPreview/dde-music-preview-plugin/test-dde-music-preview-plugin.pro
--- dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginPreview/dde-music-preview-plugin/test-dde-music-preview-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginPreview/dde-music-preview-plugin/test-dde-music-preview-plugin.pro 2024-05-31 21:17:32.683287466 +0800
@@ -8,7 +8,7 @@
TARGET = test-dde-music-preview-plugin
TEMPLATE = app
-CONFIG += c++11 console link_pkgconfig
+CONFIG += c++17 console link_pkgconfig
PKGCONFIG += taglib
diff -Nur dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginPreview/dde-pdf-preview-plugin/test-dde-pdf-preview-plugin.pro dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginPreview/dde-pdf-preview-plugin/test-dde-pdf-preview-plugin.pro
--- dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginPreview/dde-pdf-preview-plugin/test-dde-pdf-preview-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginPreview/dde-pdf-preview-plugin/test-dde-pdf-preview-plugin.pro 2024-05-31 21:17:32.683287466 +0800
@@ -11,7 +11,7 @@
PKGCONFIG += poppler-cpp
-CONFIG += c++11 console link_pkgconfig
+CONFIG += c++17 console link_pkgconfig
include(../../../../src/common/common.pri)
diff -Nur dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginPreview/dde-text-preview-plugin/test-dde-text-preview-plugin.pro dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginPreview/dde-text-preview-plugin/test-dde-text-preview-plugin.pro
--- dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginPreview/dde-text-preview-plugin/test-dde-text-preview-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginPreview/dde-text-preview-plugin/test-dde-text-preview-plugin.pro 2024-05-31 21:17:32.683287466 +0800
@@ -8,7 +8,7 @@
TARGET = test-dde-text-preview-plugin
TEMPLATE = app
-CONFIG += c++11 console
+CONFIG += c++17 console
include(../../../../src/common/common.pri)
diff -Nur dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginPreview/dde-video-preview-plugin/test-dde-video-preview-plugin.pro dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginPreview/dde-video-preview-plugin/test-dde-video-preview-plugin.pro
--- dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginPreview/dde-video-preview-plugin/test-dde-video-preview-plugin.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginPreview/dde-video-preview-plugin/test-dde-video-preview-plugin.pro 2024-05-31 21:17:32.683287466 +0800
@@ -10,7 +10,7 @@
TEMPLATE = app
PKGCONFIG += libdmr dtkgui
-CONFIG += console link_pkgconfig c++11
+CONFIG += console link_pkgconfig c++17
include(../../../../src/common/common.pri)
diff -Nur dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginView/test-pluginView.pro dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginView/test-pluginView.pro
--- dde-file-manager-5.6.4/tests/dde-file-manager-plugins/pluginView/test-pluginView.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/dde-file-manager-plugins/pluginView/test-pluginView.pro 2024-05-31 21:17:32.683287466 +0800
@@ -9,7 +9,7 @@
TARGET = test-pluginView
TEMPLATE = app
-CONFIG += c++11 plugin
+CONFIG += c++17 plugin
include(../../../src/common/common.pri)
include(../../../src/dde-file-manager-plugins/plugininterfaces/plugininterfaces.pri)
diff -Nur dde-file-manager-5.6.4/tests/deepin-anything-server-plugins/test-deepin-anything-server-plugins.pro dde-file-manager-5.6.4-new/tests/deepin-anything-server-plugins/test-deepin-anything-server-plugins.pro
--- dde-file-manager-5.6.4/tests/deepin-anything-server-plugins/test-deepin-anything-server-plugins.pro 2022-06-11 21:02:35.000000000 +0800
+++ dde-file-manager-5.6.4-new/tests/deepin-anything-server-plugins/test-deepin-anything-server-plugins.pro 2024-05-31 21:17:32.683287466 +0800
@@ -13,7 +13,7 @@
dbus \
concurrent
-CONFIG += c++11 \
+CONFIG += c++17 \
console \
link_pkgconfig \
plugin
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ytree for openSUSE:Factory checked in at 2024-06-10 17:38:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ytree (Old)
and /work/SRC/openSUSE:Factory/.ytree.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ytree"
Mon Jun 10 17:38:32 2024 rev:8 rq:1179691 version:2.09
Changes:
--------
--- /work/SRC/openSUSE:Factory/ytree/ytree.changes 2024-04-10 17:50:48.717404455 +0200
+++ /work/SRC/openSUSE:Factory/.ytree.new.19518/ytree.changes 2024-06-10 17:38:51.101657393 +0200
@@ -1,0 +2,7 @@
+Fri Jun 7 11:57:51 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 2.09:
+ * Window resize support for hex-view and hex-edit
+ * Display format improvements
+
+-------------------------------------------------------------------
Old:
----
ytree-2.08.tar.gz
New:
----
ytree-2.09.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ytree.spec ++++++
--- /var/tmp/diff_new_pack.DReYdt/_old 2024-06-10 17:38:51.625676778 +0200
+++ /var/tmp/diff_new_pack.DReYdt/_new 2024-06-10 17:38:51.625676778 +0200
@@ -17,7 +17,7 @@
Name: ytree
-Version: 2.08
+Version: 2.09
Release: 0
Summary: A filemanager similar to XTree
License: GPL-2.0-only
++++++ ytree-2.08.tar.gz -> ytree-2.09.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ytree-2.08/CHANGES new/ytree-2.09/CHANGES
--- old/ytree-2.08/CHANGES 2024-04-05 14:24:38.000000000 +0200
+++ new/ytree-2.09/CHANGES 2024-05-27 19:20:04.000000000 +0200
@@ -182,3 +182,7 @@
"Show tagged files only" in file windows (Shift-F4 or Ctrl-F4 (if system allows Ctrl function keys / Thanks to frank)
Lots of UTF_8 improvements/bugfixes
Improve compatibility with old unix systems / some minor fixes
+New in 2.09
+ Window resize support for hex-view and hex-edit
+ Display format improvements
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ytree-2.08/filewin.c new/ytree-2.09/filewin.c
--- old/ytree-2.08/filewin.c 2024-04-05 14:24:38.000000000 +0200
+++ new/ytree-2.09/filewin.c 2024-05-27 19:20:04.000000000 +0200
@@ -65,6 +65,7 @@
static void RereadWindowSize(DirEntry *dir_entry);
static void ListJump( DirEntry * dir_entry, char *str );
static char GetTypeOfFile(struct stat fst);
+static int GetVisualFileEntryLength(int mode, int max_visual_filename_len, int max_visual_linkname_len);
@@ -73,44 +74,53 @@
GetMaxYX( file_window, &window_height, &window_width );
file_mode = new_file_mode;
- switch( file_mode )
+
+ max_column = window_width /
+ (GetVisualFileEntryLength( file_mode, max_visual_filename_len, max_visual_linkname_len) + 1);
+
+ if( max_column == 0 )
+ max_column = 1;
+}
+
+
+static int GetVisualFileEntryLength(int mode, int max_visual_filename_len, int max_visual_linkname_len)
+{
+ int len = 0;
+
+ switch (file_mode)
{
- case MODE_1: if( max_visual_linkname_len)
- max_column = window_width /
- (max_visual_filename_len + max_visual_linkname_len + 45);
- else
- max_column = window_width / (max_visual_filename_len + 41);
- break;
- case MODE_2: if( max_visual_linkname_len)
- max_column = window_width /
- (max_visual_filename_len + max_visual_linkname_len + 41);
- else
- max_column = window_width / (max_visual_filename_len + 37);
- break;
- case MODE_3: max_column = window_width / (max_visual_filename_len + 3);
- break;
- case MODE_4: if( max_visual_linkname_len)
- max_column = window_width /
- (max_visual_filename_len + max_visual_linkname_len + 44);
- else
- max_column = window_width / (max_visual_filename_len + 40);
- break;
- case MODE_5: max_visual_userview_len = GetVisualUserFileEntryLength(max_visual_filename_len,
- max_visual_linkname_len,
- USERVIEW);
- if(max_visual_userview_len)
- max_column = window_width / (max_visual_userview_len + 1);
- else
- max_column = 0;
+ case MODE_1: len = (max_visual_linkname_len) ? max_visual_linkname_len + 4 : 0; /* linkname + " -> " */
+ len += max_visual_filename_len + 38; /* filename + format */
+#ifdef HAS_LONGLONG
+ len += 4; /* %11lld instead of %7d */
+#endif
+ break;
+
+ case MODE_2: len = (max_visual_linkname_len) ? max_visual_linkname_len + 4 : 0; /* linkname + " -> " */
+ len += max_visual_filename_len + 40; /* filename + format */
+#ifdef HAS_LONGLONG
+ len += 4; /* %11lld instead of %7d */
+#endif
+ break;
+
+ case MODE_3: len = max_visual_filename_len + 2; /* filename + format */
+ break;
+
+ case MODE_4: len = (max_visual_linkname_len) ? max_visual_linkname_len + 4 : 0; /* linkname + " -> " */
+ len += max_visual_filename_len + 39; /* filename + format */
+ break;
+
+ case MODE_5: len = GetVisualUserFileEntryLength(max_visual_filename_len, max_visual_linkname_len, USERVIEW);
+ max_visual_userview_len = len;
break;
}
- if( max_column == 0 )
- max_column = 1;
+ return len;
}
+
void RotateFileMode(void)
{
switch( file_mode )
@@ -697,7 +707,7 @@
sym_link_name
);
#else
- (void) sprintf( format, "%%c%%c%%%c%ds %%8u %%-12s %%-12s -> %%-%ds",
+ (void) sprintf( format, "%%c%%c%%%c%ds %%8u %%-12s %%-12s -> %%-%ds",
justify,
filename_width,
linkname_width
@@ -729,7 +739,7 @@
group_name_ptr
);
#else
- (void) sprintf( format, "%%c%%c%%%c%ds %%8u %%-12s %%-12s",
+ (void) sprintf( format, "%%c%%c%%%c%ds %%8u %%-12s %%-12s",
justify,
filename_width
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ytree-2.08/input.c new/ytree-2.09/input.c
--- old/ytree-2.08/input.c 2024-04-05 14:24:38.000000000 +0200
+++ new/ytree-2.09/input.c 2024-05-27 19:20:04.000000000 +0200
@@ -620,11 +620,11 @@
#endif
-int Getch()
+int WGetch(WINDOW *win)
{
int c;
- c = getch();
+ c = wgetch(win);
#ifdef KEY_RESIZE
if(c == KEY_RESIZE) {
@@ -636,3 +636,9 @@
return(c);
}
+
+int Getch()
+{
+ return(WGetch(stdscr));
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ytree-2.08/patchlev.h new/ytree-2.09/patchlev.h
--- old/ytree-2.08/patchlev.h 2024-04-05 14:24:38.000000000 +0200
+++ new/ytree-2.09/patchlev.h 2024-05-27 19:20:04.000000000 +0200
@@ -5,6 +5,6 @@
***************************************************************************/
-#define VERSION "2.08"
-#define PATCHLEVEL 2
-#define VERSIONDATE "05 Apr 2024"
+#define VERSION "2.09"
+#define PATCHLEVEL 0
+#define VERSIONDATE "27 May 2024"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ytree-2.08/util.c new/ytree-2.09/util.c
--- old/ytree-2.08/util.c 2024-04-05 14:24:38.000000000 +0200
+++ new/ytree-2.09/util.c 2024-05-27 19:20:04.000000000 +0200
@@ -1092,7 +1092,11 @@
} else if(!strncmp(sptr, LINKCOUNT_VIEWNAME, 3)) {
n = 3;
} else if(!strncmp(sptr, FILESIZE_VIEWNAME, 3)) {
+#ifdef HAS_LONGLONG
+ n = 11;
+#else
n = 7;
+#endif
} else if(!strncmp(sptr, MODTIME_VIEWNAME, 3)) {
n = 12;
} else if(!strncmp(sptr, SYMLINK_VIEWNAME, 3)) {
@@ -1102,7 +1106,11 @@
} else if(!strncmp(sptr, GID_VIEWNAME, 3)) {
n = 8;
} else if(!strncmp(sptr, INODE_VIEWNAME, 3)) {
+#ifdef HAS_LONGLONG
+ n = 11;
+#else
n = 7;
+#endif
} else if(!strncmp(sptr, ACCTIME_VIEWNAME, 3)) {
n = 12;
} else if(!strncmp(sptr, CHGTIME_VIEWNAME, 3)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ytree-2.08/view.c new/ytree-2.09/view.c
--- old/ytree-2.08/view.c 2024-04-05 14:24:38.000000000 +0200
+++ new/ytree-2.09/view.c 2024-05-27 19:20:04.000000000 +0200
@@ -25,13 +25,14 @@
static struct stat fdstat;
static int WLINES, WCOLS, BYTES;
static WINDOW *VIEW, *BORDER;
+static BOOL resize_done = FALSE;
-BOOL inhex=TRUE;
-BOOL inedit=FALSE;
-BOOL hexoffset=TRUE;
+static BOOL inhex=TRUE;
+static BOOL inedit=FALSE;
+static BOOL hexoffset=TRUE;
-#define CURSOR_CALC_X (10+((cursor_pos_x<(BYTES))? 2:3)+(cursor_pos_x)+(cursor_pos_x/2))
+#define CURSOR_CALC_X (10+(((cursor_pos_x/2)<(BYTES/2)) ? 2:3)+(cursor_pos_x)+(cursor_pos_x/2))
#define CURSOR_POS_X ((inhex)? CURSOR_CALC_X:(WCOLS-BYTES+cursor_pos_x))
#define C_POSX (((cursor_pos_x%2)!=1)? cursor_pos_x:(cursor_pos_x-1))
#define CURSOR_POSX ((inhex)? (C_POSX/2):cursor_pos_x)
@@ -97,10 +98,10 @@
if( access( file_path, R_OK ) )
{
(void) sprintf( message,
- "View not possible!*\"%s\"*%s",
- file_path,
- strerror(errno)
- );
+ "View not possible!*\"%s\"*%s",
+ file_path,
+ strerror(errno)
+ );
MESSAGE( message );
ESCAPE;
}
@@ -117,8 +118,9 @@
{
(void) sprintf(command_line, aux, file_p_aux);
}
- else
- (void) sprintf(command_line, "%s %s", aux, file_p_aux);
+ else {
+ (void) sprintf(command_line, "%s %s", aux, file_p_aux);
+ }
}
else
{
@@ -126,51 +128,43 @@
if( compress_method == FREEZE_COMPRESS )
{
(void) sprintf( command_line,
- "%s < %s %s | %s",
- MELT,
- file_p_aux,
- ERR_TO_STDOUT,
- PAGER
- );
- }
- else if( compress_method == COMPRESS_COMPRESS )
- {
- (void) sprintf( command_line,
- "%s < %s %s | %s",
- UNCOMPRESS,
- file_p_aux,
- ERR_TO_STDOUT,
- PAGER
- );
- }
- else if( compress_method == GZIP_COMPRESS )
- {
- (void) sprintf( command_line,
+ "%s < %s %s | %s",
+ MELT,
+ file_p_aux,
+ ERR_TO_STDOUT,
+ PAGER
+ );
+ } else if( compress_method == COMPRESS_COMPRESS ) {
+ (void) sprintf( command_line,
+ "%s < %s %s | %s",
+ UNCOMPRESS,
+ file_p_aux,
+ ERR_TO_STDOUT,
+ PAGER
+ );
+ } else if( compress_method == GZIP_COMPRESS ) {
+ (void) sprintf( command_line,
"%s < %s %s | %s",
- GNUUNZIP,
- file_p_aux,
- ERR_TO_STDOUT,
- PAGER
- );
- }
- else if( compress_method == BZIP_COMPRESS )
- {
- (void) sprintf( command_line,
+ GNUUNZIP,
+ file_p_aux,
+ ERR_TO_STDOUT,
+ PAGER
+ );
+ } else if( compress_method == BZIP_COMPRESS ) {
+ (void) sprintf( command_line,
"%s < %s %s | %s",
- BUNZIP,
- file_p_aux,
- ERR_TO_STDOUT,
- PAGER
- );
- }
- else
- {
- (void) sprintf( command_line,
- "%s %s",
- PAGER,
- file_p_aux
- );
- }
+ BUNZIP,
+ file_p_aux,
+ ERR_TO_STDOUT,
+ PAGER
+ );
+ } else {
+ (void) sprintf( command_line,
+ "%s %s",
+ PAGER,
+ file_p_aux
+ );
+ }
}
/* --crb3 01oct02: replicating what I did to <e>dit, eliminate
@@ -181,28 +175,27 @@
if (mode == DISK_MODE)
{
- if (Getcwd(cwd, PATH_LENGTH) == NULL)
- {
- WARNING("Getcwd failed*\".\"assumed");
- (void) strcpy(cwd, ".");
- }
- if (chdir(GetPath(dir_entry, path)))
- {
- (void) sprintf(message, "Can't change directory to*\"%s\"", path);
- MESSAGE(message);
- }else{
- result = SystemCall(command_line);
- }
- if( chdir(cwd) )
- {
- (void) sprintf(message, "Can't change directory to*\"%s\"", cwd);
- MESSAGE(message);
- }
- }else{
- result = SystemCall(command_line);
+ if (Getcwd(cwd, PATH_LENGTH) == NULL)
+ {
+ WARNING("Getcwd failed*\".\"assumed");
+ (void) strcpy(cwd, ".");
+ }
+ if (chdir(GetPath(dir_entry, path)))
+ {
+ (void) sprintf(message, "Can't change directory to*\"%s\"", path);
+ MESSAGE(message);
+ } else {
+ result = SystemCall(command_line);
+ }
+ if( chdir(cwd) )
+ {
+ (void) sprintf(message, "Can't change directory to*\"%s\"", cwd);
+ MESSAGE(message);
+ }
+ } else {
+ result = SystemCall(command_line);
}
- /* if((result = SilentSystemCall( command_line ))) ..did systemcall just above */
if(result)
{
(void) sprintf( message, "can't execute*%s", command_line );
@@ -241,9 +234,9 @@
if (( aux = GetExtViewer(file_path)) != NULL) {
if (strstr(aux,"%s") != NULL) {
- (void) sprintf( buffer, "| %s", PAGER );
+ (void) sprintf( buffer, "| %s", PAGER );
} else {
- (void) sprintf( buffer, "| %s", aux ); /* maybe pipe-able */
+ (void) sprintf( buffer, "| %s", aux ); /* maybe pipe-able */
}
} else {
(void) sprintf( buffer, "| %s", PAGER );
@@ -252,10 +245,10 @@
archive = (mode == TAPE_MODE) ? statistic.tape_name : statistic.login_path;
MakeExtractCommandLine( command_line,
- archive,
- file_path,
- buffer
- );
+ archive,
+ file_path,
+ buffer
+ );
if((result = SystemCall( command_line )))
{
(void) sprintf( message, "can't execute*%s", command_line );
@@ -274,7 +267,7 @@
{
dest[c]='\0';
for( ;c >= 0;c--)
- dest[c] = (isprint(src[c]) ? src[c] : '.');
+ dest[c] = (isprint(src[c]) ? src[c] : '.');
return dest;
}
*/
@@ -287,8 +280,8 @@
aux = (char *) xmalloc(WCOLS );
if (r==0)
{
- wclrtoeol(win);
- return;
+ wclrtoeol(win);
+ return;
}
if(hexoffset) {
sprintf(line, "%010X ", (int)offset);
@@ -298,37 +291,38 @@
for (i = 1; i <= r; i++ )
{
if ((i == (BYTES / 2) ) || (i == BYTES ))
- sprintf(aux, "%02hhX ", buf[i-1]);
+ sprintf(aux, "%02hhX ", buf[i-1]);
else
- sprintf(aux, "%02hhX ", buf[i-1]);
+ sprintf(aux, "%02hhX ", buf[i-1]);
strcat(line, aux);
}
for (i = r+1; i <= BYTES; i++)
{
buf[i-1]= ' ';
if ((i == (BYTES / 2) ) || (i == BYTES ))
- sprintf(aux, " ");
+ sprintf(aux, " ");
else
- sprintf(aux, " ");
+ sprintf(aux, " ");
strcat(line, aux);
}
/* strcat(line, " ");*/
line[strlen(line)] = ' ';
for (i=0; i< WCOLS-BYTES; i++)
- waddch(win, line[i]| THECOLOR);
+ waddch(win, line[i]| THECOLOR);
for( i=0; i< BYTES; i++)
- isprint(buf[i]) ? waddch(win, buf[i] | THECOLOR) :
- waddch(win, ACS_BLOCK | COLOR_PAIR(HIDIR_COLOR));
+ isprint(buf[i]) ? waddch(win, buf[i] | THECOLOR) : waddch(win, ACS_BLOCK | COLOR_PAIR(HIDIR_COLOR));
free(aux);
return;
}
+
+
static void update_line(WINDOW *win, long line)
{
int r;
char *buf;
char *line_string;
- char mensaje[50];
+ char msg[50];
line_string = (char *) xmalloc(WCOLS);
memset(line_string, ' ', WCOLS);
@@ -337,10 +331,10 @@
memset(buf, ' ', BYTES);
if (lseek(fd, (line - 1) * BYTES, SEEK_SET)== -1 )
{
- sprintf(mensaje, "Error %ld ", line);
- perror(mensaje);
- fflush(stdout);
- return;
+ sprintf(msg, "File seek failed for line: %ld: %s ", line, strerror(errno));
+ ERROR_MSG(msg);
+ fflush(stdout);
+ return;
}
r = read(fd, buf, BYTES);
printhexline(win, line_string, buf, r, (line - 1) * (BYTES));
@@ -376,8 +370,8 @@
for (i = current_line; i <= current_line + l; i++)
{
- wmove(win, i - current_line, 0);
- update_line(win, i);
+ wmove(win, i - current_line, 0);
+ update_line(win, i);
}
wnoutrefresh(win);
doupdate();
@@ -389,22 +383,27 @@
int i;
char *str;
- str = (char *)xmalloc(COLS);
+ str = (char *)xmalloc(WCOLS);
for(i = WLINES + 4; i < LINES; i++)
{
- wmove(stdscr,i , 0);
- wclrtoeol(stdscr);
+ wmove(stdscr,i , 0);
+ wclrtoeol(stdscr);
}
+
doupdate();
Print( stdscr, 0, 0, "File: ", MENU_COLOR );
Print( stdscr, 0, 6, CutPathname(str,file_path,WCOLS-5), HIMENUS_COLOR );
PrintOptions( stdscr, LINES - 3, 0, "(Edit file in hexadecimal mode)");
+ wclrtoeol(stdscr);
PrintOptions( stdscr, LINES - 2, 0, "(Q)uit (^L) redraw (<TAB>) change edit mode");
- PrintOptions( stdscr, LINES - 1, 0,
- "(NEXT)-(RIGHT)/(PREV)-(LEFT) page (HOME)-(END) of line (DOWN)-(UP) line");
+ wclrtoeol(stdscr);
+ PrintOptions( stdscr, LINES - 1, 0, "(NEXT)-(RIGHT)/(PREV)-(LEFT) page (HOME)-(END) of line (DOWN)-(UP) line");
+ wclrtoeol(stdscr);
free(str);
+ wnoutrefresh(stdscr);
+ doupdate();
return;
}
@@ -413,37 +412,41 @@
int i;
char *str;
- str = (char *)xmalloc(COLS);
+ str = (char *)xmalloc(WCOLS);
for(i = WLINES + 4; i < LINES; i++)
{
- wmove(stdscr,i , 0);
- wclrtoeol(stdscr);
+ wmove(stdscr,i , 0);
+ wclrtoeol(stdscr);
}
doupdate();
Print( stdscr, 0, 0, "File: ", MENU_COLOR );
Print( stdscr, 0, 6, CutPathname(str,file_path,WCOLS-5), HIMENUS_COLOR );
- PrintOptions( stdscr, LINES - 3, 0, "View file in hexadecimal mode");
+ PrintOptions( stdscr, LINES - 3, 0, "View file in hexadecimal mode");
+ wclrtoeol(stdscr);
PrintOptions( stdscr, LINES - 2, 0, "(Q)uit (^L) redraw (E)dit hex");
- PrintOptions( stdscr, LINES - 1, 0,
- "(NEXT)-(RIGHT)/(PREV)-(LEFT) page (HOME)-(END) of line (DOWN)-(UP) line");
+ wclrtoeol(stdscr);
+ PrintOptions( stdscr, LINES - 1, 0, "(NEXT)-(RIGHT)/(PREV)-(LEFT) page (HOME)-(END) of line (DOWN)-(UP) line");
+ wclrtoeol(stdscr);
free(str);
+ wnoutrefresh(stdscr);
return;
}
static void SetupViewWindow(char *file_path)
{
int i;
- char *str;
+
+ int myCOLS = (COLS > 18) ? COLS : 19; /* to display (at least) address, frame and one byte */
+ int myLINES = (LINES > 6) ? LINES : 7; /* to display (at least) footer, border and one line */
- str = (char *)xmalloc(COLS);
- WLINES= LINES - 6;
- WCOLS= COLS - 2;
+ WLINES=myLINES - 6;
+ WCOLS=myCOLS - 2;
if (BORDER)
- delwin(BORDER);
+ delwin(BORDER);
BORDER=newwin(WLINES + 2, WCOLS + 2, 1, 0);
if (VIEW)
- delwin(VIEW);
+ delwin(VIEW);
VIEW=newwin(WLINES, WCOLS, 2, 1);
keypad(VIEW,TRUE);
scrollok(VIEW,FALSE);
@@ -454,95 +457,98 @@
wclear(VIEW);
for( i = 0; i < WLINES - 1; i++)
{
- wmove(VIEW,i,0);
- wclrtoeol(VIEW);
+ wmove(VIEW,i,0);
+ wclrtoeol(VIEW);
}
WbkgdSet(BORDER,COLOR_PAIR(WINDIR_COLOR)|A_BOLD);
+ Change2View(file_path);
box(BORDER,0,0);
RefreshWindow(BORDER);
RefreshWindow(VIEW);
- Change2View(file_path);
BYTES = (WCOLS - 13) / 4;
- free(str);
return;
-
}
static unsigned char hexval(unsigned char v) {
- if (v >= 'a' && v <= 'f')
- v = v - 'a' + 10;
- else if (v >= '0' && v <= '9')
- v = v - '0';
- return v;
+ if (v >= 'a' && v <= 'f')
+ v = v - 'a' + 10;
+ else if (v >= '0' && v <= '9')
+ v = v - '0';
+ return v;
}
static void change_char(int ch)
{
-
CHANGES *cambio=NULL;
char pp=0;
- char mensaje[50];
+ char msg[50];
cambio = malloc(sizeof(struct MODIF));
cambio -> pos = ( (cursor_pos_y + current_line - 1) * BYTES) + CURSOR_POSX;
if (lseek(fd, cambio -> pos, SEEK_SET)== -1 )
{
- sprintf(mensaje,"Error %s ", strerror(errno));
- perror(mensaje);
- fflush(stdout);
- free(cambio);
- return;
- }
- if ((read(fd, &cambio -> old_char,1)==1))
-
- if (lseek(fd, cambio -> pos, SEEK_SET)!= -1 )
- {
- if (inhex) {
- switch( ch){
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- if ((cursor_pos_x%2)==1)
- pp = (cambio -> old_char & 0xF0) | (hexval(ch));
- else
- pp = (cambio -> old_char & 0x0F) | (hexval(ch) << 4);
- touchwin(VIEW);
- break;
- default:
- beep();
- touchwin(VIEW);
- free(cambio);
- return;
- break;
- }
- }else{
- pp = ch;
- }
- if (write(fd, &pp, 1)!= 1)
- {
- sprintf(mensaje,"Error al grabar el cambio %s ", strerror(errno));
- perror(mensaje);
- fflush(stdout);
- free(cambio);
- return;
- }
- cambio -> new_char = pp;
- cambio -> next = changes;
- changes = cambio;
- }else{
- sprintf(mensaje,"Error al posicionar %s ", strerror(errno));
- perror(mensaje);
+ sprintf(msg,"File seek failed: %s ", strerror(errno));
+ ERROR_MSG(msg);
fflush(stdout);
free(cambio);
return;
}
- else{
- sprintf(mensaje,"Error al pre-leer %s ", strerror(errno));
- perror(mensaje);
+
+ if ((read(fd, &cambio -> old_char,1)==1))
+ {
+ if (lseek(fd, cambio -> pos, SEEK_SET)!= -1 )
+ {
+ if (inhex) {
+
+ switch( ch) {
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+
+ if ((cursor_pos_x%2)==1)
+ pp = (cambio -> old_char & 0xF0) | (hexval(ch));
+ else
+ pp = (cambio -> old_char & 0x0F) | (hexval(ch) << 4);
+ touchwin(VIEW);
+ break;
+
+ default:
+ beep();
+ touchwin(VIEW);
+ free(cambio);
+ return;
+ break;
+ }
+ } else {
+ pp = ch;
+ }
+
+ if (write(fd, &pp, 1) != 1)
+ {
+ sprintf(msg,"Write to file failed: %s ", strerror(errno));
+ ERROR_MSG(msg);
+ fflush(stdout);
+ free(cambio);
+ return;
+ }
+ cambio -> new_char = pp;
+ cambio -> next = changes;
+ changes = cambio;
+ } else {
+ sprintf(msg,"File seek failed: %s ", strerror(errno));
+ ERROR_MSG(msg);
+ fflush(stdout);
+ free(cambio);
+ return;
+ }
+ } else {
+ sprintf(msg,"Read from file failed: %s ", strerror(errno));
+ ERROR_MSG(msg);
fflush(stdout);
free(cambio);
return;
@@ -553,51 +559,118 @@
static void move_right(WINDOW *win)
{
- fstat(fd,&fdstat);
- cursor_pos_x++;
- if (fdstat.st_size > ((cursor_pos_y+current_line-1) * BYTES + CURSOR_POSX )){
- cursor_pos_x--;
- if ( cursor_pos_x < CANTX(BYTES) - 1 ) {
- cursor_pos_x += 1;
- wmove( win, cursor_pos_y, CURSOR_POS_X);
- }else {
- if (fdstat.st_size >= ((current_line+cursor_pos_y) * BYTES) ){
- if (cursor_pos_y < WLINES-1 ) {
- cursor_pos_y++;
- cursor_pos_x = 0;
- wmove( win, cursor_pos_y, CURSOR_POS_X);
- } else {
- current_line++;
- scroll_down(win);
- cursor_pos_x = 0;
- wmove( win, cursor_pos_y, CURSOR_POS_X);
- }
- } else
- beep();
- }
- }else{
- cursor_pos_x--;
- beep();
+ fstat(fd,&fdstat);
+ cursor_pos_x++;
+ if (fdstat.st_size > ((cursor_pos_y+current_line-1) * BYTES + CURSOR_POSX )) {
+ cursor_pos_x--;
+ if ( cursor_pos_x < CANTX(BYTES) - 1 ) {
+ cursor_pos_x += 1;
+ wmove( win, cursor_pos_y, CURSOR_POS_X);
+ } else {
+ if (fdstat.st_size >= ((current_line+cursor_pos_y) * BYTES) ) {
+ if (cursor_pos_y < WLINES-1 ) {
+ cursor_pos_y++;
+ cursor_pos_x = 0;
+ wmove( win, cursor_pos_y, CURSOR_POS_X);
+ } else {
+ current_line++;
+ scroll_down(win);
+ cursor_pos_x = 0;
+ wmove( win, cursor_pos_y, CURSOR_POS_X);
+ }
+ } else {
+ beep();
+ }
+ }
+ } else {
+ cursor_pos_x--;
+ beep();
}
return;
}
+
+static void DoResize(char *file_path)
+{
+ int old_cursor_pos_x = cursor_pos_x;
+ int old_cursor_pos_y = cursor_pos_y;
+ int old_WLINES = WLINES;
+ int old_WCOLS = WCOLS;
+ int offset = (cursor_pos_y + current_line - 1) * BYTES + CURSOR_POSX;
+ int new_cols;
+ int new_lines;
+
+ SetupViewWindow(file_path);
+
+ new_cols = offset % BYTES;
+ new_lines = offset / BYTES;
+
+ if(WLINES < old_WLINES)
+ {
+ if(old_cursor_pos_y >= WLINES) /* view is getting smaller (heigh) */
+ {
+ /* current position is (now) in invisible line; "scoll down" */
+ int n = old_WLINES - WLINES;
+ current_line += n;
+ cursor_pos_y -= n;
+ if(cursor_pos_y < 0)
+ {
+ current_line += (cursor_pos_y * -1);
+ cursor_pos_y = 0;
+ }
+ }
+ }
+
+ if(WCOLS != old_WCOLS)
+ {
+ /* reposition x */
+ cursor_pos_x = (inhex) ? (new_cols * 2 + (old_cursor_pos_x % 2)) : new_cols;
+
+ /* reposition y */
+ while((cursor_pos_y + current_line - 1) < new_lines) /* maybe view is smaller (less columns) */
+ {
+ if(cursor_pos_y < (WLINES-1))
+ cursor_pos_y++;
+ else
+ current_line++;
+ }
+
+ while((cursor_pos_y + current_line - 1) > new_lines) /* maybe view is larger (more columns) */
+ {
+ if(cursor_pos_y > 0)
+ cursor_pos_y--;
+ else
+ current_line--;
+ }
+ }
+
+
+ Change2Edit(file_path);
+ update_all_lines(VIEW,WLINES-1);
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ doupdate();
+ resize_done = TRUE;
+}
+
+
+
static void hex_edit(char *file_path)
{
int ch;
- char mensaje[50];
+ char msg[50];
BOOL QUIT=FALSE;
cursor_pos_x = cursor_pos_y = 0;
fd2 = fd;
fd=open(file_path,O_RDWR);
- if (fd == -1){
- sprintf(mensaje,"Error %s ", strerror(errno));
- ERROR_MSG(mensaje);
- touchwin(VIEW);
+ if (fd == -1) {
+ sprintf(msg,"File open failed: %s ", strerror(errno));
+ ERROR_MSG(msg);
+ touchwin(VIEW);
fd = fd2;
- return;
+ return;
}
inedit=TRUE;
update_all_lines(VIEW,WLINES-1);
@@ -605,181 +678,188 @@
curs_set( 1);
wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
wnoutrefresh(VIEW);
+
while (!QUIT) {
- doupdate();
- ch = (resize_request) ? -1 : Getch();
+
+ doupdate();
+ ch = (resize_request) ? -1 : Getch();
+
#ifdef VI_KEYS
- ch = ViKey(ch);
+ ch = ViKey(ch);
#endif
- if (resize_request)
- {
- SetupViewWindow(file_path);
- Change2Edit(file_path);
-/* current_line = oldpos/BYTES;*/
- update_all_lines(VIEW,WLINES-1);
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- doupdate();
- }
-
- switch(ch){
- case ESC: QUIT=TRUE;
- break;
- case KEY_DOWN: /*ScrollDown();*/
- fstat(fd,&fdstat);
- if (fdstat.st_size > ((cursor_pos_y + current_line - 1) * BYTES + CURSOR_POSX)) {
-
- if (fdstat.st_size > ((cursor_pos_y + current_line - 1 + 1) * BYTES + CURSOR_POSX)) {
-
- if (cursor_pos_y < WLINES-1){
- wmove( VIEW, ++cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- } else {
- ++current_line;
- scroll_down(VIEW);
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- }
- } else {
- /* special case: last line */
-
- if (fdstat.st_size > ((cursor_pos_y + current_line - 1 + 1) * BYTES)) {
-
- for(cursor_pos_x = 0; (CURSOR_POSX + 1) < (fdstat.st_size % BYTES); cursor_pos_x++);
-
- if (cursor_pos_y < WLINES-1){
- wmove( VIEW, ++cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- } else {
- ++current_line;
- scroll_down(VIEW);
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- }
- }
- }
- } else {
- beep();
- }
- break;
- case KEY_UP: /*ScroollUp();*/
- if (cursor_pos_y > 0)
- {
- wmove( VIEW, --cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- } else if (current_line > 1) {
- current_line--;
- scroll_up(VIEW);
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- } else
- beep();
- break;
- case KEY_LEFT: /* move 1 char left */
- if ( cursor_pos_x > 0 ) {
- cursor_pos_x-=1;
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- } else if (cursor_pos_y > 0 ) {
- /*cursor_pos_x=ultimo_caracter;*/
- cursor_pos_x=CANTX(BYTES) - 1;
- wmove( VIEW, --cursor_pos_y,CURSOR_POS_X);
- } else if (current_line > 1) {
- current_line--;
- scroll_up(VIEW);
- cursor_pos_x=CANTX(BYTES) - 1;
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- } else
- beep();
- wnoutrefresh(VIEW);
- break;
- case KEY_PPAGE: /*ScrollPageDown();*/
- if (current_line > WLINES)
- current_line -= WLINES;
- else
- if (current_line > 1)
- current_line = 1;
- else
- beep();
-/* oldpos = current_line * BYTES;*/
- update_all_lines(VIEW,WLINES);
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- break;
- case KEY_RIGHT: move_right(VIEW);
- wnoutrefresh(VIEW);
- break;
- case KEY_NPAGE: /*ScroollPageUp();*/
- fstat(fd,&fdstat);
- if (fdstat.st_size > ((current_line - 1 + WLINES + cursor_pos_y) * BYTES) + CURSOR_POSX ) {
- current_line += WLINES;
- } else {
- int n;
- n = fdstat.st_size / BYTES; /* numer of full lines */
- if(fdstat.st_size % BYTES) {
- n++; /* plus 1 not fully used line */
- }
- if(current_line != n) {
- current_line = n;
- cursor_pos_y = 0;
- for(cursor_pos_x = 0; (CURSOR_POSX + 1) < (fdstat.st_size % BYTES); cursor_pos_x++);
- } else {
- beep();
- }
- }
-/* oldpos = current_line * BYTES;*/
- update_all_lines(VIEW,WLINES);
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- break;
- case KEY_HOME:
- if (CURSOR_POSX > 0) {
- cursor_pos_x = 0;
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- } else
- beep();
- wnoutrefresh(VIEW);
- break;
- case KEY_END:
- fstat(fd,&fdstat);
- if ( ((cursor_pos_y + current_line) * BYTES) > fdstat.st_size ) {
- cursor_pos_x = CANTX(fdstat.st_size % BYTES) - 1;
- } else {
- cursor_pos_x = CANTX(BYTES)-1;
- }
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- break;
- case '\t' :
- /* move cursor to the the other part of the window*/
- if (inhex){
- inhex=FALSE;
- cursor_pos_x=cursor_pos_x/2;
- }else{
- inhex=TRUE;
- cursor_pos_x=cursor_pos_x*2;
- }
- wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- break;
- case 'L' & 0x1f:
- clearok(stdscr,TRUE);
- RefreshWindow(stdscr);
- break;
-
- case 'q':
- case 'Q': if (inhex) {
- QUIT=TRUE;
- break;
- }
- default:
- change_char(ch);
- wmove(VIEW, cursor_pos_y, 0);
- update_line(VIEW, current_line+cursor_pos_y);
- move_right(VIEW);
- wmove(VIEW, cursor_pos_y, CURSOR_POS_X);
- wnoutrefresh(VIEW);
- break;
- }
+ if (resize_request)
+ {
+ DoResize(file_path);
+ resize_request = FALSE;
+ continue;
+ }
+
+ switch(ch) {
+
+#ifdef KEY_RESIZE
+
+ case KEY_RESIZE: resize_request = TRUE;
+ break;
+#endif
+ case ESC: QUIT=TRUE;
+ break;
+
+ case KEY_DOWN: /*ScrollDown();*/
+ fstat(fd,&fdstat);
+ if (fdstat.st_size > ((cursor_pos_y + current_line - 1) * BYTES + CURSOR_POSX)) {
+
+ if (fdstat.st_size > ((cursor_pos_y + current_line - 1 + 1) * BYTES + CURSOR_POSX)) {
+
+ if (cursor_pos_y < WLINES-1) {
+ wmove( VIEW, ++cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ } else {
+ ++current_line;
+ scroll_down(VIEW);
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ }
+ } else {
+ /* special case: last line */
+
+ if (fdstat.st_size > ((cursor_pos_y + current_line - 1 + 1) * BYTES)) {
+
+ for(cursor_pos_x = 0; (CURSOR_POSX + 1) < (fdstat.st_size % BYTES); cursor_pos_x++);
+
+ if (cursor_pos_y < WLINES-1) {
+ wmove( VIEW, ++cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ } else {
+ ++current_line;
+ scroll_down(VIEW);
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ }
+ }
+ }
+ } else {
+ beep();
+ }
+ break;
+ case KEY_UP: /*ScroollUp();*/
+ if (cursor_pos_y > 0)
+ {
+ wmove( VIEW, --cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ } else if (current_line > 1) {
+ current_line--;
+ scroll_up(VIEW);
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ } else {
+ beep();
+ }
+ break;
+ case KEY_LEFT: /* move 1 char left */
+ if ( cursor_pos_x > 0 ) {
+ cursor_pos_x-=1;
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ } else if (cursor_pos_y > 0 ) {
+ /*cursor_pos_x=ultimo_caracter;*/
+ cursor_pos_x=CANTX(BYTES) - 1;
+ wmove( VIEW, --cursor_pos_y,CURSOR_POS_X);
+ } else if (current_line > 1) {
+ current_line--;
+ scroll_up(VIEW);
+ cursor_pos_x=CANTX(BYTES) - 1;
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ } else {
+ beep();
+ }
+ wnoutrefresh(VIEW);
+ break;
+ case KEY_PPAGE: /*ScrollPageDown();*/
+ if (current_line > WLINES)
+ current_line -= WLINES;
+ else if (current_line > 1)
+ current_line = 1;
+ else
+ beep();
+ update_all_lines(VIEW,WLINES);
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ break;
+ case KEY_RIGHT: move_right(VIEW);
+ wnoutrefresh(VIEW);
+ break;
+ case KEY_NPAGE: /*ScroollPageUp();*/
+ fstat(fd,&fdstat);
+ if (fdstat.st_size > ((current_line - 1 + WLINES + cursor_pos_y) * BYTES) + CURSOR_POSX ) {
+ current_line += WLINES;
+ } else {
+ int n;
+ n = fdstat.st_size / BYTES; /* numer of full lines */
+ if(fdstat.st_size % BYTES) {
+ n++; /* plus 1 not fully used line */
+ }
+ if(current_line != n) {
+ current_line = n;
+ cursor_pos_y = 0;
+ for(cursor_pos_x = 0; (CURSOR_POSX + 1) < (fdstat.st_size % BYTES); cursor_pos_x++);
+ } else {
+ beep();
+ }
+ }
+ update_all_lines(VIEW,WLINES);
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ break;
+ case KEY_HOME:
+ if (CURSOR_POSX > 0) {
+ cursor_pos_x = 0;
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ } else {
+ beep();
+ }
+ wnoutrefresh(VIEW);
+ break;
+ case KEY_END:
+ fstat(fd,&fdstat);
+ if ( ((cursor_pos_y + current_line) * BYTES) > fdstat.st_size ) {
+ cursor_pos_x = CANTX(fdstat.st_size % BYTES) - 1;
+ } else {
+ cursor_pos_x = CANTX(BYTES)-1;
+ }
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ break;
+ case '\t' :
+ /* move cursor to the the other part of the window*/
+ if (inhex){
+ inhex=FALSE;
+ cursor_pos_x=cursor_pos_x/2;
+ } else {
+ inhex=TRUE;
+ cursor_pos_x=cursor_pos_x*2;
+ }
+ wmove( VIEW, cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ break;
+ case 'L' & 0x1f:
+ clearok(stdscr,TRUE);
+ RefreshWindow(stdscr);
+ break;
+
+ case 'q':
+ case 'Q':
+ if (inhex) {
+ QUIT=TRUE;
+ break;
+ }
+ default:
+ change_char(ch);
+ wmove(VIEW, cursor_pos_y, 0);
+ update_line(VIEW, current_line+cursor_pos_y);
+ move_right(VIEW);
+ wmove(VIEW, cursor_pos_y, CURSOR_POS_X);
+ wnoutrefresh(VIEW);
+ break;
+ }
}
curs_set( 0);
close(fd);
@@ -791,123 +871,127 @@
int InternalView(char *file_path)
{
- long oldpos;
int ch;
BOOL QUIT=FALSE;
hexoffset = (!strcmp(HEXEDITOFFSET, "HEX")) ? TRUE : FALSE;
if (stat(file_path, &fdstat)!=0)
- return -1;
+ return -1;
if (!(S_ISREG(fdstat.st_mode)) || S_ISBLK(fdstat.st_mode))
- return -1;
+ return -1;
fd=open(file_path,O_RDONLY);
if (fd == -1)
- return -1;
+ return -1;
SetupViewWindow(file_path);
current_line = 1;
- oldpos = 1;
update_all_lines(VIEW,WLINES-1);
+
while (!QUIT) {
- ch = (resize_request) ? -1 : Getch();
+
+ ch = (resize_request) ? -1 : WGetch(VIEW);
+
#ifdef VI_KEYS
- ch = ViKey(ch);
+ ch = ViKey(ch);
#endif
+
if (resize_request)
{
- SetupViewWindow(file_path);
- current_line = oldpos/BYTES;
- update_all_lines(VIEW,WLINES-1);
- }
-
- switch(ch){
- case ESC:
- case 'q':
- case 'Q': QUIT=TRUE;
- break;
- case 'e':
- case 'E': Change2Edit(file_path);
- hex_edit(file_path);
- update_all_lines(VIEW,WLINES-1);
- Change2View(file_path);
- break;
- case KEY_DOWN: /*ScrollDown();*/
- fstat(fd,&fdstat);
- if (fdstat.st_size > (current_line * BYTES) )
- {
- current_line++;
- oldpos = current_line * BYTES;
- scroll_down(VIEW);
- }
- else
- beep();
- break;
- case KEY_UP: /*ScroollUp();*/
- if (current_line > 1)
- {
- current_line--;
- oldpos = current_line * BYTES;
- scroll_up(VIEW);
- }
- else
- beep();
- break;
- case KEY_LEFT:
- case KEY_PPAGE: /*ScrollPageDown();*/
- if (current_line > WLINES)
- current_line -= WLINES;
- else
- if (current_line > 1)
- current_line = 1;
- else
- beep();
- oldpos = current_line * BYTES;
- update_all_lines(VIEW,WLINES);
- break;
- case KEY_RIGHT:
- case KEY_NPAGE: /*ScroollPageUp();*/
- fstat(fd,&fdstat);
- if (fdstat.st_size > ((current_line - 1 + WLINES) * BYTES) ) {
- current_line += WLINES;
- } else {
- int n;
- n = fdstat.st_size / BYTES; /* numer of full lines */
- if(fdstat.st_size % BYTES) {
- n++; /* plus 1 not fully used line */
- }
- if(current_line != n) {
- current_line = n;
- } else {
- beep();
- }
- }
- oldpos = current_line * BYTES;
- update_all_lines(VIEW,WLINES);
- break;
- case KEY_HOME: /*ScrollHome();*/
- if (current_line > 1)
- {
- current_line = 1;
- oldpos = current_line * BYTES;
- update_all_lines(VIEW,WLINES-1);
- }else
- beep();
- break;
- case KEY_END: /*ScrollEnd();*/
- fstat(fd,&fdstat);
- if (fdstat.st_size >= BYTES * 2)
- current_line = (fdstat.st_size - BYTES) / BYTES;
- else
- beep();
- oldpos = current_line * BYTES;
- update_all_lines(VIEW,WLINES);
- break;
- case 'L' & 0x1f:
- clearok(stdscr,TRUE);
- RefreshWindow(stdscr);
- break;
- default: break;
- }
+ DoResize(file_path);
+ resize_request = FALSE;
+ continue;
+ }
+
+ switch(ch) {
+
+#ifdef KEY_RESIZE
+ case KEY_RESIZE: resize_request = TRUE;
+ break;
+#endif
+
+ case ESC:
+ case 'q':
+ case 'Q': QUIT=TRUE;
+ break;
+ case 'e':
+ case 'E': Change2Edit(file_path);
+ hex_edit(file_path);
+ update_all_lines(VIEW,WLINES-1);
+ Change2View(file_path);
+ break;
+ case KEY_DOWN: /*ScrollDown();*/
+ fstat(fd,&fdstat);
+ if (fdstat.st_size > (current_line * BYTES) )
+ {
+ current_line++;
+ scroll_down(VIEW);
+ } else {
+ beep();
+ }
+ break;
+ case KEY_UP: /*ScroollUp();*/
+ if (current_line > 1)
+ {
+ current_line--;
+ scroll_up(VIEW);
+ } else {
+ beep();
+ }
+ break;
+ case KEY_LEFT:
+ case KEY_PPAGE: /*ScrollPageDown();*/
+ if (current_line > WLINES)
+ current_line -= WLINES;
+ else
+ if (current_line > 1)
+ current_line = 1;
+ else
+ beep();
+ update_all_lines(VIEW,WLINES);
+ break;
+ case KEY_RIGHT:
+ case KEY_NPAGE: /*ScroollPageUp();*/
+ fstat(fd,&fdstat);
+ if (fdstat.st_size > ((current_line - 1 + WLINES) * BYTES) ) {
+ current_line += WLINES;
+ } else {
+ int n;
+ n = fdstat.st_size / BYTES; /* numer of full lines */
+ if(fdstat.st_size % BYTES) {
+ n++; /* plus 1 not fully used line */
+ }
+ if(current_line != n) {
+ current_line = n;
+ } else {
+ beep();
+ }
+ }
+ update_all_lines(VIEW,WLINES);
+ break;
+ case KEY_HOME: /*ScrollHome();*/
+ if (current_line > 1)
+ {
+ current_line = 1;
+ update_all_lines(VIEW,WLINES-1);
+ } else {
+ beep();
+ }
+ break;
+ case KEY_END: /*ScrollEnd();*/
+ fstat(fd,&fdstat);
+ if (fdstat.st_size >= BYTES * 2) {
+ current_line = (fdstat.st_size - BYTES) / BYTES;
+ }
+ else
+ beep();
+ update_all_lines(VIEW,WLINES);
+ break;
+ case 'L' & 0x1f:
+ clearok(stdscr,TRUE);
+ RefreshWindow(stdscr);
+ break;
+ default: break;
+ }
}
Print( stdscr, 0, 0, "Path: ", MENU_COLOR );
delwin(VIEW);
@@ -915,5 +999,8 @@
touchwin(stdscr);
wnoutrefresh(stdscr);
close(fd);
+ resize_request = resize_done;
+ resize_done = FALSE;
return 0;
}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ytree-2.08/ytree-2.08.lsm new/ytree-2.09/ytree-2.08.lsm
--- old/ytree-2.08/ytree-2.08.lsm 2024-04-05 14:24:38.000000000 +0200
+++ new/ytree-2.09/ytree-2.08.lsm 1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-Begin4
-Title: ytree-2.08
-Version: 2.08
-Entered-date: 2024-03-17
-Description: Ytree is a nifty filemanager similar to xtree.
- With some helper-applications (zip/zoo/tar/rpm etc.)
- you can also browse archive files. Viewers for
- "special" files are configurable (*.wav, *.gif etc.).
- Even the commands/menus are now user configurable.
- For a screenshot visit http://www.han.de/~werner/ytree.html
-Keywords: file manager, browser, xtree
-Author: werner(a)frolix.han.de (Werner Bregulla)
-Maintained-by: werner(a)frolix.han.de (Werner Bregulla)
-Primary-site: http://www.han.de/~werner/ytree.html
- ytree-2.08.tar.gz
- ytree-2.08.lsm
-Copying-policy: GPL
-End
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ytree-2.08/ytree-2.09.lsm new/ytree-2.09/ytree-2.09.lsm
--- old/ytree-2.08/ytree-2.09.lsm 1970-01-01 01:00:00.000000000 +0100
+++ new/ytree-2.09/ytree-2.09.lsm 2024-05-27 19:21:37.000000000 +0200
@@ -0,0 +1,18 @@
+Begin4
+Title: ytree-2.09
+Version: 2.09
+Entered-date: 2024-05-27
+Description: Ytree is a nifty filemanager similar to xtree.
+ With some helper-applications (zip/zoo/tar/rpm etc.)
+ you can also browse archive files. Viewers for
+ "special" files are configurable (*.wav, *.gif etc.).
+ Even the commands/menus are now user configurable.
+ For a screenshot visit http://www.han.de/~werner/ytree.html
+Keywords: file manager, browser, xtree
+Author: werner(a)frolix.han.de (Werner Bregulla)
+Maintained-by: werner(a)frolix.han.de (Werner Bregulla)
+Primary-site: http://www.han.de/~werner/ytree.html
+ ytree-2.09.tar.gz
+ ytree-2.09.lsm
+Copying-policy: GPL
+End
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ytree-2.08/ytree.h new/ytree-2.09/ytree.h
--- old/ytree-2.08/ytree.h 2024-04-05 14:24:38.000000000 +0200
+++ new/ytree-2.09/ytree.h 2024-05-27 19:20:04.000000000 +0200
@@ -1088,6 +1088,7 @@
extern LONGLONG AtoLL(char* cptr);
extern void DisplayTree(WINDOW *win, int start_entry_no, int hilight_no);
extern void ReCreateWindows(void);
+extern int WGetch(WINDOW *win);
extern int Getch(void);
extern int DirUserMode(DirEntry *dir_entry, int ch);
extern int FileUserMode(FileEntryList *file_entry_list, int ch);
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-queuelib for openSUSE:Factory checked in at 2024-06-10 17:38:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-queuelib (Old)
and /work/SRC/openSUSE:Factory/.python-queuelib.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-queuelib"
Mon Jun 10 17:38:20 2024 rev:6 rq:1179672 version:1.7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-queuelib/python-queuelib.changes 2021-09-08 21:37:11.825929246 +0200
+++ /work/SRC/openSUSE:Factory/.python-queuelib.new.19518/python-queuelib.changes 2024-06-10 17:38:42.085323857 +0200
@@ -1,0 +2,10 @@
+Mon Jun 10 09:52:31 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 1.7.0:
+ * Added support for Python 3.10-3.12 and PyPy 3.10
+ * Removed support for Python 3.5-3.7
+ * Improved type annotations and added the ``py.typed`` file
+ * Added ``pre-commit`` configuration
+ * Improved linting and CI configuration
+
+-------------------------------------------------------------------
Old:
----
queuelib-1.6.2.tar.gz
New:
----
queuelib-1.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-queuelib.spec ++++++
--- /var/tmp/diff_new_pack.4VAIoN/_old 2024-06-10 17:38:42.625343834 +0200
+++ /var/tmp/diff_new_pack.4VAIoN/_new 2024-06-10 17:38:42.629343981 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-queuelib
#
-# Copyright (c) 2021 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
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-queuelib
-Version: 1.6.2
+Version: 1.7.0
Release: 0
Summary: Collection of Persistent (Disk-Based) Queues
License: BSD-2-Clause
++++++ queuelib-1.6.2.tar.gz -> queuelib-1.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/NEWS new/queuelib-1.7.0/NEWS
--- old/queuelib-1.6.2/NEWS 2021-08-26 15:41:56.000000000 +0200
+++ new/queuelib-1.7.0/NEWS 2024-05-04 08:02:38.000000000 +0200
@@ -1,6 +1,19 @@
Queuelib release notes
======================
+Version 1.7.0
+-------------
+(released on May 4th, 2024)
+
+No functionality changes with respect to 1.6.2
+
+* Added support for Python 3.10-3.12 and PyPy 3.10
+* Removed support for Python 3.5-3.7
+* Improved type annotations and added the ``py.typed`` file
+* Added ``pre-commit`` configuration
+* Improved linting and CI configuration
+
+
Version 1.6.2
-------------
(released on August 26th, 2021)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/PKG-INFO new/queuelib-1.7.0/PKG-INFO
--- old/queuelib-1.6.2/PKG-INFO 2021-08-26 15:42:06.895097500 +0200
+++ new/queuelib-1.7.0/PKG-INFO 2024-05-04 08:02:51.436710800 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: queuelib
-Version: 1.6.2
+Version: 1.7.0
Summary: Collection of persistent (disk-based) and non-persistent (memory-based) queues
Home-page: https://github.com/scrapy/queuelib
Author: Scrapy project
@@ -12,14 +12,15 @@
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
-Requires-Python: >=3.5
+Requires-Python: >=3.8
+Description-Content-Type: text/x-rst
License-File: LICENSE
========
@@ -211,5 +212,3 @@
.. _scrapy-users: http://groups.google.com/group/scrapy-users
.. _Semantic Versioning: http://semver.org/
.. _nosetests: https://nose.readthedocs.org/en/latest/
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/pyproject.toml new/queuelib-1.7.0/pyproject.toml
--- old/queuelib-1.6.2/pyproject.toml 2021-08-26 15:41:56.000000000 +0200
+++ new/queuelib-1.7.0/pyproject.toml 2024-05-04 08:02:38.000000000 +0200
@@ -1,3 +1,17 @@
+[tool.isort]
+profile = "black"
+multi_line_output = 3
+
+[tool.mypy]
+check_untyped_defs = true
+ignore_missing_imports = true
+no_warn_no_return = true
+
+[[tool.mypy.overrides]]
+module = "queuelib.tests.*"
+allow_untyped_defs = true
+allow_untyped_calls = true
+check_untyped_defs = false
+
[tool.black]
-line-length = 119
-include = '\.py$'
+target-version = ["py38", "py39", "py310", "py311", "py312"]
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/queuelib/__init__.py new/queuelib-1.7.0/queuelib/__init__.py
--- old/queuelib-1.6.2/queuelib/__init__.py 2021-08-26 15:41:56.000000000 +0200
+++ new/queuelib-1.7.0/queuelib/__init__.py 2024-05-04 08:02:38.000000000 +0200
@@ -1,5 +1,5 @@
-__version__ = "1.6.2"
+__version__ = "1.7.0"
-from queuelib.queue import FifoDiskQueue, LifoDiskQueue
from queuelib.pqueue import PriorityQueue
+from queuelib.queue import FifoDiskQueue, LifoDiskQueue
from queuelib.rrqueue import RoundRobinQueue
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/queuelib/pqueue.py new/queuelib-1.7.0/queuelib/pqueue.py
--- old/queuelib-1.6.2/queuelib/pqueue.py 2021-08-26 15:41:56.000000000 +0200
+++ new/queuelib-1.7.0/queuelib/pqueue.py 2024-05-04 08:02:38.000000000 +0200
@@ -27,7 +27,9 @@
"""
- def __init__(self, qfactory: Callable[[int], BaseQueue], startprios: Iterable[int] = ()) -> None:
+ def __init__(
+ self, qfactory: Callable[[int], BaseQueue], startprios: Iterable[int] = ()
+ ) -> None:
self.queues = {}
self.qfactory = qfactory
for p in startprios:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/queuelib/queue.py new/queuelib-1.7.0/queuelib/queue.py
--- old/queuelib-1.6.2/queuelib/queue.py 2021-08-26 15:41:56.000000000 +0200
+++ new/queuelib-1.7.0/queuelib/queue.py 2024-05-04 08:02:38.000000000 +0200
@@ -6,7 +6,7 @@
from abc import abstractmethod
from collections import deque
from contextlib import suppress
-from typing import Any, Optional
+from typing import Any, BinaryIO, Deque, Dict, Literal, Optional, cast
class _BaseQueueMeta(type):
@@ -14,10 +14,12 @@
Metaclass to check queue classes against the necessary interface
"""
- def __instancecheck__(cls, instance):
- return cls.__subclasscheck__(type(instance)) # pylint: disable=no-value-for-parameter
+ def __instancecheck__(cls, instance: Any) -> bool:
+ return cls.__subclasscheck__( # pylint: disable=no-value-for-parameter
+ type(instance)
+ )
- def __subclasscheck__(cls, subclass):
+ def __subclasscheck__(cls, subclass: Any) -> bool:
return (
hasattr(subclass, "push")
and callable(subclass.push)
@@ -46,7 +48,7 @@
raise NotImplementedError()
@abstractmethod
- def __len__(self):
+ def __len__(self) -> int:
raise NotImplementedError()
def close(self) -> None:
@@ -57,7 +59,7 @@
"""In-memory FIFO queue, API compliant with FifoDiskQueue."""
def __init__(self) -> None:
- self.q = deque() # type: deque
+ self.q: Deque[Any] = deque()
def push(self, obj: Any) -> None:
self.q.append(obj)
@@ -71,7 +73,7 @@
def close(self) -> None:
pass
- def __len__(self):
+ def __len__(self) -> int:
return len(self.q)
@@ -103,7 +105,7 @@
def push(self, string: bytes) -> None:
if not isinstance(string, bytes):
- raise TypeError("Unsupported type: {}".format(type(string).__name__))
+ raise TypeError(f"Unsupported type: {type(string).__name__}")
hnum, hpos = self.info["head"]
hpos += 1
szhdr = struct.pack(self.szhdr_format, len(string))
@@ -116,8 +118,8 @@
self.info["size"] += 1
self.info["head"] = [hnum, hpos]
- def _openchunk(self, number: int, mode: str = "rb"):
- return open(os.path.join(self.path, "q%05d" % number), mode)
+ def _openchunk(self, number: int, mode: Literal["rb", "ab+"] = "rb") -> BinaryIO:
+ return open(os.path.join(self.path, f"q{number:05d}"), mode)
def pop(self) -> Optional[bytes]:
tnum, tcnt, toffset = self.info["tail"]
@@ -163,13 +165,13 @@
self._cleanup()
def __len__(self) -> int:
- return self.info["size"]
+ return cast(int, self.info["size"])
- def _loadinfo(self, chunksize: int) -> dict:
+ def _loadinfo(self, chunksize: int) -> Dict[str, Any]:
infopath = self._infopath()
if os.path.exists(infopath):
with open(infopath) as f:
- info = json.load(f)
+ info = cast(Dict[str, Any], json.load(f))
else:
info = {
"chunksize": chunksize,
@@ -179,7 +181,7 @@
}
return info
- def _saveinfo(self, info: dict) -> None:
+ def _saveinfo(self, info: Dict[str, Any]) -> None:
with open(self._infopath(), "w") as f:
json.dump(info, f)
@@ -201,6 +203,7 @@
SIZE_SIZE = struct.calcsize(SIZE_FORMAT)
def __init__(self, path: str) -> None:
+ self.size: int
self.path = path
if os.path.exists(path):
self.f = open(path, "rb+")
@@ -214,7 +217,7 @@
def push(self, string: bytes) -> None:
if not isinstance(string, bytes):
- raise TypeError("Unsupported type: {}".format(type(string).__name__))
+ raise TypeError(f"Unsupported type: {type(string).__name__}")
self.f.write(string)
ssize = struct.pack(self.SIZE_FORMAT, len(string))
self.f.write(ssize)
@@ -269,7 +272,7 @@
def push(self, item: bytes) -> None:
if not isinstance(item, bytes):
- raise TypeError("Unsupported type: {}".format(type(item).__name__))
+ raise TypeError(f"Unsupported type: {type(item).__name__}")
with self._db as conn:
conn.execute(self._sql_push, (item,))
@@ -277,13 +280,13 @@
with self._db as conn:
for id_, item in conn.execute(self._sql_pop):
conn.execute(self._sql_del, (id_,))
- return item
+ return cast(bytes, item)
return None
def peek(self) -> Optional[bytes]:
with self._db as conn:
for _, item in conn.execute(self._sql_pop):
- return item
+ return cast(bytes, item)
return None
def close(self) -> None:
@@ -294,7 +297,7 @@
def __len__(self) -> int:
with self._db as conn:
- return next(conn.execute(self._sql_size))[0]
+ return cast(int, next(conn.execute(self._sql_size))[0])
class LifoSQLiteQueue(FifoSQLiteQueue):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/queuelib/rrqueue.py new/queuelib-1.7.0/queuelib/rrqueue.py
--- old/queuelib-1.6.2/queuelib/rrqueue.py 2021-08-26 15:41:56.000000000 +0200
+++ new/queuelib-1.7.0/queuelib/rrqueue.py 2024-05-04 08:02:38.000000000 +0200
@@ -1,5 +1,6 @@
from collections import deque
-from typing import Any, Callable, Hashable, Iterable, List, Optional
+from collections.abc import Hashable
+from typing import Any, Callable, Iterable, List, Optional
from queuelib.queue import BaseQueue
@@ -23,7 +24,11 @@
first and the next queue for that key is then popped.
"""
- def __init__(self, qfactory: Callable[[Hashable], BaseQueue], start_domains: Iterable[Hashable] = ()) -> None:
+ def __init__(
+ self,
+ qfactory: Callable[[Hashable], BaseQueue],
+ start_domains: Iterable[Hashable] = (),
+ ) -> None:
self.queues = {}
self.qfactory = qfactory
for key in start_domains:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/queuelib/tests/test_pqueue.py new/queuelib-1.7.0/queuelib/tests/test_pqueue.py
--- old/queuelib-1.6.2/queuelib/tests/test_pqueue.py 2021-08-26 15:41:56.000000000 +0200
+++ new/queuelib-1.7.0/queuelib/tests/test_pqueue.py 2024-05-04 08:02:38.000000000 +0200
@@ -1,11 +1,12 @@
import os
+
from queuelib.pqueue import PriorityQueue
from queuelib.queue import (
- FifoMemoryQueue,
- LifoMemoryQueue,
FifoDiskQueue,
- LifoDiskQueue,
+ FifoMemoryQueue,
FifoSQLiteQueue,
+ LifoDiskQueue,
+ LifoMemoryQueue,
LifoSQLiteQueue,
)
from queuelib.tests import QueuelibTestCase, track_closed
@@ -174,25 +175,33 @@
self.assertEqual(q2.close(), [])
-class FifoDiskPriorityQueueTest(PQueueTestMixin, FifoTestMixin, DiskTestMixin, QueuelibTestCase):
+class FifoDiskPriorityQueueTest(
+ PQueueTestMixin, FifoTestMixin, DiskTestMixin, QueuelibTestCase
+):
def qfactory(self, prio):
path = os.path.join(self.qdir, str(prio))
return track_closed(FifoDiskQueue)(path)
-class LifoDiskPriorityQueueTest(PQueueTestMixin, LifoTestMixin, DiskTestMixin, QueuelibTestCase):
+class LifoDiskPriorityQueueTest(
+ PQueueTestMixin, LifoTestMixin, DiskTestMixin, QueuelibTestCase
+):
def qfactory(self, prio):
path = os.path.join(self.qdir, str(prio))
return track_closed(LifoDiskQueue)(path)
-class FifoSQLitePriorityQueueTest(PQueueTestMixin, FifoTestMixin, DiskTestMixin, QueuelibTestCase):
+class FifoSQLitePriorityQueueTest(
+ PQueueTestMixin, FifoTestMixin, DiskTestMixin, QueuelibTestCase
+):
def qfactory(self, prio):
path = os.path.join(self.qdir, str(prio))
return track_closed(FifoSQLiteQueue)(path)
-class LifoSQLitePriorityQueueTest(PQueueTestMixin, LifoTestMixin, DiskTestMixin, QueuelibTestCase):
+class LifoSQLitePriorityQueueTest(
+ PQueueTestMixin, LifoTestMixin, DiskTestMixin, QueuelibTestCase
+):
def qfactory(self, prio):
path = os.path.join(self.qdir, str(prio))
return track_closed(LifoSQLiteQueue)(path)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/queuelib/tests/test_queue.py new/queuelib-1.7.0/queuelib/tests/test_queue.py
--- old/queuelib-1.6.2/queuelib/tests/test_queue.py 2021-08-26 15:41:56.000000000 +0200
+++ new/queuelib-1.7.0/queuelib/tests/test_queue.py 2024-05-04 08:02:38.000000000 +0200
@@ -1,18 +1,18 @@
-import os
import glob
+import os
from abc import abstractmethod
+from typing import Any, List, Optional
from unittest import mock
-from typing import Any, Optional
import pytest
from queuelib.queue import (
BaseQueue,
- FifoMemoryQueue,
- LifoMemoryQueue,
FifoDiskQueue,
- LifoDiskQueue,
+ FifoMemoryQueue,
FifoSQLiteQueue,
+ LifoDiskQueue,
+ LifoMemoryQueue,
LifoSQLiteQueue,
)
from queuelib.tests import QueuelibTestCase
@@ -20,7 +20,7 @@
class DummyQueue:
def __init__(self) -> None:
- self.q = list() # type: list
+ self.q: List[Any] = []
def push(self, obj: Any) -> None:
self.q.append(obj)
@@ -213,14 +213,15 @@
class PersistentTestMixin:
-
chunksize = 100000
- @pytest.mark.xfail(reason="Reenable once Scrapy.squeues stops extending from this testsuite")
+ @pytest.mark.xfail(
+ reason="Reenable once Scrapy.squeues stops extending from this testsuite"
+ )
def test_non_bytes_raises_typeerror(self):
q = self.queue()
self.assertRaises(TypeError, q.push, 0)
- self.assertRaises(TypeError, q.push, u"")
+ self.assertRaises(TypeError, q.push, "")
self.assertRaises(TypeError, q.push, None)
self.assertRaises(TypeError, q.push, lambda x: x)
@@ -281,7 +282,9 @@
return LifoMemoryQueue()
-class FifoDiskQueueTest(FifoTestMixin, PersistentTestMixin, QueueTestMixin, QueuelibTestCase):
+class FifoDiskQueueTest(
+ FifoTestMixin, PersistentTestMixin, QueueTestMixin, QueuelibTestCase
+):
def queue(self):
return FifoDiskQueue(self.qpath, chunksize=self.chunksize)
@@ -326,7 +329,9 @@
chunksize = 4
-class LifoDiskQueueTest(LifoTestMixin, PersistentTestMixin, QueueTestMixin, QueuelibTestCase):
+class LifoDiskQueueTest(
+ LifoTestMixin, PersistentTestMixin, QueueTestMixin, QueuelibTestCase
+):
def queue(self):
return LifoDiskQueue(self.qpath)
@@ -343,11 +348,15 @@
assert os.path.getsize(self.qpath), size
-class FifoSQLiteQueueTest(FifoTestMixin, PersistentTestMixin, QueueTestMixin, QueuelibTestCase):
+class FifoSQLiteQueueTest(
+ FifoTestMixin, PersistentTestMixin, QueueTestMixin, QueuelibTestCase
+):
def queue(self):
return FifoSQLiteQueue(self.qpath)
-class LifoSQLiteQueueTest(LifoTestMixin, PersistentTestMixin, QueueTestMixin, QueuelibTestCase):
+class LifoSQLiteQueueTest(
+ LifoTestMixin, PersistentTestMixin, QueueTestMixin, QueuelibTestCase
+):
def queue(self):
return LifoSQLiteQueue(self.qpath)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/queuelib/tests/test_rrqueue.py new/queuelib-1.7.0/queuelib/tests/test_rrqueue.py
--- old/queuelib-1.6.2/queuelib/tests/test_rrqueue.py 2021-08-26 15:41:56.000000000 +0200
+++ new/queuelib-1.7.0/queuelib/tests/test_rrqueue.py 2024-05-04 08:02:38.000000000 +0200
@@ -1,15 +1,14 @@
import os
-from queuelib.rrqueue import RoundRobinQueue
from queuelib.queue import (
- FifoMemoryQueue,
- LifoMemoryQueue,
FifoDiskQueue,
- LifoDiskQueue,
+ FifoMemoryQueue,
FifoSQLiteQueue,
+ LifoDiskQueue,
+ LifoMemoryQueue,
LifoSQLiteQueue,
)
-
+from queuelib.rrqueue import RoundRobinQueue
from queuelib.tests import QueuelibTestCase, track_closed
@@ -127,25 +126,33 @@
self.assertEqual(self.q.close(), [])
-class FifoDiskRRQueueTest(RRQueueTestMixin, FifoTestMixin, DiskTestMixin, QueuelibTestCase):
+class FifoDiskRRQueueTest(
+ RRQueueTestMixin, FifoTestMixin, DiskTestMixin, QueuelibTestCase
+):
def qfactory(self, key):
path = os.path.join(self.qdir, str(key))
return track_closed(FifoDiskQueue)(path)
-class LifoDiskRRQueueTest(RRQueueTestMixin, LifoTestMixin, DiskTestMixin, QueuelibTestCase):
+class LifoDiskRRQueueTest(
+ RRQueueTestMixin, LifoTestMixin, DiskTestMixin, QueuelibTestCase
+):
def qfactory(self, key):
path = os.path.join(self.qdir, str(key))
return track_closed(LifoDiskQueue)(path)
-class FifoSQLiteRRQueueTest(RRQueueTestMixin, FifoTestMixin, DiskTestMixin, QueuelibTestCase):
+class FifoSQLiteRRQueueTest(
+ RRQueueTestMixin, FifoTestMixin, DiskTestMixin, QueuelibTestCase
+):
def qfactory(self, key):
path = os.path.join(self.qdir, str(key))
return track_closed(FifoSQLiteQueue)(path)
-class LifoSQLiteRRQueueTest(RRQueueTestMixin, LifoTestMixin, DiskTestMixin, QueuelibTestCase):
+class LifoSQLiteRRQueueTest(
+ RRQueueTestMixin, LifoTestMixin, DiskTestMixin, QueuelibTestCase
+):
def qfactory(self, key):
path = os.path.join(self.qdir, str(key))
return track_closed(LifoSQLiteQueue)(path)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/queuelib.egg-info/PKG-INFO new/queuelib-1.7.0/queuelib.egg-info/PKG-INFO
--- old/queuelib-1.6.2/queuelib.egg-info/PKG-INFO 2021-08-26 15:42:06.000000000 +0200
+++ new/queuelib-1.7.0/queuelib.egg-info/PKG-INFO 2024-05-04 08:02:51.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: queuelib
-Version: 1.6.2
+Version: 1.7.0
Summary: Collection of persistent (disk-based) and non-persistent (memory-based) queues
Home-page: https://github.com/scrapy/queuelib
Author: Scrapy project
@@ -12,14 +12,15 @@
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
-Requires-Python: >=3.5
+Requires-Python: >=3.8
+Description-Content-Type: text/x-rst
License-File: LICENSE
========
@@ -211,5 +212,3 @@
.. _scrapy-users: http://groups.google.com/group/scrapy-users
.. _Semantic Versioning: http://semver.org/
.. _nosetests: https://nose.readthedocs.org/en/latest/
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/queuelib.egg-info/SOURCES.txt new/queuelib-1.7.0/queuelib.egg-info/SOURCES.txt
--- old/queuelib-1.6.2/queuelib.egg-info/SOURCES.txt 2021-08-26 15:42:06.000000000 +0200
+++ new/queuelib-1.7.0/queuelib.egg-info/SOURCES.txt 2024-05-04 08:02:51.000000000 +0200
@@ -7,6 +7,7 @@
setup.py
queuelib/__init__.py
queuelib/pqueue.py
+queuelib/py.typed
queuelib/queue.py
queuelib/rrqueue.py
queuelib.egg-info/PKG-INFO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/queuelib-1.6.2/setup.py new/queuelib-1.7.0/setup.py
--- old/queuelib-1.6.2/setup.py 2021-08-26 15:41:56.000000000 +0200
+++ new/queuelib-1.7.0/setup.py 2024-05-04 08:02:38.000000000 +0200
@@ -1,28 +1,32 @@
-from setuptools import setup, find_packages
+from setuptools import find_packages, setup
setup(
name="queuelib",
- version="1.6.2",
+ version="1.7.0",
license="BSD",
description="Collection of persistent (disk-based) and non-persistent (memory-based) queues",
long_description=open("README.rst").read(),
+ long_description_content_type="text/x-rst",
author="Scrapy project",
author_email="info(a)scrapy.org",
url="https://github.com/scrapy/queuelib",
packages=find_packages(),
+ package_data={
+ "queuelib": ["py.typed"],
+ },
platforms=["Any"],
- python_requires=">=3.5",
+ python_requires=">=3.8",
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.5",
- "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",
+ "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-social-auth-app-django for openSUSE:Factory checked in at 2024-06-10 17:38:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-social-auth-app-django (Old)
and /work/SRC/openSUSE:Factory/.python-social-auth-app-django.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-social-auth-app-django"
Mon Jun 10 17:38:18 2024 rev:13 rq:1179662 version:5.4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-social-auth-app-django/python-social-auth-app-django.changes 2024-03-28 14:29:19.738547526 +0100
+++ /work/SRC/openSUSE:Factory/.python-social-auth-app-django.new.19518/python-social-auth-app-django.changes 2024-06-10 17:38:40.185253569 +0200
@@ -1,0 +2,8 @@
+Mon Jun 10 09:09:59 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 5.4.1 (bsc#1223373, CVE-2024-32879):
+ * Added reverse migration for JSON field
+ * Fixed improper handling of case sensitivity with
+ MySQL/MariaDB (CVE-2024-32879)
+
+-------------------------------------------------------------------
Old:
----
social-auth-app-django-5.4.0.tar.gz
New:
----
social-auth-app-django-5.4.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-social-auth-app-django.spec ++++++
--- /var/tmp/diff_new_pack.0zIk7I/_old 2024-06-10 17:38:41.185290563 +0200
+++ /var/tmp/diff_new_pack.0zIk7I/_new 2024-06-10 17:38:41.189290711 +0200
@@ -20,7 +20,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?sle15_python_module_pythons}
Name: python-social-auth-app-django
-Version: 5.4.0
+Version: 5.4.1
Release: 0
Summary: Python Social Authentication, Django integration
License: BSD-3-Clause
++++++ social-auth-app-django-5.4.0.tar.gz -> social-auth-app-django-5.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/CHANGELOG.md new/social-auth-app-django-5.4.1/CHANGELOG.md
--- old/social-auth-app-django-5.4.0/CHANGELOG.md 2023-10-17 09:41:13.000000000 +0200
+++ new/social-auth-app-django-5.4.1/CHANGELOG.md 2024-04-24 19:22:24.000000000 +0200
@@ -5,6 +5,12 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [5.4.1](https://github.com/python-social-auth/social-app-django/releases/tag… - 2024-04-24
+
+### Changed
+- Added reverse migration for JSON field
+- Fixed improper handling of case sensitivity with MySQL/MariaDB (CVE-2024-32879)
+
## [5.4.0](https://github.com/python-social-auth/social-app-django/releases/tag… - 2023-10-17
### Changed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/PKG-INFO new/social-auth-app-django-5.4.1/PKG-INFO
--- old/social-auth-app-django-5.4.0/PKG-INFO 2023-10-17 09:41:24.227967700 +0200
+++ new/social-auth-app-django-5.4.1/PKG-INFO 2024-04-24 19:22:32.757662000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: social-auth-app-django
-Version: 5.4.0
+Version: 5.4.1
Summary: Python Social Authentication, Django integration.
Home-page: https://github.com/python-social-auth/social-app-django
Author: Matias Aguirre
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/pyproject.toml new/social-auth-app-django-5.4.1/pyproject.toml
--- old/social-auth-app-django-5.4.0/pyproject.toml 2023-10-17 09:41:13.000000000 +0200
+++ new/social-auth-app-django-5.4.1/pyproject.toml 2024-04-24 19:22:24.000000000 +0200
@@ -11,9 +11,9 @@
"doc",
"site"
]
-format = "github"
ignore = []
line-length = 120
+output-format = "github"
select = ["E", "F", "I", "PLC", "PLE", "UP"]
target-version = "py37"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/requirements-dev.txt new/social-auth-app-django-5.4.1/requirements-dev.txt
--- old/social-auth-app-django-5.4.0/requirements-dev.txt 2023-10-17 09:41:13.000000000 +0200
+++ new/social-auth-app-django-5.4.1/requirements-dev.txt 2024-04-24 19:22:24.000000000 +0200
@@ -1,4 +1,4 @@
-r requirements.txt
coverage
pre-commit==3.5.0
-tox==4.11.3
+tox==4.14.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/setup.py new/social-auth-app-django-5.4.1/setup.py
--- old/social-auth-app-django-5.4.0/setup.py 2023-10-17 09:41:13.000000000 +0200
+++ new/social-auth-app-django-5.4.1/setup.py 2024-04-24 19:22:24.000000000 +0200
@@ -1,4 +1,5 @@
"""Setup file for easy installation"""
+
import re
from os.path import dirname, join
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/social_auth_app_django.egg-info/PKG-INFO new/social-auth-app-django-5.4.1/social_auth_app_django.egg-info/PKG-INFO
--- old/social-auth-app-django-5.4.0/social_auth_app_django.egg-info/PKG-INFO 2023-10-17 09:41:24.000000000 +0200
+++ new/social-auth-app-django-5.4.1/social_auth_app_django.egg-info/PKG-INFO 2024-04-24 19:22:32.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: social-auth-app-django
-Version: 5.4.0
+Version: 5.4.1
Summary: Python Social Authentication, Django integration.
Home-page: https://github.com/python-social-auth/social-app-django
Author: Matias Aguirre
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/social_django/__init__.py new/social-auth-app-django-5.4.1/social_django/__init__.py
--- old/social-auth-app-django-5.4.0/social_django/__init__.py 2023-10-17 09:41:13.000000000 +0200
+++ new/social-auth-app-django-5.4.1/social_django/__init__.py 2024-04-24 19:22:24.000000000 +0200
@@ -1,4 +1,4 @@
-__version__ = "5.4.0"
+__version__ = "5.4.1"
from social_core.backends.base import BaseAuth
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/social_django/admin.py new/social-auth-app-django-5.4.1/social_django/admin.py
--- old/social-auth-app-django-5.4.0/social_django/admin.py 2023-10-17 09:41:13.000000000 +0200
+++ new/social-auth-app-django-5.4.1/social_django/admin.py 2024-04-24 19:22:24.000000000 +0200
@@ -1,4 +1,5 @@
"""Admin settings"""
+
from itertools import chain
from django.conf import settings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/social_django/migrations/0013_migrate_extra_data.py new/social-auth-app-django-5.4.1/social_django/migrations/0013_migrate_extra_data.py
--- old/social-auth-app-django-5.4.0/social_django/migrations/0013_migrate_extra_data.py 2023-10-17 09:41:13.000000000 +0200
+++ new/social-auth-app-django-5.4.1/social_django/migrations/0013_migrate_extra_data.py 2024-04-24 19:22:24.000000000 +0200
@@ -2,7 +2,7 @@
import json
-from django.db import migrations
+from django.db import migrations, models
def migrate_json_field(apps, schema_editor):
@@ -41,11 +41,50 @@
auth.save(update_fields=["data_new"])
+def migrate_json_field_backwards(apps, schema_editor):
+ UserSocialAuth = apps.get_model("social_django", "UserSocialAuth")
+ Partial = apps.get_model("social_django", "Partial")
+ db_alias = schema_editor.connection.alias
+ to_be_updated = []
+
+ is_text_field = isinstance(
+ UserSocialAuth._meta.get_field("extra_data"),
+ models.TextField,
+ )
+ for auth in UserSocialAuth.objects.using(db_alias).iterator():
+ new_value = auth.extra_data_new
+ if is_text_field:
+ new_value = json.dumps(new_value)
+ auth.extra_data = new_value
+ to_be_updated.append(auth)
+
+ if len(to_be_updated) >= 1000:
+ UserSocialAuth.objects.bulk_update(to_be_updated, ["extra_data"])
+ to_be_updated.clear()
+
+ if to_be_updated:
+ UserSocialAuth.objects.bulk_update(to_be_updated, ["extra_data"])
+ to_be_updated.clear()
+
+ is_text_field = issubclass(
+ Partial._meta.get_field("data"),
+ models.TextField,
+ )
+ for auth in Partial.objects.using(db_alias).all():
+ new_value = auth.data_new
+ if is_text_field:
+ new_value = json.dumps(new_value)
+ auth.data = new_value
+ auth.save(update_fields=["data"])
+
+
class Migration(migrations.Migration):
dependencies = [
("social_django", "0012_usersocialauth_extra_data_new"),
]
operations = [
- migrations.RunPython(migrate_json_field, elidable=True),
+ migrations.RunPython(
+ migrate_json_field, migrate_json_field_backwards, elidable=True
+ ),
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/social_django/models.py new/social-auth-app-django-5.4.1/social_django/models.py
--- old/social-auth-app-django-5.4.0/social_django/models.py 2023-10-17 09:41:13.000000000 +0200
+++ new/social-auth-app-django-5.4.1/social_django/models.py 2024-04-24 19:22:24.000000000 +0200
@@ -1,4 +1,5 @@
"""Django ORM models for Social Auth"""
+
from django.conf import settings
from django.db import models
from django.db.utils import IntegrityError
@@ -53,11 +54,15 @@
abstract = True
@classmethod
- def get_social_auth(cls, provider, uid):
- try:
- return cls.objects.select_related("user").get(provider=provider, uid=uid)
- except cls.DoesNotExist:
- return None
+ def get_social_auth(cls, provider: str, uid: str):
+ for social in cls.objects.select_related("user").filter(
+ provider=provider, uid=uid
+ ):
+ # We need to compare to filter out case-insensitive lookups in
+ # some databases (MySQL/MariaDB)
+ if social.uid == uid:
+ return social
+ return None
@classmethod
def username_max_length(cls):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/social_django/storage.py new/social-auth-app-django-5.4.1/social_django/storage.py
--- old/social-auth-app-django-5.4.0/social_django/storage.py 2023-10-17 09:41:13.000000000 +0200
+++ new/social-auth-app-django-5.4.1/social_django/storage.py 2024-04-24 19:22:24.000000000 +0200
@@ -1,4 +1,5 @@
"""Django ORM models for Social Auth"""
+
import base64
from django.core.exceptions import FieldDoesNotExist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/social-auth-app-django-5.4.0/social_django/urls.py new/social-auth-app-django-5.4.1/social_django/urls.py
--- old/social-auth-app-django-5.4.0/social_django/urls.py 2023-10-17 09:41:13.000000000 +0200
+++ new/social-auth-app-django-5.4.1/social_django/urls.py 2024-04-24 19:22:24.000000000 +0200
@@ -1,4 +1,5 @@
"""URLs module"""
+
from django.conf import settings
from django.urls import path
from social_core.utils import setting_name
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-zope.testbrowser for openSUSE:Factory checked in at 2024-06-10 17:38:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zope.testbrowser (Old)
and /work/SRC/openSUSE:Factory/.python-zope.testbrowser.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-zope.testbrowser"
Mon Jun 10 17:38:11 2024 rev:16 rq:1179663 version:7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-zope.testbrowser/python-zope.testbrowser.changes 2023-04-04 21:26:50.739381481 +0200
+++ /work/SRC/openSUSE:Factory/.python-zope.testbrowser.new.19518/python-zope.testbrowser.changes 2024-06-10 17:38:30.552897244 +0200
@@ -1,0 +2,8 @@
+Mon Jun 10 09:12:39 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 7.0:
+ * Add support for Python 3.12 and 3.13 as of 3.13b1.
+ * Drop support for Python 3.7.
+- use PEP517 build
+
+-------------------------------------------------------------------
Old:
----
zope.testbrowser-6.0.tar.gz
New:
----
zope.testbrowser-7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-zope.testbrowser.spec ++++++
--- /var/tmp/diff_new_pack.UAiFCs/_old 2024-06-10 17:38:32.060953031 +0200
+++ /var/tmp/diff_new_pack.UAiFCs/_new 2024-06-10 17:38:32.076953623 +0200
@@ -1,7 +1,7 @@
#
-# spec file
+# spec file for package python-zope.testbrowser
#
-# 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
@@ -25,13 +25,16 @@
%bcond_with test
%endif
Name: python-zope.testbrowser%{psuffix}
-Version: 6.0
+Version: 7.0
Release: 0
Summary: Programmable browser for functional black-box tests
License: ZPL-2.1
URL: https://github.com/zopefoundation/zope.testbrowser
Source: https://files.pythonhosted.org/packages/source/z/zope.testbrowser/zope.test…
+BuildRequires: %{python_module base >= 3.8}
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-WSGIProxy2
@@ -74,12 +77,12 @@
%build
%if !%{with test}
-%python_build
+%pyproject_wheel
%endif
%install
%if !%{with test}
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
@@ -94,6 +97,9 @@
%if !%{with test}
%doc CHANGES.rst README.rst
%license LICENSE.rst
-%{python_sitelib}/zope*
+%dir %{python_sitelib}/zope
+%{python_sitelib}/zope/testbrowser
+%{python_sitelib}/zope.testbrowser-%{version}-py*-nspkg.pth
+%{python_sitelib}/zope.testbrowser-%{version}.dist-info
%endif
++++++ zope.testbrowser-6.0.tar.gz -> zope.testbrowser-7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/.readthedocs.yaml new/zope.testbrowser-7.0/.readthedocs.yaml
--- old/zope.testbrowser-6.0/.readthedocs.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/zope.testbrowser-7.0/.readthedocs.yaml 2024-05-31 09:35:28.000000000 +0200
@@ -0,0 +1,25 @@
+# Generated from:
+# https://github.com/zopefoundation/meta/tree/master/config/pure-python
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the version of Python and other tools you might need
+build:
+ os: ubuntu-22.04
+ tools:
+ python: "3.11"
+
+# Build documentation in the docs/ directory with Sphinx
+sphinx:
+ configuration: docs/conf.py
+
+# We recommend specifying your dependencies to enable reproducible builds:
+# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
+python:
+ install:
+ - requirements: docs/requirements.txt
+ - method: pip
+ path: .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/CHANGES.rst new/zope.testbrowser-7.0/CHANGES.rst
--- old/zope.testbrowser-6.0/CHANGES.rst 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/CHANGES.rst 2024-05-31 10:41:26.000000000 +0200
@@ -2,6 +2,14 @@
CHANGES
=======
+7.0 (2024-05-31)
+----------------
+
+- Add support for Python 3.12 and 3.13 as of 3.13b1.
+
+- Drop support for Python 3.7.
+
+
6.0 (2023-03-27)
----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/MANIFEST.in new/zope.testbrowser-7.0/MANIFEST.in
--- old/zope.testbrowser-6.0/MANIFEST.in 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/MANIFEST.in 2024-05-31 09:35:28.000000000 +0200
@@ -12,6 +12,7 @@
recursive-include docs Makefile
recursive-include src *.py
+include *.yaml
recursive-include docs *.bat
recursive-include src *.gif
recursive-include src *.html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/PKG-INFO new/zope.testbrowser-7.0/PKG-INFO
--- old/zope.testbrowser-6.0/PKG-INFO 2023-03-27 13:38:00.359445600 +0200
+++ new/zope.testbrowser-7.0/PKG-INFO 2024-05-31 10:45:37.357989300 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: zope.testbrowser
-Version: 6.0
+Version: 7.0
Summary: Programmable browser for functional black-box tests
Home-page: https://github.com/zopefoundation/zope.testbrowser
Author: Zope Corporation and Contributors
@@ -12,21 +12,40 @@
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Internet :: WWW/HTTP
-Requires-Python: >=3.7
+Requires-Python: >=3.8
+License-File: LICENSE.rst
+Requires-Dist: setuptools
+Requires-Dist: zope.interface
+Requires-Dist: zope.schema
+Requires-Dist: zope.cachedescriptors
+Requires-Dist: pytz
+Requires-Dist: WebTest>=2.0.30
+Requires-Dist: BeautifulSoup4
+Requires-Dist: SoupSieve>=1.9.0
+Requires-Dist: WSGIProxy2
+Requires-Dist: legacy-cgi; python_version > "3.12"
Provides-Extra: docs
+Requires-Dist: Sphinx; extra == "docs"
+Requires-Dist: sphinx_rtd_theme; extra == "docs"
+Requires-Dist: repoze.sphinx.autointerface; extra == "docs"
+Requires-Dist: zope.app.wsgi; extra == "docs"
Provides-Extra: test
-Provides-Extra: test_bbb
+Requires-Dist: zope.testing; extra == "test"
+Requires-Dist: mock; extra == "test"
+Requires-Dist: zope.testrunner; extra == "test"
+Provides-Extra: test-bbb
+Requires-Dist: zope.testbrowser[test]; extra == "test-bbb"
Provides-Extra: wsgi
-License-File: LICENSE.rst
``zope.testbrowser`` README
===========================
@@ -35,10 +54,13 @@
:target: https://pypi.org/project/zope.testbrowser/
:alt: Latest Version
+.. image:: https://img.shields.io/pypi/pyversions/zope.testbrowser.svg
+ :target: https://pypi.org/project/zope.testbrowser/
+ :alt: Supported Python versions
+
.. image:: https://github.com/zopefoundation/zope.testbrowser/actions/workflows/tests.…
:target: https://github.com/zopefoundation/zope.testbrowser/actions/workflows/tests.…
-
.. image:: https://readthedocs.org/projects/zopetestbrowser/badge/?version=latest
:target: http://zopetestbrowser.readthedocs.org/en/latest/
:alt: Documentation Status
@@ -55,6 +77,14 @@
CHANGES
=======
+7.0 (2024-05-31)
+----------------
+
+- Add support for Python 3.12 and 3.13 as of 3.13b1.
+
+- Drop support for Python 3.7.
+
+
6.0 (2023-03-27)
----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/README.rst new/zope.testbrowser-7.0/README.rst
--- old/zope.testbrowser-6.0/README.rst 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/README.rst 2024-05-31 10:41:07.000000000 +0200
@@ -5,10 +5,13 @@
:target: https://pypi.org/project/zope.testbrowser/
:alt: Latest Version
+.. image:: https://img.shields.io/pypi/pyversions/zope.testbrowser.svg
+ :target: https://pypi.org/project/zope.testbrowser/
+ :alt: Supported Python versions
+
.. image:: https://github.com/zopefoundation/zope.testbrowser/actions/workflows/tests.…
:target: https://github.com/zopefoundation/zope.testbrowser/actions/workflows/tests.…
-
.. image:: https://readthedocs.org/projects/zopetestbrowser/badge/?version=latest
:target: http://zopetestbrowser.readthedocs.org/en/latest/
:alt: Documentation Status
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/docs/conf.py new/zope.testbrowser-7.0/docs/conf.py
--- old/zope.testbrowser-6.0/docs/conf.py 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/docs/conf.py 2024-05-31 09:34:08.000000000 +0200
@@ -134,7 +134,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+# html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
@@ -266,4 +266,4 @@
# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://docs.python.org/': None}
+intersphinx_mapping = {'python': ('http://docs.python.org/', None)}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/docs/narrative.rst new/zope.testbrowser-7.0/docs/narrative.rst
--- old/zope.testbrowser-6.0/docs/narrative.rst 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/docs/narrative.rst 2024-05-31 09:34:08.000000000 +0200
@@ -245,9 +245,9 @@
.. doctest::
- >>> from six.moves import http_client
+ >>> import http.client
>>> browser.open('http://localhost/@@/testbrowser/simple.html')
- >>> isinstance(browser.headers, http_client.HTTPMessage)
+ >>> isinstance(browser.headers, http.client.HTTPMessage)
True
The headers can be accessed as a string:
@@ -257,7 +257,7 @@
>>> print(browser.headers)
... # doctest: +NORMALIZE_WHITESPACE
Status: 200 OK
- Content-Length: 109
+ Content-Length: ...
Content-Type: text/html; charset=UTF-8
Or as a mapping:
@@ -380,7 +380,7 @@
.. doctest::
>>> browser.open('http://localhost/@@/testbrowser/navigate.html')
- >>> browser.contents
+ >>> browser.contents.replace('\r', '')
'...> Link Text \n with Whitespace\tNormalization (and parens) </...'
>>> link = browser.getLink('Link Text with Whitespace Normalization '
... '(and parens)')
@@ -1002,7 +1002,7 @@
<Control name='textarea-value' type='textarea'>
>>> verifyObject(interfaces.IControl, ctrl)
True
- >>> ctrl.value
+ >>> ctrl.value.replace('\r', '')
' Text inside\n area!\n '
>>> ctrl.value = 'A lot of\n text.'
>>> ctrl.disabled
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/docs/requirements.txt new/zope.testbrowser-7.0/docs/requirements.txt
--- old/zope.testbrowser-6.0/docs/requirements.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/zope.testbrowser-7.0/docs/requirements.txt 2024-05-31 09:34:08.000000000 +0200
@@ -0,0 +1,2 @@
+Sphinx
+repoze.sphinx.autointerface
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/rtd.txt new/zope.testbrowser-7.0/rtd.txt
--- old/zope.testbrowser-6.0/rtd.txt 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/rtd.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-repoze.sphinx.autointerface
-zope.testbrowser
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/setup.cfg new/zope.testbrowser-7.0/setup.cfg
--- old/zope.testbrowser-6.0/setup.cfg 2023-03-27 13:38:00.360248000 +0200
+++ new/zope.testbrowser-7.0/setup.cfg 2024-05-31 10:45:37.358329000 +0200
@@ -1,6 +1,3 @@
-[bdist_wheel]
-universal = 0
-
[flake8]
doctests = 1
@@ -15,7 +12,7 @@
force_single_line = True
combine_as_imports = True
sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
-known_third_party = six, docutils, pkg_resources
+known_third_party = docutils, pkg_resources, pytz
known_zope =
known_first_party =
default_section = ZOPE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/setup.py new/zope.testbrowser-7.0/setup.py
--- old/zope.testbrowser-6.0/setup.py 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/setup.py 2024-05-31 10:41:40.000000000 +0200
@@ -29,7 +29,7 @@
setup(
name='zope.testbrowser',
- version='6.0',
+ version='7.0',
url='https://github.com/zopefoundation/zope.testbrowser',
license='ZPL 2.1',
project_urls={
@@ -44,11 +44,12 @@
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python :: 3',
- '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',
+ 'Programming Language :: Python :: 3.12',
+ 'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Testing',
@@ -58,7 +59,7 @@
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['zope'],
- python_requires='>=3.7',
+ python_requires='>=3.8',
install_requires=[
'setuptools',
'zope.interface',
@@ -69,6 +70,7 @@
'BeautifulSoup4',
'SoupSieve >= 1.9.0',
'WSGIProxy2',
+ 'legacy-cgi; python_version > "3.12"', # WebOb uses the cgi module
],
extras_require={
'docs': [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/src/zope/testbrowser/cookies.py new/zope.testbrowser-7.0/src/zope/testbrowser/cookies.py
--- old/zope.testbrowser-6.0/src/zope/testbrowser/cookies.py 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/src/zope/testbrowser/cookies.py 2024-05-31 09:34:08.000000000 +0200
@@ -21,6 +21,7 @@
from urllib.parse import quote as url_quote
import pytz
+
import zope.interface
from zope.testbrowser import interfaces
@@ -201,8 +202,6 @@
def __iter__(self):
return (ck.name for ck in self._get_cookies())
- iterkeys = __iter__
-
def iterinfo(self, key=None):
return (self._getinfo(ck) for ck in self._get_cookies(key))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/src/zope/testbrowser/over_the_wire.txt new/zope.testbrowser-7.0/src/zope/testbrowser/over_the_wire.txt
--- old/zope.testbrowser-6.0/src/zope/testbrowser/over_the_wire.txt 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/src/zope/testbrowser/over_the_wire.txt 2024-05-31 09:34:08.000000000 +0200
@@ -18,5 +18,5 @@
>>> browser.open('https://www.w3.org')
>>> print(browser.contents)
- <!DOCTYPE html ...
- ...The World Wide Web Consortium (W3C) is an international community...
+ <!doctype html>
+ ...<h1>Making the Web work</h1>...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/src/zope/testbrowser/tests/helper.py new/zope.testbrowser-7.0/src/zope/testbrowser/tests/helper.py
--- old/zope.testbrowser-6.0/src/zope/testbrowser/tests/helper.py 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/src/zope/testbrowser/tests/helper.py 2024-05-31 09:34:08.000000000 +0200
@@ -26,14 +26,9 @@
(re.compile(r'boundary=\S+\.\S+\.\S+'), 'boundary=' + '-' * 30),
(re.compile(r'^---{10}.*', re.M), '-' * 30),
(re.compile(r'boundary=-{10}.*'), 'boundary=' + '-' * 30),
- (re.compile(r'User-agent:\s+\S+'), 'User-agent: Python-urllib/2.4'),
- (re.compile(r'HTTP_USER_AGENT:\s+\S+'),
- 'HTTP_USER_AGENT: Python-urllib/2.4'),
(re.compile(r'Content-[Ll]ength:.*'), 'Content-Length: 123'),
(re.compile(r'Status: 200.*'), 'Status: 200 OK'),
(win32CRLFtransformer(), None),
- (re.compile(r'User-Agent: Python-urllib/2.[567]'),
- 'User-agent: Python-urllib/2.4'),
# (re.compile(r'Host: localhost(:80)?'), 'Connection: close'),
(re.compile(r'Content-Type: '), 'Content-type: '),
(re.compile(r'Content-Disposition: '), 'Content-disposition: '),
@@ -44,27 +39,6 @@
r"59, 59, tzinfo=<UTC>\),"),
"'expires': datetime.datetime(2030, 1, 1, 0, 0, tzinfo=<UTC>),"),
- # python3 formats exceptions differently
- (re.compile(r'zope.testbrowser.browser.BrowserStateError'),
- 'BrowserStateError'),
- (re.compile(r'zope.testbrowser.interfaces.ExpiredError'),
- 'ExpiredError'),
- (re.compile(r'zope.testbrowser.browser.LinkNotFoundError'),
- 'LinkNotFoundError'),
- (re.compile(r'zope.testbrowser.browser.AmbiguityError'),
- 'AmbiguityError'),
- (re.compile(r'zope.testbrowser.ftests.wsgitestapp.NotFound'),
- 'NotFound'),
- (re.compile(r'zope.testbrowser.interfaces.AlreadyExpiredError'),
- 'AlreadyExpiredError'),
- (re.compile(r'zope.testbrowser.browser.RobotExclusionError'),
- 'RobotExclusionError'),
- (re.compile(r'urllib.error.HTTPError'),
- 'HTTPError'),
-
-
- # In py3 HTTPMessage class was moved and represented differently
- (re.compile(r'<http.client.HTTPMessage object'),
- '<httplib.HTTPMessage instance'),
- # (re.compile(r''), ''),
+ # Ignore output returned by GHA for PyPy3
+ (re.compile('/etc/ssl/certs/ca-certificates.crt /etc/ssl/certs'), ''),
])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/src/zope.testbrowser.egg-info/PKG-INFO new/zope.testbrowser-7.0/src/zope.testbrowser.egg-info/PKG-INFO
--- old/zope.testbrowser-6.0/src/zope.testbrowser.egg-info/PKG-INFO 2023-03-27 13:38:00.000000000 +0200
+++ new/zope.testbrowser-7.0/src/zope.testbrowser.egg-info/PKG-INFO 2024-05-31 10:45:37.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: zope.testbrowser
-Version: 6.0
+Version: 7.0
Summary: Programmable browser for functional black-box tests
Home-page: https://github.com/zopefoundation/zope.testbrowser
Author: Zope Corporation and Contributors
@@ -12,21 +12,40 @@
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Internet :: WWW/HTTP
-Requires-Python: >=3.7
+Requires-Python: >=3.8
+License-File: LICENSE.rst
+Requires-Dist: setuptools
+Requires-Dist: zope.interface
+Requires-Dist: zope.schema
+Requires-Dist: zope.cachedescriptors
+Requires-Dist: pytz
+Requires-Dist: WebTest>=2.0.30
+Requires-Dist: BeautifulSoup4
+Requires-Dist: SoupSieve>=1.9.0
+Requires-Dist: WSGIProxy2
+Requires-Dist: legacy-cgi; python_version > "3.12"
Provides-Extra: docs
+Requires-Dist: Sphinx; extra == "docs"
+Requires-Dist: sphinx_rtd_theme; extra == "docs"
+Requires-Dist: repoze.sphinx.autointerface; extra == "docs"
+Requires-Dist: zope.app.wsgi; extra == "docs"
Provides-Extra: test
-Provides-Extra: test_bbb
+Requires-Dist: zope.testing; extra == "test"
+Requires-Dist: mock; extra == "test"
+Requires-Dist: zope.testrunner; extra == "test"
+Provides-Extra: test-bbb
+Requires-Dist: zope.testbrowser[test]; extra == "test-bbb"
Provides-Extra: wsgi
-License-File: LICENSE.rst
``zope.testbrowser`` README
===========================
@@ -35,10 +54,13 @@
:target: https://pypi.org/project/zope.testbrowser/
:alt: Latest Version
+.. image:: https://img.shields.io/pypi/pyversions/zope.testbrowser.svg
+ :target: https://pypi.org/project/zope.testbrowser/
+ :alt: Supported Python versions
+
.. image:: https://github.com/zopefoundation/zope.testbrowser/actions/workflows/tests.…
:target: https://github.com/zopefoundation/zope.testbrowser/actions/workflows/tests.…
-
.. image:: https://readthedocs.org/projects/zopetestbrowser/badge/?version=latest
:target: http://zopetestbrowser.readthedocs.org/en/latest/
:alt: Documentation Status
@@ -55,6 +77,14 @@
CHANGES
=======
+7.0 (2024-05-31)
+----------------
+
+- Add support for Python 3.12 and 3.13 as of 3.13b1.
+
+- Drop support for Python 3.7.
+
+
6.0 (2023-03-27)
----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/src/zope.testbrowser.egg-info/SOURCES.txt new/zope.testbrowser-7.0/src/zope.testbrowser.egg-info/SOURCES.txt
--- old/zope.testbrowser-6.0/src/zope.testbrowser.egg-info/SOURCES.txt 2023-03-27 13:38:00.000000000 +0200
+++ new/zope.testbrowser-7.0/src/zope.testbrowser.egg-info/SOURCES.txt 2024-05-31 10:45:37.000000000 +0200
@@ -1,3 +1,4 @@
+.readthedocs.yaml
CHANGES.rst
CONTRIBUTING.md
COPYRIGHT.rst
@@ -5,7 +6,6 @@
MANIFEST.in
README.rst
buildout.cfg
-rtd.txt
setup.cfg
setup.py
tox.ini
@@ -16,6 +16,7 @@
docs/index.rst
docs/make.bat
docs/narrative.rst
+docs/requirements.txt
src/zope/__init__.py
src/zope.testbrowser.egg-info/PKG-INFO
src/zope.testbrowser.egg-info/SOURCES.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/src/zope.testbrowser.egg-info/requires.txt new/zope.testbrowser-7.0/src/zope.testbrowser.egg-info/requires.txt
--- old/zope.testbrowser-6.0/src/zope.testbrowser.egg-info/requires.txt 2023-03-27 13:38:00.000000000 +0200
+++ new/zope.testbrowser-7.0/src/zope.testbrowser.egg-info/requires.txt 2024-05-31 10:45:37.000000000 +0200
@@ -8,6 +8,9 @@
SoupSieve>=1.9.0
WSGIProxy2
+[:python_version > "3.12"]
+legacy-cgi
+
[docs]
Sphinx
sphinx_rtd_theme
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testbrowser-6.0/tox.ini new/zope.testbrowser-7.0/tox.ini
--- old/zope.testbrowser-6.0/tox.ini 2023-03-27 13:37:59.000000000 +0200
+++ new/zope.testbrowser-7.0/tox.ini 2024-05-31 10:41:07.000000000 +0200
@@ -3,42 +3,62 @@
[tox]
minversion = 3.18
envlist =
+ release-check
lint
- py37
py38
py39
py310
py311
+ py312
+ py313
pypy3
docs
coverage
[testenv]
usedevelop = true
+package = wheel
+wheel_build_env = .pkg
+pip_pre = py313: true
deps =
+ setuptools < 69
+ Sphinx
setenv =
ZOPE_INTERFACE_STRICT_IRO=1
+ py312: VIRTUALENV_PIP=23.1.2
+ py312: PIP_REQUIRE_VIRTUALENV=0
commands =
zope-testrunner --test-path=src {posargs:-vc}
sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest
extras =
test
docs
+[testenv:release-check]
+description = ensure that the distribution is ready to release
+basepython = python3
+skip_install = true
+deps =
+ twine
+ build
+ check-manifest
+ check-python-versions >= 0.20.0
+ wheel
+commands_pre =
+commands =
+ check-manifest
+ check-python-versions --only setup.py,tox.ini,.github/workflows/tests.yml
+ python -m build --sdist --no-isolation
+ twine check dist/*
[testenv:lint]
basepython = python3
skip_install = true
+deps =
+ isort
+ flake8
commands =
isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py
flake8 src setup.py
- check-manifest
- check-python-versions
-deps =
- check-manifest
- check-python-versions >= 0.19.1
- wheel
- flake8
- isort
[testenv:isort-apply]
basepython = python3
@@ -63,21 +83,21 @@
mkdir
deps =
coverage
- coverage-python-version
+ Sphinx
commands =
mkdir -p {toxinidir}/parts/htmlcov
coverage run -m zope.testrunner --test-path=src {posargs:-vc}
coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest
coverage html --ignore-errors
- coverage report --ignore-errors --show-missing --fail-under=70
+ coverage report --show-missing --fail-under=70
[coverage:run]
branch = True
-plugins = coverage_python_version
source = zope.testbrowser
[coverage:report]
precision = 2
+ignore_errors = True
exclude_lines =
pragma: no cover
pragma: nocover
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package gnome-sudoku for openSUSE:Factory checked in at 2024-06-10 17:38:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-sudoku (Old)
and /work/SRC/openSUSE:Factory/.gnome-sudoku.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnome-sudoku"
Mon Jun 10 17:38:09 2024 rev:53 rq:1179669 version:46.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-sudoku/gnome-sudoku.changes 2024-05-06 17:56:39.838538184 +0200
+++ /work/SRC/openSUSE:Factory/.gnome-sudoku.new.19518/gnome-sudoku.changes 2024-06-10 17:38:28.300813935 +0200
@@ -1,0 +2,7 @@
+Mon Jun 10 06:49:48 UTC 2024 - Dominique Leuenberger <dimstar(a)opensuse.org>
+
+- Update to version 46.2:
+ + Fix memory leaks.
+ + Fix print button not displaying.
+
+-------------------------------------------------------------------
Old:
----
gnome-sudoku-46.1.obscpio
New:
----
gnome-sudoku-46.2.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-sudoku.spec ++++++
--- /var/tmp/diff_new_pack.erBo06/_old 2024-06-10 17:38:30.080879784 +0200
+++ /var/tmp/diff_new_pack.erBo06/_new 2024-06-10 17:38:30.084879931 +0200
@@ -17,7 +17,7 @@
Name: gnome-sudoku
-Version: 46.1
+Version: 46.2
Release: 0
Summary: Sudoku Game for GNOME
License: GPL-3.0-or-later
++++++ _service ++++++
--- /var/tmp/diff_new_pack.erBo06/_old 2024-06-10 17:38:30.116881116 +0200
+++ /var/tmp/diff_new_pack.erBo06/_new 2024-06-10 17:38:30.120881263 +0200
@@ -3,7 +3,7 @@
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.gnome.org/GNOME/gnome-sudoku.git</param>
- <param name="revision">46.1</param>
+ <param name="revision">46.2</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">v?(.*)\+0</param>
<param name="versionrewrite-replacement">\1</param>
++++++ gnome-sudoku-46.1.obscpio -> gnome-sudoku-46.2.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/NEWS new/gnome-sudoku-46.2/NEWS
--- old/gnome-sudoku-46.1/NEWS 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/NEWS 2024-06-09 18:03:36.000000000 +0200
@@ -1,3 +1,9 @@
+46.2 - June 9, 2024
+==========================
+
+- Fix memory leaks
+- Fix print button not displaying
+
46.1 - May 5, 2024
==========================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/data/org.gnome.Sudoku.appdata.xml.in new/gnome-sudoku-46.2/data/org.gnome.Sudoku.appdata.xml.in
--- old/gnome-sudoku-46.1/data/org.gnome.Sudoku.appdata.xml.in 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/data/org.gnome.Sudoku.appdata.xml.in 2024-06-09 18:03:36.000000000 +0200
@@ -25,10 +25,14 @@
</p>
</description>
<screenshots>
- <screenshot height="577" width="748" type="default">
+ <screenshot type="default">
<image>https://gitlab.gnome.org/GNOME/gnome-sudoku/-/raw/master/data/screenshot.png</image>
<caption>A GNOME sudoku game preview</caption>
</screenshot>
+ <screenshot environment="gnome:dark">
+ <image>https://gitlab.gnome.org/GNOME/gnome-sudoku/-/raw/master/data/screenshot.png</image>
+ <caption>A GNOME sudoku game preview in dark mode</caption>
+ </screenshot>
</screenshots>
<launchable type="desktop-id">org.gnome.Sudoku.desktop</launchable>
<url type="homepage">https://wiki.gnome.org/Apps/Sudoku</url>
@@ -43,6 +47,7 @@
<id>gnome-sudoku.desktop</id>
</provides>
<releases>
+ <release version="46.2" date="2024-06-09"/>
<release version="46.1" date="2024-05-05"/>
<release version="46.0" date="2024-03-15"/>
<release version="46~rc" date="2024-02-29"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/data/print-dialog.ui new/gnome-sudoku-46.2/data/print-dialog.ui
--- old/gnome-sudoku-46.1/data/print-dialog.ui 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/data/print-dialog.ui 2024-06-09 18:03:36.000000000 +0200
@@ -3,12 +3,12 @@
<requires lib="gtk+" version="3.12"/>
<template class="PrintDialog" parent="AdwWindow">
<property name="title" translatable="yes">Print Multiple Puzzles</property>
- <property name="resizable">False</property>
+ <property name="resizable">True</property>
<property name="width-request">460</property>
<property name="modal">True</property>
<property name="default-widget">print_button</property>
<property name="focus-widget">print_button</property>
- <child>
+ <property name="content">
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar"/>
@@ -64,27 +64,25 @@
</property>
</object>
</child>
+ <child>
+ <object class="GtkButton" id="print_button">
+ <property name="margin-top">12</property>
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">_Print</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <style>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ </child>
</object>
</child>
</object>
</child>
</object>
</property>
- <child type="bottom">
- <object class="GtkActionBar">
- <child type="end">
- <object class="GtkButton" id="print_button">
- <property name="label" translatable="yes">_Print</property>
- <property name="receives-default">False</property>
- <property name="use-underline">True</property>
- <style>
- <class name="suggested-action"/>
- </style>
- </object>
- </child>
- </object>
- </child>
</object>
- </child>
+ </property>
</template>
</interface>
Binary files old/gnome-sudoku-46.1/data/screenshot-dark.png and new/gnome-sudoku-46.2/data/screenshot-dark.png differ
Binary files old/gnome-sudoku-46.1/data/screenshot.png and new/gnome-sudoku-46.2/data/screenshot.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/lib/sudoku-game.vala new/gnome-sudoku-46.2/lib/sudoku-game.vala
--- old/gnome-sudoku-46.1/lib/sudoku-game.vala 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/lib/sudoku-game.vala 2024-06-09 18:03:36.000000000 +0200
@@ -50,7 +50,6 @@
public bool[] earmarks;
}
-
private Gee.List<UndoItem?> undostack;
private Gee.List<UndoItem?> redostack;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/meson.build new/gnome-sudoku-46.2/meson.build
--- old/gnome-sudoku-46.1/meson.build 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/meson.build 2024-06-09 18:03:36.000000000 +0200
@@ -4,7 +4,7 @@
],
license: 'GPL3+',
meson_version: '>= 0.59',
- version: '46.1'
+ version: '46.2'
)
application_id = 'org.gnome.Sudoku'
add_project_arguments([
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/src/aspect-frame.vala new/gnome-sudoku-46.2/src/aspect-frame.vala
--- old/gnome-sudoku-46.1/src/aspect-frame.vala 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/src/aspect-frame.vala 2024-06-09 18:03:36.000000000 +0200
@@ -75,10 +75,16 @@
}
public SudokuFrame (Widget? child)
- {
- this.child = child;
+ {
+ this.child = child;
- this.set_css_name ("aspectframe");
- this.set_accessible_role (AccessibleRole.GROUP);
- }
+ this.set_css_name ("aspectframe");
+ this.set_accessible_role (AccessibleRole.GROUP);
+ }
+
+ public override void dispose ()
+ {
+ child.unparent ();
+ base.dispose ();
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/src/gnome-sudoku.vala new/gnome-sudoku-46.2/src/gnome-sudoku.vala
--- old/gnome-sudoku-46.1/src/gnome-sudoku.vala 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/src/gnome-sudoku.vala 2024-06-09 18:03:36.000000000 +0200
@@ -31,10 +31,11 @@
{
private GLib.Settings settings;
- private SudokuWindow? window = null;
+ private SudokuWindow window;
+
private SudokuGame? game = null;
- private SudokuView? view
+ private SudokuView view
{
get { return window.view; }
}
@@ -208,6 +209,9 @@
if (game != null)
{
+ //Source timer holds a game ref
+ game.stop_clock ();
+
if (!game.is_empty () && !game.board.complete)
saver.save_game (game);
@@ -316,9 +320,7 @@
game.stop_clock ();
- for (var i = 0; i < game.board.rows; i++)
- for (var j = 0; j < game.board.cols; j++)
- view.can_focus = false;
+ view.can_focus = false;
saver.add_game_to_finished (game, true);
@@ -363,14 +365,6 @@
if (current_game_mode == GameMode.PLAY)
board.solve ();
- if (game != null)
- {
- game.paused_changed.disconnect (paused_changed_cb);
- game.board.cell_changed.disconnect (cell_modified_cb);
- game.board.earmark_changed.disconnect (cell_modified_cb);
- game.board.completed.disconnect (board_completed_cb);
- }
-
game = new SudokuGame (board);
game.mode = current_game_mode;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/src/number-picker.vala new/gnome-sudoku-46.2/src/number-picker.vala
--- old/gnome-sudoku-46.1/src/number-picker.vala 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/src/number-picker.vala 2024-06-09 18:03:36.000000000 +0200
@@ -25,22 +25,25 @@
{
private SudokuBoard board;
- public signal void number_picked (int number);
- public signal void earmark_state_changed (int number, bool active);
+ public signal void value_picked (int val);
+ public signal void earmark_state_changed (int num, bool active);
private Button clear_button;
-
- private int earmarks_active;
+ private Button[] value_buttons;
+ private ToggleButton[] earmark_buttons;
public bool is_earmark_picker { get; private set; }
public NumberPicker (SudokuGame game, bool for_earmarks = false)
{
board = game.board;
- earmarks_active = 0;
-
is_earmark_picker = for_earmarks;
+ if (is_earmark_picker)
+ earmark_buttons = new ToggleButton [board.block_cols * board.block_rows];
+ else
+ value_buttons = new Button [board.block_cols * board.block_rows];
+
for (var col = 0; col < board.block_cols; col++)
{
for (var row = 0; row < board.block_rows; row++)
@@ -60,21 +63,29 @@
button.set_child (label);
label.show ();
+ //workaround to avoid lambda capture and memory leak
+ button.set_data<int> ("number-contained", n);
+
if (!for_earmarks)
- button.clicked.connect (() => {
- number_picked (n);
+ {
+ value_buttons[n - 1] = button;
+ button.clicked.connect ((this_button) => {
+ value_picked (this_button.get_data<int> ("number-contained"));
});
+ }
else
{
- var toggle_button = (ToggleButton) button;
- toggle_button.toggled.connect (() => {
- var toggle_active = toggle_button.get_active ();
- earmark_state_changed (n, toggle_active);
+ earmark_buttons[n - 1] = (ToggleButton) button;
+ earmark_buttons[n - 1].toggled.connect ((this_button) => {
+ int number_contained = this_button.get_data<int> ("number-contained");
+ var toggle_active = this_button.get_active ();
+ earmark_state_changed (number_contained, toggle_active);
});
}
+
if (n == 5)
- button.realize.connect (() => {
- button.grab_focus ();
+ button.realize.connect ((this_button) => {
+ this_button.grab_focus ();
});
button.show ();
}
@@ -89,18 +100,13 @@
clear_button.set_child (label);
label.show ();
- clear_button.clicked.connect (() => {
- number_picked (0);
+ clear_button.clicked.connect ((this_button) => {
+ value_picked (0);
earmark_state_changed (0, false);
- if (for_earmarks)
- {
- for (var i = 0; i <= 8; i++)
- {
- var button = get_button_for (i);
- button.set_active (false);
- }
- }
+ if (is_earmark_picker)
+ for (var i = 0; i < 9; i++)
+ earmark_buttons[i].set_active (false);
});
this.valign = Align.CENTER;
@@ -130,22 +136,25 @@
clear_button.sensitive = false;
}
- public void set_earmarks (int row, int col)
+ public void set_earmark_buttons (int row, int col)
requires (is_earmark_picker)
{
- for (var i = 0; i < board.max_val; i++)
- set_earmark (row, col, i, board.is_earmark_enabled (row, col, i + 1));
+ for (var i = 1; i <= board.max_val; i++)
+ set_earmark_button (i, board.is_earmark_enabled (row, col, i));
}
- public void set_earmark (int row, int col, int index, bool state)
+ public void set_earmark_button (int num, bool state)
requires (is_earmark_picker)
{
- get_button_for (index).set_active (state);
+ earmark_buttons[num - 1].set_active (state);
}
- private ToggleButton get_button_for (int number)
+ public override void dispose ()
{
- return (ToggleButton) this.get_child_at (number % board.block_cols,
- (board.block_rows - 1) - (number / board.block_rows));
+ clear_button.unparent ();
+ foreach (var button in earmark_buttons)
+ button.unparent ();
+ foreach (var button in value_buttons)
+ button.unparent ();
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/src/sudoku-cell.vala new/gnome-sudoku-46.2/src/sudoku-cell.vala
--- old/gnome-sudoku-46.1/src/sudoku-cell.vala 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/src/sudoku-cell.vala 2024-06-09 18:03:36.000000000 +0200
@@ -29,31 +29,98 @@
private int col;
private SudokuGame game;
public signal void will_open_popover ();
+ private unowned SudokuView view;
- /* Gesture Controllers */
private GestureClick button_controller = new GestureClick ();
private GestureLongPress long_press_controller = new GestureLongPress ();
- private EventControllerKey key_controller = new EventControllerKey ();
- private Popover _popover = null;
- public Popover popover
- {
- get {
- if (_popover == null)
- {
- _popover = new Popover ();
- _popover.autohide = false;
- }
- return _popover;
- }
- }
+ //Only initialized when the cell is not fixed
+ private bool control_key_pressed;
+ private Popover popover;
+ private EventControllerKey key_controller;
+ private NumberPicker earmark_picker;
+ private NumberPicker value_picker;
// The label can also be set to X if the label is invalid.
// If this happens, the value **must not** be changed, only the label.
private Label value_label = new Label ("") {
visible = false
};
- private Label[] earmark_labels = new Label[8];
+ private Label[] earmark_labels = new Label[9];
+
+ public SudokuCell (int row, int col, SudokuGame game, SudokuView view)
+ {
+ this.set_accessible_role (AccessibleRole.BUTTON);
+
+ this.row = row;
+ this.col = col;
+ this.game = game;
+ this.view = view;
+
+ if (value != 0)
+ {
+ value_label.set_label (this.value.to_string ());
+ value_label.set_visible (true);
+ }
+
+ focusable = true;
+ can_focus = true;
+
+ this.set_fixed_css (true);
+
+ this.notify["has-focus"].connect (focus_changed_cb);
+ this.button_controller.set_button (0 /* all buttons */);
+
+ this.add_controller (this.button_controller);
+ this.add_controller (this.long_press_controller);
+
+ this.long_press_controller.pressed.connect (long_press_cb);
+ this.button_controller.released.connect (button_released_cb);
+
+ value_label.set_parent (this);
+
+ int num = 0;
+ for (int row_tmp = 0; row_tmp < game.board.block_rows; row_tmp++)
+ {
+ for (int col_tmp = 0; col_tmp < game.board.block_cols; col_tmp++)
+ {
+ num++;
+
+ earmark_labels[num - 1] = new Label (num.to_string ()) {
+ visible = false
+ };
+ earmark_labels[num - 1].set_parent (this);
+ earmark_labels[num - 1].add_css_class ("earmark");
+ }
+ }
+
+ if (!is_fixed)
+ {
+ key_controller = new EventControllerKey ();
+ add_controller (this.key_controller);
+ key_controller.key_pressed.connect (key_pressed_cb);
+ key_controller.key_released.connect (key_released_cb);
+
+ popover = new Popover ();
+ popover.set_autohide (false);
+ popover.set_parent (this);
+ var popover_controller = new EventControllerKey ();
+ popover_controller.key_pressed.connect (key_pressed_cb);
+ popover_controller.key_released.connect (key_released_cb);
+ (popover as Widget)?.add_controller (popover_controller);
+
+ value_picker = new NumberPicker (game, false);
+ value_picker.value_picked.connect (value_picked_cb);
+
+ earmark_picker = new NumberPicker (game, true);
+ earmark_picker.earmark_state_changed.connect (earmark_picked_cb);
+ }
+ }
+
+ static construct
+ {
+ set_css_name ("sudokucell");
+ }
public int value
{
@@ -165,74 +232,6 @@
earmark.remove_css_class ("highlight-label");
}
- private bool control_key_pressed;
-
- public SudokuCell (int row, int col, ref SudokuGame game)
- {
- this.set_accessible_role (AccessibleRole.BUTTON);
-
- this.row = row;
- this.col = col;
- this.game = game;
-
- if (value != 0)
- {
- value_label.set_label (this.value.to_string ());
- value_label.set_visible (true);
- }
-
- focusable = true;
- can_focus = true;
-
- this.set_fixed_css (true);
-
- this.button_controller.set_button (0 /* all buttons */);
-
- this.add_controller (this.button_controller);
- this.add_controller (this.long_press_controller);
- this.add_controller (this.key_controller);
-
- this.long_press_controller.pressed.connect (long_press_cb);
- this.button_controller.released.connect (button_released_cb);
- this.key_controller.key_pressed.connect (key_pressed_cb);
- this.key_controller.key_released.connect (key_released_cb);
-
- value_label.set_parent (this);
-
- int num = 0;
- for (int row_tmp = 0; row_tmp < game.board.block_rows; row_tmp++)
- {
- for (int col_tmp = 0; col_tmp < game.board.block_cols; col_tmp++)
- {
- num++;
-
- earmark_labels[num - 1] = new Label (num.to_string ()) {
- visible = false
- };
- earmark_labels[num - 1].set_parent (this);
- earmark_labels[num - 1].add_css_class ("earmark");
- }
- }
-
- popover.set_parent (this);
- var popover_controller = new EventControllerKey ();
- popover_controller.key_pressed.connect (key_pressed_cb);
- popover_controller.key_released.connect (key_released_cb);
- (popover as Widget)?.add_controller (popover_controller);
- popover.closed.connect (() => {
- if (popover.visible)
- {
- popover.set_child (null);
- this.grab_focus ();
- }
- });
-
- }
-
- static construct {
- set_css_name ("sudokucell");
- }
-
public void update_value ()
{
if (value != 0)
@@ -267,7 +266,7 @@
uint keycode,
ModifierType state)
{
- if (is_fixed || game.paused)
+ if (game.paused)
return;
if (keyval == Key.Control_L || keyval == Key.Control_R)
@@ -287,7 +286,7 @@
if (number_picker != null && number_picker.is_earmark_picker)
{
- number_picker.set_earmark (row, col, key - 1, new_state);
+ number_picker.set_earmark_button (key, new_state);
}
else
{
@@ -319,7 +318,7 @@
keyval == Gdk.Key.Return ||
keyval == Gdk.Key.KP_Enter)
{
- show_number_picker ();
+ show_value_picker ();
return;
}
@@ -357,7 +356,7 @@
show_earmark_picker ();
}
else
- show_number_picker ();
+ show_value_picker ();
}
else if (gesture.get_current_button () == BUTTON_SECONDARY &&
game.mode == GameMode.PLAY &&
@@ -379,11 +378,51 @@
return;
if (game.mode == GameMode.CREATE)
- show_number_picker ();
+ show_value_picker ();
else if (this.value == 0)
show_earmark_picker ();
}
+ void focus_changed_cb ()
+ {
+ if (game.paused)
+ return;
+
+ if (this.has_focus)
+ view.set_selected (row, col);
+ }
+
+ private void value_picked_cb (int val)
+ {
+ if (val > 0)
+ popover.popdown ();
+ else
+ {
+ this.game.board.disable_all_earmarks (row, col);
+ value_picker.set_clear_button_visibility (false);
+ }
+ this.value = val;
+ }
+
+ private void earmark_picked_cb (int num, bool state)
+ {
+ if (state)
+ {
+ if (!this.game.board.is_earmark_enabled (row, col, num))
+ this.game.enable_earmark (row, col, num);
+ }
+ else
+ {
+ if (num == 0)
+ this.game.disable_all_earmarks (row, col);
+
+ else if (this.game.board.is_earmark_enabled (row, col, num))
+ this.game.disable_earmark (row, col, num);
+ }
+
+ earmark_picker.set_clear_button_enabled (this.game.board.has_earmarks (row, col));
+ }
+
private int get_key_number (uint keyval)
{
switch (keyval)
@@ -458,68 +497,39 @@
private void show_earmark_picker ()
requires (this.value == 0)
{
- if (this.popover.visible)
+ if (popover.visible)
{
+ bool is_earmark_picker = ((NumberPicker)popover.child).is_earmark_picker;
dismiss_popover ();
- if (((NumberPicker)popover.child).is_earmark_picker)
+ if (is_earmark_picker)
return;
}
will_open_popover ();
- var earmark_picker = new NumberPicker (game, true);
earmark_picker.set_clear_button_visibility (true);
- if (!this.game.board.has_earmarks (row, col))
+ earmark_picker.set_earmark_buttons (row, col);
+ if (!game.board.has_earmarks (row, col))
earmark_picker.set_clear_button_enabled (false);
- earmark_picker.earmark_state_changed.connect ((number, state) => {
- if (state)
- {
- if (!this.game.board.is_earmark_enabled (row, col, number))
- this.game.enable_earmark (row, col, number);
- }
- else
- {
- if (number == 0)
- this.game.disable_all_earmarks (row, col);
-
- else if (this.game.board.is_earmark_enabled (row, col, number))
- this.game.disable_earmark (row, col, number);
- }
-
- earmark_picker.set_clear_button_enabled (this.game.board.has_earmarks (row, col));
- });
- earmark_picker.set_earmarks (row, col);
popover.set_child (earmark_picker);
-
popover.popup ();
}
- private void show_number_picker ()
+ private void show_value_picker ()
{
- if (this.popover.visible)
+ if (popover.visible)
{
+ bool is_earmark_picker = ((NumberPicker)popover.child).is_earmark_picker;
dismiss_popover ();
- if (!((NumberPicker)popover.child).is_earmark_picker)
+ if (!is_earmark_picker)
return;
}
will_open_popover ();
+ value_picker.set_clear_button_visibility (value > 0 || game.board.has_earmarks (row, col));
- var number_picker = new NumberPicker (game);
- number_picker.number_picked.connect ((o, number) => {
- if (number > 0)
- popover.popdown ();
- else
- {
- this.game.board.disable_all_earmarks (row, col);
- number_picker.set_clear_button_visibility (false);
- }
- value = number;
- });
- number_picker.set_clear_button_visibility (value > 0 || game.board.has_earmarks (row, col));
- popover.set_child (number_picker);
-
+ popover.set_child (value_picker);
popover.popup ();
}
@@ -581,23 +591,16 @@
earmark_labels[num-1].remove_css_class ("error");
}
- public override void dispose ()
- {
- base.dispose ();
-
- this.value_label.unparent ();
- }
-
public override void size_allocate (int width,
int height,
int baseline)
{
- this.popover.present ();
+ this.popover?.present ();
int value_width, value_height;
value_width = value_height = int.min (width, height);
- set_font_size (ref value_label, height / size_ratio);
+ set_font_size (value_label, height / size_ratio);
Gsk.Transform center = new Gsk.Transform ().translate (Graphene.Point ().init (
(width - value_width) / 2,
@@ -616,7 +619,7 @@
{
num++;
- set_font_size (ref earmark_labels[num - 1], height / size_ratio / 2);
+ set_font_size (earmark_labels[num - 1], height / size_ratio / 2);
Gsk.Transform earmark_position = new Gsk.Transform ().translate (Graphene.Point ().init (
col_tmp * earmark_width,
@@ -628,7 +631,7 @@
}
}
- private void set_font_size (ref Label label, int font_size)
+ private void set_font_size (Label label, int font_size)
{
var attr_list = label.get_attributes ();
if (attr_list == null)
@@ -643,8 +646,19 @@
public void dismiss_popover ()
{
- if (_popover != null)
- _popover.popdown ();
+ if (popover != null)
+ {
+ popover.popdown ();
+ popover.child = null;
+ }
}
-}
+ public override void dispose ()
+ {
+ this.value_label.unparent ();
+ foreach (Label earmark in earmark_labels)
+ earmark.unparent ();
+ popover?.unparent ();
+ base.dispose ();
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/src/sudoku-view.vala new/gnome-sudoku-46.2/src/sudoku-view.vala
--- old/gnome-sudoku-46.1/src/sudoku-view.vala 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/src/sudoku-view.vala 2024-06-09 18:03:36.000000000 +0200
@@ -25,24 +25,17 @@
public class SudokuView : Adw.Bin
{
- private SudokuGame _game;
- public SudokuGame game
- {
- get { return _game; }
- private set { _game = value; }
- }
-
+ private SudokuGame game;
private SudokuCell[,] cells;
- private Label paused;
-
- private Overlay overlay;
- private Grid grid;
+ SudokuFrame frame;
+ Label paused_label;
public int selected_row { get; private set; default = 0; }
public int selected_col { get; private set; default = 0; }
+
public signal void selection_changed (int old_row, int old_col, int new_row, int new_col);
- private void set_selected (int cell_row, int cell_col)
+ public void set_selected (int cell_row, int cell_col)
{
if (selected_row == cell_row && selected_col == cell_col)
return;
@@ -64,8 +57,9 @@
public SudokuView (SudokuGame game, GLib.Settings settings)
{
- this.vexpand = true;
+ this.game = game;
+ this.vexpand = true;
this.focusable = true;
this.can_focus = true;
@@ -77,20 +71,18 @@
this._show_extra_warnings = settings.get_boolean ("show-extra-warnings");
this._highlighter = settings.get_boolean ("highlighter");
- overlay = new Overlay ();
- var frame = new SudokuFrame (overlay);
+ var overlay = new Overlay ();
+ frame = new SudokuFrame (overlay);
this.set_child (frame);
- this.paused = new Gtk.Label ("Paused");
- this.paused.add_css_class ("paused");
-
- if (grid != null)
- overlay.set_child (null);
+ paused_label = new Label ("Paused");
+ paused_label.add_css_class ("paused");
+ paused_label.set_visible (false);
+ overlay.add_overlay (paused_label);
- this.game = game;
this.game.paused_changed.connect(() => {
// Set Font Size
- var attr_list = this.paused.get_attributes ();
+ var attr_list = paused_label.get_attributes ();
if (attr_list == null)
attr_list = new Pango.AttrList ();
@@ -98,8 +90,8 @@
Pango.AttrSize.new_absolute ((int) (this.get_width () * 0.125) * Pango.SCALE)
);
- this.paused.set_attributes (attr_list);
- paused.set_visible (this.game.paused);
+ paused_label.set_attributes (attr_list);
+ paused_label.set_visible (this.game.paused);
if (this.game.paused)
{
@@ -115,7 +107,7 @@
has_selection = !this.game.paused;
});
- grid = new Grid () {
+ var grid = new Grid () {
row_spacing = 2,
column_spacing = 2,
column_homogeneous = true,
@@ -124,6 +116,7 @@
hexpand = true
};
grid.add_css_class ("board");
+ overlay.set_child (grid);
var blocks = new Grid[game.board.block_rows, game.board.block_cols];
for (var block_row = 0; block_row < game.board.block_rows; block_row++)
@@ -147,26 +140,11 @@
{
for (var col = 0; col < game.board.cols; col++)
{
- var cell = new SudokuCell (row, col, ref _game);
- var cell_row = row;
- var cell_col = col;
-
- cell.notify["has-focus"].connect (() => {
- if (game.paused)
- return;
-
- if (cell.has_focus)
- this.set_selected (cell_row, cell_col);
- });
-
- cell.will_open_popover.connect (() => {
- dismiss_popovers ();
- });
-
- cells[row, col] = cell;
- cells[row, col].initialize_earmarks (show_possibilities);
+ var cell = new SudokuCell (row, col, game, this);
+ cell.initialize_earmarks (show_possibilities);
blocks[row / game.board.block_rows, col / game.board.block_cols].attach (cell, col % game.board.block_cols, row % game.board.block_rows);
+ cells[row, col] = cell;
}
}
@@ -175,11 +153,6 @@
this.selection_changed.connect (selection_changed_cb);
update_warnings ();
- overlay.add_overlay (paused);
- overlay.set_child (grid);
- grid.show ();
- overlay.show ();
- paused.set_visible (false);
}
static construct {
@@ -457,5 +430,11 @@
for (var j = 0; j < game.board.cols; j++)
cells[i,j].dismiss_popover ();
}
+
+ public override void dispose ()
+ {
+ frame.unparent ();
+ base.dispose ();
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-sudoku-46.1/src/sudoku-window.vala new/gnome-sudoku-46.2/src/sudoku-window.vala
--- old/gnome-sudoku-46.1/src/sudoku-window.vala 2024-05-06 06:29:03.000000000 +0200
+++ new/gnome-sudoku-46.2/src/sudoku-window.vala 2024-06-09 18:03:36.000000000 +0200
@@ -58,11 +58,9 @@
private bool clock_in_headerbar;
private GLib.Settings settings;
-
- public SudokuView? view { get; private set; }
-
private SudokuGame? game = null;
+ public SudokuView? view { get; private set; default = null;}
private const int board_size = 140;
private const int clock_in_headerbar_min_width = 450;
@@ -183,8 +181,6 @@
public void start_game (SudokuGame game)
{
- if (this.game != null)
- this.game.tick.disconnect (tick_cb);
this.game = game;
game.tick.connect (tick_cb);
game.start_clock ();
++++++ gnome-sudoku.obsinfo ++++++
--- /var/tmp/diff_new_pack.erBo06/_old 2024-06-10 17:38:30.368890438 +0200
+++ /var/tmp/diff_new_pack.erBo06/_new 2024-06-10 17:38:30.372890586 +0200
@@ -1,5 +1,5 @@
name: gnome-sudoku
-version: 46.1
-mtime: 1714969743
-commit: eacfbb5e59bb5e3e99e0c442792bf38b0b4809ad
+version: 46.2
+mtime: 1717949016
+commit: f70b12b0f381faeaad4310dd1c7999047ca37631
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package afl for openSUSE:Factory checked in at 2024-06-10 17:38:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/afl (Old)
and /work/SRC/openSUSE:Factory/.afl.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "afl"
Mon Jun 10 17:38:07 2024 rev:83 rq:1179646 version:4.21c
Changes:
--------
--- /work/SRC/openSUSE:Factory/afl/afl.changes 2024-04-15 20:24:46.258565360 +0200
+++ /work/SRC/openSUSE:Factory/.afl.new.19518/afl.changes 2024-06-10 17:38:25.952727073 +0200
@@ -1,0 +2,42 @@
+Mon Jun 10 08:12:20 UTC 2024 - Marcus Meissner <meissner(a)suse.com>
+
+- updated to 4.21c
+ * afl-fuzz
+ - fixed a regression in afl-fuzz that resulted in a 5-10% performace loss
+ do a switch from gettimeofday() to clock_gettime() which should be rather
+ three times faster. The reason for this is unknown.
+ - new queue selection algorithm based on 2 core years of queue data
+ analysis. gives a noticable improvement on coverage although the results
+ seem counterintuitive :-)
+ - added AFL_DISABLE_REDUNDANT for huge queues
+ - added `AFL_NO_SYNC` environment variable that does what you think it does
+ - fix AFL_PERSISTENT_RECORD
+ - run custom_post_process after standard trimming
+ - prevent filenames in the queue that have spaces
+ - minor fix for FAST schedules
+ - more frequent stats update when syncing (todo: check performance impact)
+ - now timing of calibration, trimming and syncing is measured seperately,
+ thanks to @eqv!
+ - -V timing is now accurately the fuzz time (without syncing), before
+ long calibration times and syncing could result in now fuzzing being
+ made when the time was already run out until then, thanks to @eqv!
+ - fix -n uninstrumented mode when ending fuzzing
+ - enhanced the ASAN configuration
+ - make afl-fuzz use less memory with cmplog and fix a memleak
+ * afl-cc:
+ - re-enable i386 support that was accidently disabled
+ - fixes for LTO and outdated afl-gcc mode for i386
+ - fix COMPCOV split compare for old LLVMs
+ - disable xml/curl/g_ string transform functions because we do not check
+ for null pointers ... TODO
+ - ensure shared memory variables are visible in weird build setups
+ - compatability to new LLVM 19 changes
+ * afl-cmin
+ - work with input files that have a space
+ * afl-showmap
+ - fix memory leak on shmem testcase usage (thanks to @ndrewh)
+ - minor fix to collect coverage -C (thanks to @bet4it)
+ * Fixed a shmem mmap bug (that rarely came up on MacOS)
+ * libtokencap: script generate_libtoken_dict.sh added by @a-shvedov
+
+-------------------------------------------------------------------
Old:
----
v4.20c.tar.gz
New:
----
v4.21c.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ afl.spec ++++++
--- /var/tmp/diff_new_pack.UMAa2C/_old 2024-06-10 17:38:26.620751785 +0200
+++ /var/tmp/diff_new_pack.UMAa2C/_new 2024-06-10 17:38:26.620751785 +0200
@@ -27,7 +27,7 @@
%endif
Name: afl
-Version: 4.20c
+Version: 4.21c
Release: 0
Summary: American fuzzy lop is a security-oriented fuzzer
#URL: https://lcamtuf.coredump.cx/afl/
++++++ v4.20c.tar.gz -> v4.21c.tar.gz ++++++
++++ 3885 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-SoundCard for openSUSE:Factory checked in at 2024-06-10 17:38:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-SoundCard (Old)
and /work/SRC/openSUSE:Factory/.python-SoundCard.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-SoundCard"
Mon Jun 10 17:38:06 2024 rev:10 rq:1179658 version:0.4.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-SoundCard/python-SoundCard.changes 2022-08-30 14:49:32.320129406 +0200
+++ /work/SRC/openSUSE:Factory/.python-SoundCard.new.19518/python-SoundCard.changes 2024-06-10 17:38:24.944689784 +0200
@@ -1,0 +2,7 @@
+Mon Jun 10 08:57:14 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 0.4.3:
+ * improves response to Pulseaudio runtime failures
+ * implements named channel map elements on Linux
+
+-------------------------------------------------------------------
Old:
----
SoundCard-0.4.2.tar.gz
New:
----
SoundCard-0.4.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-SoundCard.spec ++++++
--- /var/tmp/diff_new_pack.cGt8Yd/_old 2024-06-10 17:38:25.488709908 +0200
+++ /var/tmp/diff_new_pack.cGt8Yd/_new 2024-06-10 17:38:25.492710056 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-SoundCard
#
-# 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
@@ -22,7 +22,7 @@
%define skip_python36 1
%endif
Name: python-SoundCard
-Version: 0.4.2
+Version: 0.4.3
Release: 0
Summary: Python package to play and record audio
License: BSD-3-Clause
++++++ SoundCard-0.4.2.tar.gz -> SoundCard-0.4.3.tar.gz ++++++
++++ 2230 lines of diff (skipped)
1
0