openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
April 2019
- 1 participants
- 1906 discussions
Hello community,
here is the log from the commit of package openSUSE-Tumbleweed-Kubic for openSUSE:Factory checked in at 2019-04-30 13:01:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-Tumbleweed-Kubic (Old)
and /work/SRC/openSUSE:Factory/.openSUSE-Tumbleweed-Kubic.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openSUSE-Tumbleweed-Kubic"
Tue Apr 30 13:01:45 2019 rev:8 rq:697579 version:15.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/openSUSE-Tumbleweed-Kubic/openSUSE-Tumbleweed-Kubic.changes 2019-04-11 14:56:55.261956783 +0200
+++ /work/SRC/openSUSE:Factory/.openSUSE-Tumbleweed-Kubic.new.5536/openSUSE-Tumbleweed-Kubic.changes 2019-04-30 13:01:50.998147357 +0200
@@ -1,0 +2,5 @@
+Wed Apr 24 15:07:59 UTC 2019 - Fabian Vogt <fvogt(a)suse.com>
+
+- Don't set DHCLIENT_SET_HOSTNAME to yes, cloud-init takes care of the hostname
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ config.sh ++++++
--- /var/tmp/diff_new_pack.1gS1L0/_old 2019-04-30 13:01:51.574147115 +0200
+++ /var/tmp/diff_new_pack.1gS1L0/_new 2019-04-30 13:01:51.574147115 +0200
@@ -93,10 +93,6 @@
#--------------------------------------
echo '** Update sysconfig entries...'
-if [[ "${kiwi_profiles}" != "*OpenStack-Cloud*" ]]; then
- baseUpdateSysConfig /etc/sysconfig/network/dhcp DHCLIENT_SET_HOSTNAME yes
-fi
-
echo FONT="$CONSOLE_FONT" >> /etc/vconsole.conf
#======================================
1
0
Hello community,
here is the log from the commit of package greybird-theme for openSUSE:Factory checked in at 2019-04-30 13:01:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/greybird-theme (Old)
and /work/SRC/openSUSE:Factory/.greybird-theme.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "greybird-theme"
Tue Apr 30 13:01:33 2019 rev:12 rq:697535 version:3.22.10~git2.799485d
Changes:
--------
--- /work/SRC/openSUSE:Factory/greybird-theme/greybird-theme.changes 2019-02-19 12:02:56.229059488 +0100
+++ /work/SRC/openSUSE:Factory/.greybird-theme.new.5536/greybird-theme.changes 2019-04-30 13:01:45.622149411 +0200
@@ -1,0 +2,12 @@
+Wed Apr 24 08:54:24 UTC 2019 - maurizio.galli(a)gmail.com
+
+- Update to version 3.22.10~git2.799485d:
+ * Make error and warning entry text more readable
+ * Also set backdrop color for print dialog
+ (Fixes gh#shimmerproject/Greybird#243)
+ * Re-apply xfwm4 tabwin sizing improvement
+ (Issue gh#shimmerproject/Greybird#224)
+- Switched sources to git master branch
+- Spec file: switched to %autosetup for simplicity
+
+-------------------------------------------------------------------
Old:
----
Greybird-3.22.10.tar.gz
New:
----
_service
_servicedata
greybird-theme-3.22.10~git2.799485d.obscpio
greybird-theme.obsinfo
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ greybird-theme.spec ++++++
--- /var/tmp/diff_new_pack.q8pYlN/_old 2019-04-30 13:01:46.922149023 +0200
+++ /var/tmp/diff_new_pack.q8pYlN/_new 2019-04-30 13:01:46.926149021 +0200
@@ -1,7 +1,7 @@
#
# spec file for package greybird-theme
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,13 +19,13 @@
%define _name Greybird
Name: greybird-theme
-Version: 3.22.10
+Version: 3.22.10~git2.799485d
Release: 0
Url: https://github.com/shimmerproject/Greybird
Summary: A grey theme for GNOME, XFCE, GTK+ 2 and 3
License: GPL-2.0-or-later OR CC-BY-SA-3.0
Group: System/GUI/GNOME
-Source: https://github.com/shimmerproject/%{_name}/archive/v%{version}/%{_name}-%{v…
+Source: %{name}-%{version}.tar.bz2
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
@@ -82,7 +82,7 @@
This package provides the GTK+ 3 support of Greybird.
%prep
-%setup -q -n %{_name}-%{version}
+%autosetup
%build
./autogen.sh
++++++ _service ++++++
<?xml version="1.0"?>
<services>
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/shimmerproject/Greybird.git</param>
<param name="scm">git</param>
<param name="filename">greybird-theme</param>
<param name="versionformat">@PARENT_TAG@~git@TAG_OFFSET@.%h</param>
<param name="changesgenerate">enable</param>
<param name="changesauthor">maurizio.galli(a)gmail.com</param>
<param name="versionrewrite-pattern">v(.*)</param>
</service>
<service name="set_version" mode="disabled"/>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="compression">bz2</param>
<param name="file">*.tar</param>
</service>
</services>
++++++ _servicedata ++++++
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/shimmerproject/Greybird.git</param>
<param name="changesrevision">799485d652042cf8b644ebb55997ea571d89f95e</param></service></servicedata>++++++ greybird-theme.obsinfo ++++++
name: greybird-theme
version: 3.22.10~git2.799485d
mtime: 1554412015
commit: 799485d652042cf8b644ebb55997ea571d89f95e
1
0
Hello community,
here is the log from the commit of package python-shellingham for openSUSE:Factory checked in at 2019-04-30 13:01:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-shellingham (Old)
and /work/SRC/openSUSE:Factory/.python-shellingham.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-shellingham"
Tue Apr 30 13:01:25 2019 rev:2 rq:697501 version:1.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-shellingham/python-shellingham.changes 2019-03-10 09:38:59.804124209 +0100
+++ /work/SRC/openSUSE:Factory/.python-shellingham.new.5536/python-shellingham.changes 2019-04-30 13:01:30.838153836 +0200
@@ -1,0 +2,7 @@
+Wed Apr 24 12:43:38 UTC 2019 - pgajdos(a)suse.com
+
+- version update to 1.3.1
+ * Fix a typo that prevents ash and csh from being detected. `#24
+ <https://github.com/sarugaku/shellingham/issues/24>`_
+
+-------------------------------------------------------------------
Old:
----
shellingham-1.3.0.tar.gz
New:
----
shellingham-1.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-shellingham.spec ++++++
--- /var/tmp/diff_new_pack.804XR0/_old 2019-04-30 13:01:32.030153479 +0200
+++ /var/tmp/diff_new_pack.804XR0/_new 2019-04-30 13:01:32.034153478 +0200
@@ -18,16 +18,16 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-shellingham
-Version: 1.3.0
+Version: 1.3.1
Release: 0
Summary: Library to detect surrounding shell
License: ISC
Group: Development/Languages/Python
URL: https://github.com/sarugaku/shellingham
Source: https://github.com/sarugaku/shellingham/archive/%{version}.tar.gz#//shellin…
-BuildRequires: %{python_module setuptools}
-BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytest-mock}
+BuildRequires: %{python_module pytest}
+BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
++++++ shellingham-1.3.0.tar.gz -> shellingham-1.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shellingham-1.3.0/CHANGELOG.rst new/shellingham-1.3.1/CHANGELOG.rst
--- old/shellingham-1.3.0/CHANGELOG.rst 2019-03-06 05:36:09.000000000 +0100
+++ new/shellingham-1.3.1/CHANGELOG.rst 2019-04-10 09:28:34.000000000 +0200
@@ -1,3 +1,13 @@
+1.3.1 (2019-04-10)
+==================
+
+Bug Fixes
+---------
+
+- Fix a typo that prevents ash and csh from being detected. `#24
+ <https://github.com/sarugaku/shellingham/issues/24>`_
+
+
1.3.0 (2019-03-06)
==================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shellingham-1.3.0/src/shellingham/__init__.py new/shellingham-1.3.1/src/shellingham/__init__.py
--- old/shellingham-1.3.0/src/shellingham/__init__.py 2019-03-06 05:36:09.000000000 +0100
+++ new/shellingham-1.3.1/src/shellingham/__init__.py 2019-04-10 09:28:34.000000000 +0200
@@ -4,7 +4,7 @@
from ._core import ShellDetectionFailure
-__version__ = '1.3.0'
+__version__ = '1.3.1'
def detect_shell(pid=None, max_depth=6):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shellingham-1.3.0/src/shellingham/_core.py new/shellingham-1.3.1/src/shellingham/_core.py
--- old/shellingham-1.3.0/src/shellingham/_core.py 2019-03-06 05:36:09.000000000 +0100
+++ new/shellingham-1.3.1/src/shellingham/_core.py 2019-04-10 09:28:34.000000000 +0200
@@ -1,5 +1,5 @@
SHELL_NAMES = {
- 'sh', 'bash', 'dash', 'ash' # Bourne.
+ 'sh', 'bash', 'dash', 'ash', # Bourne.
'csh', 'tcsh', # C.
'ksh', 'zsh', 'fish', # Common alternatives.
'cmd', 'powershell', 'pwsh', # Microsoft.
1
0
Hello community,
here is the log from the commit of package python-django-model-utils for openSUSE:Factory checked in at 2019-04-30 13:01:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-model-utils (Old)
and /work/SRC/openSUSE:Factory/.python-django-model-utils.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-model-utils"
Tue Apr 30 13:01:20 2019 rev:2 rq:697482 version:3.1.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-django-model-utils/python-django-model-utils.changes 2019-02-25 17:52:06.798728417 +0100
+++ /work/SRC/openSUSE:Factory/.python-django-model-utils.new.5536/python-django-model-utils.changes 2019-04-30 13:01:20.982156784 +0200
@@ -1,0 +2,5 @@
+Wed Apr 24 12:37:14 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Fix requires on python-Django
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-model-utils.spec ++++++
--- /var/tmp/diff_new_pack.cIYiSK/_old 2019-04-30 13:01:22.278156396 +0200
+++ /var/tmp/diff_new_pack.cIYiSK/_new 2019-04-30 13:01:22.298156391 +0200
@@ -28,11 +28,11 @@
# to patch cleanly against 3.1.2
Patch0: fix-deferred.patch
BuildRequires: %{python_module Django >= 1.4.2}
+BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module pytest-django}
BuildRequires: %{python_module setuptools}
-BuildRequires: %{python_module freezegun}
BuildRequires: fdupes
-Requires: python-django
+Requires: python-Django >= 1.4.2
BuildArch: noarch
%python_subpackages
1
0
Hello community,
here is the log from the commit of package python-django-reversion for openSUSE:Factory checked in at 2019-04-30 13:01:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-reversion (Old)
and /work/SRC/openSUSE:Factory/.python-django-reversion.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-reversion"
Tue Apr 30 13:01:16 2019 rev:8 rq:697479 version:3.0.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-django-reversion/python-django-reversion.changes 2019-03-12 09:55:17.951515522 +0100
+++ /work/SRC/openSUSE:Factory/.python-django-reversion.new.5536/python-django-reversion.changes 2019-04-30 13:01:19.814157133 +0200
@@ -1,0 +2,7 @@
+Wed Apr 24 12:34:53 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Do not mess around with doc/lang subpackages, the docs are
+ all online and the lang split actually breaks as the lang part
+ is hard-required for the python to work in most cases
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-reversion.spec ++++++
--- /var/tmp/diff_new_pack.URPt8l/_old 2019-04-30 13:01:20.642156886 +0200
+++ /var/tmp/diff_new_pack.URPt8l/_new 2019-04-30 13:01:20.646156885 +0200
@@ -28,34 +28,12 @@
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-# SECTION documentation requirements
-BuildRequires: %{python_module Django}
-BuildRequires: %{python_module Sphinx}
-# /SECTION
Requires: python-Django
-Recommends: %{name}-lang = %{version}
+Obsoletes: python-django-reversion-doc
+Obsoletes: python-django-reversion-lang
BuildArch: noarch
%python_subpackages
-%package lang
-Summary: Translations for package %{name}
-Group: System/Localization
-Requires: %{name} = %{version}
-Provides: %{name}-lang-all = %{version}
-Supplements: %{name}
-BuildArch: noarch
-
-%package doc
-Summary: Documentation for %{name}
-Group: Documentation/HTML
-Requires: %{name} = %{version}
-
-%description doc
-This package contains documentation files for %{name}.
-
-%description lang
-Provides translations for the "%{name}" package.
-
%description
Django-reversion is an extension to the Django web framework that provides
version control for model instances.
@@ -69,37 +47,14 @@
%build
%python_build
-if [ ! -d html ]; then
- %python_exec setup.py develop --user
- sphinx-build docs html
- rm -r html/.buildinfo html/.doctrees
-fi
%install
%python_install
-%find_lang django
-%python_expand grep -F "%{$python_sitelib}" django.lang > django_%{$python_bin_suffix}.lang
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%doc README.rst CHANGELOG.rst
%license LICENSE
%{python_sitelib}/*
-%exclude %{python_sitelib}/reversion/locale
-
-%files -n %{name}-doc
-%doc html
-
-%if %have_python2 && ! 0%{?skip_python2}
-%files -n %{python2_prefix}-django-reversion-lang -f django_%{python2_bin_suffix}.lang
-%license LICENSE
-%{python2_sitelib}/reversion/locale
-%endif
-
-%if %have_python3 && ! 0%{?skip_python3}
-%files -n %{python3_prefix}-django-reversion-lang -f django_%{python3_bin_suffix}.lang
-%license LICENSE
-%{python3_sitelib}/reversion/locale
-%endif
%changelog
1
0
Hello community,
here is the log from the commit of package python-django-debug-toolbar for openSUSE:Factory checked in at 2019-04-30 13:01:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-debug-toolbar (Old)
and /work/SRC/openSUSE:Factory/.python-django-debug-toolbar.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-debug-toolbar"
Tue Apr 30 13:01:09 2019 rev:12 rq:697472 version:1.11
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-django-debug-toolbar/python-django-debug-toolbar.changes 2019-02-20 14:13:10.214902601 +0100
+++ /work/SRC/openSUSE:Factory/.python-django-debug-toolbar.new.5536/python-django-debug-toolbar.changes 2019-04-30 13:01:13.806158931 +0200
@@ -1,0 +2,5 @@
+Wed Apr 24 12:02:05 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Export the lang to make sure we build on older openSUSE releases
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-debug-toolbar.spec ++++++
--- /var/tmp/diff_new_pack.iG7Ilf/_old 2019-04-30 13:01:15.234158504 +0200
+++ /var/tmp/diff_new_pack.iG7Ilf/_new 2019-04-30 13:01:15.270158494 +0200
@@ -68,6 +68,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
+export LANG=en_US.UTF8
export DJANGO_SETTINGS_MODULE=tests.settings
%python_expand $python -m django test -v2 tests
1
0
Hello community,
here is the log from the commit of package python-pony for openSUSE:Factory checked in at 2019-04-30 13:01:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pony (Old)
and /work/SRC/openSUSE:Factory/.python-pony.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pony"
Tue Apr 30 13:01:06 2019 rev:3 rq:697456 version:0.7.10
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pony/python-pony.changes 2019-03-01 16:50:20.589733034 +0100
+++ /work/SRC/openSUSE:Factory/.python-pony.new.5536/python-pony.changes 2019-04-30 13:01:09.262160292 +0200
@@ -1,0 +2,14 @@
+Wed Apr 24 11:04:20 UTC 2019 - pgajdos(a)suse.com
+
+- version update to 0.7.10
+ * Python3.7 and PyPy decompiling fixes
+ * Fix reading NULL from Optional nullable array column
+ * Fix handling of empty arrays in queries
+ * #415: error message typo
+ * #432: PonyFlask - request object can trigger teardown_request
+ without real request
+ * Fix GROUP CONCAT separator for MySQL
+- deleted sources
+ - LICENSE (not needed)
+
+-------------------------------------------------------------------
Old:
----
LICENSE
pony-0.7.9.tar.gz
New:
----
pony-0.7.10.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pony.spec ++++++
--- /var/tmp/diff_new_pack.8nZ3sg/_old 2019-04-30 13:01:09.810160127 +0200
+++ /var/tmp/diff_new_pack.8nZ3sg/_new 2019-04-30 13:01:09.810160127 +0200
@@ -18,14 +18,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pony
-Version: 0.7.9
+Version: 0.7.10
Release: 0
Summary: Pony Object-Relational Mapper
License: Apache-2.0
Group: Development/Languages/Python
URL: https://ponyorm.com
Source: https://files.pythonhosted.org/packages/source/p/pony/pony-%{version}.tar.gz
-Source99: https://raw.githubusercontent.com/ponyorm/pony/orm/LICENSE
BuildRequires: %{python_module setuptools}
BuildRequires: dos2unix
BuildRequires: fdupes
@@ -45,7 +44,6 @@
%prep
%setup -q -n pony-%{version}
-cp %{SOURCE99} .
dos2unix README.md
%build
++++++ pony-0.7.9.tar.gz -> pony-0.7.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/LICENSE new/pony-0.7.10/LICENSE
--- old/pony-0.7.9/LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/pony-0.7.10/LICENSE 2017-05-21 00:14:35.000000000 +0200
@@ -0,0 +1,179 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2016 Alexander Kozlovsky, Alexey Malashkevich
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/MANIFEST.in new/pony-0.7.10/MANIFEST.in
--- old/pony-0.7.9/MANIFEST.in 2018-12-09 11:02:22.000000000 +0100
+++ new/pony-0.7.10/MANIFEST.in 2019-04-20 16:42:08.000000000 +0200
@@ -1,2 +1,3 @@
include pony/orm/tests/queries.txt
include pony/flask/example/templates *.html
+include LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/PKG-INFO new/pony-0.7.10/PKG-INFO
--- old/pony-0.7.9/PKG-INFO 2019-01-21 08:24:10.000000000 +0100
+++ new/pony-0.7.10/PKG-INFO 2019-04-20 17:48:23.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pony
-Version: 0.7.9
+Version: 0.7.10
Summary: Pony Object-Relational Mapper
Home-page: https://ponyorm.com
Author: Alexander Kozlovsky, Alexey Malashkevich
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/__init__.py new/pony-0.7.10/pony/__init__.py
--- old/pony-0.7.9/pony/__init__.py 2019-01-21 08:21:36.000000000 +0100
+++ new/pony-0.7.10/pony/__init__.py 2019-04-20 17:42:59.000000000 +0200
@@ -3,7 +3,7 @@
import os, sys
from os.path import dirname
-__version__ = '0.7.9'
+__version__ = '0.7.10'
def detect_mode():
try: import google.appengine
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/flask/__init__.py new/pony-0.7.10/pony/flask/__init__.py
--- old/pony-0.7.9/pony/flask/__init__.py 2018-12-09 11:02:22.000000000 +0100
+++ new/pony-0.7.10/pony/flask/__init__.py 2019-04-20 16:42:08.000000000 +0200
@@ -8,9 +8,8 @@
def _exit_session(exception):
session = getattr(request, 'pony_session', None)
- if session is None:
- raise RuntimeError('Request object lost db_session')
- session.__exit__(exc=exception)
+ if session is not None:
+ session.__exit__(exc=exception)
class Pony(object):
def __init__(self, app=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/orm/core.py new/pony-0.7.10/pony/orm/core.py
--- old/pony-0.7.9/pony/orm/core.py 2019-01-19 16:53:06.000000000 +0100
+++ new/pony-0.7.10/pony/orm/core.py 2019-04-20 16:42:08.000000000 +0200
@@ -767,13 +767,17 @@
# argument 'self' cannot be named 'database', because 'database' can be in kwargs
if self.provider is not None:
throw(BindingError, 'Database object was already bound to %s provider' % self.provider.dialect)
+ if len(args) == 1 and not kwargs and hasattr(args[0], 'keys'):
+ args, kwargs = (), args[0]
+ provider = None
if args: provider, args = args[0], args[1:]
elif 'provider' not in kwargs: throw(TypeError, 'Database provider is not specified')
else: provider = kwargs.pop('provider')
if isinstance(provider, type) and issubclass(provider, DBAPIProvider):
provider_cls = provider
else:
- if not isinstance(provider, basestring): throw(TypeError)
+ if not isinstance(provider, basestring):
+ throw(TypeError, 'Provider name should be string. Got: %r' % type(provider).__name__)
if provider == 'pygresql': throw(TypeError,
'Pony no longer supports PyGreSQL module. Please use psycopg2 instead.')
self.provider_name = provider
@@ -834,7 +838,7 @@
def disconnect(database):
provider = database.provider
if provider is None: return
- if local.db_context_counter: throw(TransactionError, 'disconnect() cannot be called inside of db_sesison')
+ if local.db_context_counter: throw(TransactionError, 'disconnect() cannot be called inside of db_session')
cache = local.db2cache.get(database)
if cache is not None: cache.rollback()
provider.disconnect()
@@ -974,7 +978,8 @@
is_subclass = entity._root_ is not entity
if is_subclass:
- if table_name is not None: throw(NotImplementedError)
+ if table_name is not None: throw(NotImplementedError,
+ 'Cannot specify table name for entity %r which is subclass of %r' % (entity.__name__, entity._root_.__name__))
table_name = entity._root_._table_
entity._table_ = table_name
elif table_name is None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/orm/dbproviders/oracle.py new/pony-0.7.10/pony/orm/dbproviders/oracle.py
--- old/pony-0.7.9/pony/orm/dbproviders/oracle.py 2019-01-17 07:53:21.000000000 +0100
+++ new/pony-0.7.10/pony/orm/dbproviders/oracle.py 2019-04-20 17:40:09.000000000 +0200
@@ -276,7 +276,11 @@
throw(TranslationError, 'Oracle does not provide `length` function for JSON arrays')
def GROUP_CONCAT(builder, distinct, expr, sep=None):
assert distinct in (None, True, False)
- result = 'LISTAGG(', builder(expr)
+ if distinct and builder.provider.server_version >= (19,):
+ distinct = 'DISTINCT '
+ else:
+ distinct = ''
+ result = 'LISTAGG(', distinct, builder(expr)
if sep is not None:
result = result, ', ', builder(sep)
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/orm/dbproviders/sqlite.py new/pony-0.7.10/pony/orm/dbproviders/sqlite.py
--- old/pony-0.7.9/pony/orm/dbproviders/sqlite.py 2019-01-17 08:02:10.000000000 +0100
+++ new/pony-0.7.10/pony/orm/dbproviders/sqlite.py 2019-04-20 17:40:09.000000000 +0200
@@ -173,6 +173,9 @@
return dbapiprovider.IntConverter.sql_type(converter)
class SQLiteDecimalConverter(dbapiprovider.DecimalConverter):
+ inf = Decimal('infinity')
+ neg_inf = Decimal('-infinity')
+ NaN = Decimal('NaN')
def sql2py(converter, val):
try: val = Decimal(str(val))
except: return val
@@ -182,7 +185,10 @@
def py2sql(converter, val):
if type(val) is not Decimal: val = Decimal(val)
exp = converter.exp
- if exp is not None: val = val.quantize(exp)
+ if exp is not None:
+ if val in (converter.inf, converter.neg_inf, converter.NaN):
+ throw(ValueError, 'Cannot store %s Decimal value in database' % val)
+ val = val.quantize(exp)
return str(val)
class SQLiteDateConverter(dbapiprovider.DateConverter):
@@ -296,6 +302,7 @@
def __init__(provider, *args, **kwargs):
DBAPIProvider.__init__(provider, *args, **kwargs)
+ provider.pre_transaction_lock = Lock()
provider.transaction_lock = Lock()
@wrap_dbapi_exceptions
@@ -308,11 +315,21 @@
try: reraise(*provider.local_exceptions.exc_info)
finally: provider.local_exceptions.exc_info = None
+ def acquire_lock(provider):
+ provider.pre_transaction_lock.acquire()
+ try:
+ provider.transaction_lock.acquire()
+ finally:
+ provider.pre_transaction_lock.release()
+
+ def release_lock(provider):
+ provider.transaction_lock.release()
+
@wrap_dbapi_exceptions
def set_transaction_mode(provider, connection, cache):
assert not cache.in_transaction
if cache.immediate:
- provider.transaction_lock.acquire()
+ provider.acquire_lock()
try:
cursor = connection.cursor()
@@ -336,7 +353,7 @@
elif core.local.debug: log_orm('SWITCH TO AUTOCOMMIT MODE')
finally:
if cache.immediate and not cache.in_transaction:
- provider.transaction_lock.release()
+ provider.release_lock()
def commit(provider, connection, cache=None):
in_transaction = cache is not None and cache.in_transaction
@@ -345,7 +362,7 @@
finally:
if in_transaction:
cache.in_transaction = False
- provider.transaction_lock.release()
+ provider.release_lock()
def rollback(provider, connection, cache=None):
in_transaction = cache is not None and cache.in_transaction
@@ -354,7 +371,7 @@
finally:
if in_transaction:
cache.in_transaction = False
- provider.transaction_lock.release()
+ provider.release_lock()
def drop(provider, connection, cache=None):
in_transaction = cache is not None and cache.in_transaction
@@ -363,7 +380,7 @@
finally:
if in_transaction:
cache.in_transaction = False
- provider.transaction_lock.release()
+ provider.release_lock()
@wrap_dbapi_exceptions
def release(provider, connection, cache=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/orm/decompiling.py new/pony-0.7.10/pony/orm/decompiling.py
--- old/pony-0.7.9/pony/orm/decompiling.py 2018-12-09 11:02:23.000000000 +0100
+++ new/pony-0.7.10/pony/orm/decompiling.py 2019-04-20 16:42:08.000000000 +0200
@@ -1,9 +1,10 @@
from __future__ import absolute_import, print_function, division
-from pony.py23compat import PY2, izip, xrange
+from pony.py23compat import PY2, izip, xrange, PY37, PYPY
import sys, types, inspect
from opcode import opname as opnames, HAVE_ARGUMENT, EXTENDED_ARG, cmp_op
from opcode import hasconst, hasname, hasjrel, haslocal, hascompare, hasfree
+from collections import defaultdict
from pony.thirdparty.compiler import ast, parse
@@ -47,8 +48,6 @@
class InvalidQuery(Exception): pass
-class AstGenerated(Exception): pass
-
def binop(node_type, args_holder=tuple):
def method(decompiler):
oper2 = decompiler.stack.pop()
@@ -65,61 +64,114 @@
if end is None: end = len(code.co_code)
decompiler.end = end
decompiler.stack = []
+ decompiler.jump_map = defaultdict(list)
decompiler.targets = {}
decompiler.ast = None
decompiler.names = set()
decompiler.assnames = set()
+ decompiler.conditions_end = 0
+ decompiler.instructions = []
+ decompiler.instructions_map = {}
+ decompiler.or_jumps = set()
+ decompiler.get_instructions()
+ decompiler.analyze_jumps()
decompiler.decompile()
decompiler.ast = decompiler.stack.pop()
decompiler.external_names = decompiler.names - decompiler.assnames
assert not decompiler.stack, decompiler.stack
- def decompile(decompiler):
+ def get_instructions(decompiler):
PY36 = sys.version_info >= (3, 6)
+ before_yield = True
code = decompiler.code
co_code = code.co_code
free = code.co_cellvars + code.co_freevars
- try:
- while decompiler.pos < decompiler.end:
- i = decompiler.pos
- if i in decompiler.targets: decompiler.process_target(i)
- op = ord(code.co_code[i])
- if PY36:
- extended_arg = 0
+ decompiler.abs_jump_to_top = decompiler.for_iter_pos = -1
+ while decompiler.pos < decompiler.end:
+ i = decompiler.pos
+ op = ord(code.co_code[i])
+ if PY36:
+ extended_arg = 0
+ oparg = ord(code.co_code[i+1])
+ while op == EXTENDED_ARG:
+ extended_arg = (extended_arg | oparg) << 8
+ i += 2
+ op = ord(code.co_code[i])
oparg = ord(code.co_code[i+1])
- while op == EXTENDED_ARG:
- extended_arg = (extended_arg | oparg) << 8
- i += 2
- op = ord(code.co_code[i])
- oparg = ord(code.co_code[i+1])
- oparg = None if op < HAVE_ARGUMENT else oparg | extended_arg
+ oparg = None if op < HAVE_ARGUMENT else oparg | extended_arg
+ i += 2
+ else:
+ i += 1
+ if op >= HAVE_ARGUMENT:
+ oparg = ord(co_code[i]) + ord(co_code[i + 1]) * 256
i += 2
- else:
- i += 1
- if op >= HAVE_ARGUMENT:
- oparg = ord(co_code[i]) + ord(co_code[i + 1]) * 256
+ if op == EXTENDED_ARG:
+ op = ord(code.co_code[i])
+ i += 1
+ oparg = ord(co_code[i]) + ord(co_code[i + 1]) * 256 + oparg * 65536
i += 2
- if op == EXTENDED_ARG:
- op = ord(code.co_code[i])
- i += 1
- oparg = ord(co_code[i]) + ord(co_code[i + 1]) * 256 + oparg * 65536
- i += 2
- if op >= HAVE_ARGUMENT:
- if op in hasconst: arg = [code.co_consts[oparg]]
- elif op in hasname: arg = [code.co_names[oparg]]
- elif op in hasjrel: arg = [i + oparg]
- elif op in haslocal: arg = [code.co_varnames[oparg]]
- elif op in hascompare: arg = [cmp_op[oparg]]
- elif op in hasfree: arg = [free[oparg]]
- else: arg = [oparg]
- else: arg = []
- opname = opnames[op].replace('+', '_')
- # print(opname, arg, decompiler.stack)
- method = getattr(decompiler, opname, None)
- if method is None: throw(NotImplementedError('Unsupported operation: %s' % opname))
- decompiler.pos = i
- x = method(*arg)
- if x is not None: decompiler.stack.append(x)
- except AstGenerated: pass
+ if op >= HAVE_ARGUMENT:
+ if op in hasconst: arg = [code.co_consts[oparg]]
+ elif op in hasname: arg = [code.co_names[oparg]]
+ elif op in hasjrel: arg = [i + oparg]
+ elif op in haslocal: arg = [code.co_varnames[oparg]]
+ elif op in hascompare: arg = [cmp_op[oparg]]
+ elif op in hasfree: arg = [free[oparg]]
+ else: arg = [oparg]
+ else: arg = []
+ opname = opnames[op].replace('+', '_')
+ if opname == 'FOR_ITER':
+ decompiler.for_iter_pos = decompiler.pos
+ if opname == 'JUMP_ABSOLUTE' and arg[0] == decompiler.for_iter_pos:
+ decompiler.abs_jump_to_top = decompiler.pos
+
+ if before_yield:
+ if 'JUMP' in opname:
+ endpos = arg[0]
+ if endpos < decompiler.pos:
+ decompiler.conditions_end = i
+ decompiler.jump_map[endpos].append(decompiler.pos)
+ decompiler.instructions_map[decompiler.pos] = len(decompiler.instructions)
+ decompiler.instructions.append((decompiler.pos, i, opname, arg))
+ if opname == 'YIELD_VALUE':
+ before_yield = False
+ decompiler.pos = i
+ def analyze_jumps(decompiler):
+ if PYPY:
+ targets = decompiler.jump_map.pop(decompiler.abs_jump_to_top, [])
+ decompiler.jump_map[decompiler.for_iter_pos] = targets
+ for i, (x, y, opname, arg) in enumerate(decompiler.instructions):
+ if 'JUMP' in opname:
+ target = arg[0]
+ if target == decompiler.abs_jump_to_top:
+ decompiler.instructions[i] = (x, y, opname, [decompiler.for_iter_pos])
+ decompiler.conditions_end = y
+
+ i = decompiler.instructions_map[decompiler.conditions_end]
+ while i > 0:
+ pos, next_pos, opname, arg = decompiler.instructions[i]
+ if pos in decompiler.jump_map:
+ for jump_start_pos in decompiler.jump_map[pos]:
+ if jump_start_pos > pos:
+ continue
+ for or_jump_start_pos in decompiler.or_jumps:
+ if pos > or_jump_start_pos > jump_start_pos:
+ break # And jump
+ else:
+ decompiler.or_jumps.add(jump_start_pos)
+ i -= 1
+ def decompile(decompiler):
+ for pos, next_pos, opname, arg in decompiler.instructions:
+ if pos in decompiler.targets:
+ decompiler.process_target(pos)
+ method = getattr(decompiler, opname, None)
+ if method is None:
+ throw(NotImplementedError('Unsupported operation: %s' % opname))
+ decompiler.pos = pos
+ decompiler.next_pos = next_pos
+ x = method(*arg)
+ if x is not None:
+ decompiler.stack.append(x)
+
def pop_items(decompiler, size):
if not size: return ()
result = decompiler.stack[-size:]
@@ -154,8 +206,15 @@
def BINARY_SUBSCR(decompiler):
oper2 = decompiler.stack.pop()
oper1 = decompiler.stack.pop()
- if isinstance(oper2, ast.Tuple): return ast.Subscript(oper1, 'OP_APPLY', list(oper2.nodes))
- else: return ast.Subscript(oper1, 'OP_APPLY', [ oper2 ])
+ if isinstance(oper2, ast.Sliceobj) and len(oper2.nodes) == 2:
+ a, b = oper2.nodes
+ a = None if isinstance(a, ast.Const) and a.value == None else a
+ b = None if isinstance(b, ast.Const) and b.value == None else b
+ return ast.Slice(oper1, 'OP_APPLY', a, b)
+ elif isinstance(oper2, ast.Tuple):
+ return ast.Subscript(oper1, 'OP_APPLY', list(oper2.nodes))
+ else:
+ return ast.Subscript(oper1, 'OP_APPLY', [ oper2 ])
def BUILD_CONST_KEY_MAP(decompiler, length):
keys = decompiler.stack.pop()
@@ -174,7 +233,7 @@
data = decompiler.pop_items(2 * length) # [key1, value1, key2, value2, ...]
it = iter(data)
pairs = list(izip(it, it)) # [(key1, value1), (key2, value2), ...]
- return ast.Dict(pairs)
+ return ast.Dict(tuple(pairs))
def BUILD_SET(decompiler, size):
return ast.Set(decompiler.pop_items(size))
@@ -245,6 +304,15 @@
def CALL_METHOD(decompiler, argc):
pop = decompiler.stack.pop
args = []
+ if argc >= 256:
+ kwargc = argc // 256
+ argc = argc % 256
+ for i in range(kwargc):
+ v = pop()
+ k = pop()
+ assert isinstance(k, ast.Const)
+ k = k.value # ast.Name(k.value)
+ args.append(ast.Keyword(k, v))
for i in range(argc):
args.append(pop())
args.reverse()
@@ -278,18 +346,48 @@
pass
def JUMP_IF_FALSE(decompiler, endpos):
- return decompiler.conditional_jump(endpos, ast.And)
+ return decompiler.conditional_jump(endpos, False)
JUMP_IF_FALSE_OR_POP = JUMP_IF_FALSE
def JUMP_IF_TRUE(decompiler, endpos):
- return decompiler.conditional_jump(endpos, ast.Or)
+ return decompiler.conditional_jump(endpos, True)
JUMP_IF_TRUE_OR_POP = JUMP_IF_TRUE
- def conditional_jump(decompiler, endpos, clausetype):
- i = decompiler.pos # next instruction
- if i in decompiler.targets: decompiler.process_target(i)
+ def conditional_jump(decompiler, endpos, if_true):
+ if PY37 or PYPY:
+ return decompiler.conditional_jump_new(endpos, if_true)
+ return decompiler.conditional_jump_old(endpos, if_true)
+
+ def conditional_jump_old(decompiler, endpos, if_true):
+ i = decompiler.next_pos
+ if i in decompiler.targets:
+ decompiler.process_target(i)
+ expr = decompiler.stack.pop()
+ clausetype = ast.Or if if_true else ast.And
+ clause = clausetype([expr])
+ clause.endpos = endpos
+ decompiler.targets.setdefault(endpos, clause)
+ return clause
+
+ def conditional_jump_new(decompiler, endpos, if_true):
+ expr = decompiler.stack.pop()
+ if decompiler.pos >= decompiler.conditions_end:
+ clausetype = ast.Or if if_true else ast.And
+ elif decompiler.pos in decompiler.or_jumps:
+ clausetype = ast.Or
+ if not if_true:
+ expr = ast.Not(expr)
+ else:
+ clausetype = ast.And
+ if if_true:
+ expr = ast.Not(expr)
+ decompiler.stack.append(expr)
+
+ if decompiler.next_pos in decompiler.targets:
+ decompiler.process_target(decompiler.next_pos)
+
expr = decompiler.stack.pop()
clause = clausetype([ expr ])
clause.endpos = endpos
@@ -305,7 +403,7 @@
top = simplify(top)
if top is limit: break
if isinstance(top, ast.GenExprFor): break
-
+ if not decompiler.stack: break
top2 = decompiler.stack[-1]
if isinstance(top2, ast.GenExprFor): break
if partial and hasattr(top2, 'endpos') and top2.endpos == pos: break
@@ -324,7 +422,7 @@
decompiler.stack.append(top)
def JUMP_FORWARD(decompiler, endpos):
- i = decompiler.pos # next instruction
+ i = decompiler.next_pos # next instruction
decompiler.process_target(i, True)
then = decompiler.stack.pop()
decompiler.process_target(i, False)
@@ -418,10 +516,9 @@
pass
def RETURN_VALUE(decompiler):
- if decompiler.pos != decompiler.end: throw(NotImplementedError)
+ if decompiler.next_pos != decompiler.end: throw(NotImplementedError)
expr = decompiler.stack.pop()
- decompiler.stack.append(simplify(expr))
- raise AstGenerated()
+ return simplify(expr)
def ROT_TWO(decompiler):
tos = decompiler.stack.pop()
@@ -523,8 +620,7 @@
fors.append(top)
else: fors.append(top)
fors.reverse()
- decompiler.stack.append(ast.GenExpr(ast.GenExprInner(simplify(expr), fors)))
- raise AstGenerated()
+ return ast.GenExpr(ast.GenExprInner(simplify(expr), fors))
test_lines = """
(a and b if c and d else e and f for i in T if (A and B if C and D else E and F))
@@ -539,8 +635,13 @@
(a for b in T if f == 5 and r or t)
(a for b in T if f and r and t)
- (a for b in T if f == 5 and +r or not t)
- (a for b in T if -t and ~r or `f`)
+ # (a for b in T if f == 5 and +r or not t)
+ # (a for b in T if -t and ~r or `f`)
+
+ (a for b in T if x and not y and z)
+ (a for b in T if not x and y)
+ (a for b in T if not x and y and z)
+ (a for b in T if not x and y or z) #FIXME!
(a**2 for b in T if t * r > y / 3)
(a + 2 for b in T if t + r > y // 3)
@@ -574,10 +675,12 @@
(s for s in T if s.a > 20 and (s.x.y == 123 or 'ABC' in s.p.q.r))
(a for b in T1 if c > d for e in T2 if f < g)
- (func1(a, a.attr, keyarg=123) for s in T)
- (func1(a, a.attr, keyarg=123, *e) for s in T)
- (func1(a, b, a.attr1, a.b.c, keyarg1=123, keyarg2='mx', *e, **f) for s in T)
- (func(a, a.attr, keyarg=123) for a in T if a.method(x, *y, **z) == 4)
+ (func1(a, a.attr, x=123) for s in T)
+ # (func1(a, a.attr, *args) for s in T)
+ # (func1(a, a.attr, x=123, **kwargs) for s in T)
+ (func1(a, b, a.attr1, a.b.c, x=123, y='foo') for s in T)
+ # (func1(a, b, a.attr1, a.b.c, x=123, y='foo', **kwargs) for s in T)
+ # (func(a, a.attr, keyarg=123) for a in T if a.method(x, *args, **kwargs) == 4)
((x or y) and (p or q) for a in T if (a or b) and (c or d))
(x.y for x in T if (a and (b or (c and d))) or X)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/orm/examples/university1.py new/pony-0.7.10/pony/orm/examples/university1.py
--- old/pony-0.7.9/pony/orm/examples/university1.py 2019-01-21 07:43:48.000000000 +0100
+++ new/pony-0.7.10/pony/orm/examples/university1.py 2019-04-20 16:42:08.000000000 +0200
@@ -39,7 +39,6 @@
gpa = Required(float, default=0)
group = Required(Group)
courses = Set(Course)
- scores = Optional(IntArray, nullable=True)
sql_debug(True) # Output all SQL queries to stdout
@@ -49,7 +48,7 @@
postgres=dict(provider='postgres', user='pony', password='pony', host='localhost', database='pony'),
oracle=dict(provider='oracle', user='c##pony', password='pony', dsn='localhost/orcl')
)
-db.bind(**params['postgres'])
+db.bind(**params['sqlite'])
db.generate_mapping(create_tables=True)
@@ -85,11 +84,11 @@
g106 = Group(number=106, major='B.S./M.S. in Nuclear Engineering', dept=d3)
s1 = Student(name='John Smith', dob=date(1991, 3, 20), tel='123-456', gpa=3, group=g101,
- courses=[c1, c2, c4, c6], scores=[1, 2, 3])
+ courses=[c1, c2, c4, c6])
s2 = Student(name='Matthew Reed', dob=date(1990, 11, 26), gpa=3.5, group=g101,
- courses=[c1, c3, c4, c5], scores=[2, 3, 4])
+ courses=[c1, c3, c4, c5])
s3 = Student(name='Chuan Qin', dob=date(1989, 2, 5), gpa=4, group=g101,
- courses=[c3, c5, c6], scores=[])
+ courses=[c3, c5, c6])
s4 = Student(name='Rebecca Lawson', dob=date(1990, 4, 18), tel='234-567', gpa=3.3, group=g102,
courses=[c1, c4, c5, c6])
s5 = Student(name='Maria Ionescu', dob=date(1991, 4, 23), gpa=3.9, group=g102,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/orm/sqlbuilding.py new/pony-0.7.10/pony/orm/sqlbuilding.py
--- old/pony-0.7.9/pony/orm/sqlbuilding.py 2018-12-09 11:02:23.000000000 +0100
+++ new/pony-0.7.10/pony/orm/sqlbuilding.py 2019-04-20 17:40:09.000000000 +0200
@@ -480,7 +480,10 @@
assert distinct in (None, True, False)
result = distinct and 'GROUP_CONCAT(DISTINCT ' or 'GROUP_CONCAT(', builder(expr)
if sep is not None:
- result = result, ', ', builder(sep)
+ if builder.provider.dialect == 'MySQL':
+ result = result, ' SEPARATOR ', builder(sep)
+ else:
+ result = result, ', ', builder(sep)
return result, ')'
UPPER = make_unary_func('upper')
LOWER = make_unary_func('lower')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/orm/tests/test_declarative_func_monad.py new/pony-0.7.10/pony/orm/tests/test_declarative_func_monad.py
--- old/pony-0.7.9/pony/orm/tests/test_declarative_func_monad.py 2018-12-09 11:02:23.000000000 +0100
+++ new/pony-0.7.10/pony/orm/tests/test_declarative_func_monad.py 2019-04-20 17:40:09.000000000 +0200
@@ -115,6 +115,7 @@
self.assertEqual(result, {Student[1], Student[2], Student[3], Student[4], Student[5]})
@raises_exception(ExprEvalError, "`1 < datetime.now()` raises TypeError: " + (
"can't compare 'datetime' to 'int'" if PYPY2 else
+ "'<' not supported between instances of 'int' and 'datetime'" if PYPY and sys.version_info >= (3, 6) else
"unorderable types: int < datetime" if PYPY else
"can't compare datetime.datetime to int" if PY2 else
"unorderable types: int() < datetime.datetime()" if sys.version_info < (3, 6) else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/orm/tests/test_decompiler.py new/pony-0.7.10/pony/orm/tests/test_decompiler.py
--- old/pony-0.7.9/pony/orm/tests/test_decompiler.py 1970-01-01 01:00:00.000000000 +0100
+++ new/pony-0.7.10/pony/orm/tests/test_decompiler.py 2019-04-20 16:42:08.000000000 +0200
@@ -0,0 +1,103 @@
+import unittest
+
+from pony.thirdparty.compiler.transformer import parse
+from pony.orm.decompiling import Decompiler
+from pony.orm.asttranslation import ast2src
+
+
+def generate_gens():
+ patterns = [
+ '(x * y) * [z * j)',
+ '([x * y) * z) * j',
+ '(x * [y * z)) * j',
+ 'x * ([y * z) * j)',
+ 'x * (y * [z * j))'
+ ]
+
+ ops = ('and', 'or')
+ nots = (True, False)
+
+ result = []
+
+ for pat in patterns:
+ cur = pat
+ for op1 in ops:
+ for op2 in ops:
+ for op3 in ops:
+ res = cur.replace('*', op1, 1)
+ res = res.replace('*', op2, 1)
+ res = res.replace('*', op3, 1)
+ result.append(res)
+
+ final = []
+
+ for res in result:
+ for par1 in nots:
+ for par2 in nots:
+ for a in nots:
+ for b in nots:
+ for c in nots:
+ for d in nots:
+ cur = res.replace('(', 'not(') if not par1 else res
+ if not par2:
+ cur = cur.replace('[', 'not(')
+ else:
+ cur = cur.replace('[', '(')
+ if not a: cur = cur.replace('x', 'not x')
+ if not b: cur = cur.replace('y', 'not y')
+ if not c: cur = cur.replace('z', 'not z')
+ if not d: cur = cur.replace('j', 'not j')
+ final.append(cur)
+
+ return final
+
+def create_test(gen):
+ def wrapped_test(self):
+ def get_condition_values(cond):
+ result = []
+ vals = (True, False)
+ for x in vals:
+ for y in vals:
+ for z in vals:
+ for j in vals:
+ result.append(eval(cond, {'x': x, 'y': y, 'z': z, 'j': j}))
+ return result
+ src1 = '(a for a in [] if %s)' % gen
+ src2 = 'lambda x, y, z, j: (%s)' % gen
+ src3 = '(m for m in [] if %s for n in [] if %s)' % (gen, gen)
+
+ code1 = compile(src1, '<?>', 'eval').co_consts[0]
+ ast1 = Decompiler(code1).ast
+ res1 = ast2src(ast1).replace('.0', '[]')
+ res1 = res1[res1.find('if')+2:-1]
+
+ code2 = compile(src2, '<?>', 'eval').co_consts[0]
+ ast2 = Decompiler(code2).ast
+ res2 = ast2src(ast2).replace('.0', '[]')
+ res2 = res2[res2.find(':')+1:]
+
+ code3 = compile(src3, '<?>', 'eval').co_consts[0]
+ ast3 = Decompiler(code3).ast
+ res3 = ast2src(ast3).replace('.0', '[]')
+ res3 = res3[res3.find('if')+2: res3.rfind('for')-1]
+
+ if get_condition_values(gen) != get_condition_values(res1):
+ self.fail("Incorrect generator decompilation: %s -> %s" % (gen, res1))
+
+ if get_condition_values(gen) != get_condition_values(res2):
+ self.fail("Incorrect lambda decompilation: %s -> %s" % (gen, res2))
+
+ if get_condition_values(gen) != get_condition_values(res3):
+ self.fail("Incorrect multi-for generator decompilation: %s -> %s" % (gen, res3))
+
+ return wrapped_test
+
+
+class TestDecompiler(unittest.TestCase):
+ pass
+
+
+for i, gen in enumerate(generate_gens()):
+ test_method = create_test(gen)
+ test_method.__name__ = 'test_decompiler_%d' % i
+ setattr(TestDecompiler, test_method.__name__, test_method)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/orm/tests/test_select_from_select_queries.py new/pony-0.7.10/pony/orm/tests/test_select_from_select_queries.py
--- old/pony-0.7.9/pony/orm/tests/test_select_from_select_queries.py 2018-12-09 11:02:23.000000000 +0100
+++ new/pony-0.7.10/pony/orm/tests/test_select_from_select_queries.py 2019-04-20 17:40:09.000000000 +0200
@@ -2,6 +2,7 @@
from pony.orm import *
from pony.orm.tests.testutils import *
+from pony.py23compat import PYPY2
db = Database('sqlite', ':memory:')
@@ -88,7 +89,8 @@
self.assertEqual(db.last_sql.count('SELECT'), 1)
@db_session
- @raises_exception(ExprEvalError, "`s.scholarship > 0` raises NameError: name 's' is not defined")
+ @raises_exception(ExprEvalError, "`s.scholarship > 0` raises NameError: name 's' is not defined" if not PYPY2
+ else "`s.scholarship > 0` raises NameError: global name 's' is not defined")
def test_7(self): # test access to original query var name from the new query
q = select(s.first_name for s in Student if s.scholarship < 500)
q2 = select(x for x in q if s.scholarship > 0)
@@ -377,7 +379,7 @@
@db_session
def test_45(self):
- q = select(s for s in Student).order_by(Student.first_name).limit(3, offset=1)
+ q = select(s for s in Student).order_by(Student.first_name, Student.id).limit(3, offset=1)
q2 = select(s for s in q if s.age > 18).limit(2, offset=1)
q3 = select(s.last_name for s in q2).limit(2, offset=1)
self.assertEqual(set(q3), {'Brown'})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony/py23compat.py new/pony-0.7.10/pony/py23compat.py
--- old/pony-0.7.9/pony/py23compat.py 2018-12-09 11:02:23.000000000 +0100
+++ new/pony-0.7.10/pony/py23compat.py 2019-04-20 16:42:08.000000000 +0200
@@ -3,6 +3,7 @@
PY2 = sys.version_info[0] == 2
PYPY = platform.python_implementation() == 'PyPy'
PYPY2 = PYPY and PY2
+PY37 = sys.version_info[:2] >= (3, 7)
if PY2:
from future_builtins import zip as izip, map as imap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony.egg-info/PKG-INFO new/pony-0.7.10/pony.egg-info/PKG-INFO
--- old/pony-0.7.9/pony.egg-info/PKG-INFO 2019-01-21 08:24:08.000000000 +0100
+++ new/pony-0.7.10/pony.egg-info/PKG-INFO 2019-04-20 17:48:21.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pony
-Version: 0.7.9
+Version: 0.7.10
Summary: Pony Object-Relational Mapper
Home-page: https://ponyorm.com
Author: Alexander Kozlovsky, Alexey Malashkevich
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pony-0.7.9/pony.egg-info/SOURCES.txt new/pony-0.7.10/pony.egg-info/SOURCES.txt
--- old/pony-0.7.9/pony.egg-info/SOURCES.txt 2019-01-21 08:24:09.000000000 +0100
+++ new/pony-0.7.10/pony.egg-info/SOURCES.txt 2019-04-20 17:48:21.000000000 +0200
@@ -1,3 +1,4 @@
+LICENSE
MANIFEST.in
README.md
setup.py
@@ -78,6 +79,7 @@
pony/orm/tests/test_declarative_sqltranslator.py
pony/orm/tests/test_declarative_sqltranslator2.py
pony/orm/tests/test_declarative_strings.py
+pony/orm/tests/test_decompiler.py
pony/orm/tests/test_deduplication.py
pony/orm/tests/test_diagram.py
pony/orm/tests/test_diagram_attribute.py
1
0
Hello community,
here is the log from the commit of package python-pdd for openSUSE:Factory checked in at 2019-04-30 13:01:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pdd (Old)
and /work/SRC/openSUSE:Factory/.python-pdd.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pdd"
Tue Apr 30 13:01:02 2019 rev:2 rq:697446 version:1.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pdd/python-pdd.changes 2019-04-04 14:13:45.549337898 +0200
+++ /work/SRC/openSUSE:Factory/.python-pdd.new.5536/python-pdd.changes 2019-04-30 13:01:06.098161238 +0200
@@ -1,0 +2,9 @@
+Wed Apr 24 09:21:19 UTC 2019 - pgajdos(a)suse.com
+
+- version update to 1.4
+ - Command piggybacking with countdown timer
+ - Show current time for timers
+ - Disable showing epoch time on `pdd`
+- run the test suite
+
+-------------------------------------------------------------------
Old:
----
pdd-1.3.1.tar.gz
New:
----
pdd-1.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pdd.spec ++++++
--- /var/tmp/diff_new_pack.VK8MD2/_old 2019-04-30 13:01:07.202160908 +0200
+++ /var/tmp/diff_new_pack.VK8MD2/_new 2019-04-30 13:01:07.202160908 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pdd
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,29 +12,32 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
+
# pdd is not available for Python 2
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pdd
-Version: 1.3.1
+Version: 1.4
Release: 0
-License: GPL-3.0
Summary: Tiny date, time diff calculator with timers
-Url: https://github.com/jarun/pdd
+License: GPL-3.0-only
Group: Development/Languages/Python
+Url: https://github.com/jarun/pdd
Source: https://files.pythonhosted.org/packages/source/p/pdd/pdd-%{version}.tar.gz
-BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
+BuildRequires: python-rpm-macros
# SECTION test requirements
-BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module pytest}
+BuildRequires: %{python_module python-dateutil}
# /SECTION
BuildRequires: fdupes
Requires: python-python-dateutil
+Requires: python-setuptools
BuildArch: noarch
%python_subpackages
@@ -46,12 +49,19 @@
%setup -q -n pdd-%{version}
%build
+# this seems to be fixed in github (there is pdd instead of pdd.py,
+# what setup.py expects, if I have not missed anything)
+mv pdd.py pdd
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%check
+chmod 755 pdd
+%pytest test.py
+
%files %{python_files}
%doc README.md CHANGELOG
%license LICENSE
++++++ pdd-1.3.1.tar.gz -> pdd-1.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdd-1.3.1/CHANGELOG new/pdd-1.4/CHANGELOG
--- old/pdd-1.3.1/CHANGELOG 2018-08-08 18:16:59.000000000 +0200
+++ new/pdd-1.4/CHANGELOG 2019-04-04 13:18:23.000000000 +0200
@@ -1,3 +1,13 @@
+pdd v1.4
+2019-04-04
+
+- Support hiding cursor on OSX
+- Command piggybacking with countdown timer
+- Show current time for timers
+- Disable showing epoch time on `pdd`
+
+-------------------------------------------------------------------------------
+
pdd v1.3.1
2018-08-08
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdd-1.3.1/MANIFEST.in new/pdd-1.4/MANIFEST.in
--- old/pdd-1.3.1/MANIFEST.in 2018-08-08 18:16:59.000000000 +0200
+++ new/pdd-1.4/MANIFEST.in 2019-04-04 13:18:23.000000000 +0200
@@ -1 +1,2 @@
include CHANGELOG LICENSE
+include test.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdd-1.3.1/PKG-INFO new/pdd-1.4/PKG-INFO
--- old/pdd-1.3.1/PKG-INFO 2018-08-08 18:17:40.000000000 +0200
+++ new/pdd-1.4/PKG-INFO 2019-04-04 13:19:33.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pdd
-Version: 1.3.1
+Version: 1.4
Summary: Tiny date, time diff calculator with timers
Home-page: https://github.com/jarun/pdd
Author: Arun Prakash Jana
@@ -18,8 +18,9 @@
</p>
<p align="center">
+ <a href="https://repology.org/metapackage/pdd"><img src="https://repology.org/badge/tiny-repos/pdd.svg" alt="Availability"></a>
<a href="https://github.com/jarun/pdd/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-GPLv3-yellow.svg?maxAge=2592000" alt="License" /></a>
- <a href="https://travis-ci.org/jarun/pdd"><img src="https://travis-ci.org/jarun/pdd.svg?branch=master" alt="Build Status" /></a>
+ <a href="https://circleci.com/gh/jarun/workflows/pdd"><img src="https://img.shields.io/circleci/project/github/jarun/pdd.svg" alt="Build Status" /></a>
</p>
<p align="center">
@@ -33,8 +34,7 @@
*Love smart and efficient utilities? Explore [my repositories](https://github.com/jarun?tab=repositories). Buy me a cup of coffee if they help you.*
<p align="center">
- <a href="https://saythanks.io/to/jarun"><img src="https://img.shields.io/badge/say-thanks!-ff69b4.svg" /></a>
- <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ7…"><img src="https://img.shields.io/badge/PayPal-donate-green.svg" alt="Donate via PayPal!" /></a>
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ7…"><img src="https://img.shields.io/badge/PayPal-donate-1eb0fc.svg" alt="Donate via PayPal!" /></a>
</p>
### Table of Contents
@@ -58,7 +58,7 @@
- calculate date and time difference
- calculate diff from *today* and *now*
- add, subtract duration (timeslice) to/from date (time)
- - countdown timer
+ - countdown timer with command piggybacking
- custom resolution stopwatch
- non-verbose mode for background timers
- show current date, time and timezone
@@ -79,14 +79,16 @@
#### From a package manager
- - [AUR](https://aur.archlinux.org/packages/pdd/) (`pacman -S pdd`)
+ - [AUR](https://aur.archlinux.org/packages/pdd/) (`yay -S pdd`)
- [Debian](https://packages.debian.org/search?keywords=pdd&searchon=names&exac… (`apt-get install pdd`)
- [Fedora](https://apps.fedoraproject.org/packages/pdd) (`dnf install pdd`)
- [NixOS](https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/misc/pdd) (`nix-env -i pdd`)
- [PyPI](https://pypi.org/project/pdd) (`pip3 install pdd`)
+ - [Raspbian Testing](https://archive.raspbian.org/raspbian/pool/main/p/pdd/) (`apt-get install pdd`)
+ - [Termux](https://termux.com/) (`pip3 install pdd`)
- [Ubuntu](https://packages.ubuntu.com/search?keywords=pdd&searchon=names&exac… (`apt-get install pdd`)
- [Ubuntu PPA](https://launchpad.net/~twodopeshaggy/+archive/ubuntu/jarun/) (`apt-get install pdd`)
- - [Void Linux](https://github.com/voidlinux/void-packages/tree/master/srcpkgs/pdd) (`xbps-install -S pdd`)
+ - [Void Linux](https://github.com/void-linux/void-packages/tree/master/srcpkgs/pdd) (`xbps-install -S pdd`)
#### Release packages
@@ -110,17 +112,19 @@
`pdd` is a standalone utility. From the containing directory, run:
- $ ./pdd.py
+ $ chmod +x pdd
+ $ ./pdd
### Usage
#### cmdline options
```
- usage: pdd.py [-h] [-d yyyy mmm dd [yyyy mmm dd | y m d]]
- [-t hh:mm:ss [hh:mm:ss | h:m:s]] [--add] [--sub]
- [--day yyyy mmm dd] [-c hh:mm:ss] [-s [resolution]] [-q]
- [keywords [keywords ...]]
+ usage: pdd [-h] [-d yyyy mmm dd [yyyy mmm dd | y m d]]
+ [-t hh:mm:ss [hh:mm:ss | h:m:s]] [--add] [--sub]
+ [--day yyyy mmm dd] [-c hh:mm:ss] [-r command] [-s [resolution]]
+ [-q]
+ [keywords [keywords ...]]
Tiny date, time difference calculator with timers.
@@ -137,7 +141,8 @@
--sub subtract from date (/today) or time (/now)
--day yyyy mmm dd show day of the week on a date
-c hh:mm:ss start a countdown timer
- -s [resolution] start a stopwatch (default resolution: ms)
+ -r command run command when countdown timer reaches 0
+ -s [resolution] start a stopwatch [default resolution: 3 (ms)]
-q quiet mode for background timer/stopwatch
```
@@ -219,6 +224,11 @@
$ pdd -qc 3:0:0 &
To see the final counter run `fg` and press <kbd>Ctrl-C</kbd>.
+ 17. Run a command when countdown timer reaches 0
+
+ $ pdd -c 00:00:5 -r 'ps -aux'
+ $ pdd -c 00:00:5 -r 'notify-send pdd "timer expired"'
+
### Copyright
Copyright © 2017 [Arun Prakash Jana](https://github.com/jarun)
@@ -227,6 +237,7 @@
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
@@ -236,6 +247,7 @@
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Utilities
+Requires-Python: >=3.5
Description-Content-Type: text/markdown
Provides-Extra: packaging
Provides-Extra: tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdd-1.3.1/README.md new/pdd-1.4/README.md
--- old/pdd-1.3.1/README.md 2018-08-08 18:16:59.000000000 +0200
+++ new/pdd-1.4/README.md 2019-04-04 13:18:23.000000000 +0200
@@ -10,8 +10,9 @@
</p>
<p align="center">
+<a href="https://repology.org/metapackage/pdd"><img src="https://repology.org/badge/tiny-repos/pdd.svg" alt="Availability"></a>
<a href="https://github.com/jarun/pdd/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-GPLv3-yellow.svg?maxAge=2592000" alt="License" /></a>
-<a href="https://travis-ci.org/jarun/pdd"><img src="https://travis-ci.org/jarun/pdd.svg?branch=master" alt="Build Status" /></a>
+<a href="https://circleci.com/gh/jarun/workflows/pdd"><img src="https://img.shields.io/circleci/project/github/jarun/pdd.svg" alt="Build Status" /></a>
</p>
<p align="center">
@@ -25,8 +26,7 @@
*Love smart and efficient utilities? Explore [my repositories](https://github.com/jarun?tab=repositories). Buy me a cup of coffee if they help you.*
<p align="center">
-<a href="https://saythanks.io/to/jarun"><img src="https://img.shields.io/badge/say-thanks!-ff69b4.svg" /></a>
-<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ7…"><img src="https://img.shields.io/badge/PayPal-donate-green.svg" alt="Donate via PayPal!" /></a>
+<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ7…"><img src="https://img.shields.io/badge/PayPal-donate-1eb0fc.svg" alt="Donate via PayPal!" /></a>
</p>
### Table of Contents
@@ -50,7 +50,7 @@
- calculate date and time difference
- calculate diff from *today* and *now*
- add, subtract duration (timeslice) to/from date (time)
-- countdown timer
+- countdown timer with command piggybacking
- custom resolution stopwatch
- non-verbose mode for background timers
- show current date, time and timezone
@@ -71,14 +71,16 @@
#### From a package manager
-- [AUR](https://aur.archlinux.org/packages/pdd/) (`pacman -S pdd`)
+- [AUR](https://aur.archlinux.org/packages/pdd/) (`yay -S pdd`)
- [Debian](https://packages.debian.org/search?keywords=pdd&searchon=names&exac… (`apt-get install pdd`)
- [Fedora](https://apps.fedoraproject.org/packages/pdd) (`dnf install pdd`)
- [NixOS](https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/misc/pdd) (`nix-env -i pdd`)
- [PyPI](https://pypi.org/project/pdd) (`pip3 install pdd`)
+- [Raspbian Testing](https://archive.raspbian.org/raspbian/pool/main/p/pdd/) (`apt-get install pdd`)
+- [Termux](https://termux.com/) (`pip3 install pdd`)
- [Ubuntu](https://packages.ubuntu.com/search?keywords=pdd&searchon=names&exac… (`apt-get install pdd`)
- [Ubuntu PPA](https://launchpad.net/~twodopeshaggy/+archive/ubuntu/jarun/) (`apt-get install pdd`)
-- [Void Linux](https://github.com/voidlinux/void-packages/tree/master/srcpkgs/pdd) (`xbps-install -S pdd`)
+- [Void Linux](https://github.com/void-linux/void-packages/tree/master/srcpkgs/pdd) (`xbps-install -S pdd`)
#### Release packages
@@ -102,17 +104,19 @@
`pdd` is a standalone utility. From the containing directory, run:
- $ ./pdd.py
+ $ chmod +x pdd
+ $ ./pdd
### Usage
#### cmdline options
```
-usage: pdd.py [-h] [-d yyyy mmm dd [yyyy mmm dd | y m d]]
- [-t hh:mm:ss [hh:mm:ss | h:m:s]] [--add] [--sub]
- [--day yyyy mmm dd] [-c hh:mm:ss] [-s [resolution]] [-q]
- [keywords [keywords ...]]
+usage: pdd [-h] [-d yyyy mmm dd [yyyy mmm dd | y m d]]
+ [-t hh:mm:ss [hh:mm:ss | h:m:s]] [--add] [--sub]
+ [--day yyyy mmm dd] [-c hh:mm:ss] [-r command] [-s [resolution]]
+ [-q]
+ [keywords [keywords ...]]
Tiny date, time difference calculator with timers.
@@ -129,7 +133,8 @@
--sub subtract from date (/today) or time (/now)
--day yyyy mmm dd show day of the week on a date
-c hh:mm:ss start a countdown timer
- -s [resolution] start a stopwatch (default resolution: ms)
+ -r command run command when countdown timer reaches 0
+ -s [resolution] start a stopwatch [default resolution: 3 (ms)]
-q quiet mode for background timer/stopwatch
```
@@ -211,6 +216,11 @@
$ pdd -qc 3:0:0 &
To see the final counter run `fg` and press <kbd>Ctrl-C</kbd>.
+17. Run a command when countdown timer reaches 0
+
+ $ pdd -c 00:00:5 -r 'ps -aux'
+ $ pdd -c 00:00:5 -r 'notify-send pdd "timer expired"'
+
### Copyright
Copyright © 2017 [Arun Prakash Jana](https://github.com/jarun)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdd-1.3.1/pdd.egg-info/PKG-INFO new/pdd-1.4/pdd.egg-info/PKG-INFO
--- old/pdd-1.3.1/pdd.egg-info/PKG-INFO 2018-08-08 18:17:40.000000000 +0200
+++ new/pdd-1.4/pdd.egg-info/PKG-INFO 2019-04-04 13:19:33.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pdd
-Version: 1.3.1
+Version: 1.4
Summary: Tiny date, time diff calculator with timers
Home-page: https://github.com/jarun/pdd
Author: Arun Prakash Jana
@@ -18,8 +18,9 @@
</p>
<p align="center">
+ <a href="https://repology.org/metapackage/pdd"><img src="https://repology.org/badge/tiny-repos/pdd.svg" alt="Availability"></a>
<a href="https://github.com/jarun/pdd/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-GPLv3-yellow.svg?maxAge=2592000" alt="License" /></a>
- <a href="https://travis-ci.org/jarun/pdd"><img src="https://travis-ci.org/jarun/pdd.svg?branch=master" alt="Build Status" /></a>
+ <a href="https://circleci.com/gh/jarun/workflows/pdd"><img src="https://img.shields.io/circleci/project/github/jarun/pdd.svg" alt="Build Status" /></a>
</p>
<p align="center">
@@ -33,8 +34,7 @@
*Love smart and efficient utilities? Explore [my repositories](https://github.com/jarun?tab=repositories). Buy me a cup of coffee if they help you.*
<p align="center">
- <a href="https://saythanks.io/to/jarun"><img src="https://img.shields.io/badge/say-thanks!-ff69b4.svg" /></a>
- <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ7…"><img src="https://img.shields.io/badge/PayPal-donate-green.svg" alt="Donate via PayPal!" /></a>
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ7…"><img src="https://img.shields.io/badge/PayPal-donate-1eb0fc.svg" alt="Donate via PayPal!" /></a>
</p>
### Table of Contents
@@ -58,7 +58,7 @@
- calculate date and time difference
- calculate diff from *today* and *now*
- add, subtract duration (timeslice) to/from date (time)
- - countdown timer
+ - countdown timer with command piggybacking
- custom resolution stopwatch
- non-verbose mode for background timers
- show current date, time and timezone
@@ -79,14 +79,16 @@
#### From a package manager
- - [AUR](https://aur.archlinux.org/packages/pdd/) (`pacman -S pdd`)
+ - [AUR](https://aur.archlinux.org/packages/pdd/) (`yay -S pdd`)
- [Debian](https://packages.debian.org/search?keywords=pdd&searchon=names&exac… (`apt-get install pdd`)
- [Fedora](https://apps.fedoraproject.org/packages/pdd) (`dnf install pdd`)
- [NixOS](https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/misc/pdd) (`nix-env -i pdd`)
- [PyPI](https://pypi.org/project/pdd) (`pip3 install pdd`)
+ - [Raspbian Testing](https://archive.raspbian.org/raspbian/pool/main/p/pdd/) (`apt-get install pdd`)
+ - [Termux](https://termux.com/) (`pip3 install pdd`)
- [Ubuntu](https://packages.ubuntu.com/search?keywords=pdd&searchon=names&exac… (`apt-get install pdd`)
- [Ubuntu PPA](https://launchpad.net/~twodopeshaggy/+archive/ubuntu/jarun/) (`apt-get install pdd`)
- - [Void Linux](https://github.com/voidlinux/void-packages/tree/master/srcpkgs/pdd) (`xbps-install -S pdd`)
+ - [Void Linux](https://github.com/void-linux/void-packages/tree/master/srcpkgs/pdd) (`xbps-install -S pdd`)
#### Release packages
@@ -110,17 +112,19 @@
`pdd` is a standalone utility. From the containing directory, run:
- $ ./pdd.py
+ $ chmod +x pdd
+ $ ./pdd
### Usage
#### cmdline options
```
- usage: pdd.py [-h] [-d yyyy mmm dd [yyyy mmm dd | y m d]]
- [-t hh:mm:ss [hh:mm:ss | h:m:s]] [--add] [--sub]
- [--day yyyy mmm dd] [-c hh:mm:ss] [-s [resolution]] [-q]
- [keywords [keywords ...]]
+ usage: pdd [-h] [-d yyyy mmm dd [yyyy mmm dd | y m d]]
+ [-t hh:mm:ss [hh:mm:ss | h:m:s]] [--add] [--sub]
+ [--day yyyy mmm dd] [-c hh:mm:ss] [-r command] [-s [resolution]]
+ [-q]
+ [keywords [keywords ...]]
Tiny date, time difference calculator with timers.
@@ -137,7 +141,8 @@
--sub subtract from date (/today) or time (/now)
--day yyyy mmm dd show day of the week on a date
-c hh:mm:ss start a countdown timer
- -s [resolution] start a stopwatch (default resolution: ms)
+ -r command run command when countdown timer reaches 0
+ -s [resolution] start a stopwatch [default resolution: 3 (ms)]
-q quiet mode for background timer/stopwatch
```
@@ -219,6 +224,11 @@
$ pdd -qc 3:0:0 &
To see the final counter run `fg` and press <kbd>Ctrl-C</kbd>.
+ 17. Run a command when countdown timer reaches 0
+
+ $ pdd -c 00:00:5 -r 'ps -aux'
+ $ pdd -c 00:00:5 -r 'notify-send pdd "timer expired"'
+
### Copyright
Copyright © 2017 [Arun Prakash Jana](https://github.com/jarun)
@@ -227,6 +237,7 @@
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
@@ -236,6 +247,7 @@
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Utilities
+Requires-Python: >=3.5
Description-Content-Type: text/markdown
Provides-Extra: packaging
Provides-Extra: tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdd-1.3.1/pdd.egg-info/SOURCES.txt new/pdd-1.4/pdd.egg-info/SOURCES.txt
--- old/pdd-1.3.1/pdd.egg-info/SOURCES.txt 2018-08-08 18:17:40.000000000 +0200
+++ new/pdd-1.4/pdd.egg-info/SOURCES.txt 2019-04-04 13:19:33.000000000 +0200
@@ -4,6 +4,7 @@
README.md
pdd.py
setup.py
+test.py
pdd.egg-info/PKG-INFO
pdd.egg-info/SOURCES.txt
pdd.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdd-1.3.1/pdd.py new/pdd-1.4/pdd.py
--- old/pdd-1.3.1/pdd.py 2018-08-08 18:16:59.000000000 +0200
+++ new/pdd-1.4/pdd.py 2019-04-04 13:19:33.000000000 +0200
@@ -21,10 +21,13 @@
import calendar as cal
from datetime import date
from datetime import datetime
-from dateutil.relativedelta import relativedelta
import os
+import shlex
+import subprocess
import sys
import time
+from dateutil.relativedelta import relativedelta
+
if os.name == 'nt':
import ctypes
@@ -32,11 +35,11 @@
_fields_ = [("size", ctypes.c_int),
("visible", ctypes.c_byte)]
-# Globals
+# Global variables
monthdict = {name.lower(): num
for num, name in enumerate(cal.month_abbr) if num}
-_VERSION_ = '1.3.1' # current program version
+_VERSION_ = '1.4' # current program version
def is_int(arg):
@@ -68,7 +71,7 @@
def showdatediff(d0, d1):
'''Show absolute difference between two dates'''
- if (d0 < d1):
+ if d0 < d1:
d0, d1 = d1, d0
delta = d0 - d1
@@ -169,26 +172,199 @@
print('%ds' % (t0 - t1))
-def cursor_off():
- if os.name != 'nt':
- os.system('setterm -cursor off')
+def showdate():
+ t = time.localtime()
+
+ if os.name == 'nt' and sys.version_info < (3, 6):
+ # No tm_zone in Python < v3.6 on Windows
+ print('%s %02d %s %d %02d:%02d:%02d' % (
+ cal.day_abbr[t.tm_wday],
+ t.tm_year, cal.month_abbr[t.tm_mon], t.tm_mday,
+ t.tm_hour, t.tm_min, t.tm_sec))
else:
+ print('%s %02d %s %d %02d:%02d:%02d %s' % (
+ cal.day_abbr[t.tm_wday],
+ t.tm_year, cal.month_abbr[t.tm_mon], t.tm_mday,
+ t.tm_hour, t.tm_min, t.tm_sec, t.tm_zone))
+
+
+def cursor_off():
+ if os.name == 'nt':
ci = _CursorInfo()
handle = ctypes.windll.kernel32.GetStdHandle(-11)
ctypes.windll.kernel32.GetConsoleCursorInfo(handle, ctypes.byref(ci))
ci.visible = False
ctypes.windll.kernel32.SetConsoleCursorInfo(handle, ctypes.byref(ci))
+ elif sys.platform == 'darwin':
+ os.system('tput civis')
+ else:
+ os.system('setterm -cursor off')
def cursor_on():
- if os.name != 'nt':
- os.system('setterm -cursor on')
- else:
+ if os.name == 'nt':
ci = _CursorInfo()
handle = ctypes.windll.kernel32.GetStdHandle(-11)
ctypes.windll.kernel32.GetConsoleCursorInfo(handle, ctypes.byref(ci))
ci.visible = True
ctypes.windll.kernel32.SetConsoleCursorInfo(handle, ctypes.byref(ci))
+ elif sys.platform == 'darwin':
+ os.system('tput cnorm')
+ else:
+ os.system('setterm -cursor on')
+
+
+def calc_date(args):
+ d0 = getdate(args.date[:3])
+
+ if args.add:
+ if not validargs(args.date[3], args.date[4], args.date[5]):
+ raise ValueError('negative value')
+
+ d0 += getreldate(args.date[3:])
+ print('%s %04d %s %02d' % (
+ cal.day_abbr[d0.weekday()], d0.year, cal.month_abbr[d0.month], d0.day))
+ elif args.sub:
+ if not validargs(args.date[3], args.date[4], args.date[5]):
+ raise ValueError('negative value')
+
+ d0 -= getreldate(args.date[3:])
+ print('%s %04d %s %02d' % (
+ cal.day_abbr[d0.weekday()], d0.year, cal.month_abbr[d0.month], d0.day))
+ else:
+ d1 = getdate(args.date[3:])
+ showdatediff(d0, d1)
+
+
+def calc_time(args):
+ h, m, s = gettime(args.time[0])
+ h, m, s = gethms(h, m, s)
+ if not validdata(h, m, s):
+ raise ValueError('negative value')
+ t0 = h * 3600 + m * 60 + s
+
+ h, m, s = gettime(args.time[1])
+ h, m, s = gethms(h, m, s)
+ if not validdata(h, m, s):
+ raise ValueError('negative value')
+ t1 = h * 3600 + m * 60 + s
+
+ if args.add:
+ showtimesum(t0, t1)
+ elif args.sub:
+ showtimesub(t0, t1)
+ else:
+ showtimediff(t0, t1)
+
+
+def show_day(day):
+ d = getdate(day)
+ print('%s' % cal.day_abbr[d.weekday()])
+
+
+def calc_misc(args):
+ if len(args.keywords) == 3:
+ # Show date diff from today
+ today = datetime.now().date()
+
+ if args.add:
+ if not validargs(args.keywords[0], args.keywords[1],
+ args.keywords[1]):
+ raise ValueError('negative value')
+
+ today += getreldate(args.keywords)
+ print('%s %04d %s %02d' % (
+ cal.day_abbr[today.weekday()], today.year, cal.month_abbr[today.month], today.day))
+ elif args.sub:
+ if not validargs(args.keywords[0], args.keywords[1], args.keywords[2]):
+ raise ValueError('negative value')
+
+ today -= getreldate(args.keywords)
+ print('%s %04d %s %02d' % (
+ cal.day_abbr[today.weekday()], today.year, cal.month_abbr[today.month], today.day))
+ else:
+ d0 = getdate(args.keywords)
+ showdatediff(today, d0)
+ elif len(args.keywords) == 1:
+ # Show time diff from now
+ h, m, s = gettime(args.keywords[0])
+ h, m, s = gethms(h, m, s)
+ if not validdata(h, m, s):
+ raise ValueError('negative value')
+ t0 = h * 3600 + m * 60 + s
+
+ now = datetime.now().time()
+ secs = now.hour * 3600 + now.minute * 60 + now.second
+
+ if args.add:
+ showtimesum(t0, secs)
+ elif args.sub:
+ showtimesub(secs, t0)
+ else:
+ showtimediff(t0, secs)
+ else:
+ print('keywords can be [dd mmm yyyy] OR [hh:mm:ss]')
+
+
+def run_countdown_timer(args):
+ h, m, s = gettime(args.timer[0])
+ h, m, s = gethms(h, m, s)
+ if not validdata(h, m, s):
+ raise ValueError('negative value')
+
+ if args.quiet is False:
+ cursor_off()
+
+ try:
+ while True:
+ if args.quiet is False:
+ print('\r\x1b[7m{0:02d}h {1:02d}m {2:02d}s\x1b[0m'.format(h, m, s), end='')
+ s = s - 1
+ if s == -1:
+ s = 59
+ m = m - 1
+ if m == -1:
+ m = 59
+ h = h - 1
+ if h == -1:
+ h = m = s = 0
+ break
+ time.sleep(1)
+ except KeyboardInterrupt:
+ pass
+ finally:
+ print('\r\x1b[7m{0:02d}h {1:02d}m {2:02d}s\x1b[0m '.format(h, m, s), end='\b\b\n', flush=True)
+ print('stop: ', end='')
+ showdate()
+ if args.quiet is False:
+ cursor_on()
+ if args.run:
+ # subprocess.call(''.join(args.run).split())
+ subprocess.call(shlex.split(''.join(args.run)))
+
+
+def run_stopwatch(args):
+ print('start: ', end='')
+ showdate()
+
+ n = args.stopwatch
+ res = 10 ** (-n)
+ t0 = time.time()
+ # os.system('clear')
+ if args.quiet is False:
+ cursor_off()
+
+ try:
+ while True:
+ t1 = time.time()
+ if args.quiet is False:
+ print('\r\x1b[7m{1:.{0}f}s\x1b[0m'.format(n, t1 - t0), end='')
+ time.sleep(res)
+ except KeyboardInterrupt:
+ print('\r\x1b[7m{1:.{0}f}s\x1b[0m '.format(n, t1 - t0), end='\b\b\n', flush=True)
+ finally:
+ if args.quiet is False:
+ cursor_on()
class ExtendedArgumentParser(argparse.ArgumentParser):
@@ -228,7 +404,7 @@
'''
argparser = ExtendedArgumentParser(
- description='Tiny date, time difference calculator with timers.')
+ description='Tiny date, time difference calculator with timers.')
addarg = argparser.add_argument
addarg('-d', dest='date', nargs=6,
metavar=('yyyy', 'mmm', 'dd', '[yyyy', 'mmm', 'dd | y m d]'),
@@ -244,30 +420,17 @@
help='show day of the week on a date')
addarg('-c', dest='timer', nargs=1, metavar=('hh:mm:ss'),
help='start a countdown timer')
+ addarg('-r', dest='run', nargs=1, metavar=('command'),
+ help='run command when countdown timer reaches 0')
addarg('-s', dest='stopwatch', nargs='?', type=int, const=3, choices=range(1, 10),
- metavar=('resolution'), help='start a stopwatch (default resolution: ms)')
+ metavar=('resolution'), help='start a stopwatch [default resolution: 3 (ms)]')
addarg('-q', dest='quiet', action='store_true',
help='quiet mode for background timer/stopwatch')
addarg('keywords', nargs='*', help='diff/add/subtract from today or now')
# Show `date` and exit if no arguments
if len(sys.argv) < 2:
- t = time.localtime()
-
- if os.name == 'nt' and sys.version_info < (3,6):
- # No tm_zone in Python < v3.6 on Windows
- print('%s %02d %s %d %02d:%02d:%02d' % (
- cal.day_abbr[t.tm_wday],
- t.tm_year, cal.month_abbr[t.tm_mon], t.tm_mday,
- t.tm_hour, t.tm_min, t.tm_sec))
- print(time.time())
- else:
- print('%s %02d %s %d %02d:%02d:%02d %s' % (
- cal.day_abbr[t.tm_wday],
- t.tm_year, cal.month_abbr[t.tm_mon], t.tm_mday,
- t.tm_hour, t.tm_min, t.tm_sec, t.tm_zone))
- print(time.time())
-
+ showdate()
sys.exit(0)
return argparser.parse_args(args, namespace)
@@ -280,157 +443,32 @@
print('error: cannot add and subtract simultaneously')
sys.exit(1)
- # Handle date add, sub or show date diff
- if args.date is not None:
- try:
- d0 = getdate(args.date[:3])
-
- if args.add:
- if not validargs(args.date[3], args.date[4], args.date[5]):
- raise ValueError('negative value')
-
- d0 += getreldate(args.date[3:])
- print('%s %04d %s %02d' % (cal.day_abbr[d0.weekday()], d0.year, cal.month_abbr[d0.month], d0.day))
- elif args.sub:
- if not validargs(args.date[3], args.date[4], args.date[5]):
- raise ValueError('negative value')
-
- d0 -= getreldate(args.date[3:])
- print('%s %04d %s %02d' % (cal.day_abbr[d0.weekday()], d0.year, cal.month_abbr[d0.month], d0.day))
- else:
- d1 = getdate(args.date[3:])
- showdatediff(d0, d1)
- except (ValueError, KeyError) as e:
- print('error: ' + str(e))
-
- # Handle time add, sub or show time diff
- if args.time is not None:
- try:
- h, m, s = gettime(args.time[0])
- h, m, s = gethms(h, m, s)
- if not validdata(h, m, s):
- raise ValueError('negative value')
- t0 = h * 3600 + m * 60 + s
-
- h, m, s = gettime(args.time[1])
- h, m, s = gethms(h, m, s)
- if not validdata(h, m, s):
- raise ValueError('negative value')
- t1 = h * 3600 + m * 60 + s
-
- if args.add:
- showtimesum(t0, t1)
- elif args.sub:
- showtimesub(t0, t1)
- else:
- showtimediff(t0, t1)
- except (ValueError, TypeError) as e:
- print('error: ' + str(e))
-
- # Show day of the week on the given date
- if args.day is not None:
- try:
- d = getdate(args.day)
- print('%s' % cal.day_abbr[d.weekday()])
- except (ValueError, KeyError) as e:
- print('error: ' + str(e))
-
- if len(args.keywords):
- try:
- if len(args.keywords) == 3:
- # Show date diff from today
- today = datetime.now().date()
-
- if args.add:
- if not validargs(args.keywords[0], args.keywords[1],
- args.keywords[1]):
- raise ValueError('negative value')
-
- today += getreldate(args.keywords)
- print('%s %04d %s %02d' % (cal.day_abbr[today.weekday()], today.year, cal.month_abbr[today.month], today.day))
- elif args.sub:
- if not validargs(args.keywords[0], args.keywords[1], args.keywords[2]):
- raise ValueError('negative value')
-
- today -= getreldate(args.keywords)
- print('%s %04d %s %02d' % (cal.day_abbr[today.weekday()], today.year, cal.month_abbr[today.month], today.day))
- else:
- d0 = getdate(args.keywords)
- showdatediff(today, d0)
- elif len(args.keywords) == 1:
- # Show time diff from now
- h, m, s = gettime(args.keywords[0])
- h, m, s = gethms(h, m, s)
- if not validdata(h, m, s):
- raise ValueError('negative value')
- t0 = h * 3600 + m * 60 + s
-
- now = datetime.now().time()
- secs = now.hour * 3600 + now.minute * 60 + now.second
-
- if args.add:
- showtimesum(t0, secs)
- elif args.sub:
- showtimesub(secs, t0)
- else:
- showtimediff(t0, secs)
- else:
- print('keywords can be [dd mmm yyyy] OR [hh:mm:ss]')
- except (ValueError) as e:
- print('error: ' + str(e))
+ try:
+ # Handle date add, sub or show date diff
+ if args.date is not None:
+ calc_date(args)
+
+ # Handle time add, sub or show time diff
+ if args.time is not None:
+ calc_time(args)
+
+ # Show day of the week on the given date
+ if args.day is not None:
+ show_day(args.day)
+
+ # Diff/add/subtract from today or now
+ if args.keywords:
+ calc_misc(args)
+ except (ValueError, TypeError, KeyError) as e:
+ print('error: ' + str(e))
# Countdown timer
if args.timer is not None:
- h, m, s = gettime(args.timer[0])
- h, m, s = gethms(h, m, s)
- if not validdata(h, m, s):
- raise ValueError('negative value')
-
- if args.quiet is False:
- cursor_off()
-
- try:
- while True:
- if args.quiet is False:
- print('\r\x1b[7m{0:02d}h {1:02d}m {2:02d}s\x1b[0m'.format(h, m, s), end='')
- s = s - 1
- if s == -1:
- s = 59
- m = m - 1
- if m == -1:
- m = 59
- h = h - 1
- if h == -1:
- h = m = s = 0
- break
- time.sleep(1)
- except KeyboardInterrupt:
- pass
- finally:
- print('\r\x1b[7m{0:02d}h {1:02d}m {2:02d}s\x1b[0m '.format(h, m, s), end='\b\b\n', flush=True)
- if args.quiet is False:
- cursor_on()
+ run_countdown_timer(args)
# Stopwatch
if args.stopwatch:
- n = args.stopwatch
- res = 10 ** (-n)
- t0 = time.time()
- # os.system('clear')
- if args.quiet is False:
- cursor_off()
-
- try:
- while True:
- t1 = time.time()
- if args.quiet is False:
- print('\r\x1b[7m{1:.{0}f}s\x1b[0m'.format(n, t1 - t0), end='')
- time.sleep(res)
- except KeyboardInterrupt:
- print('\r\x1b[7m{1:.{0}f}s\x1b[0m '.format(n, t1 - t0), end='\b\b\n', flush=True)
- finally:
- if args.quiet is False:
- cursor_on()
+ run_stopwatch(args)
if __name__ == '__main__':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdd-1.3.1/setup.py new/pdd-1.4/setup.py
--- old/pdd-1.3.1/setup.py 2018-07-02 09:42:18.000000000 +0200
+++ new/pdd-1.4/setup.py 2019-04-04 13:18:23.000000000 +0200
@@ -1,13 +1,12 @@
#!/usr/bin/env python3
import re
+import shutil
import sys
from setuptools import setup, find_packages
-if sys.version_info < (3, 5):
- print('ERROR: pdd requires at least Python 3.5 to run.')
- sys.exit(1)
+shutil.copyfile('pdd', 'pdd.py')
with open('pdd.py', encoding='utf-8') as f:
version = re.search('_VERSION_ = \'([^\']+)\'', f.read()).group(1)
@@ -27,6 +26,7 @@
author_email='engineerarun(a)gmail.com',
url='https://github.com/jarun/pdd',
license='GPLv3',
+ python_requires='>=3.5', # requires pip>=9.0.0
platforms=['any'],
py_modules=['pdd'],
install_requires=['python-dateutil'],
@@ -44,6 +44,7 @@
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
+ 'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdd-1.3.1/test.py new/pdd-1.4/test.py
--- old/pdd-1.3.1/test.py 1970-01-01 01:00:00.000000000 +0100
+++ new/pdd-1.4/test.py 2019-04-04 13:18:23.000000000 +0200
@@ -0,0 +1,64 @@
+#!/usr/bin/env python3
+
+'''
+pdd test script
+
+Author: Arun Prakash Jana
+Email : engineerarun(a)gmail.com
+Home : https://github.com/jarun/pdd
+
+NOTES:
+
+1. Before raising a PR,
+ a. add relevant test cases
+ b. run `python3 -m pytest test.py
+'''
+import pytest
+import subprocess
+
+test = [
+ ('./pdd', '-d', '1983', 'jul', '3', '2014', '1', '15'), # 1
+ ('./pdd', '-d', '2014', '1', '15', '1983', 'jul', '03'), # 2
+ ('./pdd', '-t', '45:50', '6:17:33'), # 3
+ ('./pdd', '-t', '6:17:33', '45:50'), # 4
+ ('./pdd', '-t', '5:80:75', '6:17:33'), # 5
+ ('./pdd', '-t', '6:17:33', '5:80:75'), # 6
+ ('./pdd', '-d', '2000', 'FEB', '28', '3', '2', '1', '--add'), # 7
+ ('./pdd', '-d', '2000', 'FEB', '28', '1', '2', '3', '--add'), # 8
+ ('./pdd', '-t', '47:71:37', '1:2:63', '--add'), # 9
+ ('./pdd', '-d', '2000', 'Mar', '01', '0', '0', '1', '--sub'), # 10
+ ('./pdd', '-d', '2000', 'Mar', '1', '1', '1', '1', '--sub'), # 11
+ ('./pdd', '-t', '00:00:00', '0:0:1', '--sub'), # 12
+ ('./pdd', '-t', '25:61:61', '0:0:0', '--sub'), # 13
+ ('./pdd', '-t', '0:0:0', '1:1:1', '--sub'), # 14
+ ('./pdd', '-t', '0:0:0', '25:61:61', '--sub'), # 15
+]
+
+res = [
+ b'30y 6m 12d\n11154d\n', # 1
+ b'30y 6m 12d\n11154d\n', # 2
+ b'05:31:43\n19903s\n', # 3
+ b'05:31:43\n19903s\n', # 4
+ b'00:03:42\n222s\n', # 5
+ b'00:03:42\n222s\n', # 6
+ b'Tue 2003 Apr 29\n', # 7
+ b'Tue 2001 May 01\n', # 8
+ b'2 day(s) later, 01:14:40\n177280s\n', # 9
+ b'Tue 2000 Feb 29\n', # 10
+ b'Sun 1999 Jan 31\n', # 11
+ b'1 day(s) earlier, 23:59:59\n-1s\n', # 12
+ b'02:02:01\n93721s\n', # 13
+ b'1 day(s) earlier, 22:58:59\n-3661s\n', # 14
+ b'2 day(s) earlier, 21:57:59\n-93721s\n', # 15
+]
+
+
+(a)pytest.mark.parametrize('item, res', zip(test, res))
+def test_output(item, res):
+ try:
+ out = subprocess.check_output(item, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ # print(e.output)
+ assert e.output == res
+ else:
+ assert out == res
1
0
Hello community,
here is the log from the commit of package python-param for openSUSE:Factory checked in at 2019-04-30 13:00:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-param (Old)
and /work/SRC/openSUSE:Factory/.python-param.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-param"
Tue Apr 30 13:00:47 2019 rev:8 rq:697417 version:1.9.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-param/python-param.changes 2019-03-14 15:01:01.823699307 +0100
+++ /work/SRC/openSUSE:Factory/.python-param.new.5536/python-param.changes 2019-04-30 13:00:51.590165579 +0200
@@ -1,0 +2,27 @@
+Wed Apr 24 09:06:21 UTC 2019 - pgajdos(a)suse.com
+
+- version update to 1.9.0
+ New features:
+ Added support for instance parameters, allowing parameter metadata
+ to be modified per instance and allowing parameter objects to be
+ passed to Panel objects (#306)
+ Added label slot to Parameter, to allow overriding attribute name
+ for display (#319)
+ Added step slot to Parameter, e.g. to control Panel widget step
+ size (#326)
+ Added keywords_to_params utility for deducing Parameter types and
+ ranges automatically (#317)
+ Added support for multiple outputs from a Parameterized (#312)
+ Added Selector as a more user-friendly version of ObjectSelector,
+ accepting a list of options as a positional argument (#316)
+ Changes affecting backwards compatibility:
+ Changed from root logger to a param-specific logger; no change to
+ API but will change format of error and warning messages (#330)
+ Old abstract class Selector renamed to SelectorBase; should be no
+ change unless user code added custom classes inherited from
+ Selector without providing a constructor (#316)
+ Bugfixes and other improvements:
+ Various bugfixes (#320, #323, #327, #329)
+ Other improvements (#315, #325)
+
+-------------------------------------------------------------------
Old:
----
v1.8.2.tar.gz
New:
----
v1.9.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-param.spec ++++++
--- /var/tmp/diff_new_pack.LYMInn/_old 2019-04-30 13:00:53.354165052 +0200
+++ /var/tmp/diff_new_pack.LYMInn/_new 2019-04-30 13:00:53.358165050 +0200
@@ -18,12 +18,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-param
-Version: 1.8.2
+Version: 1.9.0
Release: 0
Summary: Declarative Python programming using Parameters
License: BSD-3-Clause
Group: Development/Languages/Python
-URL: http://ioam.github.com/param/
+URL: http://param.pyviz.org/
Source0: https://github.com/ioam/param/archive/v%{version}.tar.gz
BuildRequires: %{python_module nose}
BuildRequires: %{python_module numpy}
++++++ v1.8.2.tar.gz -> v1.9.0.tar.gz ++++++
++++ 2703 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package libmaa for openSUSE:Factory checked in at 2019-04-30 13:00:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libmaa (Old)
and /work/SRC/openSUSE:Factory/.libmaa.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libmaa"
Tue Apr 30 13:00:40 2019 rev:2 rq:697416 version:1.4.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/libmaa/libmaa.changes 2019-02-24 17:11:03.128497026 +0100
+++ /work/SRC/openSUSE:Factory/.libmaa.new.5536/libmaa.changes 2019-04-30 13:00:45.794167314 +0200
@@ -1,0 +2,19 @@
+Tue Apr 23 22:06:51 MSK 2019 - vle(a)gmx.net
+
+- Update to libmaa-1.4.4:
+ * Fix compilation failure using gcc-8
+- Simplify build process using capabilities of mk-configure
+- Remove patches already applied in upstream, specifically
+ - 02-Spelling-typos.patch
+ - 03-Fix-gcc-8-ftbfs.patch
+- Fix License in rpm spec
+- Remove unnecessary dependencies from rpm spec
+
+-------------------------------------------------------------------
+Thu Mar 7 23:47:47 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Update to 1.4.3:
+ - Fix parallel build
+ - Explicitely enable WARNERR and remove gcc-ism from CFLAGS
+
+-------------------------------------------------------------------
Old:
----
02-Spelling-typos.patch
03-Fix-gcc-8-ftbfs.patch
libmaa-1.4.2.tar.gz
New:
----
libmaa-1.4.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libmaa.spec ++++++
--- /var/tmp/diff_new_pack.S3zwS9/_old 2019-04-30 13:00:47.390166835 +0200
+++ /var/tmp/diff_new_pack.S3zwS9/_new 2019-04-30 13:00:47.390166835 +0200
@@ -19,21 +19,14 @@
%define soname 4
Name: libmaa
-Version: 1.4.2
+Version: 1.4.4
Release: 0
Summary: Library providing many low-level data structures
-License: GPL-2.0-or-later
+License: MIT
Group: Development/Libraries/C and C++
Url: http://www.dict.org
Source0: https://downloads.sourceforge.net/dict/%{name}-%{version}.tar.gz
-Patch0: 02-Spelling-typos.patch
-Patch1: 03-Fix-gcc-8-ftbfs.patch
-BuildRequires: bison
-BuildRequires: bmake
-BuildRequires: flex
-BuildRequires: libtool
BuildRequires: mk-configure
-BuildRequires: pam-devel
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -71,17 +64,19 @@
%prep
%setup -q
-%autopatch -p 1
+
+%define env \
+ unset MAKEFLAGS \
+ export MKSTATICLIB=no \
+ export NOSUBDIR=doc
%build
-mkcmake PREFIX=%{_prefix} LIBDIR=%{_libdir}
+%{env}
+%{mkcmake}
%install
-mkcmake install DESTDIR=%{?buildroot} \
- PREFIX=%{_prefix} LIBDIR=%{_libdir}
-rm -f %{buildroot}%{_libdir}/*.la
-rm -f %{buildroot}%{_libdir}/*.a
-rm -rf %{buildroot}%{_datadir}/doc/libmaa
+%{env}
+%{mkcmake} install DESTDIR=%{?buildroot}
%post -n %{name}%{soname} -p /sbin/ldconfig
++++++ libmaa-1.4.2.tar.gz -> libmaa-1.4.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmaa-1.4.2/Makefile.common new/libmaa-1.4.4/Makefile.common
--- old/libmaa-1.4.2/Makefile.common 2018-03-07 11:13:00.000000000 +0100
+++ new/libmaa-1.4.4/Makefile.common 2019-04-23 20:53:24.000000000 +0200
@@ -4,4 +4,4 @@
DOCDIR ?= ${DATADIR}/doc/libmaa
-VERSION = 1.4.2
+VERSION = 1.4.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmaa-1.4.2/doc/NEWS new/libmaa-1.4.4/doc/NEWS
--- old/libmaa-1.4.2/doc/NEWS 2018-03-07 11:13:00.000000000 +0100
+++ new/libmaa-1.4.4/doc/NEWS 2019-04-23 20:53:24.000000000 +0200
@@ -1,4 +1,15 @@
========================================================================
+Version 1.4.4, by Aleksey Cheusov, Tue, 23 Apr 2019 21:50:34 +0300
+
+ Fix compilation failure using gcc-8.
+ Thanks to Robert Luberda!
+
+========================================================================
+Version 1.4.3, by Aleksey Cheusov, Fri, 15 Feb 2019 21:09:58 +0300
+
+ Fix parallel build
+
+========================================================================
Version 1.4.2, by Aleksey Cheusov, Wed, 7 Mar 2018 1:10:37 +0300
Fix build failure on SunOS-5.11 (alloca)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmaa-1.4.2/maa/Makefile new/libmaa-1.4.4/maa/Makefile
--- old/libmaa-1.4.2/maa/Makefile 2018-03-07 11:13:00.000000000 +0100
+++ new/libmaa-1.4.4/maa/Makefile 2019-04-23 20:53:24.000000000 +0200
@@ -3,10 +3,8 @@
MKC_REQUIRE_PROGS += awk
##################################################
-.PATH: ${.OBJDIR}
-
WARNS ?= 4
-#WARNERR ?= yes
+WARNERR ?= yes
LIB = maa
INCS = maa.h
@@ -20,14 +18,13 @@
MKC_CHECK_SIZEOF = long
MKC_CHECK_HEADERS = sys/resource.h alloca.h
-arg.o: arggram.c
-arggram.c: arggram.txt
+arg.o arg.os: ${.OBJDIR}/arggram.c arg.c
+${.OBJDIR}/arggram.c: arggram.txt
awk -f ${SRCDIR_maa}/arggram2c < ${SRCDIR_maa}/arggram.txt > $@
CFLAGS += -DMAA_MAJOR=${MAA_MAJOR}
CFLAGS += -DMAA_MINOR=${MAA_MINOR}
CFLAGS += -DMAA_TEENY=${MAA_TEENY}
-CFLAGS += -Wno-error=strict-prototypes
CPPFLAGS += -I. -I${.OBJDIR}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmaa-1.4.2/maa/log.c new/libmaa-1.4.4/maa/log.c
--- old/libmaa-1.4.2/maa/log.c 2018-03-07 11:13:00.000000000 +0100
+++ new/libmaa-1.4.4/maa/log.c 2019-04-23 20:53:24.000000000 +0200
@@ -297,7 +297,7 @@
{
va_list ap_copy;
time_t t;
- static char buf [4096] = "";
+ static char buf [8192] = "";
static char buf_main [4096] = "";
static char buf_preamble [256] = "";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmaa-1.4.2/maa/sl.c new/libmaa-1.4.4/maa/sl.c
--- old/libmaa-1.4.2/maa/sl.c 2018-03-07 11:13:00.000000000 +0100
+++ new/libmaa-1.4.4/maa/sl.c 2019-04-23 20:53:24.000000000 +0200
@@ -181,9 +181,9 @@
}
if (!compare)
- err_internal( __func__, "compare fuction is NULL\n" );
+ err_internal( __func__, "compare function is NULL\n" );
if (!key)
- err_internal( __func__, "key fuction is NULL\n" );
+ err_internal( __func__, "key function is NULL\n" );
l = mem_get_object( _sl_Memory );
#if MAA_MAGIC
1
0