openSUSE Commits
Threads by month
- ----- 2024 -----
- 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
December 2020
- 1 participants
- 2154 discussions
21 Dec '20
Hello community,
here is the log from the commit of package inotify-tools for openSUSE:Factory checked in at 2020-12-21 10:24:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/inotify-tools (Old)
and /work/SRC/openSUSE:Factory/.inotify-tools.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "inotify-tools"
Mon Dec 21 10:24:25 2020 rev:6 rq:857150 version:3.20.11.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/inotify-tools/inotify-tools.changes 2020-08-18 15:10:41.072031563 +0200
+++ /work/SRC/openSUSE:Factory/.inotify-tools.new.5145/inotify-tools.changes 2020-12-21 10:27:02.388226295 +0100
@@ -1,0 +2,7 @@
+Sun Dec 20 12:56:31 UTC 2020 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 3.20.11.0:
+ * Added --no-dereference to watch a symlink
+ * bugfixes
+
+-------------------------------------------------------------------
Old:
----
3.20.2.2.tar.gz
New:
----
3.20.11.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ inotify-tools.spec ++++++
--- /var/tmp/diff_new_pack.IczsHq/_old 2020-12-21 10:27:02.964226948 +0100
+++ /var/tmp/diff_new_pack.IczsHq/_new 2020-12-21 10:27:02.964226948 +0100
@@ -17,20 +17,19 @@
Name: inotify-tools
-Version: 3.20.2.2
+Version: 3.20.11.0
Release: 0
Summary: Tools for inotify
License: GPL-2.0-only
Group: System/Monitoring
-URL: https://github.com/rvoicilas/inotify-tools/wiki/
-Source: http://github.com/rvoicilas/inotify-tools/archive/%{version}.tar.gz
+URL: https://github.com/inotify-tools/inotify-tools
+Source: https://github.com/inotify-tools/inotify-tools/archive/%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: glibc-devel
BuildRequires: libtool
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
inotify is a kernel facility to watch file system changes. This
@@ -73,39 +72,34 @@
%configure --disable-static \
--docdir=%{_docdir}/%{name} \
--enable-doxygen
-make %{?_smp_mflags}
+%make_build
%install
-make DESTDIR=%{buildroot} install %{?_smp_mflags}
+%make_install
%fdupes %{buildroot}/%{_docdir}
rm %{buildroot}/%{_libdir}/libinotifytools.la
%post -n libinotifytools0 -p /sbin/ldconfig
-
%postun -n libinotifytools0 -p /sbin/ldconfig
%check
-make %{?_smp_mflags} check
+%make_build check
%files
-%defattr(-,root,root)
%{_bindir}/inotifywait
%{_bindir}/inotifywatch
-%{_mandir}/man1/inotifywait.1.gz
-%{_mandir}/man1/inotifywatch.1.gz
+%{_mandir}/man1/inotifywait.1%{?ext_man}
+%{_mandir}/man1/inotifywatch.1%{?ext_man}
%files -n libinotifytools0
-%defattr(-,root,root)
%license COPYING
%{_libdir}/libinotifytools.so.*
%files devel
-%defattr(-,root,root)
%{_libdir}/libinotifytools.so
%{_includedir}/inotifytools/
%files doc
-%defattr(-,root,root)
%doc %{_docdir}/%{name}
%changelog
++++++ 3.20.2.2.tar.gz -> 3.20.11.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/.cirrus.yml new/inotify-tools-3.20.11.0/.cirrus.yml
--- old/inotify-tools-3.20.2.2/.cirrus.yml 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/.cirrus.yml 2020-11-13 11:52:25.000000000 +0100
@@ -2,8 +2,7 @@
name: FreeBSD
freebsd_instance:
matrix:
- # There isn't a stable 13.0 image yet (2019-12)
- image_family: freebsd-13-0-snap
+ image_family: freebsd-11-3-snap
image_family: freebsd-12-1
pkginstall_script:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/.github/FUNDING.yml new/inotify-tools-3.20.11.0/.github/FUNDING.yml
--- old/inotify-tools-3.20.2.2/.github/FUNDING.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/inotify-tools-3.20.11.0/.github/FUNDING.yml 2020-11-13 11:52:25.000000000 +0100
@@ -0,0 +1 @@
+open_collective: inotify-tools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/.github/ISSUE_TEMPLATE/bug_report.md new/inotify-tools-3.20.11.0/.github/ISSUE_TEMPLATE/bug_report.md
--- old/inotify-tools-3.20.2.2/.github/ISSUE_TEMPLATE/bug_report.md 1970-01-01 01:00:00.000000000 +0100
+++ new/inotify-tools-3.20.11.0/.github/ISSUE_TEMPLATE/bug_report.md 2020-11-13 11:52:25.000000000 +0100
@@ -0,0 +1,38 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Desktop (please complete the following information):**
+ - OS: [e.g. iOS]
+ - Browser [e.g. chrome, safari]
+ - Version [e.g. 22]
+
+**Smartphone (please complete the following information):**
+ - Device: [e.g. iPhone6]
+ - OS: [e.g. iOS8.1]
+ - Browser [e.g. stock browser, safari]
+ - Version [e.g. 22]
+
+**Additional context**
+Add any other context about the problem here.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/.github/ISSUE_TEMPLATE/feature_request.md new/inotify-tools-3.20.11.0/.github/ISSUE_TEMPLATE/feature_request.md
--- old/inotify-tools-3.20.2.2/.github/ISSUE_TEMPLATE/feature_request.md 1970-01-01 01:00:00.000000000 +0100
+++ new/inotify-tools-3.20.11.0/.github/ISSUE_TEMPLATE/feature_request.md 2020-11-13 11:52:25.000000000 +0100
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/.travis.yml new/inotify-tools-3.20.11.0/.travis.yml
--- old/inotify-tools-3.20.2.2/.travis.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/inotify-tools-3.20.11.0/.travis.yml 2020-11-13 11:52:25.000000000 +0100
@@ -0,0 +1,11 @@
+language: c
+sudo: required
+matrix:
+ include:
+ - os: linux
+ arch: arm64
+ compiler: gcc
+ dist: xenial
+script:
+ - ./build_and_test.sh
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/CODE_OF_CONDUCT.md new/inotify-tools-3.20.11.0/CODE_OF_CONDUCT.md
--- old/inotify-tools-3.20.2.2/CODE_OF_CONDUCT.md 1970-01-01 01:00:00.000000000 +0100
+++ new/inotify-tools-3.20.11.0/CODE_OF_CONDUCT.md 2020-11-13 11:52:25.000000000 +0100
@@ -0,0 +1,76 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, sex characteristics, gender identity and expression,
+level of experience, education, socio-economic status, nationality, personal
+appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at ericcurtin17(a)gmail.com. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see
+https://www.contributor-covenant.org/faq
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/Makefile.am new/inotify-tools-3.20.11.0/Makefile.am
--- old/inotify-tools-3.20.2.2/Makefile.am 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/Makefile.am 2020-11-13 11:52:25.000000000 +0100
@@ -2,6 +2,8 @@
SUBDIRS = libinotifytools src man
+README: README.md
+
dist-hook:
# Automake official documentation states that dist-hook should assume files
# are not writable.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/README.md new/inotify-tools-3.20.11.0/README.md
--- old/inotify-tools-3.20.2.2/README.md 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/README.md 2020-11-13 11:52:25.000000000 +0100
@@ -1,4 +1,7 @@
-![](https://github.com/inotify-tools/inotify-tools/workflows/build/badge.svg)
+[![GitHub Build Status](https://github.com/inotify-tools/inotify-tools/workflows/build/badg…
+[![Travis Build Status](https://travis-ci.org/inotify-tools/inotify-tools.svg?branch=master…
+[![Cirrus Build Status](https://api.cirrus-ci.com/github/inotify-tools/inotify-tools.svg?br…
+[![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/inotify-tools/inotify-tools.…
inotify-tools
=============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/autogen.sh new/inotify-tools-3.20.11.0/autogen.sh
--- old/inotify-tools-3.20.2.2/autogen.sh 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/autogen.sh 2020-11-13 11:52:25.000000000 +0100
@@ -1,4 +1,3 @@
#!/bin/sh
-cp README.md README
autoreconf --install "$@" || exit 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/build_and_test.sh new/inotify-tools-3.20.11.0/build_and_test.sh
--- old/inotify-tools-3.20.2.2/build_and_test.sh 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/build_and_test.sh 2020-11-13 11:52:25.000000000 +0100
@@ -2,20 +2,27 @@
set -e
-j=3
+j=10
printf "gcc build\n"
-git clean -fdx 2>&1
+if [ "$1" == "clean" ]; then
+ git clean -fdx 2>&1
+fi
+
export CC=gcc
./autogen.sh
./configure
make -j$j
-printf "\nunit test\n"
-cd libinotifytools/src/
-make -j$j test
-./test
-cd -
+os=$(uname -o)
+
+if [ "$os" != "FreeBSD" ]; then
+ printf "\nunit test\n"
+ cd libinotifytools/src/
+ make -j$j test
+ ./test
+ cd -
+fi
printf "\nintegration test\n"
cd t
@@ -23,17 +30,22 @@
cd -
printf "\nclang build\n"
-git clean -fdx 2>&1
+if [ "$1" == "clean" ]; then
+ git clean -fdx 2>&1
+fi
+
export CC=clang
./autogen.sh
./configure
make -j$j
-printf "\nunit test\n"
-cd libinotifytools/src/
-make -j$j test
-./test
-cd -
+if [ "$os" != "FreeBSD" ]; then
+ printf "\nunit test\n"
+ cd libinotifytools/src/
+ make -j$j test
+ ./test
+ cd -
+fi
printf "\nintegration test\n"
cd t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/configure.ac new/inotify-tools-3.20.11.0/configure.ac
--- old/inotify-tools-3.20.2.2/configure.ac 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/configure.ac 2020-11-13 11:52:25.000000000 +0100
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([inotify-tools], [3.20.2.2])
+AC_INIT([inotify-tools], [3.20.11.0])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_SRCDIR([src/inotifywait.c])
AC_CONFIG_HEADERS([config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/libinotifytools/src/Makefile.am new/inotify-tools-3.20.11.0/libinotifytools/src/Makefile.am
--- old/inotify-tools-3.20.2.2/libinotifytools/src/Makefile.am 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/libinotifytools/src/Makefile.am 2020-11-13 11:52:25.000000000 +0100
@@ -14,7 +14,7 @@
nobase_include_HEADERS = inotifytools/inotifytools.h inotifytools/inotify-nosys.h inotifytools/inotify.h
-AM_CFLAGS = -std=c99 -Wall -Werror
+AM_CFLAGS = -std=c99 -Wall -Wshadow -Werror
if DOXYGEN_ENABLE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/libinotifytools/src/inotifytools/inotifytools.h new/inotify-tools-3.20.11.0/libinotifytools/src/inotifytools/inotifytools.h
--- old/inotify-tools-3.20.2.2/libinotifytools/src/inotifytools/inotifytools.h 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/libinotifytools/src/inotifytools/inotifytools.h 2020-11-13 11:52:25.000000000 +0100
@@ -13,6 +13,20 @@
#include <stdio.h>
+#define MAX_STRLEN 4096
+
+/** @struct nstring
+ * @brief This structure holds string that can contain any charater including NULL.
+ * @var nstring::buf
+ * Member 'buf' contains character buffer. It can hold up to 4096 characters.
+ * @var nstring::len
+ * Member 'len' contains number of characters in buffer.
+ */
+struct nstring {
+ char buf[MAX_STRLEN];
+ unsigned int len;
+};
+
int inotifytools_str_to_event(char const * event);
int inotifytools_str_to_event_sep(char const * event, char sep);
char * inotifytools_event_to_str(int events);
@@ -49,8 +63,8 @@
int inotifytools_printf( struct inotify_event* event, char* fmt );
int inotifytools_fprintf( FILE* file, struct inotify_event* event, char* fmt );
-int inotifytools_sprintf( char * out, struct inotify_event* event, char* fmt );
-int inotifytools_snprintf( char * out, int size, struct inotify_event* event,
+int inotifytools_sprintf( struct nstring * out, struct inotify_event* event, char* fmt );
+int inotifytools_snprintf( struct nstring * out, int size, struct inotify_event* event,
char* fmt );
void inotifytools_set_printf_timefmt( char * fmt );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/libinotifytools/src/inotifytools.c new/inotify-tools-3.20.11.0/libinotifytools/src/inotifytools.c
--- old/inotify-tools-3.20.2.2/libinotifytools/src/inotifytools.c 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/libinotifytools/src/inotifytools.c 2020-11-13 11:52:25.000000000 +0100
@@ -121,7 +121,6 @@
*/
#define MAX_EVENTS 4096
-#define MAX_STRLEN 4096
#define INOTIFY_PROCDIR "/proc/sys/fs/inotify/"
#define WATCHES_SIZE_PATH INOTIFY_PROCDIR "max_user_watches"
#define QUEUE_SIZE_PATH INOTIFY_PROCDIR "max_queued_watches"
@@ -1119,12 +1118,15 @@
static int first_byte = 0;
static ssize_t bytes;
static jmp_buf jmp;
- static char match_name[MAX_STRLEN];
+ static struct nstring match_name;
+ static char match_name_string[MAX_STRLEN+1];
#define RETURN(A) {\
if (regex) {\
- inotifytools_snprintf(match_name, MAX_STRLEN, A, "%w%f");\
- if (0 == regexec(regex, match_name, 0, 0, 0)) {\
+ inotifytools_snprintf(&match_name, MAX_STRLEN, A, "%w%f");\
+ memcpy(&match_name_string, &match_name.buf, match_name.len);\
+ match_name_string[match_name.len] = '\0';\
+ if (0 == regexec(regex, match_name_string, 0, 0, 0)) {\
if (!invert_regexp)\
longjmp(jmp,0);\
} else {\
@@ -1655,6 +1657,8 @@
* The following tokens will be replaced with the specified string:
* \li \c \%w - This will be replaced with the name of the Watched file on
* which an event occurred.
+ * \li \c \%c - This will be replaced with the cookie of the Watched file on
+ * which an event occurred.
* \li \c \%f - When an event occurs within a directory, this will be replaced
* with the name of the File which caused the event to occur.
* Otherwise, this will be replaced with an empty string.
@@ -1665,6 +1669,8 @@
* string previously passed to inotifytools_set_printf_timefmt(),
* or replaced with an empty string if that function has never
* been called.
+ * \li \c \%0 - Replaced with the 'NUL' character
+ * \li \c \%n - Replaced with the 'Line Feed' character
*
* @section example Example
* @code
@@ -1700,6 +1706,8 @@
* The following tokens will be replaced with the specified string:
* \li \c \%w - This will be replaced with the name of the Watched file on
* which an event occurred.
+ * \li \c \%c - This will be replaced with the cookie of the Watched file on
+ * which an event occurred.
* \li \c \%f - When an event occurs within a directory, this will be replaced
* with the name of the File which caused the event to occur.
* Otherwise, this will be replaced with an empty string.
@@ -1710,6 +1718,8 @@
* string previously passed to inotifytools_set_printf_timefmt(),
* or replaced with an empty string if that function has never
* been called.
+ * \li \c \%0 - Replaced with the 'NUL' character
+ * \li \c \%n - Replaced with the 'Line Feed' character
*
* @section example Example
* @code
@@ -1726,10 +1736,10 @@
* @endcode
*/
int inotifytools_fprintf( FILE* file, struct inotify_event* event, char* fmt ) {
- static char out[MAX_STRLEN+1];
+ static struct nstring out;
static int ret;
- ret = inotifytools_sprintf( out, event, fmt );
- if ( -1 != ret ) fprintf( file, "%s", out );
+ ret = inotifytools_sprintf( &out, event, fmt );
+ if ( -1 != ret ) fwrite( out.buf, sizeof(char), out.len, file );
return ret;
}
@@ -1742,11 +1752,11 @@
* may crash.
* inotifytools_snprintf() is safer and you should use it where possible.
*
- * @param out location in which to store string.
+ * @param out location in which to store nstring.
*
- * @param event the event to use to construct a string.
+ * @param event the event to use to construct a nstring.
*
- * @param fmt the format string used to construct a string.
+ * @param fmt the format string used to construct a nstring.
*
* @return number of characters written, or -1 if an error occurs.
*
@@ -1754,6 +1764,8 @@
* The following tokens will be replaced with the specified string:
* \li \c \%w - This will be replaced with the name of the Watched file on
* which an event occurred.
+ * \li \c \%c - This will be replaced with the cookie of the Watched file on
+ * which an event occurred.
* \li \c \%f - When an event occurs within a directory, this will be replaced
* with the name of the File which caused the event to occur.
* Otherwise, this will be replaced with an empty string.
@@ -1764,6 +1776,8 @@
* string previously passed to inotifytools_set_printf_timefmt(),
* or replaced with an empty string if that function has never
* been called.
+ * \li \c \%0 - Replaced with the 'NUL' character
+ * \li \c \%n - Replaced with the 'Line Feed' character
*
* @section example Example
* @code
@@ -1773,17 +1787,15 @@
* // wait until an event occurs
* struct inotify_event * event = inotifytools_next_event( -1 );
*
- * char mystring[1024];
- * // hope this doesn't crash - if filename is really long, might not fit into
- * // mystring!
- * inotifytools_sprintf(mystring, event, "in %w, file %f had event(s): %.e\n");
- * printf( mystring );
+ * nstring mynstring;
+ * inotifytools_sprintf(mynstring, event, "in %w, file %f had event(s): %.e\n");
+ * fwrite( mynstring.buf, sizeof(char), mynstring.len, stdout );
* // suppose the file 'myfile' in mydir was written to and closed. Then,
* // this prints something like:
* // "in mydir/, file myfile had event(s): CLOSE_WRITE.CLOSE.ISDIR\n"
* @endcode
*/
-int inotifytools_sprintf( char * out, struct inotify_event* event, char* fmt ) {
+int inotifytools_sprintf( struct nstring * out, struct inotify_event* event, char* fmt ) {
return inotifytools_snprintf( out, MAX_STRLEN, event, fmt );
}
@@ -1792,13 +1804,13 @@
* Construct a string using an inotify_event and a printf-like syntax.
* The string can only ever be up to 4096 characters in length.
*
- * @param out location in which to store string.
+ * @param out location in which to store nstring.
*
* @param size maximum amount of characters to write.
*
- * @param event the event to use to construct a string.
+ * @param event the event to use to construct a nstring.
*
- * @param fmt the format string used to construct a string.
+ * @param fmt the format string used to construct a nstring.
*
* @return number of characters written, or -1 if an error occurs.
*
@@ -1806,6 +1818,8 @@
* The following tokens will be replaced with the specified string:
* \li \c \%w - This will be replaced with the name of the Watched file on
* which an event occurred.
+ * \li \c \%c - This will be replaced with cookie of the Watched file on
+ * which an event occurred.
* \li \c \%f - When an event occurs within a directory, this will be replaced
* with the name of the File which caused the event to occur.
* Otherwise, this will be replaced with an empty string.
@@ -1816,6 +1830,8 @@
* string previously passed to inotifytools_set_printf_timefmt(),
* or replaced with an empty string if that function has never
* been called.
+ * \li \c \%0 - Replaced with the 'NUL' character
+ * \li \c \%n - Replaced with the 'Line Feed' character
*
* @section example Example
* @code
@@ -1825,25 +1841,24 @@
* // wait until an event occurs
* struct inotify_event * event = inotifytools_next_event( -1 );
*
- * char mystring[1024];
- * inotifytools_snprintf( mystring, 1024, event,
+ * struct nstring mynstring;
+ * inotifytools_snprintf( mynstring, MAX_STRLEN, event,
* "in %w, file %f had event(s): %.e\n" );
- * printf( mystring );
+ * fwrite( mynstring.buf, sizeof(char), mynstring.len, stdout );
* // suppose the file 'myfile' in mydir was written to and closed. Then,
* // this prints something like:
* // "in mydir/, file myfile had event(s): CLOSE_WRITE.CLOSE.ISDIR\n"
* @endcode
*/
-int inotifytools_snprintf( char * out, int size,
+int inotifytools_snprintf( struct nstring * out, int size,
struct inotify_event* event, char* fmt ) {
static char * filename, * eventname, * eventstr;
static unsigned int i, ind;
static char ch1;
static char timestr[MAX_STRLEN];
- static time_t now;
-
+ static time_t now;
- if ( event->len > 0 ) {
+ if ( event->len > 0 ) {
eventname = event->name;
}
else {
@@ -1866,7 +1881,7 @@
for ( i = 0; i < strlen(fmt) &&
(int)ind < size - 1; ++i ) {
if ( fmt[i] != '%' ) {
- out[ind++] = fmt[i];
+ out->buf[ind++] = fmt[i];
continue;
}
@@ -1879,14 +1894,26 @@
ch1 = fmt[i+1];
if ( ch1 == '%' ) {
- out[ind++] = '%';
+ out->buf[ind++] = '%';
+ ++i;
+ continue;
+ }
+
+ if ( ch1 == '0' ) {
+ out->buf[ind++] = '\0';
+ ++i;
+ continue;
+ }
+
+ if ( ch1 == 'n' ) {
+ out->buf[ind++] = '\n';
++i;
continue;
}
if ( ch1 == 'w' ) {
if ( filename ) {
- strncpy( &out[ind], filename, size - ind );
+ strncpy( &out->buf[ind], filename, size - ind );
ind += strlen(filename);
}
++i;
@@ -1895,16 +1922,22 @@
if ( ch1 == 'f' ) {
if ( eventname ) {
- strncpy( &out[ind], eventname, size - ind );
+ strncpy( &out->buf[ind], eventname, size - ind );
ind += strlen(eventname);
}
++i;
continue;
}
+ if ( ch1 == 'c' ) {
+ ind += snprintf( &out->buf[ind], size-ind, "%x", event->cookie);
+ ++i;
+ continue;
+ }
+
if ( ch1 == 'e' ) {
eventstr = inotifytools_event_to_str( event->mask );
- strncpy( &out[ind], eventstr, size - ind );
+ strncpy( &out->buf[ind], eventstr, size - ind );
ind += strlen(eventstr);
++i;
continue;
@@ -1913,21 +1946,21 @@
if ( ch1 == 'T' ) {
if ( timefmt ) {
-
now = time(0);
- if ( 0 >= strftime( timestr, MAX_STRLEN-1, timefmt,
- localtime( &now ) ) ) {
-
- // time format probably invalid
- error = EINVAL;
- return ind;
+ struct tm now_tm;
+ if (0 >= strftime(timestr, MAX_STRLEN - 1,
+ timefmt,
+ localtime_r(&now, &now_tm))) {
+ // time format probably invalid
+ error = EINVAL;
+ return ind;
}
}
else {
timestr[0] = 0;
}
- strncpy( &out[ind], timestr, size - ind );
+ strncpy( &out->buf[ind], timestr, size - ind );
ind += strlen(timestr);
++i;
continue;
@@ -1936,18 +1969,18 @@
// Check if next char in fmt is e
if ( i < strlen(fmt) - 2 && fmt[i+2] == 'e' ) {
eventstr = inotifytools_event_to_str_sep( event->mask, ch1 );
- strncpy( &out[ind], eventstr, size - ind );
+ strncpy( &out->buf[ind], eventstr, size - ind );
ind += strlen(eventstr);
i += 2;
continue;
}
// OK, this wasn't a special format character, just output it as normal
- if ( ind < MAX_STRLEN ) out[ind++] = '%';
- if ( ind < MAX_STRLEN ) out[ind++] = ch1;
+ if ( ind < MAX_STRLEN ) out->buf[ind++] = '%';
+ if ( ind < MAX_STRLEN ) out->buf[ind++] = ch1;
++i;
}
- out[ind] = 0;
+ out->len = ind;
return ind - 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/libinotifytools/src/redblack.c new/inotify-tools-3.20.11.0/libinotifytools/src/redblack.c
--- old/inotify-tools-3.20.2.2/libinotifytools/src/redblack.c 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/libinotifytools/src/redblack.c 2020-11-13 11:52:25.000000000 +0100
@@ -292,7 +292,6 @@
struct RB_ENTRY(node) *x,*y,*z;
int cmp;
int found=0;
- int cmpmods();
y=RBNULL; /* points to the parent of x */
x=rbinfo->rb_root;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/libinotifytools/src/redblack.h new/inotify-tools-3.20.11.0/libinotifytools/src/redblack.h
--- old/inotify-tools-3.20.2.2/libinotifytools/src/redblack.h 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/libinotifytools/src/redblack.h 2020-11-13 11:52:25.000000000 +0100
@@ -27,6 +27,7 @@
/* Stop multiple includes */
#ifndef _REDBLACK_H
+#define _REDBLACK_H
#ifndef RB_CUSTOMIZE
/*
@@ -132,7 +133,6 @@
#define rbmin(rbinfo) RB_ENTRY(lookup)(RB_LUFIRST, NULL, (rbinfo))
#define rbmax(rbinfo) RB_ENTRY(lookup)(RB_LULAST, NULL, (rbinfo))
-#define _REDBLACK_H
#endif /* _REDBLACK_H */
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/libinotifytools/src/test.c new/inotify-tools-3.20.11.0/libinotifytools/src/test.c
--- old/inotify-tools-3.20.2.2/libinotifytools/src/test.c 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/libinotifytools/src/test.c 2020-11-13 11:52:25.000000000 +0100
@@ -199,63 +199,61 @@
verify(inotifytools_initialize());
verify(inotifytools_watch_file(TEST_DIR, IN_CLOSE));
-#define BUFSZ 2048
#define RESET \
do { \
- memset(buf, 0, BUFSZ); \
+ memset(out.buf, 0, MAX_STRLEN); \
memset(test_event, 0, sizeof(struct inotify_event)); \
test_event->wd = inotifytools_wd_from_filename(TEST_DIR "/"); \
verify(test_event->wd >= 0); \
inotifytools_set_printf_timefmt(0); \
} while (0)
- char buf[BUFSZ];
+ struct nstring out;
char event_buf[4096];
struct inotify_event *test_event = (struct inotify_event *)event_buf;
RESET;
test_event->mask = IN_ACCESS;
- inotifytools_snprintf(buf, 1024, test_event, "Event %e %.e on %w %f %T");
- verify2(!strcmp(buf, "Event ACCESS ACCESS on " TEST_DIR "/ "), buf);
+ inotifytools_snprintf(&out, MAX_STRLEN, test_event, "Event %e %.e on %w %f %T");
+ verify2(!strcmp(out.buf, "Event ACCESS ACCESS on " TEST_DIR "/ "), out.buf);
RESET;
test_event->mask = IN_ACCESS | IN_DELETE;
- inotifytools_snprintf(buf, 1024, test_event, "Event %e %.e on %w %f %T");
+ inotifytools_snprintf(&out, MAX_STRLEN, test_event, "Event %e %.e on %w %f %T");
verify2(
- !strcmp(buf, "Event ACCESS,DELETE ACCESS.DELETE on " TEST_DIR "/ ") ||
- !strcmp(buf,
+ !strcmp(out.buf, "Event ACCESS,DELETE ACCESS.DELETE on " TEST_DIR "/ ") ||
+ !strcmp(out.buf,
"Event DELETE,ACCESS DELETE.ACCESS on " TEST_DIR "/ "),
- buf);
+ out.buf);
RESET;
test_event->mask = IN_MODIFY;
- inotifytools_snprintf(buf, 10, test_event, "Event %e %.e on %w %f %T");
- verify2(!strcmp(buf, "Event MODI"), buf);
+ inotifytools_snprintf(&out, 10, test_event, "Event %e %.e on %w %f %T");
+ verify2(!strcmp(out.buf, "Event MODI"), out.buf);
RESET;
test_event->mask = IN_ACCESS;
strcpy(test_event->name, "my_great_file");
test_event->len = strlen(test_event->name) + 1;
- inotifytools_snprintf(buf, 1024, test_event, "Event %e %.e on %w %f %T");
- verify2(!strcmp(buf, "Event ACCESS ACCESS on " TEST_DIR "/ my_great_file "),
- buf);
+ inotifytools_snprintf(&out, MAX_STRLEN, test_event, "Event %e %.e on %w %f %T");
+ verify2(!strcmp(out.buf, "Event ACCESS ACCESS on " TEST_DIR "/ my_great_file "),
+ out.buf);
RESET;
test_event->mask = IN_ACCESS;
inotifytools_set_printf_timefmt("%D%% %H:%M");
{
- char expected[1024];
+ char expected[MAX_STRLEN];
char timestr[512];
time_t now = time(0);
strftime(timestr, 512, "%D%% %H:%M", localtime(&now));
- snprintf(expected, 1024, "Event ACCESS ACCESS on %s/ %s", TEST_DIR,
+ snprintf(expected, MAX_STRLEN, "Event ACCESS ACCESS on %s/ %s", TEST_DIR,
timestr);
- inotifytools_snprintf(buf, 1024, test_event,
+ inotifytools_snprintf(&out, MAX_STRLEN, test_event,
"Event %e %.e on %w %f %T");
- verify2(!strcmp(buf, expected), buf);
+ verify2(!strcmp(out.buf, expected), out.buf);
}
-#undef BUFSZ
EXIT
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/man/inotifywait.1.in new/inotify-tools-3.20.11.0/man/inotifywait.1.in
--- old/inotify-tools-3.20.2.2/man/inotifywait.1.in 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/man/inotifywait.1.in 2020-11-13 11:52:25.000000000 +0100
@@ -5,7 +5,7 @@
.SH SYNOPSIS
.B inotifywait
-.RB [ \-hcmrq ]
+.RB [ \-hcmrPq ]
.RB [ \-e
<event> ]
.RB [ \-t
@@ -90,6 +90,9 @@
.BR syslog(3)
system log module rather than stderr.
.TP
+.B \-P, \-\-no\-dereference
+Do not follow symlinks.
+.TP
.B \-r, \-\-recursive
Watch all subdirectories of any directories passed as arguments. Watches
will be set up recursively to an unlimited depth. Symbolic links are not
@@ -147,6 +150,10 @@
in the \-\-format option.
.TP
+.B \-\-no-newline
+Don't print newline symbol after user-specified format in the \-\-format option.
+
+.TP
.B \-\-format <fmt>
Output in a user-specified format, using printf-like syntax. The event strings
output are limited to around 4000 characters and will be truncated to this length.
@@ -176,6 +183,14 @@
Replaced with the current Time in the format specified by the \-\-timefmt option,
which should be a format string suitable for passing to strftime(3).
+.TP
+%0
+Replaced with NUL.
+
+.TP
+%n
+Replaced with Line Feed.
+
.SH "EXIT STATUS"
@@ -332,6 +347,17 @@
DELETE badfile
.fi
+.SS Example 4
+Enforce file permissions in directory `~/test'
+
+.nf
+inotifywait -qmr -e 'moved_to,create' --format '%w%f%0' --no-newline ~/test |\\
+ while IFS= read -r -d '' file
+ do
+ chmod -v a+rX "$file"
+ done
+.fi
+
.SH BUGS
There are race conditions in the recursive directory watching code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/man/inotifywatch.1.in new/inotify-tools-3.20.11.0/man/inotifywatch.1.in
--- old/inotify-tools-3.20.2.2/man/inotifywatch.1.in 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/man/inotifywatch.1.in 2020-11-13 11:52:25.000000000 +0100
@@ -5,7 +5,7 @@
.SH SYNOPSIS
.B inotifywatch
-.RB [ \-hvzrqf ]
+.RB [ \-hvzrPqf ]
.RB [ \-e
<event> ]
.RB [ \-t
@@ -97,6 +97,10 @@
.BR /proc/sys/fs/inotify/max_user_watches .
.TP
+.B \-P, \-\-no\-dereference
+Do not follow symlinks.
+
+.TP
.B \-t <seconds>, \-\-timeout <seconds>
Listen only for the specified amount of seconds. If not specified, inotifywatch
will gather statistics until receiving an interrupt signal by (for example)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/src/Makefile.am new/inotify-tools-3.20.11.0/src/Makefile.am
--- old/inotify-tools-3.20.2.2/src/Makefile.am 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/src/Makefile.am 2020-11-13 11:52:25.000000000 +0100
@@ -2,7 +2,7 @@
inotifywait_SOURCES = inotifywait.c common.c common.h
inotifywatch_SOURCES = inotifywatch.c common.c common.h
-AM_CFLAGS = -Wall -Wextra -Wpointer-arith -Werror -std=c99 -I../libinotifytools/src
+AM_CFLAGS = -Wall -Wextra -Wshadow -Wpointer-arith -Werror -std=c99 -I../libinotifytools/src
AM_CPPFLAGS = -I$(top_srcdir)/libinotifytools/src
LDADD = ../libinotifytools/src/libinotifytools.la
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/src/common.c new/inotify-tools-3.20.11.0/src/common.c
--- old/inotify-tools-3.20.2.2/src/common.c 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/src/common.c 2020-11-13 11:52:25.000000000 +0100
@@ -62,11 +62,12 @@
list.exclude_files = 0;
FILE *file = 0;
- if (!filename) {
- } else if (!strcmp(filename, "-")) {
- file = stdin;
- } else {
- file = fopen(filename, "r");
+ if (filename) {
+ if (!strcmp(filename, "-")) {
+ file = stdin;
+ } else {
+ file = fopen(filename, "r");
+ }
}
int watch_len = LIST_CHUNK;
@@ -136,8 +137,8 @@
}
}
-bool is_timeout_option_valid(long int *timeout, char *optarg) {
- if ((optarg == NULL) || (*optarg == '\0')) {
+bool is_timeout_option_valid(long int *timeout, char *o) {
+ if ((o == NULL) || (*o == '\0')) {
fprintf(stderr, "The provided value is not a valid timeout value.\n"
"Please specify a long int value.\n");
return false;
@@ -145,7 +146,7 @@
char *timeout_end = NULL;
errno = 0;
- *timeout = strtol(optarg, &timeout_end, 10);
+ *timeout = strtol(o, &timeout_end, 10);
const int err = errno;
if (err != 0) {
@@ -172,7 +173,7 @@
if (*timeout_end != '\0') {
fprintf(stderr, "'%s' is not a valid timeout value.\n"
"Please specify a long int value.\n",
- optarg);
+ o);
return false;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/src/inotifywait.c new/inotify-tools-3.20.11.0/src/inotifywait.c
--- old/inotify-tools-3.20.2.2/src/inotifywait.c 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/src/inotifywait.c 2020-11-13 11:52:25.000000000 +0100
@@ -34,9 +34,10 @@
// METHODS
bool parse_opts(int *argc, char ***argv, int *events, bool *monitor, int *quiet,
long int *timeout, int *recursive, bool *csv, bool *daemon,
- bool *syslog, char **format, char **timefmt, char **fromfile,
- char **outfile, char **exc_regex, char **exc_iregex,
- char **inc_regex, char **inc_iregex);
+ bool *syslog, bool *no_dereference, char **format,
+ char **timefmt, char **fromfile, char **outfile,
+ char **exc_regex, char **exc_iregex, char **inc_regex,
+ char **inc_iregex, bool *no_newline);
void print_help();
@@ -136,6 +137,7 @@
bool csv = false;
bool dodaemon = false;
bool syslog = false;
+ bool no_dereference = false;
char *format = NULL;
char *timefmt = NULL;
char *fromfile = NULL;
@@ -144,13 +146,14 @@
char *exc_iregex = NULL;
char *inc_regex = NULL;
char *inc_iregex = NULL;
+ bool no_newline = false;
int fd;
// Parse commandline options, aborting if something goes wrong
if (!parse_opts(&argc, &argv, &events, &monitor, &quiet, &timeout,
- &recursive, &csv, &dodaemon, &syslog, &format, &timefmt,
- &fromfile, &outfile, &exc_regex, &exc_iregex, &inc_regex,
- &inc_iregex)) {
+ &recursive, &csv, &dodaemon, &syslog, &no_dereference,
+ &format, &timefmt, &fromfile, &outfile, &exc_regex,
+ &exc_iregex, &inc_regex, &inc_iregex, &no_newline)) {
return EXIT_FAILURE;
}
@@ -190,6 +193,9 @@
if (monitor && recursive) {
events = events | IN_CREATE | IN_MOVED_TO | IN_MOVED_FROM;
}
+ if (no_dereference) {
+ events = events | IN_DONT_FOLLOW;
+ }
FileList list = construct_path_list(argc, argv, fromfile);
@@ -412,9 +418,10 @@
bool parse_opts(int *argc, char ***argv, int *events, bool *monitor, int *quiet,
long int *timeout, int *recursive, bool *csv, bool *daemon,
- bool *syslog, char **format, char **timefmt, char **fromfile,
- char **outfile, char **exc_regex, char **exc_iregex,
- char **inc_regex, char **inc_iregex) {
+ bool *syslog, bool *no_dereference, char **format,
+ char **timefmt, char **fromfile, char **outfile,
+ char **exc_regex, char **exc_iregex, char **inc_regex,
+ char **inc_iregex, bool *no_newline) {
assert(argc);
assert(argv);
assert(events);
@@ -424,6 +431,7 @@
assert(csv);
assert(daemon);
assert(syslog);
+ assert(no_dereference);
assert(format);
assert(timefmt);
assert(fromfile);
@@ -445,11 +453,11 @@
const char *regex_warning =
"only the last option will be taken into consideration.\n";
- // format with trailing newline
- static char *newlineformat;
+ // format provided by the user
+ static char *customformat = NULL;
// Short options
- static const char opt_string[] = "mrhcdsqt:fo:e:";
+ static const char opt_string[] = "mrhcdsPqt:fo:e:";
// Long options
static const struct option long_opts[] = {
@@ -463,7 +471,9 @@
{"csv", no_argument, NULL, 'c'},
{"daemon", no_argument, NULL, 'd'},
{"syslog", no_argument, NULL, 's'},
+ {"no-dereference", no_argument, NULL, 'P'},
{"format", required_argument, NULL, 'n'},
+ {"no-newline", no_argument, NULL, '0'},
{"timefmt", required_argument, NULL, 'i'},
{"fromfile", required_argument, NULL, 'z'},
{"outfile", required_argument, NULL, 'o'},
@@ -519,6 +529,11 @@
(*syslog) = true;
break;
+ // --no-dereference or -P
+ case 'P':
+ (*no_dereference) = true;
+ break;
+
// --filename or -f
case 'f':
fprintf(stderr, "The '--filename' option no longer exists. "
@@ -529,10 +544,13 @@
// --format
case 'n':
- newlineformat = (char *)malloc(strlen(optarg) + 2);
- strcpy(newlineformat, optarg);
- strcat(newlineformat, "\n");
- (*format) = newlineformat;
+ customformat = (char *)malloc(strlen(optarg) + 2);
+ strcpy(customformat, optarg);
+ break;
+
+ // --no-newline
+ case '0':
+ (*no_newline) = true;
break;
// --timefmt
@@ -610,6 +628,13 @@
curr_opt = getopt_long(*argc, *argv, opt_string, long_opts, NULL);
}
+ if (customformat) {
+ if(!(*no_newline)) {
+ strcat(customformat, "\n");
+ }
+ (*format) = customformat;
+ }
+
if (*exc_regex && *exc_iregex) {
fprintf(stderr, "--exclude and --excludei cannot both be specified.\n");
return false;
@@ -632,6 +657,11 @@
return false;
}
+ if (!*format && *no_newline) {
+ fprintf(stderr, "--no-newline cannot be specified without --format.\n");
+ return false;
+ }
+
if (!*format && *timefmt) {
fprintf(stderr, "--timefmt cannot be specified without --format.\n");
return false;
@@ -693,6 +723,8 @@
"\t-d|--daemon \tSame as --monitor, except run in the background\n"
"\t \tlogging events to a file specified by --outfile.\n"
"\t \tImplies --syslog.\n");
+ printf("\t-P|--no-dereference\n"
+ "\t \tDo not follow symlinks.\n");
printf("\t-r|--recursive\tWatch directories recursively.\n");
printf("\t--fromfile <file>\n"
"\t \tRead files to watch from <file> or `-' for "
@@ -704,6 +736,8 @@
printf("\t-qq \tPrint nothing (not even events).\n");
printf("\t--format <fmt>\tPrint using a specified printf-like format\n"
"\t \tstring; read the man page for more details.\n");
+ printf("\t--no-newline \tDon't print newline symbol after\n"
+ "\t \t--format string.\n");
printf("\t--timefmt <fmt>\tstrftime-compatible format string for use with\n"
"\t \t%%T in --format string.\n");
printf("\t-c|--csv \tPrint events in CSV format.\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/src/inotifywatch.c new/inotify-tools-3.20.11.0/src/inotifywatch.c
--- old/inotify-tools-3.20.2.2/src/inotifywatch.c 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/src/inotifywatch.c 2020-11-13 11:52:25.000000000 +0100
@@ -1,4 +1,3 @@
-// FIXME this is cheating! Make this use only the public API.
#include "../config.h"
#include "../libinotifytools/src/inotifytools_p.h"
#include "common.h"
@@ -31,8 +30,8 @@
// METHODS
bool parse_opts(int *argc, char ***argv, int *events, long int *timeout,
int *verbose, int *zero, int *sort, int *recursive,
- char **fromfile, char **exc_regex, char **exc_iregex,
- char **inc_regex, char **inc_iregex);
+ int *no_dereference, char **fromfile, char **exc_regex,
+ char **exc_iregex, char **inc_regex, char **inc_iregex);
void print_help();
@@ -74,6 +73,7 @@
int verbose = 0;
zero = 0;
int recursive = 0;
+ int no_dereference = 0;
char *fromfile = 0;
sort = -1;
done = false;
@@ -86,8 +86,8 @@
// Parse commandline options, aborting if something goes wrong
if (!parse_opts(&argc, &argv, &events, &timeout, &verbose, &zero, &sort,
- &recursive, &fromfile, &exc_regex, &exc_iregex, &inc_regex,
- &inc_iregex)) {
+ &recursive, &no_dereference, &fromfile, &exc_regex,
+ &exc_iregex, &inc_regex, &inc_iregex)) {
return EXIT_FAILURE;
}
@@ -119,6 +119,8 @@
// If events is still 0, make it all events.
if (!events)
events = IN_ALL_EVENTS;
+ if (no_dereference)
+ events = events | IN_DONT_FOLLOW;
FileList list = construct_path_list(argc, argv, fromfile);
@@ -362,18 +364,19 @@
return EXIT_SUCCESS;
}
-bool parse_opts(int *argc, char ***argv, int *events, long int *timeout,
- int *verbose, int *zero, int *sort, int *recursive,
- char **fromfile, char **exc_regex, char **exc_iregex,
- char **inc_regex, char **inc_iregex) {
+bool parse_opts(int *argc, char ***argv, int *e, long int *timeout,
+ int *verbose, int *z, int *s, int *recursive,
+ int *no_dereference, char **fromfile, char **exc_regex,
+ char **exc_iregex, char **inc_regex, char **inc_iregex) {
assert(argc);
assert(argv);
- assert(events);
+ assert(e);
assert(timeout);
assert(verbose);
- assert(zero);
- assert(sort);
+ assert(z);
+ assert(s);
assert(recursive);
+ assert(no_dereference);
assert(fromfile);
assert(exc_regex);
assert(exc_iregex);
@@ -385,7 +388,7 @@
bool sort_set = false;
// Short options
- static const char opt_string[] = "hra:d:zve:t:";
+ static const char opt_string[] = "hrPa:d:zve:t:";
// Construct array
static const struct option long_opts[] = {
@@ -397,6 +400,7 @@
{"ascending", required_argument, NULL, 'a'},
{"descending", required_argument, NULL, 'd'},
{"recursive", no_argument, NULL, 'r'},
+ {"no-dereference", no_argument, NULL, 'P'},
{"fromfile", required_argument, NULL, 'o'},
{"exclude", required_argument, NULL, 'c'},
{"excludei", required_argument, NULL, 'b'},
@@ -427,10 +431,13 @@
case 'r':
++(*recursive);
break;
+ case 'P':
+ ++(*no_dereference);
+ break;
// --zero or -z
case 'z':
- ++(*zero);
+ ++(*z);
break;
// --exclude
@@ -484,7 +491,7 @@
}
// Add the new event to the event mask
- (*events) = ((*events) | new_event);
+ (*e) = ((*e) | new_event);
break;
@@ -495,7 +502,7 @@
return false;
}
if (0 == strcasecmp(optarg, "total")) {
- (*sort) = 0;
+ (*s) = 0;
} else if (0 == strcasecmp(optarg, "move")) {
fprintf(stderr, "Cannot sort by `move' event; please use "
"`moved_from' or `moved_to'.\n");
@@ -515,7 +522,7 @@
return false;
}
- (*sort) = event;
+ (*s) = event;
}
sort_set = true;
break;
@@ -527,7 +534,7 @@
return false;
}
if (0 == strcasecmp(optarg, "total")) {
- (*sort) = -1;
+ (*s) = -1;
} else {
int event = inotifytools_str_to_event(optarg);
@@ -539,7 +546,7 @@
return false;
}
- (*sort) = -event;
+ (*s) = -event;
}
break;
}
@@ -550,8 +557,8 @@
(*argc) -= optind;
*argv = &(*argv)[optind];
- if ((*sort) != 0 && (*sort) != -1 &&
- !(abs(*sort) & ((*events) ? (*events) : IN_ALL_EVENTS))) {
+ if ((*s) != 0 && (*s) != -1 &&
+ !(abs(*s) & ((*e) ? (*e) : IN_ALL_EVENTS))) {
fprintf(stderr, "Can't sort by an event which isn't being watched "
"for!\n");
return false;
@@ -603,6 +610,8 @@
"\t\tif they consist only of zeros (the default is to not output\n"
"\t\tthese rows and columns).\n");
printf("\t-r|--recursive\tWatch directories recursively.\n");
+ printf("\t-P|--no-dereference\n"
+ "\t\tDo not follow symlinks.\n");
printf("\t-t|--timeout <seconds>\n"
"\t\tListen only for specified amount of time in seconds; if\n"
"\t\tomitted or negative, inotifywatch will execute until receiving "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/t/Makefile new/inotify-tools-3.20.11.0/t/Makefile
--- old/inotify-tools-3.20.2.2/t/Makefile 2020-02-01 13:05:18.000000000 +0100
+++ new/inotify-tools-3.20.11.0/t/Makefile 2020-11-13 11:52:25.000000000 +0100
@@ -17,8 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/ .
-SHELL_PATH ?= $(SHELL)
-SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
+SHELL_PATH ?= /bin/bash
RM ?= rm -f
PROVE ?= prove
AGGREGATE_SCRIPT ?= aggregate-results.sh
@@ -32,11 +31,11 @@
$(MAKE) aggregate-results-and-cleanup
prove: pre-clean
- @echo "*** prove ***"; $(PROVE) --exec '$(SHELL_PATH_SQ)' $(PROVE_OPTS) $(T) :: $(TEST_OPTS)
+ @echo "*** prove ***"; $(PROVE) --exec '$(SHELL_PATH)' $(PROVE_OPTS) $(T) :: $(TEST_OPTS)
$(MAKE) clean-except-prove-cache
$(T):
- @echo "*** $@ ***"; '$(SHELL_PATH_SQ)' $@ $(TEST_OPTS)
+ @echo "*** $@ ***"; '$(SHELL_PATH)' $@ $(TEST_OPTS)
pre-clean:
$(RM) -r test-results
@@ -54,7 +53,7 @@
aggregate-results:
for f in test-results/*.counts; do \
echo "$$f"; \
- done | '$(SHELL_PATH_SQ)' '$(AGGREGATE_SCRIPT)'
+ done | '$(SHELL_PATH)' '$(AGGREGATE_SCRIPT)'
.PHONY: all test prove $(T) pre-clean clean
.PHONY: aggregate-results-and-cleanup aggregate-results
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/t/inotifywait-daemon-logs-chown.t new/inotify-tools-3.20.11.0/t/inotifywait-daemon-logs-chown.t
--- old/inotify-tools-3.20.2.2/t/inotifywait-daemon-logs-chown.t 1970-01-01 01:00:00.000000000 +0100
+++ new/inotify-tools-3.20.11.0/t/inotifywait-daemon-logs-chown.t 2020-11-13 11:52:25.000000000 +0100
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+test_description='Issue #62
+
+When --daemon is used, events are logged correctly to --outfile
+even if that is a relative path
+'
+
+. ./sharness.sh
+
+logfile="log"
+
+run_() {
+ # Setup code, defer an ATTRIB event for after
+ # inotifywait has been set up.
+ timeout=2 &&
+ touch $logfile test-file &&
+ {(sleep 1 && chown $(id -u) test-file)&} &&
+
+ export LD_LIBRARY_PATH="../../libinotifytools/src/.libs/"
+ ../../src/.libs/inotifywait \
+ --quiet \
+ --daemon \
+ --outfile $logfile \
+ --event ATTRIB \
+ --timeout $timeout \
+ $(realpath test-file) &&
+ # No way to use 'wait' for a process that is not a child of this one,
+ # sleep instead until inotifywait's timeout is reached.
+ sleep $timeout
+}
+
+test_expect_success 'event logged' '
+ run_ &&
+ grep ATTRIB $logfile
+'
+
+test_done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/t/inotifywait-format-option-cookie.t new/inotify-tools-3.20.11.0/t/inotifywait-format-option-cookie.t
--- old/inotify-tools-3.20.2.2/t/inotifywait-format-option-cookie.t 1970-01-01 01:00:00.000000000 +0100
+++ new/inotify-tools-3.20.11.0/t/inotifywait-format-option-cookie.t 2020-11-13 11:52:25.000000000 +0100
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+test_description='Resolves Issue #72
+
+Make transaction id (cookie) available as part of the format string using %c'
+
+. ./sharness.sh
+
+logfile="log"
+
+run_() {
+ # Setup code, defer an ATTRIB event for after
+ # inotifywait has been set up.
+ touch $logfile
+
+ export LD_LIBRARY_PATH="../../libinotifytools/src/.libs/"
+
+ ../../src/.libs/inotifywait \
+ --monitor \
+ --daemon \
+ --quiet \
+ --outfile $logfile \
+ --format '%c %e %w%f' \
+ --event create \
+ --event moved_to \
+ --event moved_from \
+ $(realpath ./)
+
+ PID="$!"
+
+ touch test-file-src
+
+ mv test-file-src test-file-dst
+
+ kill ${PID}
+}
+
+test_expect_success \
+ 'event logged' \
+ '
+ set -e
+ trap "set +e" RETURN
+ run_
+ local NONCOOKIE="$(cat "${logfile}" | sed -n 1p | grep -Eo "^[^ ]+")"
+ #Make sure cookie is 0 for single events
+ [[ "${NONCOOKIE}" == "0" ]] || return 1
+ local COOKIE_A="$(cat "${logfile}" | sed -n 2p | grep -Eo "^[^ ]+")"
+ [[ -n "${COOKIE_A}" ]] || return 1
+ local COOKIE_B="$(cat "${logfile}" | sed -n 3p | grep -Eo "^[^ ]+")"
+ [[ "${COOKIE_A}" == "${COOKIE_B}" ]] || return 1
+ return 0
+ '
+
+test_done
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/t/inotifywait-format-option-null.t new/inotify-tools-3.20.11.0/t/inotifywait-format-option-null.t
--- old/inotify-tools-3.20.2.2/t/inotifywait-format-option-null.t 1970-01-01 01:00:00.000000000 +0100
+++ new/inotify-tools-3.20.11.0/t/inotifywait-format-option-null.t 2020-11-13 11:52:25.000000000 +0100
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+test_description='Check producing NUL-delimited output'
+
+. ./sharness.sh
+
+logfile="log"
+
+run_() {
+ touch $logfile
+
+ export LD_LIBRARY_PATH="../../libinotifytools/src/.libs/"
+
+ ../../src/.libs/inotifywait \
+ --monitor \
+ --quiet \
+ --outfile $logfile \
+ --format '%w%f%0' \
+ --no-newline \
+ --event create \
+ --event moved_to \
+ --event moved_from \
+ $(realpath ./) &
+
+ PID="$!"
+ sleep 1
+
+ touch test-file-src
+
+ mv test-file-src test-file-dst
+
+ sleep 1
+
+ kill ${PID}
+}
+
+test_expect_success 'the output is delimited by NUL' \
+ '
+ set -e
+ trap "set +e" RETURN
+ run_
+ srcfile="${PWD}/test-file-src"
+ dstfile="${PWD}/test-file-dst"
+
+ return $(printf "${srcfile}\0${srcfile}\0${dstfile}\0" | cmp -s "${logfile}")
+ '
+
+test_done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/t/inotifywait-no-dereference-ignore-symlinked-file.t new/inotify-tools-3.20.11.0/t/inotifywait-no-dereference-ignore-symlinked-file.t
--- old/inotify-tools-3.20.2.2/t/inotifywait-no-dereference-ignore-symlinked-file.t 1970-01-01 01:00:00.000000000 +0100
+++ new/inotify-tools-3.20.11.0/t/inotifywait-no-dereference-ignore-symlinked-file.t 2020-11-13 11:52:25.000000000 +0100
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+test_description='--no-dereference causes inotifywait to ignore events on symlink target'
+
+. ./sharness.sh
+
+run_() {
+ export LD_LIBRARY_PATH="../../libinotifytools/src/.libs/"
+ touch test &&
+ ln -s test test-symlink &&
+ {(sleep 1 && touch test)&} &&
+ ../../src/.libs/inotifywait --quiet --no-dereference --timeout 2 test-symlink
+}
+
+test_expect_success 'Exit code 2 is returned' '
+ test_expect_code 2 run_
+'
+
+test_done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inotify-tools-3.20.2.2/t/inotifywait-no-dereference-respond-to-symlink-event.t new/inotify-tools-3.20.11.0/t/inotifywait-no-dereference-respond-to-symlink-event.t
--- old/inotify-tools-3.20.2.2/t/inotifywait-no-dereference-respond-to-symlink-event.t 1970-01-01 01:00:00.000000000 +0100
+++ new/inotify-tools-3.20.11.0/t/inotifywait-no-dereference-respond-to-symlink-event.t 2020-11-13 11:52:25.000000000 +0100
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+test_description='--no-dereference causes inotifywait to respond to events on symlink'
+
+. ./sharness.sh
+
+run_() {
+ export LD_LIBRARY_PATH="../../libinotifytools/src/.libs/"
+ touch test &&
+ ln -s test test-symlink &&
+ {(sleep 1 && touch -h test-symlink)&} &&
+ ../../src/.libs/inotifywait --quiet --no-dereference --timeout 2 test-symlink
+}
+
+test_expect_success 'Exit code 0 is returned' '
+ run_
+'
+
+test_done
1
0
21 Dec '20
Hello community,
here is the log from the commit of package python-pykickstart for openSUSE:Factory checked in at 2020-12-21 10:24:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pykickstart (Old)
and /work/SRC/openSUSE:Factory/.python-pykickstart.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pykickstart"
Mon Dec 21 10:24:23 2020 rev:2 rq:857755 version:3.30
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pykickstart/python-pykickstart.changes 2020-05-23 17:28:16.207515690 +0200
+++ /work/SRC/openSUSE:Factory/.python-pykickstart.new.5145/python-pykickstart.changes 2020-12-21 10:27:01.508225297 +0100
@@ -1,0 +2,9 @@
+Sun Dec 20 17:45:46 UTC 2020 - Neal Gompa <ngompa13(a)gmail.com>
+
+- Update to version 3.30
+ + Add new timesource command
+ + Deprecate the --ntpservers and --nontp options of the timezone command
+ + Remove --biospart argument from harddrive command, it was never implemented or used.
+ + Add Fedora 34 handler
+
+-------------------------------------------------------------------
Old:
----
pykickstart-3.25.tar.gz
New:
----
pykickstart-3.30.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pykickstart.spec ++++++
--- /var/tmp/diff_new_pack.TiKJzy/_old 2020-12-21 10:27:02.036225896 +0100
+++ /var/tmp/diff_new_pack.TiKJzy/_new 2020-12-21 10:27:02.040225901 +0100
@@ -23,7 +23,7 @@
Name: python-%{mod_name}
-Version: 3.25
+Version: 3.30
Release: 0
Summary: Python module for parsing and writing kickstart files
Group: Development/Libraries/Python
@@ -36,12 +36,10 @@
BuildRequires: fdupes
BuildRequires: gettext
BuildRequires: python-rpm-macros
-BuildRequires: %{python_module ordered-set}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
-Requires: python-ordered-set
Requires: python-requests
Requires: python-six
++++++ pykickstart-3.25.tar.gz -> pykickstart-3.30.tar.gz ++++++
++++ 27447 lines of diff (skipped)
1
0
21 Dec '20
Hello community,
here is the log from the commit of package python-rich for openSUSE:Factory checked in at 2020-12-21 10:24:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rich (Old)
and /work/SRC/openSUSE:Factory/.python-rich.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rich"
Mon Dec 21 10:24:19 2020 rev:10 rq:857159 version:9.5.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rich/python-rich.changes 2020-10-29 14:51:53.121218519 +0100
+++ /work/SRC/openSUSE:Factory/.python-rich.new.5145/python-rich.changes 2020-12-21 10:26:59.176222654 +0100
@@ -1,0 +2,76 @@
+Fri Dec 18 19:46:52 UTC 2020 - Martin Hauke <mardnh(a)gmx.de>
+
+- Update to version 9.5.1
+ * Fixed hex number highlighting
+- Update to version 9.5.0
+ Changed
+ * If file is not specified on Console then the Console.file will
+ return the current sys.stdout. Prior to 9.5.0 sys.stdout was
+ cached on the Console, which could break code that wrapped
+ sys.stdout after the Console was constructed.
+ * Changed Color.__str__ to not include ansi codes
+ * Changed Console.size to get the terminal dimensions via
+ sys.stdin. This means that if you set file to be an
+ io.StringIO file (for example) then the width will be set to
+ the current terminal dimensions and not a default of 80.
+ Added
+ * Added stderr parameter to Console
+ * Added rich.reconfigure
+ * Added Color.__rich__
+ * Added Console.style parameter
+ * Added Table.highlight parameter to enable highlighting ofcells
+ * Added Panel.highlight parameter to enable highlighting of panel
+ title
+ * Added highlight to ConsoleOptions
+ Fixed
+ * Fixed double output in rich.live #485
+ * Fixed Console.out highlighting not reflecting defaults #827
+ * FileProxy now raises TypeError for empty non-str arguments #828
+- Update to version 9.5.0
+ Added
+ * Added rich.live #382
+ * Added algin parameter to Rule and Console.rule
+ * Added rich.Status class and Console.status
+ * Added getitem to Text
+ * Added style parameter to Console.log
+ * Added rich.diagnose command
+ Changed
+ * Table.add_row style argument now applies to entire line and not
+ just cells
+ * Added end_section parameter to Table.add_row to force a line
+ underneath row
+ Fixed
+ * Fixed suppressed traceback context #468
+- Update to version 9.3.0
+ Added
+ * Added get_datetime parameter to Console, to allow for
+ repeatable tests
+ * Added get_time parameter to Console
+ * Added rich.abc.RichRenderable
+ * Added expand_all to rich.pretty.install()
+ * Added locals_max_length, and locals_max_string to Traceback and
+ logging.RichHandler
+ * Set defaults of max_length and max_string for Traceback to 10
+ and 80
+ * Added disable argument to Progress
+ Changed
+ * Reformatted test card (python -m rich)
+ Fixed
+ * Fixed redirecting of stderr in Progress
+ * Fixed broken expanded tuple of one #445
+ * Fixed justify argument not working in console.log #460
+- Update to version 9.2.0
+ Added
+ * Added tracebacks_show_locals parameter to RichHandler
+ * Added max_string to Pretty
+ * Added rich.ansi.AnsiDecoder
+ * Added decoding of ansi codes to captured stdout in Progress
+ * Added expand_all to rich.pretty.pprint
+ Changed
+ * Applied dim=True to indent guide styles
+ * Factored out RichHandler.get_style_and_level to allow for
+ overriding in subclasses
+ * Hid progress bars from html export
+ * rich.pretty.pprint now soft wraps
+
+-------------------------------------------------------------------
Old:
----
rich-9.1.0.tar.gz
New:
----
rich-9.5.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-rich.spec ++++++
--- /var/tmp/diff_new_pack.E6KvC7/_old 2020-12-21 10:27:01.204224953 +0100
+++ /var/tmp/diff_new_pack.E6KvC7/_new 2020-12-21 10:27:01.208224957 +0100
@@ -20,7 +20,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-rich
-Version: 9.1.0
+Version: 9.5.1
Release: 0
Summary: A Python library for rich text and beautiful formatting in the terminal
License: MIT
@@ -31,15 +31,15 @@
BuildRequires: %{python_module poetry-core}
BuildRequires: python-rpm-macros
# SECTION test requirements
-BuildRequires: %{python_module colorama >= 0.4.0}
-BuildRequires: %{python_module commonmark >= 0.9.0}
+BuildRequires: %{python_module colorama >= 0.4.3}
+BuildRequires: %{python_module commonmark >= 0.9.1}
BuildRequires: %{python_module pygments >= 2.6.0}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module typing_extensions >= 3.7.4}
# /SECTION
BuildRequires: fdupes
-Requires: python-colorama >= 0.4.0
-Requires: python-commonmark >= 0.9.0
+Requires: python-colorama >= 0.4.3
+Requires: python-commonmark >= 0.9.1
Requires: python-pygments >= 2.6.0
Requires: python-typing_extensions >= 3.7.4
%if %{python_version_nodots} < 37
++++++ rich-9.1.0.tar.gz -> rich-9.5.1.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-rich/rich-9.1.0.tar.gz /work/SRC/openSUSE:Factory/.python-rich.new.5145/rich-9.5.1.tar.gz differ: char 13, line 1
1
0
21 Dec '20
Hello community,
here is the log from the commit of package python-textfsm for openSUSE:Factory checked in at 2020-12-21 10:24:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-textfsm (Old)
and /work/SRC/openSUSE:Factory/.python-textfsm.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-textfsm"
Mon Dec 21 10:24:16 2020 rev:5 rq:857158 version:1.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-textfsm/python-textfsm.changes 2019-12-02 11:30:56.490571225 +0100
+++ /work/SRC/openSUSE:Factory/.python-textfsm.new.5145/python-textfsm.changes 2020-12-21 10:26:58.556221951 +0100
@@ -1,0 +2,7 @@
+Sun Dec 20 10:50:25 UTC 2020 - ecsos <ecsos(a)opensuse.org>
+
+- Remove Conflicts: python-texttable because it should fixed since
+ version 1.0.0. https://github.com/google/textfsm/issues/77
+ texttable.py is now in subdir textfsm.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-textfsm.spec ++++++
--- /var/tmp/diff_new_pack.sCsnnF/_old 2020-12-21 10:26:59.036222496 +0100
+++ /var/tmp/diff_new_pack.sCsnnF/_new 2020-12-21 10:26:59.040222500 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-textfsm
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -38,11 +38,7 @@
%ifpython2
Requires: python-future
%endif
-Conflicts: python-texttable
BuildArch: noarch
-%ifpython2
-Conflicts: %{oldpython}-texttable
-%endif
%python_subpackages
%description
1
0
21 Dec '20
Hello community,
here is the log from the commit of package python-mbstrdecoder for openSUSE:Factory checked in at 2020-12-21 10:24:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mbstrdecoder (Old)
and /work/SRC/openSUSE:Factory/.python-mbstrdecoder.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mbstrdecoder"
Mon Dec 21 10:24:15 2020 rev:6 rq:857157 version:1.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mbstrdecoder/python-mbstrdecoder.changes 2020-04-07 10:28:41.654321002 +0200
+++ /work/SRC/openSUSE:Factory/.python-mbstrdecoder.new.5145/python-mbstrdecoder.changes 2020-12-21 10:26:57.888221194 +0100
@@ -1,0 +2,5 @@
+Sun Dec 20 08:22:59 UTC 2020 - John Vandenberg <jayvdb(a)gmail.com>
+
+- Allow use with chardet v4
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-mbstrdecoder.spec ++++++
--- /var/tmp/diff_new_pack.LCZyq4/_old 2020-12-21 10:26:58.408221784 +0100
+++ /var/tmp/diff_new_pack.LCZyq4/_new 2020-12-21 10:26:58.412221788 +0100
@@ -45,6 +45,10 @@
# Remove build alias
sed -i '/build =/d' setup.cfg
+# Remove chardet v4 block
+# Effectively the same as https://github.com/thombashi/mbstrdecoder/pull/4
+sed -i 's/,<4.0.0//' setup.py
+
%build
%python_build
1
0
21 Dec '20
Hello community,
here is the log from the commit of package python-pysaml2 for openSUSE:Factory checked in at 2020-12-21 10:24:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pysaml2 (Old)
and /work/SRC/openSUSE:Factory/.python-pysaml2.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pysaml2"
Mon Dec 21 10:24:12 2020 rev:19 rq:857125 version:6.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pysaml2/python-pysaml2.changes 2020-07-15 15:06:06.631473845 +0200
+++ /work/SRC/openSUSE:Factory/.python-pysaml2.new.5145/python-pysaml2.changes 2020-12-21 10:26:56.188219267 +0100
@@ -1,0 +2,31 @@
+Sun Dec 20 10:04:41 UTC 2020 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 6.3.1:
+ - Fix extraction of RegistrationInfo when no information is available
+ - Fix http_info struct to include status-code
+ - Allow to specify policy configurations based on the registration authority.
+ - Add new configuration option `logout_responses_signed` to sign logout responses.
+ - When available and appropriate return the ResponseLocation along with the Location
+ attribute.
+ - Always use base64.encodebytes; base64.encodestring has been dropped.
+ - Examples: fix IdP example that was outputing debug statements on stdout that became
+ part of its metadata.
+ - CI/CD: Use Ubuntu bionic as the host to run the CI/CD process.
+ - CI/CD: Pre-releases are now available on [test.pypi.org][pypi.test.pysaml2]. Each
+ commit/merge on the master branch autotically creates a new pre-release. To install a
+ prelease, run:
+ - Fix the generated xsd:ID format for EncryptedData and EncryptedKey elements
+ - Set the default value for the NameFormat attribute to unspecified when parsing
+ - Support arbitrary entity attributes
+ - Replace all asserts with proper checks
+ - Allow request signing in artifact2message
+ - Support logging configuration through the python logger
+ - Fix wrong identifiers for ecdsa algos
+ - Fix automatic inversion of attribute map files
+ - Factor out common codepaths in attribute_converter
+ - Remove uneeded exception logging
+ - Docs: Update configuration options documentation
+ - Examples: Support both str and bytes in SAML requests on the example idp
+ - Examples: Update to key generation to 2048 bits
+
+-------------------------------------------------------------------
Old:
----
v6.1.0.tar.gz
New:
----
v6.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pysaml2.spec ++++++
--- /var/tmp/diff_new_pack.xxlac9/_old 2020-12-21 10:26:56.964220147 +0100
+++ /var/tmp/diff_new_pack.xxlac9/_new 2020-12-21 10:26:56.968220151 +0100
@@ -20,7 +20,7 @@
%global modname pysaml2
%global skip_python2 1
Name: python-pysaml2
-Version: 6.1.0
+Version: 6.3.1
Release: 0
Summary: Python implementation of SAML Version 2 to be used in a WSGI environment
License: Apache-2.0
++++++ v6.1.0.tar.gz -> v6.3.1.tar.gz ++++++
++++ 4590 lines of diff (skipped)
1
0
21 Dec '20
Hello community,
here is the log from the commit of package python-aniso8601 for openSUSE:Factory checked in at 2020-12-21 10:24:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-aniso8601 (Old)
and /work/SRC/openSUSE:Factory/.python-aniso8601.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-aniso8601"
Mon Dec 21 10:24:11 2020 rev:8 rq:857119 version:8.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-aniso8601/python-aniso8601.changes 2020-04-23 18:32:47.588358114 +0200
+++ /work/SRC/openSUSE:Factory/.python-aniso8601.new.5145/python-aniso8601.changes 2020-12-21 10:26:55.308218270 +0100
@@ -1,0 +2,19 @@
+Sun Dec 20 09:47:26 UTC 2020 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 8.1.0:
+ * Empty string arguments to get_date_resolution and parse_date now raise ISOFormatError, fixes 26
+ * None and non-string arguments to get_date_resolution and parse_date now raise ValueError
+ * Empty string arguments to parse_duration now raise ISOFormatError
+ * None and non-string arguments to parse_duration now raise ValueError
+ * Empty string arguments to parse_interval and parse_repeating_interval now raise ISOFormatError
+ * None and non-string arguments to parse_interval and parse_repeating_internval now raise ValueError
+ * Empty string arguments to get_time_resolution and parse_time now raise ISOFormatError
+ * None and non-string arguments to parse_time now raise ValueError
+ * None and non-string arguments to parse_timezone now raise ValueError
+ * Empty string arguments to parse_datetime now raise ISOFormatError
+ * None and non-string arguments to parse_datetime now raise ValueError
+ * Missing delimiter in datetime strings when calling parse_datetime now raises ISOFormatError
+ * Missing delimiter in regular and repeating interval strings when calling parse_interval and parse_repeating_interval now raises ISOFormatError
+ * get_time_resolution now correctly throws ISOFormatError when a time component has too many characters in a time using ":" as a separator
+
+-------------------------------------------------------------------
Old:
----
aniso8601-8.0.0.tar.gz
New:
----
aniso8601-8.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-aniso8601.spec ++++++
--- /var/tmp/diff_new_pack.cnYxAf/_old 2020-12-21 10:26:55.944218991 +0100
+++ /var/tmp/diff_new_pack.cnYxAf/_new 2020-12-21 10:26:55.948218996 +0100
@@ -20,7 +20,7 @@
%define modname aniso8601
%bcond_without python2
Name: python-%{modname}
-Version: 8.0.0
+Version: 8.1.0
Release: 0
Summary: A library for parsing ISO 8601 strings
License: BSD-3-Clause
++++++ aniso8601-8.0.0.tar.gz -> aniso8601-8.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/LICENSE new/aniso8601-8.1.0/LICENSE
--- old/aniso8601-8.0.0/LICENSE 2019-01-08 22:27:49.000000000 +0100
+++ new/aniso8601-8.1.0/LICENSE 2020-11-23 20:26:01.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2019, Brandon Nielsen
+Copyright (c) 2020, Brandon Nielsen
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/PKG-INFO new/aniso8601-8.1.0/PKG-INFO
--- old/aniso8601-8.0.0/PKG-INFO 2019-09-12 02:58:51.000000000 +0200
+++ new/aniso8601-8.1.0/PKG-INFO 2020-11-30 21:16:01.733981800 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: aniso8601
-Version: 8.0.0
+Version: 8.1.0
Summary: A library for parsing ISO 8601 strings.
Home-page: https://bitbucket.org/nielsenb/aniso8601
Author: Brandon Nielsen
@@ -75,13 +75,13 @@
>>> aniso8601.parse_datetime('2018-03-06T23:59:60')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- File "aniso8601/time.py", line 131, in parse_datetime
+ File "aniso8601/time.py", line 135, in parse_datetime
return builder.build_datetime(datepart, timepart)
- File "aniso8601/builder.py", line 300, in build_datetime
+ File "aniso8601/builders/python.py", line 176, in build_datetime
cls._build_object(time))
- File "aniso8601/builder.py", line 71, in _build_object
- ss=parsetuple[2], tz=parsetuple[3])
- File "aniso8601/builder.py", line 253, in build_time
+ File "aniso8601/builders/__init__.py", line 63, in _build_object
+ return cls.build_time(hh=parsetuple[0], mm=parsetuple[1],
+ File "aniso8601/builders/python.py", line 134, in build_time
raise LeapSecondError('Leap seconds are not supported.')
aniso8601.exceptions.LeapSecondError: Leap seconds are not supported.
@@ -156,11 +156,11 @@
>>> aniso8601.parse_time('23:59:60')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- File "aniso8601/time.py", line 116, in parse_time
- return _RESOLUTION_MAP[get_time_resolution(timestr)](timestr, tz, builder)
- File "aniso8601/time.py", line 165, in _parse_second_time
- return builder.build_time(hh=hourstr, mm=minutestr, ss=secondstr, tz=tz)
- File "aniso8601/builder.py", line 253, in build_time
+ File "aniso8601/time.py", line 113, in parse_time
+ return _RESOLUTION_MAP[timeresolution](timestr, tz, builder)
+ File "aniso8601/time.py", line 169, in _parse_second_time
+ return builder.build_time(hh=normalize(hourstr), mm=normalize(minutestr),
+ File "aniso8601/builders/python.py", line 134, in build_time
raise LeapSecondError('Leap seconds are not supported.')
aniso8601.exceptions.LeapSecondError: Leap seconds are not supported.
@@ -257,7 +257,7 @@
>>> list(aniso8601.parse_repeating_interval('R/PT1H2M/1980-03-05T01:01:00'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- File "aniso8601/builders/python.py", line 463, in _date_generator_unbounded
+ File "aniso8601/builders/python.py", line 419, in _date_generator_unbounded
currentdate += timedelta
OverflowError: date value out of range
@@ -421,4 +421,6 @@
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: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/README.rst new/aniso8601-8.1.0/README.rst
--- old/aniso8601-8.0.0/README.rst 2019-09-12 02:53:18.000000000 +0200
+++ new/aniso8601-8.1.0/README.rst 2020-11-24 03:24:37.000000000 +0100
@@ -64,13 +64,13 @@
>>> aniso8601.parse_datetime('2018-03-06T23:59:60')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- File "aniso8601/time.py", line 131, in parse_datetime
+ File "aniso8601/time.py", line 135, in parse_datetime
return builder.build_datetime(datepart, timepart)
- File "aniso8601/builder.py", line 300, in build_datetime
+ File "aniso8601/builders/python.py", line 176, in build_datetime
cls._build_object(time))
- File "aniso8601/builder.py", line 71, in _build_object
- ss=parsetuple[2], tz=parsetuple[3])
- File "aniso8601/builder.py", line 253, in build_time
+ File "aniso8601/builders/__init__.py", line 63, in _build_object
+ return cls.build_time(hh=parsetuple[0], mm=parsetuple[1],
+ File "aniso8601/builders/python.py", line 134, in build_time
raise LeapSecondError('Leap seconds are not supported.')
aniso8601.exceptions.LeapSecondError: Leap seconds are not supported.
@@ -145,11 +145,11 @@
>>> aniso8601.parse_time('23:59:60')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- File "aniso8601/time.py", line 116, in parse_time
- return _RESOLUTION_MAP[get_time_resolution(timestr)](timestr, tz, builder)
- File "aniso8601/time.py", line 165, in _parse_second_time
- return builder.build_time(hh=hourstr, mm=minutestr, ss=secondstr, tz=tz)
- File "aniso8601/builder.py", line 253, in build_time
+ File "aniso8601/time.py", line 113, in parse_time
+ return _RESOLUTION_MAP[timeresolution](timestr, tz, builder)
+ File "aniso8601/time.py", line 169, in _parse_second_time
+ return builder.build_time(hh=normalize(hourstr), mm=normalize(minutestr),
+ File "aniso8601/builders/python.py", line 134, in build_time
raise LeapSecondError('Leap seconds are not supported.')
aniso8601.exceptions.LeapSecondError: Leap seconds are not supported.
@@ -246,7 +246,7 @@
>>> list(aniso8601.parse_repeating_interval('R/PT1H2M/1980-03-05T01:01:00'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- File "aniso8601/builders/python.py", line 463, in _date_generator_unbounded
+ File "aniso8601/builders/python.py", line 419, in _date_generator_unbounded
currentdate += timedelta
OverflowError: date value out of range
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/__init__.py new/aniso8601-8.1.0/aniso8601/__init__.py
--- old/aniso8601-8.0.0/aniso8601/__init__.py 2019-01-08 22:27:49.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/__init__.py 2020-11-23 20:30:16.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/builders/__init__.py new/aniso8601-8.1.0/aniso8601/builders/__init__.py
--- old/aniso8601-8.0.0/aniso8601/builders/__init__.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/builders/__init__.py 2020-11-23 20:31:43.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/builders/python.py new/aniso8601-8.1.0/aniso8601/builders/python.py
--- old/aniso8601-8.0.0/aniso8601/builders/python.py 2019-06-11 21:12:26.000000000 +0200
+++ new/aniso8601-8.1.0/aniso8601/builders/python.py 2020-11-23 20:31:59.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/builders/tests/__init__.py new/aniso8601-8.1.0/aniso8601/builders/tests/__init__.py
--- old/aniso8601-8.0.0/aniso8601/builders/tests/__init__.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/builders/tests/__init__.py 2020-11-23 20:32:57.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/builders/tests/test_init.py new/aniso8601-8.1.0/aniso8601/builders/tests/test_init.py
--- old/aniso8601-8.0.0/aniso8601/builders/tests/test_init.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/builders/tests/test_init.py 2020-11-23 20:32:42.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/builders/tests/test_python.py new/aniso8601-8.1.0/aniso8601/builders/tests/test_python.py
--- old/aniso8601-8.0.0/aniso8601/builders/tests/test_python.py 2019-06-11 21:12:26.000000000 +0200
+++ new/aniso8601-8.1.0/aniso8601/builders/tests/test_python.py 2020-11-23 20:33:05.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/compat.py new/aniso8601-8.1.0/aniso8601/compat.py
--- old/aniso8601-8.0.0/aniso8601/compat.py 2019-01-08 22:27:49.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/compat.py 2020-11-23 20:31:26.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/date.py new/aniso8601-8.1.0/aniso8601/date.py
--- old/aniso8601-8.0.0/aniso8601/date.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/date.py 2020-11-24 03:10:00.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -23,13 +23,18 @@
#YYYYWwwD
#YYYY-DDD
#YYYYDDD
+ if not isinstance(isodatestr, str):
+ raise ValueError('Date must be string.')
+
if isodatestr.startswith('+') or isodatestr.startswith('-'):
raise NotImplementedError('ISO 8601 extended year representation '
'not supported.')
- if isodatestr[0].isdigit() is False or isodatestr[-1].isdigit() is False:
+ if (len(isodatestr) == 0 or
+ isodatestr[0].isdigit() is False
+ or isodatestr[-1].isdigit() is False):
raise ISOFormatError('"{0}" is not a valid ISO 8601 date.'
- .format(isodatestr))
+ .format(isodatestr))
if isodatestr.find('W') != -1:
#Handle ISO 8601 week date format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/decimalfraction.py new/aniso8601-8.1.0/aniso8601/decimalfraction.py
--- old/aniso8601-8.0.0/aniso8601/decimalfraction.py 2019-09-12 02:53:18.000000000 +0200
+++ new/aniso8601-8.1.0/aniso8601/decimalfraction.py 2020-11-23 20:30:56.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/duration.py new/aniso8601-8.1.0/aniso8601/duration.py
--- old/aniso8601-8.0.0/aniso8601/duration.py 2019-09-12 02:53:18.000000000 +0200
+++ new/aniso8601-8.1.0/aniso8601/duration.py 2020-11-24 03:10:00.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -21,6 +21,13 @@
#PnYnMnDTnHnMnS (or any reduced precision equivalent)
#P<date>T<time>
+ if not isinstance(isodurationstr, str):
+ raise ValueError('Duration must be string.')
+
+ if len(isodurationstr) == 0:
+ raise ISOFormatError('"{0}" is not a valid ISO 8601 duration.'
+ .format(isodurationstr))
+
if isodurationstr[0] != 'P':
raise ISOFormatError('ISO 8601 duration must start with a P.')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/exceptions.py new/aniso8601-8.1.0/aniso8601/exceptions.py
--- old/aniso8601-8.0.0/aniso8601/exceptions.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/exceptions.py 2020-11-23 20:30:27.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/interval.py new/aniso8601-8.1.0/aniso8601/interval.py
--- old/aniso8601-8.0.0/aniso8601/interval.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/interval.py 2020-11-24 03:10:00.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -32,6 +32,17 @@
#Is expressly not supported as there is no way to provide the additional
#required context.
+ if not isinstance(isointervalstr, str):
+ raise ValueError('Interval must be string.')
+
+ if len(isointervalstr) == 0:
+ raise ISOFormatError('Interval string is empty.')
+
+ if intervaldelimiter not in isointervalstr:
+ raise ISOFormatError('Interval delimiter "{0}" is not in interval '
+ 'string "{1}".'
+ .format(intervaldelimiter, isointervalstr))
+
if isointervalstr[0] == 'R':
raise ISOFormatError('ISO 8601 repeating intervals must be parsed '
'with parse_repeating_interval.')
@@ -47,6 +58,17 @@
#Rnn/<interval>
#R/<interval>
+ if not isinstance(isointervalstr, str):
+ raise ValueError('Interval must be string.')
+
+ if len(isointervalstr) == 0:
+ raise ISOFormatError('Repeating interval string is empty.')
+
+ if intervaldelimiter not in isointervalstr:
+ raise ISOFormatError('Interval delimiter "{0}" is not in interval '
+ 'string "{1}".'
+ .format(intervaldelimiter, isointervalstr))
+
if isointervalstr[0] != 'R':
raise ISOFormatError('ISO 8601 repeating interval must start '
'with an R.')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/resolution.py new/aniso8601-8.1.0/aniso8601/resolution.py
--- old/aniso8601-8.0.0/aniso8601/resolution.py 2019-01-08 22:27:49.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/resolution.py 2020-11-23 20:29:50.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/tests/__init__.py new/aniso8601-8.1.0/aniso8601/tests/__init__.py
--- old/aniso8601-8.0.0/aniso8601/tests/__init__.py 2019-01-08 22:27:49.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/tests/__init__.py 2020-11-23 20:29:30.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/tests/compat.py new/aniso8601-8.1.0/aniso8601/tests/compat.py
--- old/aniso8601-8.0.0/aniso8601/tests/compat.py 2019-01-08 22:27:49.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/tests/compat.py 2020-11-23 20:29:15.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/tests/test_date.py new/aniso8601-8.1.0/aniso8601/tests/test_date.py
--- old/aniso8601-8.0.0/aniso8601/tests/test_date.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/tests/test_date.py 2020-11-24 03:10:00.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -43,6 +43,42 @@
self.assertEqual(get_date_resolution('1981095'),
DateResolution.Ordinal)
+ def test_get_date_resolution_badtype(self):
+ testtuples = (None, 1, False, 1.234)
+
+ for testtuple in testtuples:
+ with self.assertRaises(ValueError):
+ get_date_resolution(testtuple)
+
+ def test_get_date_resolution_extended_year(self):
+ testtuples = ('+2000', '+30000')
+
+ for testtuple in testtuples:
+ with self.assertRaises(NotImplementedError):
+ get_date_resolution(testtuple)
+
+ def test_get_date_resolution_badweek(self):
+ testtuples = ('2004-W1', '2004W1')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ get_date_resolution(testtuple)
+
+ def test_get_date_resolution_badweekday(self):
+ testtuples = ('2004-W53-67', '2004W5367')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ get_date_resolution(testtuple)
+
+ def test_get_date_resolution_badstr(self):
+ testtuples = ('W53', '2004-W', '2014-01-230', '2014-012-23',
+ '201-01-23', '201401230', '201401', 'bad', '')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ get_date_resolution(testtuple)
+
class TestDateParserFunctions(unittest.TestCase):
def test_parse_date(self):
testtuples = (('2013', {'YYYY': '2013'}),
@@ -69,6 +105,21 @@
self.assertEqual(result, testtuple[1])
mockBuildDate.assert_called_once_with(**testtuple[1])
+ def test_parse_date_badtype(self):
+ testtuples = (None, 1, False, 1.234)
+
+ for testtuple in testtuples:
+ with self.assertRaises(ValueError):
+ parse_date(testtuple, builder=None)
+
+ def test_parse_date_badstr(self):
+ testtuples = ('W53', '2004-W', '2014-01-230', '2014-012-23',
+ '201-01-23', '201401230', '201401', 'bad', '')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ parse_date(testtuple, builder=None)
+
def test_parse_date_mockbuilder(self):
mockBuilder = mock.Mock()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/tests/test_decimalfraction.py new/aniso8601-8.1.0/aniso8601/tests/test_decimalfraction.py
--- old/aniso8601-8.0.0/aniso8601/tests/test_decimalfraction.py 2019-09-12 02:55:32.000000000 +0200
+++ new/aniso8601-8.1.0/aniso8601/tests/test_decimalfraction.py 2020-11-23 20:28:35.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/tests/test_duration.py new/aniso8601-8.1.0/aniso8601/tests/test_duration.py
--- old/aniso8601-8.0.0/aniso8601/tests/test_duration.py 2019-09-12 02:53:18.000000000 +0200
+++ new/aniso8601-8.1.0/aniso8601/tests/test_duration.py 2020-11-24 03:10:00.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -106,6 +106,13 @@
self.assertEqual(result, expectedargs)
mockBuilder.build_duration.assert_called_once_with(**expectedargs)
+ def test_parse_duration_badtype(self):
+ testtuples = (None, 1, False, 1.234)
+
+ for testtuple in testtuples:
+ with self.assertRaises(ValueError):
+ parse_duration(testtuple, builder=None)
+
def test_parse_duration_nop(self):
with self.assertRaises(ISOFormatError):
#Duration must start with a P
@@ -173,6 +180,13 @@
with self.assertRaises(ISOFormatError):
parse_duration('PT1S1H', builder=None)
+ def test_parse_duration_badstr(self):
+ testtuples = ('bad', '')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ValueError):
+ parse_duration(testtuple, builder=None)
+
def test_parse_duration_prescribed(self):
testtuples = (('P1Y2M3DT4H54M6S', {'PnY': '1', 'PnM': '2',
'PnD': '3', 'TnH': '4',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/tests/test_init.py new/aniso8601-8.1.0/aniso8601/tests/test_init.py
--- old/aniso8601-8.0.0/aniso8601/tests/test_init.py 2019-01-08 22:27:49.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/tests/test_init.py 2020-11-23 20:29:01.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/tests/test_interval.py new/aniso8601-8.1.0/aniso8601/tests/test_interval.py
--- old/aniso8601-8.0.0/aniso8601/tests/test_interval.py 2019-09-12 02:53:18.000000000 +0200
+++ new/aniso8601-8.1.0/aniso8601/tests/test_interval.py 2020-11-24 03:10:00.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -269,6 +269,28 @@
self.assertEqual(result, expectedargs)
mockBuilder.build_interval.assert_called_once_with(**expectedargs)
+ def test_parse_interval_badtype(self):
+ testtuples = (None, 1, False, 1.234)
+
+ for testtuple in testtuples:
+ with self.assertRaises(ValueError):
+ parse_interval(testtuple, builder=None)
+
+ def test_parse_interval_baddelimiter(self):
+ testtuples = ('1980-03-05T01:01:00,1981-04-05T01:01:00',
+ 'P1M 1981-04-05T01:01:00')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ parse_interval(testtuple, builder=None)
+
+ def test_parse_interval_badstr(self):
+ testtuples = ('bad', '')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ parse_interval(testtuple, builder=None)
+
def test_parse_interval_repeating(self):
#Parse interval can't parse repeating intervals
with self.assertRaises(ISOFormatError):
@@ -283,16 +305,16 @@
def test_parse_interval_suffixgarbage(self):
#Don't allow garbage after the duration
#https://bitbucket.org/nielsenb/aniso8601/issues/9/durations-with-trailing-garbage-are-parsed
- with self.assertRaises(ValueError):
+ with self.assertRaises(ISOFormatError):
parse_interval('2001/P1Dasdf', builder=None)
- with self.assertRaises(ValueError):
+ with self.assertRaises(ISOFormatError):
parse_interval('P1Dasdf/2001', builder=None)
- with self.assertRaises(ValueError):
+ with self.assertRaises(ISOFormatError):
parse_interval('2001/P0003-06-04T12:30:05.5asdfasdf', builder=None)
- with self.assertRaises(ValueError):
+ with self.assertRaises(ISOFormatError):
parse_interval('P0003-06-04T12:30:05.5asdfasdf/2001', builder=None)
class TestRepeatingIntervalParserFunctions(unittest.TestCase):
@@ -458,6 +480,20 @@
self.assertEqual(result, args)
mockBuilder.build_repeating_interval.assert_called_once_with(**args)
+ def test_parse_repeating_interval_badtype(self):
+ testtuples = (None, 1, False, 1.234)
+
+ for testtuple in testtuples:
+ with self.assertRaises(ValueError):
+ parse_repeating_interval(testtuple, builder=None)
+
+ def test_parse_repeating_interval_baddelimiter(self):
+ testtuples = ('R,PT1H2M,1980-03-05T01:01:00', 'R3 1981-04-05 P1D')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ parse_repeating_interval(testtuple, builder=None)
+
def test_parse_repeating_interval_suffixgarbage(self):
#Don't allow garbage after the duration
#https://bitbucket.org/nielsenb/aniso8601/issues/9/durations-with-trailing-garbage-are-parsed
@@ -470,6 +506,13 @@
'P0003-06-04T12:30:05.5asdfasdf',
builder=None)
+ def test_parse_repeating_interval_badstr(self):
+ testtuples = ('bad', '')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ parse_repeating_interval(testtuple, builder=None)
+
def test_parse_interval_internal(self):
#Test the internal _parse_interval function
testtuples = (('P1M/1981-04-05T01:01:00',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/tests/test_time.py new/aniso8601-8.1.0/aniso8601/tests/test_time.py
--- old/aniso8601-8.0.0/aniso8601/tests/test_time.py 2019-09-12 02:53:18.000000000 +0200
+++ new/aniso8601-8.1.0/aniso8601/tests/test_time.py 2020-11-24 03:10:00.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -9,13 +9,14 @@
import unittest
import aniso8601
+from aniso8601.exceptions import ISOFormatError
from aniso8601.resolution import TimeResolution
from aniso8601.time import (get_time_resolution, parse_datetime, parse_time,
_parse_hour, _parse_minute_time,
_parse_second_time, _split_tz)
from aniso8601.tests.compat import mock
-class TestTimeParserFunctions(unittest.TestCase):
+class TestTimeResolutionFunctions(unittest.TestCase):
def test_get_time_resolution(self):
self.assertEqual(get_time_resolution('01:23:45'),
TimeResolution.Seconds)
@@ -66,6 +67,21 @@
self.assertEqual(get_time_resolution('06:14:00.000123Z'),
TimeResolution.Seconds)
+ def test_get_time_resolution_badtype(self):
+ testtuples = (None, 1, False, 1.234)
+
+ for testtuple in testtuples:
+ with self.assertRaises(ValueError):
+ get_time_resolution(testtuple)
+
+ def test_get_time_resolution_badstr(self):
+ testtuples = ('A6:14:00.000123Z', '06:14:0B', 'bad', '')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ get_time_resolution(testtuple)
+
+class TestTimeParserFunctions(unittest.TestCase):
def test_parse_time(self):
testtuples = (('01:23:45', {'hh': '01', 'mm': '23',
'ss': '45', 'tz': None}),
@@ -191,6 +207,20 @@
self.assertEqual(result, testtuple[1])
mockBuildTime.assert_called_once_with(**testtuple[1])
+ def test_parse_time_badtype(self):
+ testtuples = (None, 1, False, 1.234)
+
+ for testtuple in testtuples:
+ with self.assertRaises(ValueError):
+ parse_time(testtuple, builder=None)
+
+ def test_parse_time_badstr(self):
+ testtuples = ('A6:14:00.000123Z', '06:14:0B', 'bad', '')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ parse_time(testtuple, builder=None)
+
def test_parse_time_mockbuilder(self):
mockBuilder = mock.Mock()
@@ -302,6 +332,34 @@
self.assertEqual(result, expectedargs)
mockBuildDateTime.assert_called_once_with(*expectedargs)
+ def test_parse_datetime_baddelimiter(self):
+ testtuples = ('1981-04-05,23:21:28,512400Z',
+ '2004-W53-6 23:21:28.512400-12:3',
+ '1981040523:21:28')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ parse_datetime(testtuple, builder=None)
+
+ def test_parse_datetime_badtype(self):
+ testtuples = (None, 1, False, 1.234)
+
+ for testtuple in testtuples:
+ with self.assertRaises(ValueError):
+ parse_datetime(testtuple, builder=None)
+
+ def test_parse_datetime_badstr(self):
+ testtuples = ('1981-04-05TA6:14:00.000123Z',
+ '2004-W53-6T06:14:0B',
+ '2014-01-230T23:21:28+00',
+ '201401230T01:03:11.858714',
+ 'bad',
+ '')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ parse_time(testtuple, builder=None)
+
def test_parse_datetime_mockbuilder(self):
mockBuilder = mock.Mock()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/tests/test_timezone.py new/aniso8601-8.1.0/aniso8601/tests/test_timezone.py
--- old/aniso8601-8.0.0/aniso8601/tests/test_timezone.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/tests/test_timezone.py 2020-11-24 03:10:00.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -62,6 +62,20 @@
self.assertEqual(result, testtuple[1])
mockBuildTimezone.assert_called_once_with(**testtuple[1])
+ def test_parse_timezone_badtype(self):
+ testtuples = (None, 1, False, 1.234)
+
+ for testtuple in testtuples:
+ with self.assertRaises(ValueError):
+ parse_timezone(testtuple, builder=None)
+
+ def test_parse_timezone_badstr(self):
+ testtuples = ('+1', '-00', '-0000', '-00:00', '01', '0123', 'bad', '')
+
+ for testtuple in testtuples:
+ with self.assertRaises(ISOFormatError):
+ parse_timezone(testtuple, builder=None)
+
def test_parse_timezone_mockbuilder(self):
mockBuilder = mock.Mock()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/tests/test_utcoffset.py new/aniso8601-8.1.0/aniso8601/tests/test_utcoffset.py
--- old/aniso8601-8.0.0/aniso8601/tests/test_utcoffset.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/tests/test_utcoffset.py 2020-11-23 20:28:47.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/time.py new/aniso8601-8.1.0/aniso8601/time.py
--- old/aniso8601-8.0.0/aniso8601/time.py 2019-09-12 02:53:18.000000000 +0200
+++ new/aniso8601-8.1.0/aniso8601/time.py 2020-11-24 03:10:00.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -42,15 +42,16 @@
#hh:mm±hh
#hhmm±hh
#hh±hh
+ if not isinstance(isotimestr, str):
+ raise ValueError('Time must be string.')
- timestr = _split_tz(isotimestr)[0]
+ timestr = _split_tz(isotimestr)[0].replace(':', '')
- if timestr.count(':') == 2:
- #hh:mm:ss
- return TimeResolution.Seconds
- elif timestr.count(':') == 1:
- #hh:mm
- return TimeResolution.Minutes
+ if (len(timestr) == 0 or
+ timestr[0].isdigit() is False or
+ timestr[-1].isdigit() is False):
+ raise ISOFormatError('"{0}" is not a valid ISO 8601 time.'
+ .format(timestr))
#Format must be hhmmss, hhmm, or hh
timestrlen = find_separator(timestr)
@@ -100,19 +101,16 @@
#hh:mm±hh
#hhmm±hh
#hh±hh
+ timeresolution = get_time_resolution(isotimestr)
(timestr, tzstr) = _split_tz(isotimestr)
- if timestr[0].isdigit() is False or timestr[-1].isdigit() is False:
- raise ISOFormatError('"{0}" is not a valid ISO 8601 time.'
- .format(timestr))
-
if tzstr is None:
tz = None
else:
tz = parse_timezone(tzstr, builder=TupleBuilder)
- return _RESOLUTION_MAP[get_time_resolution(timestr)](timestr, tz, builder)
+ return _RESOLUTION_MAP[timeresolution](timestr, tz, builder)
def parse_datetime(isodatetimestr, delimiter='T', builder=PythonTimeBuilder):
#Given a string in ISO 8601 date time format, return a datetime.datetime
@@ -120,6 +118,13 @@
#By default, the ISO 8601 specified T delimiter is used to split the
#date and time (<date>T<time>). Fixed offset tzdata will be included
#if UTC offset is given in the input string.
+ if not isinstance(isodatetimestr, str):
+ raise ValueError('Date time must be string.')
+
+ if delimiter not in isodatetimestr:
+ raise ISOFormatError('Delimiter "{0}" is not in combined date time '
+ 'string "{1}".'
+ .format(delimiter, isodatetimestr))
isodatestr, isotimestr = isodatetimestr.split(delimiter, 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/timezone.py new/aniso8601-8.1.0/aniso8601/timezone.py
--- old/aniso8601-8.0.0/aniso8601/timezone.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/timezone.py 2020-11-24 03:10:00.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
@@ -11,6 +11,9 @@
def parse_timezone(tzstr, builder=PythonTimeBuilder):
#tzstr can be Z, ±hh:mm, ±hhmm, ±hh
+ if not isinstance(tzstr, str):
+ raise ValueError('Time zone must be string.')
+
if 'Z' in tzstr:
if len(tzstr) != 1:
raise ISOFormatError('"{0}" is not a valid ISO 8601 time offset.'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601/utcoffset.py new/aniso8601-8.1.0/aniso8601/utcoffset.py
--- old/aniso8601-8.0.0/aniso8601/utcoffset.py 2019-03-01 21:54:25.000000000 +0100
+++ new/aniso8601-8.1.0/aniso8601/utcoffset.py 2020-11-23 20:26:49.000000000 +0100
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Brandon Nielsen
+# Copyright (c) 2020, Brandon Nielsen
# All rights reserved.
#
# This software may be modified and distributed under the terms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/aniso8601.egg-info/PKG-INFO new/aniso8601-8.1.0/aniso8601.egg-info/PKG-INFO
--- old/aniso8601-8.0.0/aniso8601.egg-info/PKG-INFO 2019-09-12 02:58:51.000000000 +0200
+++ new/aniso8601-8.1.0/aniso8601.egg-info/PKG-INFO 2020-11-30 21:16:01.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: aniso8601
-Version: 8.0.0
+Version: 8.1.0
Summary: A library for parsing ISO 8601 strings.
Home-page: https://bitbucket.org/nielsenb/aniso8601
Author: Brandon Nielsen
@@ -75,13 +75,13 @@
>>> aniso8601.parse_datetime('2018-03-06T23:59:60')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- File "aniso8601/time.py", line 131, in parse_datetime
+ File "aniso8601/time.py", line 135, in parse_datetime
return builder.build_datetime(datepart, timepart)
- File "aniso8601/builder.py", line 300, in build_datetime
+ File "aniso8601/builders/python.py", line 176, in build_datetime
cls._build_object(time))
- File "aniso8601/builder.py", line 71, in _build_object
- ss=parsetuple[2], tz=parsetuple[3])
- File "aniso8601/builder.py", line 253, in build_time
+ File "aniso8601/builders/__init__.py", line 63, in _build_object
+ return cls.build_time(hh=parsetuple[0], mm=parsetuple[1],
+ File "aniso8601/builders/python.py", line 134, in build_time
raise LeapSecondError('Leap seconds are not supported.')
aniso8601.exceptions.LeapSecondError: Leap seconds are not supported.
@@ -156,11 +156,11 @@
>>> aniso8601.parse_time('23:59:60')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- File "aniso8601/time.py", line 116, in parse_time
- return _RESOLUTION_MAP[get_time_resolution(timestr)](timestr, tz, builder)
- File "aniso8601/time.py", line 165, in _parse_second_time
- return builder.build_time(hh=hourstr, mm=minutestr, ss=secondstr, tz=tz)
- File "aniso8601/builder.py", line 253, in build_time
+ File "aniso8601/time.py", line 113, in parse_time
+ return _RESOLUTION_MAP[timeresolution](timestr, tz, builder)
+ File "aniso8601/time.py", line 169, in _parse_second_time
+ return builder.build_time(hh=normalize(hourstr), mm=normalize(minutestr),
+ File "aniso8601/builders/python.py", line 134, in build_time
raise LeapSecondError('Leap seconds are not supported.')
aniso8601.exceptions.LeapSecondError: Leap seconds are not supported.
@@ -257,7 +257,7 @@
>>> list(aniso8601.parse_repeating_interval('R/PT1H2M/1980-03-05T01:01:00'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- File "aniso8601/builders/python.py", line 463, in _date_generator_unbounded
+ File "aniso8601/builders/python.py", line 419, in _date_generator_unbounded
currentdate += timedelta
OverflowError: date value out of range
@@ -421,4 +421,6 @@
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: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aniso8601-8.0.0/setup.py new/aniso8601-8.1.0/setup.py
--- old/aniso8601-8.0.0/setup.py 2019-09-12 02:56:27.000000000 +0200
+++ new/aniso8601-8.1.0/setup.py 2020-11-30 21:11:27.000000000 +0100
@@ -16,7 +16,7 @@
setup(
name='aniso8601',
- version='8.0.0',
+ version='8.1.0',
description='A library for parsing ISO 8601 strings.',
long_description=README_TEXT,
author='Brandon Nielsen',
@@ -38,6 +38,8 @@
'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',
'Topic :: Software Development :: Libraries :: Python Modules'
],
keywords='iso8601 parser',
1
0
21 Dec '20
Hello community,
here is the log from the commit of package python-texttable for openSUSE:Factory checked in at 2020-12-21 10:24:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-texttable (Old)
and /work/SRC/openSUSE:Factory/.python-texttable.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-texttable"
Mon Dec 21 10:24:10 2020 rev:6 rq:857117 version:1.6.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-texttable/python-texttable.changes 2019-07-22 17:19:49.113903846 +0200
+++ /work/SRC/openSUSE:Factory/.python-texttable.new.5145/python-texttable.changes 2020-12-21 10:26:54.260217082 +0100
@@ -1,0 +2,6 @@
+Sun Dec 20 09:44:50 UTC 2020 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 1.6.3:
+ * Improve int conversion
+
+-------------------------------------------------------------------
Old:
----
texttable-1.6.2.tar.gz
New:
----
texttable-1.6.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-texttable.spec ++++++
--- /var/tmp/diff_new_pack.Qzx7Jt/_old 2020-12-21 10:26:54.824217722 +0100
+++ /var/tmp/diff_new_pack.Qzx7Jt/_new 2020-12-21 10:26:54.828217726 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-texttable
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 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-texttable
-Version: 1.6.2
+Version: 1.6.3
Release: 0
Summary: Module for creating simple ASCII tables
License: MIT
++++++ texttable-1.6.2.tar.gz -> texttable-1.6.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.2/CHANGELOG.md new/texttable-1.6.3/CHANGELOG.md
--- old/texttable-1.6.2/CHANGELOG.md 2019-07-01 11:39:46.000000000 +0200
+++ new/texttable-1.6.3/CHANGELOG.md 2020-09-06 10:18:57.000000000 +0200
@@ -1,5 +1,8 @@
# Version History
+v1.6.3 (2020-09-06)
+* Improve int conversion (https://github.com/foutaise/texttable/issues/70)
+
v1.6.2 (2019-07-01)
* Fix auto-formatting NaN (https://github.com/foutaise/texttable/pull/60)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.2/LICENSE new/texttable-1.6.3/LICENSE
--- old/texttable-1.6.2/LICENSE 2019-02-15 13:19:32.000000000 +0100
+++ new/texttable-1.6.3/LICENSE 2020-01-15 10:42:06.000000000 +0100
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2019 Gerome Fournier
+Copyright (c) 2020 Gerome Fournier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.2/PKG-INFO new/texttable-1.6.3/PKG-INFO
--- old/texttable-1.6.2/PKG-INFO 2019-07-01 11:47:18.000000000 +0200
+++ new/texttable-1.6.3/PKG-INFO 2020-09-06 10:45:19.122467500 +0200
@@ -1,12 +1,12 @@
Metadata-Version: 2.1
Name: texttable
-Version: 1.6.2
+Version: 1.6.3
Summary: module for creating simple ASCII tables
Home-page: https://github.com/foutaise/texttable/
Author: Gerome Fournier
Author-email: jef(a)foutaise.org
License: MIT
-Download-URL: https://github.com/foutaise/texttable/archive/v1.6.2.tar.gz
+Download-URL: https://github.com/foutaise/texttable/archive/v1.6.3.tar.gz
Description: # texttable
Python module for creating simple ASCII tables
@@ -262,6 +262,10 @@
- preserve empty lines
```
+ ## Forks
+
+ * [latextable](https://github.com/JAEarly/latextable) is a fork of texttable that provide a LaTeX backend.
+
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.2/README.md new/texttable-1.6.3/README.md
--- old/texttable-1.6.2/README.md 2019-07-01 11:40:25.000000000 +0200
+++ new/texttable-1.6.3/README.md 2020-06-21 15:47:55.000000000 +0200
@@ -252,3 +252,7 @@
frinkelpi:
- preserve empty lines
```
+
+## Forks
+
+* [latextable](https://github.com/JAEarly/latextable) is a fork of texttable that provide a LaTeX backend.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.2/setup.py new/texttable-1.6.3/setup.py
--- old/texttable-1.6.2/setup.py 2019-07-01 11:40:28.000000000 +0200
+++ new/texttable-1.6.3/setup.py 2020-09-06 10:19:32.000000000 +0200
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#
# texttable - module for creating simple ASCII tables
-# Copyright (C) 2003-2019 Gerome Fournier <jef(at)foutaise.org>
+# Copyright (C) 2003-2020 Gerome Fournier <jef(at)foutaise.org>
from setuptools import setup
@@ -12,11 +12,11 @@
setup(
name="texttable",
- version="1.6.2",
+ version="1.6.3",
author="Gerome Fournier",
author_email="jef(a)foutaise.org",
url="https://github.com/foutaise/texttable/",
- download_url="https://github.com/foutaise/texttable/archive/v1.6.2.tar.gz",
+ download_url="https://github.com/foutaise/texttable/archive/v1.6.3.tar.gz",
license="MIT",
py_modules=["texttable"],
description=DESCRIPTION,
@@ -42,5 +42,6 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
- ]
+ ],
+ options={"bdist_wheel": {"universal": "1"}}
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.2/t.py new/texttable-1.6.3/t.py
--- old/texttable-1.6.2/t.py 1970-01-01 01:00:00.000000000 +0100
+++ new/texttable-1.6.3/t.py 2020-09-06 10:06:59.000000000 +0200
@@ -0,0 +1,5 @@
+from texttable import Texttable
+tt = Texttable()
+tt.set_cols_dtype(['i']) # dtype 'i' is the problem here
+tt.add_rows([['hello'], [18014398509481983]])
+print(tt.draw())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.2/texttable.egg-info/PKG-INFO new/texttable-1.6.3/texttable.egg-info/PKG-INFO
--- old/texttable-1.6.2/texttable.egg-info/PKG-INFO 2019-07-01 11:47:18.000000000 +0200
+++ new/texttable-1.6.3/texttable.egg-info/PKG-INFO 2020-09-06 10:45:19.000000000 +0200
@@ -1,12 +1,12 @@
Metadata-Version: 2.1
Name: texttable
-Version: 1.6.2
+Version: 1.6.3
Summary: module for creating simple ASCII tables
Home-page: https://github.com/foutaise/texttable/
Author: Gerome Fournier
Author-email: jef(a)foutaise.org
License: MIT
-Download-URL: https://github.com/foutaise/texttable/archive/v1.6.2.tar.gz
+Download-URL: https://github.com/foutaise/texttable/archive/v1.6.3.tar.gz
Description: # texttable
Python module for creating simple ASCII tables
@@ -262,6 +262,10 @@
- preserve empty lines
```
+ ## Forks
+
+ * [latextable](https://github.com/JAEarly/latextable) is a fork of texttable that provide a LaTeX backend.
+
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.2/texttable.egg-info/SOURCES.txt new/texttable-1.6.3/texttable.egg-info/SOURCES.txt
--- old/texttable-1.6.2/texttable.egg-info/SOURCES.txt 2019-07-01 11:47:18.000000000 +0200
+++ new/texttable-1.6.3/texttable.egg-info/SOURCES.txt 2020-09-06 10:45:19.000000000 +0200
@@ -4,6 +4,7 @@
MANIFEST.in
README.md
setup.py
+t.py
tests.py
texttable.py
texttable.pyi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.2/texttable.py new/texttable-1.6.3/texttable.py
--- old/texttable-1.6.2/texttable.py 2019-07-01 11:40:33.000000000 +0200
+++ new/texttable-1.6.3/texttable.py 2020-09-06 10:36:58.000000000 +0200
@@ -1,5 +1,5 @@
# texttable - module for creating simple ASCII tables
-# Copyright (C) 2003-2019 Gerome Fournier <jef(at)foutaise.org>
+# Copyright (C) 2003-2020 Gerome Fournier <jef(at)foutaise.org>
"""module for creating simple ASCII tables
@@ -62,7 +62,7 @@
__author__ = 'Gerome Fournier <jef(at)foutaise.org>'
__license__ = 'MIT'
-__version__ = '1.6.2'
+__version__ = '1.6.3'
__credits__ = """\
Jeff Kowalczyk:
- textwrap improved import
@@ -443,10 +443,11 @@
@classmethod
def _fmt_int(cls, x, **kw):
"""Integer formatting class-method.
-
- - x will be float-converted and then used.
"""
- return str(int(round(cls._to_float(x))))
+ if type(x) == int:
+ return str(x)
+ else:
+ return str(int(round(cls._to_float(x))))
@classmethod
def _fmt_float(cls, x, **kw):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.2/tox.ini new/texttable-1.6.3/tox.ini
--- old/texttable-1.6.2/tox.ini 2019-02-15 07:13:58.000000000 +0100
+++ new/texttable-1.6.3/tox.ini 2020-09-06 10:33:41.000000000 +0200
@@ -1,5 +1,5 @@
[tox]
-envlist = py27,py35,py36,py37
+envlist = py27,py35,py36,py37,py38
[testenv]
deps =
1
0
21 Dec '20
Hello community,
here is the log from the commit of package python-argcomplete for openSUSE:Factory checked in at 2020-12-21 10:24:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-argcomplete (Old)
and /work/SRC/openSUSE:Factory/.python-argcomplete.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-argcomplete"
Mon Dec 21 10:24:08 2020 rev:17 rq:857103 version:1.12.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-argcomplete/python-argcomplete.changes 2020-06-10 00:43:29.086195153 +0200
+++ /work/SRC/openSUSE:Factory/.python-argcomplete.new.5145/python-argcomplete.changes 2020-12-21 10:26:53.360216062 +0100
@@ -1,0 +2,11 @@
+Sun Dec 20 09:17:00 UTC 2020 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 1.12.2:
+ - Update importlib-metadata dependency pin (#332)
+ - Add change log project URL (#312)
+ - Replace Travis CI with GitHub Actions (#323)
+ - Update importlib-metadata dependency version range
+ - Bash nounset mode fixes (#313)
+- remove 0001-Remove-expected-test-failure-for-new-versions-of-fish.patch (upstream)
+
+-------------------------------------------------------------------
Old:
----
0001-Remove-expected-test-failure-for-new-versions-of-fish.patch
argcomplete-1.11.1.tar.gz
New:
----
argcomplete-1.12.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-argcomplete.spec ++++++
--- /var/tmp/diff_new_pack.VbSizh/_old 2020-12-21 10:26:53.900216674 +0100
+++ /var/tmp/diff_new_pack.VbSizh/_new 2020-12-21 10:26:53.908216683 +0100
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-argcomplete
-Version: 1.11.1
+Version: 1.12.2
Release: 0
Summary: Bash tab completion for argparse
License: Apache-2.0
@@ -28,7 +28,6 @@
Source: https://files.pythonhosted.org/packages/source/a/argcomplete/argcomplete-%{…
Patch0: skip_tcsh_tests.patch
Patch1: trim-test-deps.patch
-Patch2: 0001-Remove-expected-test-failure-for-new-versions-of-fish.patch
BuildRequires: %{python_module importlib-metadata >= 0.23}
BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module pip}
++++++ argcomplete-1.11.1.tar.gz -> argcomplete-1.12.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/Changes.rst new/argcomplete-1.12.2/Changes.rst
--- old/argcomplete-1.11.1/Changes.rst 2020-01-14 18:19:23.000000000 +0100
+++ new/argcomplete-1.12.2/Changes.rst 2020-11-24 05:10:32.000000000 +0100
@@ -1,3 +1,19 @@
+Changes for v1.12.2 (2020-11-23)
+================================
+
+- Update importlib-metadata dependency pin (#332)
+
+- Add change log project URL (#312)
+
+- Replace Travis CI with GitHub Actions (#323)
+
+Changes for v1.12.1 (2020-09-26)
+================================
+
+- Update importlib-metadata dependency version range
+
+- Bash nounset mode fixes (#313)
+
Changes for v1.11.1 (2020-01-14)
================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/PKG-INFO new/argcomplete-1.12.2/PKG-INFO
--- old/argcomplete-1.11.1/PKG-INFO 2020-01-14 18:19:36.000000000 +0100
+++ new/argcomplete-1.12.2/PKG-INFO 2020-11-24 05:10:45.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: argcomplete
-Version: 1.11.1
+Version: 1.12.2
Summary: Bash tab completion for argparse
Home-page: https://github.com/kislyuk/argcomplete
Author: Andrey Kislyuk
@@ -9,6 +9,7 @@
Project-URL: Documentation, https://kislyuk.github.io/argcomplete
Project-URL: Source Code, https://github.com/kislyuk/argcomplete
Project-URL: Issue Tracker, https://github.com/kislyuk/argcomplete/issues
+Project-URL: Change Log, https://github.com/kislyuk/argcomplete/blob/master/Changes.rst
Description: argcomplete - Bash tab completion for argparse
==============================================
*Tab complete all the things!*
@@ -287,12 +288,44 @@
------------
To activate completions for fish use::
- register-python-argcomplete --shell fish my-awesome-script | .
+ register-python-argcomplete --shell fish my-awesome-script | source
or create new completion file, e.g::
register-python-argcomplete --shell fish ~/.config/fish/completions/my-awesome-script.fish
+ Completion Description For Fish
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ By default help string is added as completion description.
+
+ .. image:: docs/fish_help_string.png
+
+ You can disable this feature by removing ``_ARGCOMPLETE_DFS`` variable, e.g::
+
+ register-python-argcomplete --shell fish my-awesome-script | grep -v _ARGCOMPLETE_DFS | .
+
+ Git Bash Support
+ ----------------
+ Due to limitations of file descriptor inheritance on Windows,
+ Git Bash not supported out of the box. You can opt in to using
+ temporary files instead of file descriptors for for IPC
+ by setting the environment variable ``ARGCOMPLETE_USE_TEMPFILES``,
+ e.g. by adding ``export ARGCOMPLETE_USE_TEMPFILES=1`` to ``~/.bashrc``.
+
+ For full support, consider using Bash with the
+ Windows Subsystem for Linux (WSL).
+
+ External argcomplete script
+ ---------------------------
+ To register an argcomplete script for an arbitrary name, the ``--external-argcomplete-script`` argument of the ``register-python-argcomplete`` script can be used::
+
+ eval "$(register-python-argcomplete --external-argcomplete-script /path/to/script arbitrary-name)"
+
+ This allows, for example, to use the auto completion functionality of argcomplete for an application not written in Python.
+ The command line interface of this program must be additionally implemented in a Python script with argparse and argcomplete and whenever the application is called the registered external argcomplete script is used for auto completion.
+
+ This option can also be used in combination with the other supported shells.
+
Python Support
--------------
Argcomplete requires Python 2.7 or 3.5+.
@@ -326,6 +359,7 @@
* `Documentation <https://kislyuk.github.io/argcomplete/>`_
* `Package distribution (PyPI) <https://pypi.python.org/pypi/argcomplete>`_
* `Change log <https://github.com/kislyuk/argcomplete/blob/master/Changes.rst>`_
+ * `xontrib-argcomplete <https://github.com/anki-code/xontrib-argcomplete>`_ - support argcomplete in `xonsh <https://github.com/xonsh/xonsh>`_ shell
Bugs
~~~~
@@ -335,8 +369,8 @@
-------
Licensed under the terms of the `Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_.
- .. image:: https://travis-ci.org/kislyuk/argcomplete.png
- :target: https://travis-ci.org/kislyuk/argcomplete
+ .. image:: https://github.com/kislyuk/argcomplete/workflows/Python%20package/badge.svg
+ :target: https://github.com/kislyuk/argcomplete/actions
.. image:: https://codecov.io/github/kislyuk/argcomplete/coverage.svg?branch=master
:target: https://codecov.io/github/kislyuk/argcomplete?branch=master
.. image:: https://img.shields.io/pypi/v/argcomplete.svg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/README.rst new/argcomplete-1.12.2/README.rst
--- old/argcomplete-1.11.1/README.rst 2019-12-22 22:07:12.000000000 +0100
+++ new/argcomplete-1.12.2/README.rst 2020-11-24 05:09:16.000000000 +0100
@@ -276,12 +276,44 @@
------------
To activate completions for fish use::
- register-python-argcomplete --shell fish my-awesome-script | .
+ register-python-argcomplete --shell fish my-awesome-script | source
or create new completion file, e.g::
register-python-argcomplete --shell fish ~/.config/fish/completions/my-awesome-script.fish
+Completion Description For Fish
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+By default help string is added as completion description.
+
+.. image:: docs/fish_help_string.png
+
+You can disable this feature by removing ``_ARGCOMPLETE_DFS`` variable, e.g::
+
+ register-python-argcomplete --shell fish my-awesome-script | grep -v _ARGCOMPLETE_DFS | .
+
+Git Bash Support
+----------------
+Due to limitations of file descriptor inheritance on Windows,
+Git Bash not supported out of the box. You can opt in to using
+temporary files instead of file descriptors for for IPC
+by setting the environment variable ``ARGCOMPLETE_USE_TEMPFILES``,
+e.g. by adding ``export ARGCOMPLETE_USE_TEMPFILES=1`` to ``~/.bashrc``.
+
+For full support, consider using Bash with the
+Windows Subsystem for Linux (WSL).
+
+External argcomplete script
+---------------------------
+To register an argcomplete script for an arbitrary name, the ``--external-argcomplete-script`` argument of the ``register-python-argcomplete`` script can be used::
+
+ eval "$(register-python-argcomplete --external-argcomplete-script /path/to/script arbitrary-name)"
+
+This allows, for example, to use the auto completion functionality of argcomplete for an application not written in Python.
+The command line interface of this program must be additionally implemented in a Python script with argparse and argcomplete and whenever the application is called the registered external argcomplete script is used for auto completion.
+
+This option can also be used in combination with the other supported shells.
+
Python Support
--------------
Argcomplete requires Python 2.7 or 3.5+.
@@ -315,6 +347,7 @@
* `Documentation <https://kislyuk.github.io/argcomplete/>`_
* `Package distribution (PyPI) <https://pypi.python.org/pypi/argcomplete>`_
* `Change log <https://github.com/kislyuk/argcomplete/blob/master/Changes.rst>`_
+* `xontrib-argcomplete <https://github.com/anki-code/xontrib-argcomplete>`_ - support argcomplete in `xonsh <https://github.com/xonsh/xonsh>`_ shell
Bugs
~~~~
@@ -324,8 +357,8 @@
-------
Licensed under the terms of the `Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_.
-.. image:: https://travis-ci.org/kislyuk/argcomplete.png
- :target: https://travis-ci.org/kislyuk/argcomplete
+.. image:: https://github.com/kislyuk/argcomplete/workflows/Python%20package/badge.svg
+ :target: https://github.com/kislyuk/argcomplete/actions
.. image:: https://codecov.io/github/kislyuk/argcomplete/coverage.svg?branch=master
:target: https://codecov.io/github/kislyuk/argcomplete?branch=master
.. image:: https://img.shields.io/pypi/v/argcomplete.svg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/argcomplete/__init__.py new/argcomplete-1.12.2/argcomplete/__init__.py
--- old/argcomplete-1.11.1/argcomplete/__init__.py 2019-12-28 17:07:40.000000000 +0100
+++ new/argcomplete-1.12.2/argcomplete/__init__.py 2020-07-12 20:14:04.000000000 +0200
@@ -182,6 +182,13 @@
debug_stream = os.fdopen(9, "w")
except:
debug_stream = sys.stderr
+ debug()
+
+ if output_stream is None:
+ filename = os.environ.get("_ARGCOMPLETE_STDOUT_FILENAME")
+ if filename is not None:
+ debug("Using output file {}".format(filename))
+ output_stream = open(filename, "wb")
if output_stream is None:
try:
@@ -199,6 +206,11 @@
debug("Invalid value for IFS, quitting [{v}]".format(v=ifs))
exit_method(1)
+ dfs = os.environ.get("_ARGCOMPLETE_DFS")
+ if dfs and len(dfs) != 1:
+ debug("Invalid value for DFS, quitting [{v}]".format(v=dfs))
+ exit_method(1)
+
comp_line = os.environ["COMP_LINE"]
comp_point = int(os.environ["COMP_POINT"])
@@ -226,6 +238,12 @@
completions = self._get_completions(comp_words, cword_prefix, cword_prequote, last_wordbreak_pos)
+ if dfs:
+ display_completions = {key_part: value.replace(ifs, " ") if value else ""
+ for key, value in self._display_completions.items()
+ for key_part in key}
+ completions = [dfs.join((key, display_completions.get(key) or "")) for key in completions]
+
debug("\nReturning completions:", completions)
output_stream.write(ifs.join(completions).encode(sys_encoding))
output_stream.flush()
@@ -321,16 +339,16 @@
return self.active_parsers
def _get_subparser_completions(self, parser, cword_prefix):
- def filter_aliases(metavar, dest, prefix):
- if not metavar:
- return dest if dest and dest.startswith(prefix) else ""
-
- # metavar combines dest and aliases with ",".
- a = metavar.replace(",", "").split()
- return " ".join(x for x in a if x.startswith(prefix))
+ def filter_aliases(aliases, prefix):
+ return tuple(x for x in aliases if x.startswith(prefix))
+
+ aliases_by_parser = {}
+ for key in parser.choices.keys():
+ p = parser.choices[key]
+ aliases_by_parser.setdefault(p, []).append(key)
for action in parser._get_subactions():
- subcmd_with_aliases = filter_aliases(action.metavar, action.dest, cword_prefix)
+ subcmd_with_aliases = filter_aliases(aliases_by_parser[parser.choices[action.dest]], cword_prefix)
if subcmd_with_aliases:
self._display_completions[subcmd_with_aliases] = action.help
@@ -350,8 +368,8 @@
def _get_option_completions(self, parser, cword_prefix):
self._display_completions.update(
- [[" ".join(ensure_str(x) for x in action.option_strings
- if ensure_str(x).startswith(cword_prefix)), action.help]
+ [[tuple(ensure_str(x) for x in action.option_strings
+ if ensure_str(x).startswith(cword_prefix)), action.help]
for action in parser._actions
if action.option_strings])
@@ -428,6 +446,9 @@
completer = self.default_completer
if completer:
+ if isinstance(completer, SuppressCompleter) and completer.suppress():
+ continue
+
if callable(completer):
completions_from_callable = [c for c in completer(
prefix=cword_prefix, action=active_action, parser=parser, parsed_args=parsed_args)
@@ -437,10 +458,10 @@
completions += completions_from_callable
if isinstance(completer, completers.ChoicesCompleter):
self._display_completions.update(
- [[x, active_action.help] for x in completions_from_callable])
+ [[(x,), active_action.help] for x in completions_from_callable])
else:
self._display_completions.update(
- [[x, ""] for x in completions_from_callable])
+ [[(x,), ""] for x in completions_from_callable])
else:
debug("Completer is not callable, trying the readline completer protocol instead")
for i in range(9999):
@@ -448,7 +469,7 @@
if next_completion is None:
break
if self.validator(next_completion, cword_prefix):
- self._display_completions.update({next_completion: ""})
+ self._display_completions.update({(next_completion,): ""})
completions.append(next_completion)
if optional_prefix:
completions = [optional_prefix + "=" + completion for completion in completions]
@@ -635,7 +656,7 @@
readline.set_completion_display_matches_hook(display_completions)
"""
- return self._display_completions
+ return {" ".join(k): v for k, v in self._display_completions.items()}
class ExclusiveCompletionFinder(CompletionFinder):
@staticmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/argcomplete/bash_completion.d/python-argcomplete new/argcomplete-1.12.2/argcomplete/bash_completion.d/python-argcomplete
--- old/argcomplete-1.11.1/argcomplete/bash_completion.d/python-argcomplete 2019-12-22 21:59:57.000000000 +0100
+++ new/argcomplete-1.12.2/argcomplete/bash_completion.d/python-argcomplete 2020-09-27 06:24:26.000000000 +0200
@@ -14,8 +14,22 @@
# Run something, muting output or redirecting it to the debug stream
# depending on the value of _ARC_DEBUG.
+# If ARGCOMPLETE_USE_TEMPFILES is set, use tempfiles for IPC.
__python_argcomplete_run() {
- if [[ -z "$_ARC_DEBUG" ]]; then
+ if [[ -z "${ARGCOMPLETE_USE_TEMPFILES-}" ]]; then
+ __python_argcomplete_run_inner "$@"
+ return
+ fi
+ local tmpfile="$(mktemp)"
+ _ARGCOMPLETE_STDOUT_FILENAME="$tmpfile" __python_argcomplete_run_inner "$@"
+ local code=$?
+ cat "$tmpfile"
+ rm "$tmpfile"
+ return $code
+}
+
+__python_argcomplete_run_inner() {
+ if [[ -z "${_ARC_DEBUG-}" ]]; then
"$@" 8>&1 9>&2 1>/dev/null 2>&1
else
"$@" 8>&1 9>&2 1>&9 2>&1
@@ -82,7 +96,7 @@
__python_argcomplete_run "$executable" "${COMP_WORDS[@]:1:ARGCOMPLETE-1}") )
if [[ $? != 0 ]]; then
unset COMPREPLY
- elif [[ "$COMPREPLY" =~ [=/:]$ ]]; then
+ elif [[ "${COMPREPLY-}" =~ [=/:]$ ]]; then
compopt -o nospace
fi
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/argcomplete/shell_integration.py new/argcomplete-1.12.2/argcomplete/shell_integration.py
--- old/argcomplete-1.11.1/argcomplete/shell_integration.py 2020-01-14 17:20:59.000000000 +0100
+++ new/argcomplete-1.12.2/argcomplete/shell_integration.py 2020-09-27 06:24:26.000000000 +0200
@@ -8,15 +8,29 @@
bashcode = r'''
# Run something, muting output or redirecting it to the debug stream
# depending on the value of _ARC_DEBUG.
+# If ARGCOMPLETE_USE_TEMPFILES is set, use tempfiles for IPC.
__python_argcomplete_run() {
- if [[ -z "$_ARC_DEBUG" ]]; then
+ if [[ -z "${ARGCOMPLETE_USE_TEMPFILES-}" ]]; then
+ __python_argcomplete_run_inner "$@"
+ return
+ fi
+ local tmpfile="$(mktemp)"
+ _ARGCOMPLETE_STDOUT_FILENAME="$tmpfile" __python_argcomplete_run_inner "$@"
+ local code=$?
+ cat "$tmpfile"
+ rm "$tmpfile"
+ return $code
+}
+
+__python_argcomplete_run_inner() {
+ if [[ -z "${_ARC_DEBUG-}" ]]; then
"$@" 8>&1 9>&2 1>/dev/null 2>&1
else
"$@" 8>&1 9>&2 1>&9 2>&1
fi
}
-_python_argcomplete() {
+_python_argcomplete%(function_suffix)s() {
local IFS=$'\013'
local SUPPRESS_SPACE=0
if compopt +o nospace 2> /dev/null; then
@@ -29,23 +43,24 @@
_ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" \
_ARGCOMPLETE=1 \
_ARGCOMPLETE_SUPPRESS_SPACE=$SUPPRESS_SPACE \
- __python_argcomplete_run "$1") )
+ __python_argcomplete_run "%(argcomplete_script)s") )
if [[ $? != 0 ]]; then
unset COMPREPLY
- elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "$COMPREPLY" =~ [=/:]$ ]]; then
+ elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "${COMPREPLY-}" =~ [=/:]$ ]]; then
compopt -o nospace
fi
}
-complete %(complete_opts)s -F _python_argcomplete %(executables)s
+complete %(complete_opts)s -F _python_argcomplete%(function_suffix)s %(executables)s
'''
tcshcode = '''\
-complete "%(executable)s" 'p@*@`python-argcomplete-tcsh "%(executable)s"`@' ;
+complete "%(executable)s" 'p@*@`python-argcomplete-tcsh "%(argcomplete_script)s"`@' ;
'''
fishcode = r'''
function __fish_%(executable)s_complete
set -x _ARGCOMPLETE 1
+ set -x _ARGCOMPLETE_DFS \t
set -x _ARGCOMPLETE_IFS \n
set -x _ARGCOMPLETE_SUPPRESS_SPACE 1
set -x _ARGCOMPLETE_SHELL fish
@@ -53,24 +68,29 @@
set -x COMP_POINT (string length (commandline -cp))
set -x COMP_TYPE
if set -q _ARC_DEBUG
- %(executable)s 8>&1 9>&2 1>/dev/null 2>&1
+ %(argcomplete_script)s 8>&1 9>&2 1>/dev/null 2>&1
else
- %(executable)s 8>&1 9>&2 1>&9 2>&1
+ %(argcomplete_script)s 8>&1 9>&2 1>&9 2>&1
end
end
complete -c %(executable)s -f -a '(__fish_%(executable)s_complete)'
'''
+shell_codes = {'bash': bashcode, 'tcsh': tcshcode, 'fish': fishcode}
-def shellcode(executables, use_defaults=True, shell='bash', complete_arguments=None):
+
+def shellcode(executables, use_defaults=True, shell='bash', complete_arguments=None, argcomplete_script=None):
'''
Provide the shell code required to register a python executable for use with the argcomplete module.
- :param str executables: Executables to be completed (when invoked exactly with this name
+ :param list(str) executables: Executables to be completed (when invoked exactly with this name)
:param bool use_defaults: Whether to fallback to readline's default completion when no matches are generated.
:param str shell: Name of the shell to output code for (bash or tcsh)
:param complete_arguments: Arguments to call complete with
:type complete_arguments: list(str) or None
+ :param argcomplete_script: Script to call complete with, if not the executable to complete.
+ If supplied, will be used to complete *all* passed executables.
+ :type argcomplete_script: str or None
'''
if complete_arguments is None:
@@ -81,14 +101,21 @@
if shell == 'bash':
quoted_executables = [quote(i) for i in executables]
executables_list = " ".join(quoted_executables)
- code = bashcode % dict(complete_opts=complete_options, executables=executables_list)
- elif shell == 'fish':
- code = ""
- for executable in executables:
- code += fishcode % dict(executable=executable)
+ script = argcomplete_script
+ if script:
+ function_suffix = '_' + script
+ else:
+ script = '$1'
+ function_suffix = ''
+ code = bashcode % dict(complete_opts=complete_options, executables=executables_list,
+ argcomplete_script=script, function_suffix=function_suffix)
else:
code = ""
for executable in executables:
- code += tcshcode % dict(executable=executable)
+ script = argcomplete_script
+ # If no script was specified, default to the executable being completed.
+ if not script:
+ script = executable
+ code += shell_codes.get(shell, '') % dict(executable=executable, argcomplete_script=script)
return code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/argcomplete.egg-info/PKG-INFO new/argcomplete-1.12.2/argcomplete.egg-info/PKG-INFO
--- old/argcomplete-1.11.1/argcomplete.egg-info/PKG-INFO 2020-01-14 18:19:36.000000000 +0100
+++ new/argcomplete-1.12.2/argcomplete.egg-info/PKG-INFO 2020-11-24 05:10:45.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: argcomplete
-Version: 1.11.1
+Version: 1.12.2
Summary: Bash tab completion for argparse
Home-page: https://github.com/kislyuk/argcomplete
Author: Andrey Kislyuk
@@ -9,6 +9,7 @@
Project-URL: Documentation, https://kislyuk.github.io/argcomplete
Project-URL: Source Code, https://github.com/kislyuk/argcomplete
Project-URL: Issue Tracker, https://github.com/kislyuk/argcomplete/issues
+Project-URL: Change Log, https://github.com/kislyuk/argcomplete/blob/master/Changes.rst
Description: argcomplete - Bash tab completion for argparse
==============================================
*Tab complete all the things!*
@@ -287,12 +288,44 @@
------------
To activate completions for fish use::
- register-python-argcomplete --shell fish my-awesome-script | .
+ register-python-argcomplete --shell fish my-awesome-script | source
or create new completion file, e.g::
register-python-argcomplete --shell fish ~/.config/fish/completions/my-awesome-script.fish
+ Completion Description For Fish
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ By default help string is added as completion description.
+
+ .. image:: docs/fish_help_string.png
+
+ You can disable this feature by removing ``_ARGCOMPLETE_DFS`` variable, e.g::
+
+ register-python-argcomplete --shell fish my-awesome-script | grep -v _ARGCOMPLETE_DFS | .
+
+ Git Bash Support
+ ----------------
+ Due to limitations of file descriptor inheritance on Windows,
+ Git Bash not supported out of the box. You can opt in to using
+ temporary files instead of file descriptors for for IPC
+ by setting the environment variable ``ARGCOMPLETE_USE_TEMPFILES``,
+ e.g. by adding ``export ARGCOMPLETE_USE_TEMPFILES=1`` to ``~/.bashrc``.
+
+ For full support, consider using Bash with the
+ Windows Subsystem for Linux (WSL).
+
+ External argcomplete script
+ ---------------------------
+ To register an argcomplete script for an arbitrary name, the ``--external-argcomplete-script`` argument of the ``register-python-argcomplete`` script can be used::
+
+ eval "$(register-python-argcomplete --external-argcomplete-script /path/to/script arbitrary-name)"
+
+ This allows, for example, to use the auto completion functionality of argcomplete for an application not written in Python.
+ The command line interface of this program must be additionally implemented in a Python script with argparse and argcomplete and whenever the application is called the registered external argcomplete script is used for auto completion.
+
+ This option can also be used in combination with the other supported shells.
+
Python Support
--------------
Argcomplete requires Python 2.7 or 3.5+.
@@ -326,6 +359,7 @@
* `Documentation <https://kislyuk.github.io/argcomplete/>`_
* `Package distribution (PyPI) <https://pypi.python.org/pypi/argcomplete>`_
* `Change log <https://github.com/kislyuk/argcomplete/blob/master/Changes.rst>`_
+ * `xontrib-argcomplete <https://github.com/anki-code/xontrib-argcomplete>`_ - support argcomplete in `xonsh <https://github.com/xonsh/xonsh>`_ shell
Bugs
~~~~
@@ -335,8 +369,8 @@
-------
Licensed under the terms of the `Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_.
- .. image:: https://travis-ci.org/kislyuk/argcomplete.png
- :target: https://travis-ci.org/kislyuk/argcomplete
+ .. image:: https://github.com/kislyuk/argcomplete/workflows/Python%20package/badge.svg
+ :target: https://github.com/kislyuk/argcomplete/actions
.. image:: https://codecov.io/github/kislyuk/argcomplete/coverage.svg?branch=master
:target: https://codecov.io/github/kislyuk/argcomplete?branch=master
.. image:: https://img.shields.io/pypi/v/argcomplete.svg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/argcomplete.egg-info/requires.txt new/argcomplete-1.12.2/argcomplete.egg-info/requires.txt
--- old/argcomplete-1.11.1/argcomplete.egg-info/requires.txt 2020-01-14 18:19:36.000000000 +0100
+++ new/argcomplete-1.12.2/argcomplete.egg-info/requires.txt 2020-11-24 05:10:45.000000000 +0100
@@ -1,15 +1,15 @@
[:python_version == "2.7"]
-importlib-metadata<2,>=0.23
+importlib-metadata<4,>=0.23
[:python_version == "3.5"]
-importlib-metadata<2,>=0.23
+importlib-metadata<4,>=0.23
[:python_version == "3.6"]
-importlib-metadata<2,>=0.23
+importlib-metadata<4,>=0.23
[:python_version == "3.7"]
-importlib-metadata<2,>=0.23
+importlib-metadata<4,>=0.23
[test]
coverage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/scripts/register-python-argcomplete new/argcomplete-1.12.2/scripts/register-python-argcomplete
--- old/argcomplete-1.11.1/scripts/register-python-argcomplete 2019-12-22 21:59:20.000000000 +0100
+++ new/argcomplete-1.12.2/scripts/register-python-argcomplete 2020-05-22 02:59:06.000000000 +0200
@@ -43,6 +43,9 @@
'-s', '--shell',
choices=('bash', 'tcsh', 'fish'), default='bash',
help='output code for the specified shell')
+parser.add_argument(
+ '-e', '--external-argcomplete-script',
+ help='external argcomplete script for auto completion of the executable')
parser.add_argument(
'executable',
@@ -59,4 +62,4 @@
sys.stdout.write(argcomplete.shellcode(
- args.executable, args.use_defaults, args.shell, args.complete_arguments))
+ args.executable, args.use_defaults, args.shell, args.complete_arguments, args.external_argcomplete_script))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/setup.py new/argcomplete-1.12.2/setup.py
--- old/argcomplete-1.11.1/setup.py 2020-01-14 18:19:08.000000000 +0100
+++ new/argcomplete-1.12.2/setup.py 2020-11-24 05:09:45.000000000 +0100
@@ -5,16 +5,17 @@
install_requires = []
tests_require = ["coverage", "flake8", "pexpect", "wheel"]
-importlib_backport_requires = ["importlib-metadata >= 0.23, < 2"]
+importlib_backport_requires = ["importlib-metadata >= 0.23, < 4"]
setup(
name='argcomplete',
- version='1.11.1',
+ version='1.12.2',
url='https://github.com/kislyuk/argcomplete',
project_urls={
"Documentation": "https://kislyuk.github.io/argcomplete",
"Source Code": "https://github.com/kislyuk/argcomplete",
- "Issue Tracker": "https://github.com/kislyuk/argcomplete/issues"
+ "Issue Tracker": "https://github.com/kislyuk/argcomplete/issues",
+ "Change Log": "https://github.com/kislyuk/argcomplete/blob/master/Changes.rst",
},
license='Apache Software License',
author='Andrey Kislyuk',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/test/prog new/argcomplete-1.12.2/test/prog
--- old/argcomplete-1.11.1/test/prog 2019-10-24 01:48:19.000000000 +0200
+++ new/argcomplete-1.12.2/test/prog 2020-07-12 20:14:04.000000000 +0200
@@ -31,12 +31,12 @@
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
-subparsers.add_parser('basic').add_argument('arg', choices=['foo', 'bar', 'baz'])
+subparsers.add_parser('basic', help='basic help\nnext line of help').add_argument('arg', choices=['foo', 'bar', 'baz'])
subparsers.add_parser('space').add_argument('arg', choices=['foo bar', 'baz'])
subparsers.add_parser('cont').add_argument('arg').completer = complete_cont
subparsers.add_parser('spec').add_argument('arg', choices=['d$e$f', 'd$e$g', 'x!x', r'y\y'])
subparsers.add_parser('quote').add_argument('arg', choices=["1'1", '2"2'])
-subparsers.add_parser('break').add_argument('arg', choices=['a:b:c', 'a:b:d'])
+subparsers.add_parser('break', help="break help").add_argument('arg', choices=['a:b:c', 'a:b:d'])
subparsers.add_parser('env').add_argument('arg').completer = check_environ
subparsers.add_parser('debug').add_argument('arg').completer = print_output
subparsers.add_parser('point', add_help=False).add_argument('arg', nargs='*').completer = get_comp_point
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argcomplete-1.11.1/test/test.py new/argcomplete-1.12.2/test/test.py
--- old/argcomplete-1.11.1/test/test.py 2019-11-22 21:05:27.000000000 +0100
+++ new/argcomplete-1.12.2/test/test.py 2020-09-27 08:00:07.000000000 +0200
@@ -28,6 +28,8 @@
BASH_VERSION = subprocess.check_output(['bash', '-c', 'echo $BASH_VERSION']).decode()
BASH_MAJOR_VERSION = int(BASH_VERSION.split('.')[0])
+FISH_VERSION_STR = subprocess.check_output(['fish', '-c', 'echo -n $FISH_VERSION']).decode()
+FISH_VERSION_TUPLE = tuple(int(x) for x in FISH_VERSION_STR.split('.'))
class TempDir(object):
@@ -74,8 +76,10 @@
with TemporaryFile() as t:
os.environ["COMP_LINE"] = ensure_bytes(command) if USING_PYTHON2 else command
os.environ["COMP_POINT"] = point
- self.assertRaises(SystemExit, completer, parser, output_stream=t,
- exit_method=sys.exit, **kwargs)
+ with self.assertRaises(SystemExit) as cm:
+ completer(parser, output_stream=t, exit_method=sys.exit, **kwargs)
+ if cm.exception.code != 0:
+ raise Exception("Unexpected exit code %d" % cm.exception.code)
t.seek(0)
return t.read().decode(sys_encoding).split(IFS)
@@ -371,7 +375,7 @@
[r"on\ a\ train", r"with\ a\ goat", r"on\ a\ boat", r"in\ the\ rain", "--help", "-h"]),
("prog eggs ", [r"on\ a\ train", r"with\ a\ goat", r"on\ a\ boat", r"in\ the\ rain", "--help", "-h"]),
("prog eggs \"on a", ['on a train', 'on a boat']),
- ("prog eggs on\\ a", [r"on\ a\ train", "on\ a\ boat"]),
+ ("prog eggs on\\ a", [r"on\ a\ train", r"on\ a\ boat"]),
("prog spam ", ["iberico", "ham", "--help", "-h"]),
)
@@ -398,7 +402,7 @@
("prog ", ["--книга", "-h", "--help"]),
("prog --книга ",
[r"Трудно\ быть\ богом", r"Парень\ из\ преисподней", r"Понедельник\ начинается\ в\ субботу"]),
- ("prog --книга П", [r"Парень\ из\ преисподней", "Понедельник\ начинается\ в\ субботу"]),
+ ("prog --книга П", [r"Парень\ из\ преисподней", r"Понедельник\ начинается\ в\ субботу"]),
("prog --книга Пу", [""]),
)
@@ -504,6 +508,41 @@
self.assertEqual("ttt", disp.get("--oh", ""))
self.assertEqual("ccc", disp.get("--ch", ""))
+ @unittest.skipIf(USING_PYTHON2, "Subparser aliases aren't supported on Python 2")
+ def test_display_completions_with_aliases(self):
+ parser = ArgumentParser()
+ parser.add_subparsers().add_parser("a", aliases=["b", "c"], help="abc help")
+
+ # empty
+ completer = CompletionFinder(parser)
+ completer.rl_complete("", 0)
+ disp = completer.get_display_completions()
+ self.assertEqual({"a b c": "abc help", "-h --help": "show this help message and exit"}, disp)
+
+ # a
+ completer = CompletionFinder(parser)
+ completer.rl_complete("a", 0)
+ disp = completer.get_display_completions()
+ self.assertEqual({"a": "abc help", "": "show this help message and exit"}, disp)
+
+ # b
+ completer = CompletionFinder(parser)
+ completer.rl_complete("b", 0)
+ disp = completer.get_display_completions()
+ self.assertEqual({"b": "abc help", "": "show this help message and exit"}, disp)
+
+ # c
+ completer = CompletionFinder(parser)
+ completer.rl_complete("c", 0)
+ disp = completer.get_display_completions()
+ self.assertEqual({"c": "abc help", "": "show this help message and exit"}, disp)
+
+ # (
+ completer = CompletionFinder(parser)
+ completer.rl_complete("(", 0)
+ disp = completer.get_display_completions()
+ self.assertEqual({"": "show this help message and exit"}, disp)
+
def test_nargs_one_or_more(self):
def make_parser():
parser = ArgumentParser()
@@ -753,9 +792,41 @@
fh.write(sc.encode())
fh.flush()
subprocess.check_call(['bash', '-n', fh.name])
+ with NamedTemporaryFile() as fh:
+ sc = shellcode(["prog"], use_defaults=True, shell="bash", complete_arguments=None,
+ argcomplete_script="~/.bash_completion.d/prog.py")
+ fh.write(sc.encode())
+ fh.flush()
+ subprocess.check_call(['bash', '-n', fh.name])
sc = shellcode(["prog"], use_defaults=False, shell="tcsh", complete_arguments=["-o", "nospace"])
sc = shellcode(["prog"], use_defaults=False, shell="woosh", complete_arguments=["-o", "nospace"])
sc = shellcode(["prog"], shell="fish")
+ sc = shellcode(["prog"], shell="fish", argcomplete_script="~/.bash_completion.d/prog.py")
+
+ def test_option_help(self):
+ os.environ["_ARGCOMPLETE_DFS"] = "\t"
+ os.environ["_ARGCOMPLETE_SUPPRESS_SPACE"] = "1"
+ os.environ["_ARGCOMPLETE_SHELL"] = "fish"
+
+ p = ArgumentParser()
+ p.add_argument("--foo", help="foo" + IFS + "help")
+ p.add_argument("--bar", "--bar2", help="bar help")
+
+ subparsers = p.add_subparsers()
+ subparsers.add_parser("subcommand", help="subcommand help")
+ subparsers.add_parser("subcommand 2", help="subcommand 2 help")
+
+ completions = self.run_completer(p, "prog --f")
+ self.assertEqual(set(completions), {"--foo\tfoo help"})
+
+ completions = self.run_completer(p, "prog --b")
+ self.assertEqual(set(completions), {"--bar\tbar help", "--bar2\tbar help"})
+
+ completions = self.run_completer(p, "prog sub")
+ self.assertEqual(set(completions), {"subcommand\tsubcommand help", "subcommand 2\tsubcommand 2 help"})
+
+ os.environ["_ARGCOMPLETE_DFS"] = "invalid"
+ self.assertRaises(Exception, self.run_completer, p, "prog --b")
class TestArgcompleteREPL(unittest.TestCase):
def setUp(self):
@@ -890,8 +961,8 @@
self.assertEqual(self.prefix('a b c'), 'c')
def test_escaped_special(self):
- self.assertEqual(self.prefix('a\$b'), 'a$b')
- self.assertEqual(self.prefix('a\`b'), 'a`b')
+ self.assertEqual(self.prefix(r'a\$b'), 'a$b')
+ self.assertEqual(self.prefix(r'a\`b'), 'a`b')
def test_unescaped_special(self):
self.assertEqual(self.prefix('a$b'), 'a$b')
@@ -899,8 +970,8 @@
@unittest.expectedFailure
def test_escaped_special_in_double_quotes(self):
- self.assertEqual(self.prefix('"a\$b'), 'a$b')
- self.assertEqual(self.prefix('"a\`b'), 'a`b')
+ self.assertEqual(self.prefix(r'"a\$b'), 'a$b')
+ self.assertEqual(self.prefix(r'"a\`b'), 'a`b')
def test_punctuation(self):
self.assertEqual(self.prefix('a,'), 'a,')
@@ -1120,7 +1191,9 @@
# This requires compopt which is not available in 3.x.
expected_failures.append('test_quoted_exact')
- install_cmd = 'eval "$(register-python-argcomplete prog)"'
+ # 'dummy' argument unused; checks multi-command registration works
+ # by passing 'prog' as the second argument.
+ install_cmd = 'eval "$(register-python-argcomplete dummy prog)"'
def setUp(self):
sh = pexpect.replwrap.bash()
@@ -1131,6 +1204,10 @@
sh.run_command('complete -r python python2 python3')
output = sh.run_command(self.install_cmd)
self.assertEqual(output, '')
+ # Register a dummy completion with an external argcomplete script
+ # to ensure this doesn't overwrite our previous registration.
+ output = sh.run_command('eval "$(register-python-argcomplete dummy --external-argcomplete-script dummy)"')
+ self.assertEqual(output, '')
self.sh = sh
def test_one_space_after_exact(self):
@@ -1147,6 +1224,18 @@
self.assertIn('PYTHON_ARGCOMPLETE_STDERR\r\n', output)
self.assertTrue(output.endswith('foo\r\n'))
+ def test_temp_file(self):
+ self.sh.run_command('export ARGCOMPLETE_USE_TEMPFILES=1')
+ self.assertEqual(self.sh.run_command('prog basic f\t'), 'foo\r\n')
+ # Confirm we used a temp file by searching for the debug message.
+ self.sh.run_command('export _ARC_DEBUG=1')
+ output = self.sh.run_command('prog basic f\t')
+ self.assertIn('Using output file ', output)
+
+ def test_nounset(self):
+ self.sh.run_command('set -o nounset')
+ self.test_simple_completion()
+
@unittest.skipIf(BASH_MAJOR_VERSION < 4, 'complete -D not supported')
class TestBashGlobal(TestBash):
@@ -1210,10 +1299,12 @@
"""Test completing a console_script for a package."""
self._test_console_script(package=True)
+ @unittest.skipIf(os.uname()[0] == "Darwin", "Skip test that fails on MacOS")
def test_console_script_module_wheel(self):
"""Test completing a console_script for a module from a wheel."""
self._test_console_script(wheel=True)
+ @unittest.skipIf(os.uname()[0] == "Darwin", "Skip test that fails on MacOS")
def test_console_script_package_wheel(self):
"""Test completing a console_script for a package from a wheel."""
self._test_console_script(package=True, wheel=True)
@@ -1235,7 +1326,13 @@
path = ' '.join([os.path.join(BASE_DIR, 'scripts'), TEST_DIR, '$path'])
sh.run_command('set path = ({0})'.format(path))
sh.run_command('setenv PYTHONPATH {0}'.format(BASE_DIR))
- output = sh.run_command('eval `register-python-argcomplete --shell tcsh prog`')
+ # 'dummy' argument unused; checks multi-command registration works
+ # by passing 'prog' as the second argument.
+ output = sh.run_command('eval `register-python-argcomplete --shell tcsh dummy prog`')
+ self.assertEqual(output, '')
+ # Register a dummy completion with an external argcomplete script
+ # to ensure this doesn't overwrite our previous registration.
+ output = sh.run_command('eval `register-python-argcomplete --shell tcsh dummy --external-argcomplete-script dummy`')
self.assertEqual(output, '')
self.sh = sh
@@ -1251,8 +1348,11 @@
expected_failures = [
'test_parse_special_characters',
'test_comp_point',
- 'test_special_characters_double_quoted'
]
+ if FISH_VERSION_TUPLE < (3, 1):
+ expected_failures.extend([
+ 'test_special_characters_double_quoted'
+ ])
skipped = [
'test_single_quotes_in_single_quotes',
@@ -1265,7 +1365,13 @@
path = ' '.join([os.path.join(BASE_DIR, 'scripts'), TEST_DIR, '$PATH'])
sh.run_command('set -x PATH {0}'.format(path))
sh.run_command('set -x PYTHONPATH {0}'.format(BASE_DIR))
- output = sh.run_command('register-python-argcomplete --shell fish prog | .')
+ # 'dummy' argument unused; checks multi-command registration works
+ # by passing 'prog' as the second argument.
+ output = sh.run_command('register-python-argcomplete --shell fish dummy prog | .')
+ self.assertEqual(output, '')
+ # Register a dummy completion with an external argcomplete script
+ # to ensure this doesn't overwrite our previous registration.
+ output = sh.run_command('register-python-argcomplete --shell fish dummy --external-argcomplete-script dummy | .')
self.assertEqual(output, '')
self.sh = sh
++++++ skip_tcsh_tests.patch ++++++
--- /var/tmp/diff_new_pack.VbSizh/_old 2020-12-21 10:26:54.016216805 +0100
+++ /var/tmp/diff_new_pack.VbSizh/_new 2020-12-21 10:26:54.016216805 +0100
@@ -1,8 +1,8 @@
-Index: argcomplete-1.11.0/test/test.py
+Index: argcomplete-1.12.2/test/test.py
===================================================================
---- argcomplete-1.11.0.orig/test/test.py
-+++ argcomplete-1.11.0/test/test.py
-@@ -1219,34 +1219,6 @@ class TestBashGlobal(TestBash):
+--- argcomplete-1.12.2.orig/test/test.py
++++ argcomplete-1.12.2/test/test.py
+@@ -1310,40 +1310,6 @@ class TestBashGlobal(TestBash):
self._test_console_script(package=True, wheel=True)
@@ -22,7 +22,13 @@
- path = ' '.join([os.path.join(BASE_DIR, 'scripts'), TEST_DIR, '$path'])
- sh.run_command('set path = ({0})'.format(path))
- sh.run_command('setenv PYTHONPATH {0}'.format(BASE_DIR))
-- output = sh.run_command('eval `register-python-argcomplete --shell tcsh prog`')
+- # 'dummy' argument unused; checks multi-command registration works
+- # by passing 'prog' as the second argument.
+- output = sh.run_command('eval `register-python-argcomplete --shell tcsh dummy prog`')
+- self.assertEqual(output, '')
+- # Register a dummy completion with an external argcomplete script
+- # to ensure this doesn't overwrite our previous registration.
+- output = sh.run_command('eval `register-python-argcomplete --shell tcsh dummy --external-argcomplete-script dummy`')
- self.assertEqual(output, '')
- self.sh = sh
-
++++++ trim-test-deps.patch ++++++
--- /var/tmp/diff_new_pack.VbSizh/_old 2020-12-21 10:26:54.028216819 +0100
+++ /var/tmp/diff_new_pack.VbSizh/_new 2020-12-21 10:26:54.028216819 +0100
@@ -1,13 +1,13 @@
-Index: argcomplete-1.11.0/setup.py
+Index: argcomplete-1.12.2/setup.py
===================================================================
---- argcomplete-1.11.0.orig/setup.py
-+++ argcomplete-1.11.0/setup.py
+--- argcomplete-1.12.2.orig/setup.py
++++ argcomplete-1.12.2/setup.py
@@ -4,7 +4,7 @@ import glob
from setuptools import setup, find_packages
install_requires = []
-tests_require = ["coverage", "flake8", "pexpect", "wheel"]
+tests_require = ["pexpect"]
- importlib_backport_requires = ["importlib-metadata >= 0.23, < 2"]
+ importlib_backport_requires = ["importlib-metadata >= 0.23, < 4"]
setup(
1
0
21 Dec '20
Hello community,
here is the log from the commit of package qore-mysql-module for openSUSE:Factory checked in at 2020-12-21 10:24:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qore-mysql-module (Old)
and /work/SRC/openSUSE:Factory/.qore-mysql-module.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qore-mysql-module"
Mon Dec 21 10:24:06 2020 rev:5 rq:857091 version:2.0.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/qore-mysql-module/qore-mysql-module.changes 2018-08-24 16:59:32.917747465 +0200
+++ /work/SRC/openSUSE:Factory/.qore-mysql-module.new.5145/qore-mysql-module.changes 2020-12-21 10:26:52.656215264 +0100
@@ -1,0 +2,5 @@
+Sat Dec 19 18:00:24 UTC 2020 - sarah.kriesch(a)opensuse.org
+
+- add s390x in spec file
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qore-mysql-module.spec ++++++
--- /var/tmp/diff_new_pack.Cw02u4/_old 2020-12-21 10:26:53.172215849 +0100
+++ /var/tmp/diff_new_pack.Cw02u4/_new 2020-12-21 10:26:53.176215853 +0100
@@ -45,7 +45,7 @@
%setup -q
%build
-%ifarch x86_64 aarch64 ppc64 ppc64le x390x
+%ifarch x86_64 aarch64 ppc64 ppc64le s390x
c64=--enable-64bit
%endif
CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" ./configure RPM_OPT_FLAGS="%{optflags}" --prefix=/usr --disable-debug $c64
1
0