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
February 2015
- 1 participants
- 1390 discussions
Hello community,
here is the log from the commit of package unbound for openSUSE:Factory checked in at 2015-02-27 11:10:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/unbound (Old)
and /work/SRC/openSUSE:Factory/.unbound.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "unbound"
Changes:
--------
--- /work/SRC/openSUSE:Factory/unbound/unbound.changes 2014-12-10 23:44:25.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.unbound.new/unbound.changes 2015-02-27 11:10:37.000000000 +0100
@@ -1,0 +2,54 @@
+Thu Feb 19 23:35:58 UTC 2015 - mrueckert(a)suse.de
+
+- update to 1.5.2
+ - Features
+ - local-zone: example.com inform makes unbound log a message
+ with client IP for queries in that zone. Eg. for finding
+ infected hosts.
+ - patch from Stephane Lapie that adds to the python API, that
+ exposes struct delegpt, and adds the find_delegation
+ function.
+ - Updated contrib warmup.cmd/sh to support two modes - load
+ from pre-defined list of domains or (with filename as
+ argument) load from user-specified list of domains, and
+ updated contrib unbound_cache.sh/cmd to support
+ loading/save/reload cache to/from default path or (with
+ secondary argument) arbitrary path/filename, from Yuri
+ Voinov.
+ - patch for remote control over local sockets, from Dag-Erling
+ Smorgrav, Ilya Bakulin. Use control-interface: /path/sock and
+ control-use-cert: no.
+ - unbound-checkconf -f prints chroot with pidfile path.
+ - infra-cache-min-rtt patch from Florian Riehm, for expected
+ long uplink roundtrip times.
+ - Bug Fixes
+ - config.guess and config.sub update from libtoolize.
+ - getauxval test for ppc64 linux compatibility.
+ - make strip works for unbound-host and unbound-anchor.
+ - print query name when max target count is exceeded.
+ - patch from Stuart Henderson that fixes DESTDIR in
+ unbound-control-setup for installs where config is not in the
+ prefix location.
+ - [bugzilla: 634 ] Fix #634: fix fail to start on Linux LTS
+ 3.14.X, ignores missing IP_MTU_DISCOVER OMIT option (fix from
+ Remi Gacogne).
+ - Patch from Philip Paeps to contrib/unbound_munin_ that uses
+ type ABSOLUTE. Allows munin.conf: [idleserver.example.net]
+ unbound_munin_hits.graph_period minute
+ - Fix pyunbound ord call, portable for python 2 and 3.
+ - Fix unintended use of gcc extension for incomplete enum
+ types, compile with pedantic c99 compliance (from Daniel
+ Dickman).
+ - Fix pyunbound byte string representation for python3.
+ - Fix 0x20 capsforid fallback to omit gratuitous NS and
+ additional section changes.
+ - Fix validation failure in case upstream forwarder (ISC BIND)
+ does not have the same trust anchors and decides to insert
+ unsigned NS record in authority section.
+ - Fix scrubber with harden-glue turned off to reject NS (and
+ other not-address) records.
+ - iana portlist update.
+ - [bugzilla: 643 ] Fix doc/example.conf.in: unnecessary
+ whitespace.
+
+-------------------------------------------------------------------
Old:
----
unbound-1.5.1.tar.gz
New:
----
unbound-1.5.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ unbound.spec ++++++
--- /var/tmp/diff_new_pack.yjv174/_old 2015-02-27 11:10:38.000000000 +0100
+++ /var/tmp/diff_new_pack.yjv174/_new 2015-02-27 11:10:38.000000000 +0100
@@ -47,7 +47,7 @@
%endif
Name: unbound
-Version: 1.5.1
+Version: 1.5.2
Release: 0
#
#
++++++ unbound-1.5.1.tar.gz -> unbound-1.5.2.tar.gz ++++++
++++ 10808 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python-raet for openSUSE:Factory checked in at 2015-02-27 11:10:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-raet (Old)
and /work/SRC/openSUSE:Factory/.python-raet.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-raet"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-raet/python-raet.changes 2015-01-29 09:58:32.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-raet.new/python-raet.changes 2015-02-27 11:10:34.000000000 +0100
@@ -1,0 +2,15 @@
+Thu Feb 26 21:30:45 UTC 2015 - aboe76(a)gmail.com
+
+- Updated to 0.6.1
+ - Updated tutorial fixed log message
+ - Added enum support using python 3.4 enums via backport enum34 raeting.py NamedTuples replaced with enums
+ - Added tutorial documents Fixed merge error Fixed bugs
+ - Updated setup.py dependencies
+ - Added python-argparse as depency for python < 2.7
+ - Windows impossible file check More coverage tests
+ - Python3 support
+ - Added support for burst size limits in the Message transaction to deal with limits on UDP receive buffers
+ on some hosts. Significant changes to how the Messenger and Messagent transactions work.
+ - Added more units tests for messaging.
+
+-------------------------------------------------------------------
Old:
----
raet-0.4.6.tar.gz
New:
----
raet-0.6.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-raet.spec ++++++
--- /var/tmp/diff_new_pack.3HjWd3/_old 2015-02-27 11:10:35.000000000 +0100
+++ /var/tmp/diff_new_pack.3HjWd3/_new 2015-02-27 11:10:35.000000000 +0100
@@ -16,7 +16,7 @@
#
Name: python-raet
-Version: 0.4.6
+Version: 0.6.1
Release: 0
License: Apache-2.0
Summary: Reliable Asynchronous Event Transport protocol
@@ -38,9 +38,11 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+BuildRequires: python
BuildRequires: python-importlib
+BuildRequires: python-argparse
Requires: python-importlib
-BuildRequires: python
+Requires: python-argparse
Requires: python
%else
BuildArch: noarch
++++++ raet-0.4.6.tar.gz -> raet-0.6.1.tar.gz ++++++
++++ 13083 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python-ioflo for openSUSE:Factory checked in at 2015-02-27 11:10:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ioflo (Old)
and /work/SRC/openSUSE:Factory/.python-ioflo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ioflo"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ioflo/python-ioflo.changes 2015-01-29 09:58:27.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-ioflo.new/python-ioflo.changes 2015-02-27 11:10:30.000000000 +0100
@@ -1,0 +2,10 @@
+Thu Feb 26 21:28:47 UTC 2015 - aboe76(a)gmail.com
+
+- Updated to v1.1.9
+ - More Skeddar timer fixes
+ - Added MonoTimer to Skeddar that detects if system clock is retrograded.
+ - Added binary create mode for OCFN utility function. Needed for P3 support if using msgpack.
+ - Renamed Registry class to Registrar class to avoid confusion with .Registry in RegisterType metaclass
+ - Added Ordered Set class called oset or OSet in base.osetting.py
+
+-------------------------------------------------------------------
Old:
----
ioflo-1.1.5.tar.gz
New:
----
ioflo-1.1.9.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ioflo.spec ++++++
--- /var/tmp/diff_new_pack.xM2fD2/_old 2015-02-27 11:10:31.000000000 +0100
+++ /var/tmp/diff_new_pack.xM2fD2/_new 2015-02-27 11:10:31.000000000 +0100
@@ -16,7 +16,7 @@
#
Name: python-ioflo
-Version: 1.1.5
+Version: 1.1.9
Release: 0
License: Apache-2.0
Summary: Python IoFlo
++++++ ioflo-1.1.5.tar.gz -> ioflo-1.1.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/PKG-INFO new/ioflo-1.1.9/PKG-INFO
--- old/ioflo-1.1.5/PKG-INFO 2015-01-21 01:55:25.000000000 +0100
+++ new/ioflo-1.1.9/PKG-INFO 2015-02-13 23:58:26.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ioflo
-Version: 1.1.5
+Version: 1.1.9
Summary: Flow Based Programming Automated Reasoning Engine and Automation Operation System
Home-page: https://github.com/ioflo/ioflo
Author: Samuel M. Smith
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/__metadata__.py new/ioflo-1.1.9/ioflo/__metadata__.py
--- old/ioflo-1.1.5/ioflo/__metadata__.py 2015-01-21 01:53:24.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/__metadata__.py 2015-02-13 23:40:03.000000000 +0100
@@ -2,7 +2,7 @@
Ioflo package metadata
'''
-__version_info__ = (1, 1, 5)
+__version_info__ = (1, 1, 9)
__version__ = '{0}.{1}.{2}'.format(*__version_info__)
__author__ = "Samuel M. Smith"
__license__ = "Apache 2.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/app/test/runplans.py new/ioflo-1.1.9/ioflo/app/test/runplans.py
--- old/ioflo-1.1.5/ioflo/app/test/runplans.py 1970-01-01 01:00:00.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/app/test/runplans.py 2014-12-10 00:28:32.000000000 +0100
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+Runs all the example FloScripts
+
+
+"""
+import sys
+import os
+
+import ioflo.app.run
+
+PLAN_DIR_PATH = os.path.join(
+ os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ , 'plan')
+
+def getPlanFiles(planDirPath=PLAN_DIR_PATH):
+ planFiles = []
+ for fname in os.listdir(os.path.abspath(planDirPath)):
+ root, ext = os.path.splitext(fname)
+ if ext != '.flo' or root.startswith('__') or root.startswith('gps'):
+ continue
+
+ planFiles.append(os.path.abspath(os.path.join(planDirPath, fname)))
+ return planFiles
+
+def main():
+ """ Run example scripts"""
+ failedCount = 0
+ plans = getPlanFiles()
+ for plan in plans:
+ name, ext = os.path.splitext(os.path.basename(plan))
+ skeddar = ioflo.app.run.run( name=name,
+ filepath=plan,
+ period=0.0625,
+ verbose=1,
+ real=False,)
+
+ print("Plan {0}\n Skeddar {1}\n".format(plan, skeddar.name))
+ failed = False
+ for house in skeddar.houses:
+ failure = house.metas['failure'].value
+ if failure:
+ failed = True
+ print("**** Failed in House = {0}. "
+ "Failure = {1}.\n".format(house.name, failure))
+ else:
+ print("**** Succeeded in House = {0}.\n".format(house.name))
+ if failed:
+ failedCount += 1
+
+ print("{0} failed out of {1}.\n".format(failedCount, len(plans)))
+
+if __name__ == '__main__':
+ main()
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/app/test/runstart.py new/ioflo-1.1.9/ioflo/app/test/runstart.py
--- old/ioflo-1.1.5/ioflo/app/test/runstart.py 1970-01-01 01:00:00.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/app/test/runstart.py 2014-03-03 21:32:07.000000000 +0100
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+Runs alls the example FloScripts
+
+
+"""
+import sys
+import os
+
+import ioflo.app.run
+
+PLAN_DIR_PATH = os.path.join(
+ os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ , 'plan')
+
+def getPlanFiles(planDirPath=PLAN_DIR_PATH):
+ planFiles = []
+ for fname in os.listdir(os.path.abspath(planDirPath)):
+ root, ext = os.path.splitext(fname)
+ if ext != '.flo' or root.startswith('__'):
+ continue
+
+ planFiles.append(os.path.abspath(os.path.join(planDirPath, fname)))
+ return planFiles
+
+def test():
+ """ Execute run.start """
+ plans = getPlanFiles()
+ filepath = "../plan/meta.flo"
+ opts = dict(gandolf='grey', saruman='white')
+ metas = [("opts", ".testmeta.opts", dict(value=opts))]
+
+ ioflo.app.run.start(
+ name='teststart',
+ period=0.125,
+ stamp=0.0,
+ real=False,
+ filepath=filepath,
+ behaviors=None,
+ username="",
+ password="",
+ mode=None,
+ houses=None,
+ metas=metas,
+ verbose=2,
+ )
+
+if __name__ == '__main__':
+ test()
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/app/test/testPlans.py new/ioflo-1.1.9/ioflo/app/test/testPlans.py
--- old/ioflo-1.1.5/ioflo/app/test/testPlans.py 2014-12-10 00:28:32.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/app/test/testPlans.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-"""
-Runs all the example FloScripts
-
-
-"""
-import sys
-import os
-
-import ioflo.app.run
-
-PLAN_DIR_PATH = os.path.join(
- os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- , 'plan')
-
-def getPlanFiles(planDirPath=PLAN_DIR_PATH):
- planFiles = []
- for fname in os.listdir(os.path.abspath(planDirPath)):
- root, ext = os.path.splitext(fname)
- if ext != '.flo' or root.startswith('__') or root.startswith('gps'):
- continue
-
- planFiles.append(os.path.abspath(os.path.join(planDirPath, fname)))
- return planFiles
-
-def main():
- """ Run example scripts"""
- failedCount = 0
- plans = getPlanFiles()
- for plan in plans:
- name, ext = os.path.splitext(os.path.basename(plan))
- skeddar = ioflo.app.run.run( name=name,
- filepath=plan,
- period=0.0625,
- verbose=1,
- real=False,)
-
- print("Plan {0}\n Skeddar {1}\n".format(plan, skeddar.name))
- failed = False
- for house in skeddar.houses:
- failure = house.metas['failure'].value
- if failure:
- failed = True
- print("**** Failed in House = {0}. "
- "Failure = {1}.\n".format(house.name, failure))
- else:
- print("**** Succeeded in House = {0}.\n".format(house.name))
- if failed:
- failedCount += 1
-
- print("{0} failed out of {1}.\n".format(failedCount, len(plans)))
-
-if __name__ == '__main__':
- main()
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/app/test/testStart.py new/ioflo-1.1.9/ioflo/app/test/testStart.py
--- old/ioflo-1.1.5/ioflo/app/test/testStart.py 2014-03-03 21:32:07.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/app/test/testStart.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-"""
-Runs alls the example FloScripts
-
-
-"""
-import sys
-import os
-
-import ioflo.app.run
-
-PLAN_DIR_PATH = os.path.join(
- os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- , 'plan')
-
-def getPlanFiles(planDirPath=PLAN_DIR_PATH):
- planFiles = []
- for fname in os.listdir(os.path.abspath(planDirPath)):
- root, ext = os.path.splitext(fname)
- if ext != '.flo' or root.startswith('__'):
- continue
-
- planFiles.append(os.path.abspath(os.path.join(planDirPath, fname)))
- return planFiles
-
-def test():
- """ Execute run.start """
- plans = getPlanFiles()
- filepath = "../plan/meta.flo"
- opts = dict(gandolf='grey', saruman='white')
- metas = [("opts", ".testmeta.opts", dict(value=opts))]
-
- ioflo.app.run.start(
- name='teststart',
- period=0.125,
- stamp=0.0,
- real=False,
- filepath=filepath,
- behaviors=None,
- username="",
- password="",
- mode=None,
- houses=None,
- metas=metas,
- verbose=2,
- )
-
-if __name__ == '__main__':
- test()
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/aiding.py new/ioflo-1.1.9/ioflo/base/aiding.py
--- old/ioflo-1.1.5/ioflo/base/aiding.py 2015-01-09 17:30:53.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/aiding.py 2015-02-13 23:17:30.000000000 +0100
@@ -32,6 +32,7 @@
# Import ioflo libs
from .globaling import *
from .odicting import odict
+from . import excepting
from .consoling import getConsole
console = getConsole()
@@ -148,7 +149,7 @@
""" Computes elapsed time in seconds (fractional) since start.
if zero then hasn't started yet
"""
- return abs(time.time() - self.start)
+ return max(0.0, time.time() - self.start)
elapsed = property(getElapsed, doc='Elapsed time.')
def getRemaining(self):# for property
@@ -206,8 +207,130 @@
return self.restart(start=self.start, duration=duration)
+class MonoTimer(object):
+ """ Class to manage real elaspsed time with monotonic guarantee.
+ If the system clock is retrograded (moved back in time)
+ while the timer is running then time.time() could move
+ to before the start time.
+ A MonoTimer detects this retrograde and if adjust is True then
+ shifts the timer back otherwise it raises a TimerRetroError
+ exception.
+ This timer is not able to detect a prograded clock
+ (moved forward in time)
+
+ Needs time module
+ attributes:
+ .duration = time duration of timer start to stop
+ .start = time started
+ .stop = time when timer expires
+ .base = real time when started or restarted
+ .prev = real time when checked
+
+ properties:
+ .elaspsed = time elasped since start
+ .remaining = time remaining until stop
+ .expired = True if expired, False otherwise
+
+ methods:
+ .extend() = extends/shrinks timer duration
+ .repeat() = restarts timer at last .stop so no time lost
+ .restart() = restarts timer
+ """
+
+ def __init__(self, duration = 0.0, adjust=False):
+ """ Initialization method for instance.
+ duration in seconds (fractional)
+ """
+ self.adjust = True if adjust else False
+ self.start = None
+ self.stop = None
+ self.latest = time.time() # last time checked current time
+ self.restart(start=self.latest, duration=duration)
+
+ def update(self):
+ '''
+ Updates .latest to current time.
+ Checks for retrograde movement of system time.time() and either
+ raises a TimerRetroErrorexception or adjusts the timer attributes to compensate.
+ '''
+ delta = time.time() - self.latest # current time - last time checked
+ if delta < 0: # system clock has retrograded
+ if not self.adjust:
+ raise excepting.TimerRetroError("Timer retrograded by {0} "
+ "seconds\n".format(delta))
+ self.start = self.start + delta
+ self.stop = self.stop + delta
+
+ self.latest += delta
+
+ def getElapsed(self): #for property
+ """ Computes elapsed time in seconds (fractional) since start.
+ if zero then hasn't started yet
+ """
+ self.update()
+ return max(0.0, self.latest - self.start)
+ elapsed = property(getElapsed, doc='Elapsed time.')
+
+ def getRemaining(self):# for property
+ """ Returns time remaining in seconds (fractional) before expires.
+ returns zero if it has already expired
+ """
+ self.update()
+ return max(0.0, self.stop - self.latest)
+ remaining = property(getRemaining, doc='Remaining time.')
+
+ def getExpired(self):
+ self.update()
+ if (self.latest >= self.stop):
+ return True
+ else:
+ return False
+ expired = property(getExpired, doc='True if expired, False otherwise')
+
+ def restart(self,start=None, duration=None):
+ """ Starts timer at start time secs for duration secs.
+ (fractional from epoc)
+ If start arg is missing then restarts at current time
+ If duration arg is missing then restarts for current duration
+ """
+ self.update()
+ if start is not None:
+ self.start = abs(start) #must be non negative
+ else: #use current time
+ self.start = self.latest
+
+ if duration is not None:
+ self.duration = abs(duration) #must be non negative
+ #Otherwise keep old duration
+
+ self.stop = self.start + self.duration
+
+ return (self.start, self.stop)
+
+ def repeat(self):
+ """ Restarts timer at stop so no time lost
+
+ """
+ return self.restart(start=self.stop)
+
+ def extend(self, extension=None):
+ """ Extends timer duration for additional extension seconds (fractional).
+ Useful so as not to lose time when need more/less time on timer
+
+ If extension negative then shortens existing duration
+ If extension arg missing then extends for the existing duration
+ effectively doubling the time
+
+ """
+ if extension is None: #otherwise extend by .duration or double
+ extension = self.duration
+
+ duration = self.duration + extension
+
+ return self.restart(start=self.start, duration=duration)
+
class StoreTimer(object):
- """ Class to manage realtive Store based time.
+ """ Class to manage relative Store based time.
Uses Store instance .stamp attribute as current time
Attributes:
.duration = time duration of timer start to stop
@@ -238,7 +361,7 @@
""" Computes elapsed time in seconds (fractional) since start.
if zero then hasn't started yet
"""
- return abs(self.store.stamp - self.start)
+ return max(0.0, self.store.stamp - self.start)
elapsed = property(getElapsed, doc='Elapsed time.')
def getRemaining(self):# for property
@@ -2178,16 +2301,22 @@
crc64 = CRC64 # alias
-def Ocfn(filename, openMode = 'r+'):
+def Ocfn(filename, openMode = 'r+', binary=False):
"""Atomically open or create file from filename.
If file already exists, Then open file using openMode
- Else create file using write update mode
+ Else create file using write update mode If not binary Else
+ write update binary mode
Returns file object
+
+ If binary Then If new file open with write update binary mode
"""
try:
newfd = os.open(filename, os.O_EXCL | os.O_CREAT | os.O_RDWR, 436) # 436 == octal 0664
- newfile = os.fdopen(newfd,"w+")
+ if not binary:
+ newfile = os.fdopen(newfd,"w+")
+ else:
+ newfile = os.fdopen(newfd,"w+b")
except OSError as ex:
if ex.errno == errno.EEXIST:
newfile = open(filename, openMode)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/excepting.py new/ioflo-1.1.9/ioflo/base/excepting.py
--- old/ioflo-1.1.5/ioflo/base/excepting.py 2015-01-05 22:40:57.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/excepting.py 2015-02-13 19:54:46.000000000 +0100
@@ -118,6 +118,20 @@
def __str__(self):
return ("{0}: {1}.\n".format(self.__class__.__name__, self.message))
+class TimerRetroError(Exception):
+ """Used to indicate timer base has retrograded while timer is running
+
+ usage:
+
+ raise excepting.TimerRetrogradeError(msg)
+ """
+ def __init__(self, message = None):
+ self.message = message #description of error
+ self.args = (message)
+
+ def __str__(self):
+ return ("{0}: {1}.\n".format(self.__class__.__name__, self.message))
+
def Test():
"""Module self test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/framing.py new/ioflo-1.1.9/ioflo/base/framing.py
--- old/ioflo-1.1.5/ioflo/base/framing.py 2015-01-08 22:10:54.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/framing.py 2015-01-21 18:59:03.000000000 +0100
@@ -726,7 +726,7 @@
return (exits, enters)
-class Frame(registering.StoriedRegistry):
+class Frame(registering.StoriedRegistrar):
""" Frame Class for hierarchical action framework object
inherited instance attributes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/housing.py new/ioflo-1.1.9/ioflo/base/housing.py
--- old/ioflo-1.1.5/ioflo/base/housing.py 2015-01-07 22:14:05.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/housing.py 2015-01-21 18:59:01.000000000 +0100
@@ -50,7 +50,7 @@
#Class definitions
-class House(registering.StoriedRegistry):
+class House(registering.StoriedRegistrar):
"""House Class for managing framework(s)
includes store for framework and name registries for framers, frames, and actions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/logging.py new/ioflo-1.1.9/ioflo/base/logging.py
--- old/ioflo-1.1.5/ioflo/base/logging.py 2014-09-24 04:37:02.000000000 +0200
+++ new/ioflo-1.1.9/ioflo/base/logging.py 2015-01-21 18:58:59.000000000 +0100
@@ -230,7 +230,7 @@
self.desire = ABORT
self.status = ABORTED
-class Log(registering.StoriedRegistry):
+class Log(registering.StoriedRegistrar):
"""Log Class for logging to file
Iherited instance attributes:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/odicting.py new/ioflo-1.1.9/ioflo/base/odicting.py
--- old/ioflo-1.1.5/ioflo/base/odicting.py 2014-03-31 19:18:25.000000000 +0200
+++ new/ioflo-1.1.9/ioflo/base/odicting.py 2015-01-29 18:20:14.000000000 +0100
@@ -22,10 +22,8 @@
Changing the value of a key does not affect the order of the key
"""
-
__slots__ = ['_keys']
-
def __new__(cls, *args, **kwargs):
self = dict.__new__(cls,*args, **kwargs)
self._keys = []
@@ -74,7 +72,6 @@
for k in kwa:
self[k] = kwa[k]
-
def __delitem__(self, key):
""" del x[y] """
dict.__delitem__(self, key)
@@ -148,7 +145,6 @@
if k not in self._keys:
self[k] = kwa[k]
-
def insert(self, index, key, val):
""" Insert val at index if key not in odict"""
if key in self:
@@ -196,7 +192,6 @@
del self[key]
return (key, value)
-
def reorder(self, other):
""" Update values in this odict based on the `other` odict or dict.
reorder is ignored if other is not an odict
@@ -216,7 +211,6 @@
keys.remove(key)
keys.append(key)
-
def setdefault(self, key, default=None):
""" If key in odict, return value at key
Otherwise set value at key to default and return default
@@ -245,6 +239,7 @@
def values(self):
return [self[key] for key in self._keys]
+ODict = odict # alias
#from . import optimize
#optimize.bind_all(odict)
@@ -281,7 +276,6 @@
print(x)
print(y)
-
def Test():
"""Self test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/osetting.py new/ioflo-1.1.9/ioflo/base/osetting.py
--- old/ioflo-1.1.5/ioflo/base/osetting.py 1970-01-01 01:00:00.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/osetting.py 2015-01-29 18:23:29.000000000 +0100
@@ -0,0 +1,84 @@
+"""Ordered set class.
+Modified version of recipe
+http://code.activestate.com/recipes/576694/
+
+
+"""
+#print("module {0}".format(__name__))
+import collections
+
+class oset(collections.MutableSet):
+ """
+ Ordered Set, preserves order of entry in set
+
+ Usage:
+ s = oset('abracadaba')
+ t = oset('simsalabim')
+ print(s | t)
+ print(s & t)
+ print(s - t)
+ """
+
+ def __init__(self, iterable=None):
+ self.end = end = []
+ end += [None, end, end] # sentinel node for doubly linked list
+ self.map = {} # key --> [key, prev, next]
+ if iterable is not None:
+ self |= iterable
+
+ def __len__(self):
+ return len(self.map)
+
+ def __contains__(self, key):
+ return key in self.map
+
+ def add(self, key):
+ if key not in self.map:
+ end = self.end
+ curr = end[1]
+ curr[2] = end[1] = self.map[key] = [key, curr, end]
+
+ def discard(self, key):
+ if key in self.map:
+ key, prev, next = self.map.pop(key)
+ prev[2] = next
+ next[1] = prev
+
+ def __iter__(self):
+ end = self.end
+ curr = end[2]
+ while curr is not end:
+ yield curr[0]
+ curr = curr[2]
+
+ def __reversed__(self):
+ end = self.end
+ curr = end[1]
+ while curr is not end:
+ yield curr[0]
+ curr = curr[1]
+
+ def pop(self, last=True):
+ if not self:
+ raise KeyError('set is empty')
+ key = self.end[1][0] if last else self.end[2][0]
+ self.discard(key)
+ return key
+
+ def __repr__(self):
+ if not self:
+ return '%s()' % (self.__class__.__name__,)
+ return '%s(%r)' % (self.__class__.__name__, list(self))
+
+ def __eq__(self, other):
+ if isinstance(other, OrderedSet):
+ return len(self) == len(other) and list(self) == list(other)
+ return set(self) == set(other)
+
+
+if __name__ == '__main__':
+ s = oset('abracadaba')
+ t = oset('simsalabim')
+ print(s | t)
+ print(s & t)
+ print(s - t)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/registering.py new/ioflo-1.1.9/ioflo/base/registering.py
--- old/ioflo-1.1.5/ioflo/base/registering.py 2014-12-10 00:28:33.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/registering.py 2015-01-21 18:58:56.000000000 +0100
@@ -52,7 +52,7 @@
odict(ioinits or odict()),
odict(parms or odict()))
-class Registry(object):
+class Registrar(object):
"""Class that ensures every instance has a unique name
uses class variable Counter and Names dictionary
"""
@@ -119,7 +119,7 @@
return cls.Names.get(name, None)
-class StoriedRegistry(Registry):
+class StoriedRegistrar(Registrar):
"""Adds store attribute to Registry instances
"""
__slots__ = ('store', )
@@ -133,7 +133,7 @@
.store = reference to shared data store
"""
- super(StoriedRegistry, self).__init__(**kw)
+ super(StoriedRegistrar, self).__init__(**kw)
self.changeStore(store=store)
def changeStore(self, store=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/skedding.py new/ioflo-1.1.9/ioflo/base/skedding.py
--- old/ioflo-1.1.5/ioflo/base/skedding.py 2014-12-10 02:44:21.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/skedding.py 2015-02-13 23:37:41.000000000 +0100
@@ -125,8 +125,8 @@
self.stamp = float(abs(stamp))
#real time or sim time mode
self.real = True if real else False
- self.timer = aiding.Timer(duration = self.period)
- self.elapsed = aiding.Timer()
+ self.timer = aiding.MonoTimer(duration = self.period, adjust=True)
+ self.elapsed = aiding.MonoTimer(adjust=True)
self.filepath = os.path.abspath(filepath)
self.plan = os.path.split(self.filepath)[1]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/storing.py new/ioflo-1.1.9/ioflo/base/storing.py
--- old/ioflo-1.1.5/ioflo/base/storing.py 2015-01-09 20:42:24.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/storing.py 2015-01-21 18:58:19.000000000 +0100
@@ -52,7 +52,7 @@
return self
-class Store(registering.Registry):
+class Store(registering.Registrar):
"""global data store to be shared amoungst all taskers.
Each object has the concept of ownership in the datashare.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/tasking.py new/ioflo-1.1.9/ioflo/base/tasking.py
--- old/ioflo-1.1.5/ioflo/base/tasking.py 2014-12-19 21:11:45.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/tasking.py 2015-01-21 18:59:17.000000000 +0100
@@ -24,7 +24,7 @@
#Class definitions
-class Tasker(registering.StoriedRegistry):
+class Tasker(registering.StoriedRegistrar):
"""Task class, Base class for weightless threads
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/test/_testRegister.py new/ioflo-1.1.9/ioflo/base/test/_testRegister.py
--- old/ioflo-1.1.5/ioflo/base/test/_testRegister.py 2014-07-24 19:06:14.000000000 +0200
+++ new/ioflo-1.1.9/ioflo/base/test/_testRegister.py 2015-01-21 18:58:10.000000000 +0100
@@ -10,7 +10,7 @@
self.store = store
- print(A.Registry)
+ print(A.Registrar)
def TestMetaclassify():
@@ -22,7 +22,7 @@
self.store = store
- print(A.Registry)
+ print(A.Registrar)
if __name__ == "__main__":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/test/_testRegistry.py new/ioflo-1.1.9/ioflo/base/test/_testRegistry.py
--- old/ioflo-1.1.5/ioflo/base/test/_testRegistry.py 2014-07-24 19:06:14.000000000 +0200
+++ new/ioflo-1.1.9/ioflo/base/test/_testRegistry.py 2015-01-21 18:58:16.000000000 +0100
@@ -4,16 +4,16 @@
def TestRegistry():
"""Module self test
"""
- x = Registry()
+ x = Registrar()
print(x.name)
- y = Registry()
+ y = Registrar()
print(y.name)
name = "Hello"
- if Registry.VerifyName(name):
- z = Registry(name=name)
- print(Registry.Names)
- print(Registry.VerifyName(name))
+ if Registrar.VerifyName(name):
+ z = Registrar(name=name)
+ print(Registrar.Names)
+ print(Registrar.VerifyName(name))
if __name__ == "__main__":
TestRegistry()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/test/testActing.py new/ioflo-1.1.9/ioflo/base/test/testActing.py
--- old/ioflo-1.1.5/ioflo/base/test/testActing.py 2015-01-13 20:06:37.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/test/testActing.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,195 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
-Unit Test Template
-"""
-
-import sys
-if sys.version_info < (2, 7):
- import unittest2 as unittest
-else:
- import unittest
-
-import os
-
-from ioflo.test import testing
-from ioflo.base.consoling import getConsole
-console = getConsole()
-
-
-from ioflo.base import acting
-from ioflo.base import deeding
-from ioflo.base import storing
-
-
-def setUpModule():
- console.reinit(verbosity=console.Wordage.concise)
-
-def tearDownModule():
- pass
-
-
-class BasicTestCase(testing.FrameIofloTestCase):
- """
- Example TestCase
- """
-
- def setUp(self):
- """
- Call super if override so House Framer and Frame are setup correctly
- """
- super(BasicTestCase, self).setUp()
-
- def tearDown(self):
- """
- Call super if override so House Framer and Frame are torn down correctly
- """
- super(BasicTestCase, self).tearDown()
-
- def testActorify(self):
- """
- Test the actorify decorator
- """
- console.terse("{0}\n".format(self.testActorify.__doc__))
- @acting.actorify("BlueBeard")
- def bearded(self, x=1, y=2):
- """
- Actor action method
- """
- z = x + y
- return (self, z)
-
- self.assertIn("BlueBeard", acting.Actor.Registry)
- actor, inits, ioinits, parms = acting.Actor.__fetch__("BlueBeard")
- self.assertIs(actor._Parametric, True)
- self.assertDictEqual(actor.Inits, {})
- self.assertDictEqual(actor.Ioinits, {})
- self.assertDictEqual(actor.Parms, {})
- self.assertDictEqual(inits, {})
- self.assertDictEqual(ioinits, {})
- self.assertDictEqual(parms, {})
-
- actor = actor() # create instance
- self.assertIsInstance(actor, acting.Actor )
- self.assertEqual(actor.__class__.__name__, "BlueBeard")
- self.assertEqual(actor.action.im_class.__name__, "BlueBeard")
- self.assertIs(actor.action.im_func, bearded)
- self.assertIs(actor.action.im_self, actor)
- self.assertEqual(actor.action.__doc__, '\n Actor action method\n ')
- self.assertEqual(actor.action.__name__, 'bearded')
-
- me, z = actor() # perform action
- self.assertIs(me, actor)
- self.assertEqual(z, 3)
-
-
- def testDeedify(self):
- """
- Test the deedify decorator
- """
- console.terse("{0}\n".format(self.testDeedify.__doc__))
- @deeding.deedify("BlackSmith")
- def blackened(self, x=3, y=2):
- """
- Deed action method
- """
- z = x + y
- return (self, z)
-
- self.assertIn("BlackSmith", deeding.Deed.Registry)
- actor, inits, ioinits, parms = deeding.Deed.__fetch__("BlackSmith")
- self.assertIs(actor._Parametric, False)
- self.assertDictEqual(actor.Inits, {})
- self.assertDictEqual(actor.Ioinits, {})
- self.assertDictEqual(actor.Parms, {})
- self.assertDictEqual(inits, {})
- self.assertDictEqual(ioinits, {})
- self.assertDictEqual(parms, {})
-
- actor = actor() # create instance
- self.assertIsInstance(actor, deeding.Deed )
- self.assertEqual(actor.__class__.__name__, "BlackSmith")
- self.assertEqual(actor.action.im_class.__name__, "BlackSmith")
- self.assertIs(actor.action.im_func, blackened)
- self.assertIs(actor.action.im_self, actor)
- self.assertEqual(actor.action.__doc__, '\n Deed action method\n ')
- self.assertEqual(actor.action.__name__, 'blackened')
-
- me, z = actor() # perform action
- self.assertIs(me, actor)
- self.assertEqual(z, 5)
-
- def testFrameDeed(self):
- """
- Test adding a Deed to a frame and running it
- """
- console.terse("{0}\n".format(self.testFrameDeed.__doc__))
- @deeding.deedify("TestDeed")
- def action(self, a="Felgercarb", **kwa):
- """
- Deed action method
- """
- share = self.store.create(".test.a").update(value=a)
-
- self.assertIn("TestDeed", deeding.Deed.Registry)
- act = self.addDeed("TestDeed")
- self.assertIsInstance(act, acting.Act)
- self.assertIn(act, self.frame.reacts)
- self.assertEqual(act.actor, "TestDeed")
- self.assertEqual(act.frame, self.frame.name)
-
- self.resolve() # resolve House
- self.assertIs(act.frame, self.frame)
- self.assertIs(act.frame.framer, self.framer)
- self.assertIs(act.actor.store, self.store)
- self.assertIn(act.actor.name, deeding.Deed.Registry)
- self.assertEqual(act.actor.name, "TestDeed")
- self.assertIsInstance(act.actor, deeding.Deed)
- self.assertEqual(act.actor.__class__.__name__, "TestDeed")
- self.assertEqual(act.actor.action.im_class.__name__, "TestDeed")
- self.assertIs(act.actor.action.im_func, action)
- self.assertIs(act.actor.action.im_self, act.actor)
- self.assertEqual(act.actor.action.__doc__, '\n Deed action method\n ')
- self.assertEqual(act.actor.action.__name__, 'action')
-
- self.assertIs(self.store.fetch(".test.a"), None)
- self.frame.recur() # run reacts in frame
- share = self.store.fetch(".test.a")
- self.assertIsInstance(share, storing.Share )
- self.assertEqual(share.value, "Felgercarb")
-
-
-def runOne(test):
- '''
- Unittest Runner
- '''
- test = BasicTestCase(test)
- suite = unittest.TestSuite([test])
- unittest.TextTestRunner(verbosity=2).run(suite)
-
-def runSome():
- """ Unittest runner """
- tests = []
- names = ['testActorify',
- 'testDeedify',
- 'testFrameDeed', ]
- tests.extend(map(BasicTestCase, names))
- suite = unittest.TestSuite(tests)
- unittest.TextTestRunner(verbosity=2).run(suite)
-
-def runAll():
- """ Unittest runner """
- suite = unittest.TestSuite()
- suite.addTest(unittest.TestLoader().loadTestsFromTestCase(BasicTestCase))
- unittest.TextTestRunner(verbosity=2).run(suite)
-
-if __name__ == '__main__' and __package__ is None:
-
- #console.reinit(verbosity=console.Wordage.concise)
-
- #runAll() #run all unittests
-
- runSome()#only run some
-
- #runOne('testBasic')
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/base/test/test_acting.py new/ioflo-1.1.9/ioflo/base/test/test_acting.py
--- old/ioflo-1.1.5/ioflo/base/test/test_acting.py 1970-01-01 01:00:00.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/base/test/test_acting.py 2015-02-03 00:15:27.000000000 +0100
@@ -0,0 +1,210 @@
+# -*- coding: utf-8 -*-
+"""
+Unit Test Template
+"""
+
+import sys
+if sys.version_info < (2, 7):
+ import unittest2 as unittest
+else:
+ import unittest
+
+import os
+
+from ioflo.test import testing
+from ioflo.base.consoling import getConsole
+console = getConsole()
+
+
+from ioflo.base import acting
+from ioflo.base import deeding
+from ioflo.base import storing
+
+
+def setUpModule():
+ console.reinit(verbosity=console.Wordage.concise)
+
+def tearDownModule():
+ pass
+
+
+class BasicTestCase(testing.FrameIofloTestCase):
+ """
+ Example TestCase
+ """
+
+ def setUp(self):
+ """
+ Call super if override so House Framer and Frame are setup correctly
+ """
+ super(BasicTestCase, self).setUp()
+
+ def tearDown(self):
+ """
+ Call super if override so House Framer and Frame are torn down correctly
+ """
+ super(BasicTestCase, self).tearDown()
+
+ def testActorify(self):
+ """
+ Test the actorify decorator
+ """
+ console.terse("{0}\n".format(self.testActorify.__doc__))
+ @acting.actorify("BlueBeard")
+ def bearded(self, x=1, y=2):
+ """
+ Actor action method
+ """
+ z = x + y
+ return (self, z)
+
+ self.assertIn("BlueBeard", acting.Actor.Registry)
+ actor, inits, ioinits, parms = acting.Actor.__fetch__("BlueBeard")
+ self.assertIs(actor._Parametric, True)
+ self.assertDictEqual(actor.Inits, {})
+ self.assertDictEqual(actor.Ioinits, {})
+ self.assertDictEqual(actor.Parms, {})
+ self.assertDictEqual(inits, {})
+ self.assertDictEqual(ioinits, {})
+ self.assertDictEqual(parms, {})
+
+ actor = actor() # create instance
+ self.assertIsInstance(actor, acting.Actor )
+ self.assertEqual(actor.__class__.__name__, "BlueBeard")
+ if sys.version > '3':
+ self.assertEqual(actor.action.__self__.__class__.__name__, "BlueBeard")
+ self.assertIs(actor.action.__func__, bearded)
+ self.assertIs(actor.action.__self__, actor)
+ else:
+ self.assertEqual(actor.action.im_class.__name__, "BlueBeard")
+ self.assertIs(actor.action.im_func, bearded)
+ self.assertIs(actor.action.im_self, actor)
+ self.assertEqual(actor.action.__doc__, '\n Actor action method\n ')
+ self.assertEqual(actor.action.__name__, 'bearded')
+
+ me, z = actor() # perform action
+ self.assertIs(me, actor)
+ self.assertEqual(z, 3)
+
+
+ def testDeedify(self):
+ """
+ Test the deedify decorator
+ """
+ console.terse("{0}\n".format(self.testDeedify.__doc__))
+ @deeding.deedify("BlackSmith")
+ def blackened(self, x=3, y=2):
+ """
+ Deed action method
+ """
+ z = x + y
+ return (self, z)
+
+ self.assertIn("BlackSmith", deeding.Deed.Registry)
+ actor, inits, ioinits, parms = deeding.Deed.__fetch__("BlackSmith")
+ self.assertIs(actor._Parametric, False)
+ self.assertDictEqual(actor.Inits, {})
+ self.assertDictEqual(actor.Ioinits, {})
+ self.assertDictEqual(actor.Parms, {})
+ self.assertDictEqual(inits, {})
+ self.assertDictEqual(ioinits, {})
+ self.assertDictEqual(parms, {})
+
+ actor = actor() # create instance
+ self.assertIsInstance(actor, deeding.Deed )
+ self.assertEqual(actor.__class__.__name__, "BlackSmith")
+ if sys.version > '3':
+ self.assertEqual(actor.action.__self__.__class__.__name__, "BlackSmith")
+ self.assertIs(actor.action.__func__, blackened)
+ self.assertIs(actor.action.__self__, actor)
+ else:
+ self.assertEqual(actor.action.im_class.__name__, "BlackSmith")
+ self.assertIs(actor.action.im_func, blackened)
+ self.assertIs(actor.action.im_self, actor)
+ self.assertEqual(actor.action.__doc__, '\n Deed action method\n ')
+ self.assertEqual(actor.action.__name__, 'blackened')
+
+ me, z = actor() # perform action
+ self.assertIs(me, actor)
+ self.assertEqual(z, 5)
+
+ def testFrameDeed(self):
+ """
+ Test adding a Deed to a frame and running it
+ """
+ console.terse("{0}\n".format(self.testFrameDeed.__doc__))
+ @deeding.deedify("TestDeed")
+ def action(self, a="Felgercarb", **kwa):
+ """
+ Deed action method
+ """
+ share = self.store.create(".test.a").update(value=a)
+
+ self.assertIn("TestDeed", deeding.Deed.Registry)
+ act = self.addDeed("TestDeed")
+ self.assertIsInstance(act, acting.Act)
+ self.assertIn(act, self.frame.reacts)
+ self.assertEqual(act.actor, "TestDeed")
+ self.assertEqual(act.frame, self.frame.name)
+
+ self.resolve() # resolve House
+ self.assertIs(act.frame, self.frame)
+ self.assertIs(act.frame.framer, self.framer)
+ self.assertIs(act.actor.store, self.store)
+ self.assertIn(act.actor.name, deeding.Deed.Registry)
+ self.assertEqual(act.actor.name, "TestDeed")
+ self.assertIsInstance(act.actor, deeding.Deed)
+ self.assertEqual(act.actor.__class__.__name__, "TestDeed")
+ if sys.version > '3':
+ self.assertEqual(act.actor.action.__self__.__class__.__name__, "TestDeed")
+ self.assertIs(act.actor.action.__func__, action)
+ self.assertIs(act.actor.action.__self__, act.actor)
+ else:
+ self.assertEqual(act.actor.action.im_class.__name__, "TestDeed")
+ self.assertIs(act.actor.action.im_func, action)
+ self.assertIs(act.actor.action.im_self, act.actor)
+ self.assertEqual(act.actor.action.__doc__, '\n Deed action method\n ')
+ self.assertEqual(act.actor.action.__name__, 'action')
+
+ self.assertIs(self.store.fetch(".test.a"), None)
+ self.frame.recur() # run reacts in frame
+ share = self.store.fetch(".test.a")
+ self.assertIsInstance(share, storing.Share )
+ self.assertEqual(share.value, "Felgercarb")
+
+
+def runOne(test):
+ '''
+ Unittest Runner
+ '''
+ test = BasicTestCase(test)
+ suite = unittest.TestSuite([test])
+ unittest.TextTestRunner(verbosity=2).run(suite)
+
+def runSome():
+ """ Unittest runner """
+ tests = []
+ names = ['testActorify',
+ 'testDeedify',
+ 'testFrameDeed', ]
+ tests.extend(map(BasicTestCase, names))
+ suite = unittest.TestSuite(tests)
+ unittest.TextTestRunner(verbosity=2).run(suite)
+
+def runAll():
+ """ Unittest runner """
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.TestLoader().loadTestsFromTestCase(BasicTestCase))
+ unittest.TextTestRunner(verbosity=2).run(suite)
+
+if __name__ == '__main__' and __package__ is None:
+
+ #console.reinit(verbosity=console.Wordage.concise)
+
+ #runAll() #run all unittests
+
+ runSome()#only run some
+
+ #runOne('testBasic')
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo/test/__init__.py new/ioflo-1.1.9/ioflo/test/__init__.py
--- old/ioflo-1.1.5/ioflo/test/__init__.py 2015-01-12 19:59:20.000000000 +0100
+++ new/ioflo-1.1.9/ioflo/test/__init__.py 2015-02-03 18:26:55.000000000 +0100
@@ -35,7 +35,7 @@
console.terse("\nRunning ioflo tests starting at '{0}' from '{1}', \n".format(start, top))
loader = unittest.TestLoader()
- suite = loader.discover(start, 'test*.py', top )
+ suite = loader.discover(start, 'test_*.py', top )
unittest.TextTestRunner(verbosity=2).run(suite)
if __name__ == "__main__":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo.egg-info/PKG-INFO new/ioflo-1.1.9/ioflo.egg-info/PKG-INFO
--- old/ioflo-1.1.5/ioflo.egg-info/PKG-INFO 2015-01-21 01:55:14.000000000 +0100
+++ new/ioflo-1.1.9/ioflo.egg-info/PKG-INFO 2015-02-13 23:58:16.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ioflo
-Version: 1.1.5
+Version: 1.1.9
Summary: Flow Based Programming Automated Reasoning Engine and Automation Operation System
Home-page: https://github.com/ioflo/ioflo
Author: Samuel M. Smith
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ioflo-1.1.5/ioflo.egg-info/SOURCES.txt new/ioflo-1.1.9/ioflo.egg-info/SOURCES.txt
--- old/ioflo-1.1.5/ioflo.egg-info/SOURCES.txt 2015-01-21 01:55:14.000000000 +0100
+++ new/ioflo-1.1.9/ioflo.egg-info/SOURCES.txt 2015-02-13 23:58:17.000000000 +0100
@@ -27,8 +27,8 @@
ioflo/app/plan/testResolveDoClause.flo
ioflo/app/plan/testSlave.flo
ioflo/app/test/__init__.py
-ioflo/app/test/testPlans.py
-ioflo/app/test/testStart.py
+ioflo/app/test/runplans.py
+ioflo/app/test/runstart.py
ioflo/base/__init__.py
ioflo/base/acting.py
ioflo/base/aiding.py
@@ -49,6 +49,7 @@
ioflo/base/needing.py
ioflo/base/odicting.py
ioflo/base/optimize.py
+ioflo/base/osetting.py
ioflo/base/poking.py
ioflo/base/registering.py
ioflo/base/serving.py
@@ -69,7 +70,7 @@
ioflo/base/test/_testStoring.py
ioflo/base/test/_testTasking.py
ioflo/base/test/_testmeta.py
-ioflo/base/test/testActing.py
+ioflo/base/test/test_acting.py
ioflo/test/__init__.py
ioflo/test/testTemplate.py
ioflo/test/testing.py
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package vtk for openSUSE:Factory checked in at 2015-02-27 11:10:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vtk (Old)
and /work/SRC/openSUSE:Factory/.vtk.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vtk"
Changes:
--------
--- /work/SRC/openSUSE:Factory/vtk/vtk.changes 2014-09-12 10:03:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.vtk.new/vtk.changes 2015-02-27 11:10:29.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Feb 26 12:30:11 UTC 2015 - dkxls23(a)gmail.com
+
+- Add MPI support
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ vtk.spec ++++++
--- /var/tmp/diff_new_pack.Vjuewn/_old 2015-02-27 11:10:30.000000000 +0100
+++ /var/tmp/diff_new_pack.Vjuewn/_new 2015-02-27 11:10:30.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package vtk
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -61,6 +61,7 @@
BuildRequires: libqt4-devel
BuildRequires: libtheora-devel
BuildRequires: libtiff-devel
+BuildRequires: openmpi-devel
BuildRequires: python-devel
BuildRequires: python-qt4-devel
BuildRequires: tcl-devel
@@ -101,6 +102,7 @@
Requires: libqt4-devel
Requires: libtheora-devel
Requires: libtiff-devel
+Requires: openmpi-devel
Requires: python-%{name} = %{version}
Requires: python-%{name}-qt = %{version}
@@ -241,6 +243,8 @@
mkdir build
pushd build
cmake .. \
+ -DCMAKE_CXX_COMPILER:STRING='mpicxx' \
+ -DCMAKE_C_COMPILER:STRING='mpicc' \
-DBUILD_DOCUMENTATION:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
@@ -265,6 +269,7 @@
-DVTK_WRAP_JAVA:BOOL=ON \
-DVTK_WRAP_PYTHON_SIP:BOOL=ON \
-DVTK_WRAP_TCL:BOOL=ON \
+ -DVTK_Group_MPI:BOOL=ON \
-DVTK_Group_Imaging:BOOL=ON \
-DVTK_Group_Qt:BOOL=ON \
-DModule_vtkTestingCore:BOOL=ON \
@@ -399,6 +404,7 @@
%files -n python-%{name}
%defattr(-,root,root,-)
%{_bindir}/%{name}python
+%{_bindir}/p%{name}python
%{_bindir}/%{name}WrapPython
%{_bindir}/%{name}WrapPythonInit
%{_libdir}/%{name}/*Python*.so.*
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package bitcoin for openSUSE:Factory checked in at 2015-02-27 11:10:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bitcoin (Old)
and /work/SRC/openSUSE:Factory/.bitcoin.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bitcoin"
Changes:
--------
--- /work/SRC/openSUSE:Factory/bitcoin/bitcoin.changes 2015-02-18 12:08:42.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.bitcoin.new/bitcoin.changes 2015-02-27 11:10:27.000000000 +0100
@@ -72,0 +73 @@
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bitcoin.spec ++++++
--- /var/tmp/diff_new_pack.qHRjx0/_old 2015-02-27 11:10:28.000000000 +0100
+++ /var/tmp/diff_new_pack.qHRjx0/_new 2015-02-27 11:10:28.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package bitcoin
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011-2014 P Rusnak <prusnak(a)opensuse.org>
#
# All modifications and additions to the file contributed by third parties
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package erlang for openSUSE:Factory checked in at 2015-02-27 11:10:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/erlang (Old)
and /work/SRC/openSUSE:Factory/.erlang.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "erlang"
Changes:
--------
--- /work/SRC/openSUSE:Factory/erlang/erlang.changes 2014-12-16 14:48:44.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.erlang.new/erlang.changes 2015-02-27 11:10:24.000000000 +0100
@@ -1,0 +2,5 @@
+Mon Feb 23 09:27:18 UTC 2015 - kruber(a)zib.de
+
+- add ct-fix_incl-dirs.patch (upstream patch for common test)
+
+-------------------------------------------------------------------
New:
----
ct-fix_incl-dirs.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ erlang.spec ++++++
--- /var/tmp/diff_new_pack.S8bmN4/_old 2015-02-27 11:10:27.000000000 +0100
+++ /var/tmp/diff_new_pack.S8bmN4/_new 2015-02-27 11:10:27.000000000 +0100
@@ -39,6 +39,8 @@
Patch4: erlang-not-install-misc.patch
# PATCH-FIX-UPSTREAM crypto.patch - matwey.kornilov(a)gmail.com -- fix compilation with disabled EC in openssl
Patch5: crypto.patch
+# PATCH-FIX-UPSTREAM ct-fix_incl-dirs.patch - kruber(a)zib.de -- fix working with include directories outside of the test sources (will probably make it into the next release)
+Patch6: ct-fix_incl-dirs.patch
BuildRequires: autoconf
BuildRequires: gcc-c++
BuildRequires: ncurses-devel
@@ -281,6 +283,7 @@
%patch0 -p1 -b .rpath
%patch4 -p1
%patch5 -p1
+%patch6 -p1
cp %{S:9} .
# enable dynamic linking for ssl
++++++ ct-fix_incl-dirs.patch ++++++
>From d5ae0df2f59f5f87922ceb76479a85e82c64c9b0 Mon Sep 17 00:00:00 2001
From: Peter Andersson <peppe(a)erlang.org>
Date: Thu, 22 Jan 2015 01:03:25 +0100
Subject: [PATCH 1/2] Add valid include path to epp in erl2html2 and fix
crashing code
---
lib/common_test/src/ct_run.erl | 21 +++++++++++++++------
lib/test_server/src/erl2html2.erl | 20 +++++++++++---------
lib/test_server/src/test_server_ctrl.erl | 9 +++++++--
3 files changed, 33 insertions(+), 17 deletions(-)
diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl
index 00d0aab..3605385 100644
--- a/lib/common_test/src/ct_run.erl
+++ b/lib/common_test/src/ct_run.erl
@@ -293,10 +293,10 @@ script_start1(Parent, Args) ->
application:set_env(common_test, auto_compile, true),
InclDirs =
case proplists:get_value(include, Args) of
- Incl when is_list(hd(Incl)) ->
- Incl;
+ Incls when is_list(hd(Incls)) ->
+ [filename:absname(IDir) || IDir <- Incls];
Incl when is_list(Incl) ->
- [Incl];
+ [filename:absname(Incl)];
undefined ->
[]
end,
@@ -1023,10 +1023,10 @@ run_test2(StartOpts) ->
case proplists:get_value(include, StartOpts) of
undefined ->
[];
- Incl when is_list(hd(Incl)) ->
- Incl;
+ Incls when is_list(hd(Incls)) ->
+ [filename:absname(IDir) || IDir <- Incls];
Incl when is_list(Incl) ->
- [Incl]
+ [filename:absname(Incl)]
end,
case os:getenv("CT_INCLUDE_PATH") of
false ->
@@ -1393,6 +1393,7 @@ run_testspec2(TestSpec) ->
EnvInclude++Opts#opts.include
end,
application:set_env(common_test, include, AllInclude),
+
LogDir1 = which(logdir,Opts#opts.logdir),
case check_and_install_configfiles(
Opts#opts.config, LogDir1, Opts) of
@@ -2134,6 +2135,14 @@ do_run_test(Tests, Skip, Opts0) ->
case check_and_add(Tests, [], []) of
{ok,AddedToPath} ->
ct_util:set_testdata({stats,{0,0,{0,0}}}),
+
+ %% test_server needs to know the include path too
+ InclPath = case application:get_env(common_test, include) of
+ {ok,Incls} -> Incls;
+ _ -> []
+ end,
+ application:set_env(test_server, include, InclPath),
+
test_server_ctrl:start_link(local),
%% let test_server expand the test tuples and count no of cases
diff --git a/lib/test_server/src/erl2html2.erl b/lib/test_server/src/erl2html2.erl
index b9b45cd..7cfaa2c 100644
--- a/lib/test_server/src/erl2html2.erl
+++ b/lib/test_server/src/erl2html2.erl
@@ -22,11 +22,11 @@
%%%------------------------------------------------------------------
-module(erl2html2).
--export([convert/2, convert/3]).
+-export([convert/3, convert/4]).
-convert([], _Dest) -> % Fake clause.
+convert([], _Dest, _InclPath) -> % Fake clause.
ok;
-convert(File, Dest) ->
+convert(File, Dest, InclPath) ->
%% The generated code uses the BGCOLOR attribute in the
%% BODY tag, which wasn't valid until HTML 3.2. Also,
%% good HTML should either override all colour attributes
@@ -48,12 +48,12 @@ convert(File, Dest) ->
"</head>\n\n"
"<body bgcolor=\"white\" text=\"black\""
" link=\"blue\" vlink=\"purple\" alink=\"red\">\n"],
- convert(File, Dest, Header).
+ convert(File, Dest, InclPath, Header).
-convert(File, Dest, Header) ->
+convert(File, Dest, InclPath, Header) ->
%% statistics(runtime),
- case parse_file(File) of
+ case parse_file(File, InclPath) of
{ok,Functions} ->
%% {_, Time1} = statistics(runtime),
%% io:format("Parsed file in ~.2f Seconds.~n",[Time1/1000]),
@@ -92,8 +92,8 @@ convert(File, Dest, Header) ->
%%% Use expanded preprocessor directives if possible (epp). Only if
%%% this fails, fall back on using non-expanded code (epp_dodger).
-parse_file(File) ->
- case epp:open(File, [], []) of
+parse_file(File, InclPath) ->
+ case epp:open(File, InclPath, []) of
{ok,Epp} ->
try parse_preprocessed_file(Epp,File,false) of
Forms ->
@@ -145,13 +145,15 @@ parse_non_preprocessed_file(File) ->
parse_non_preprocessed_file(Epp, File, Location) ->
case epp_dodger:parse_form(Epp, Location) of
{ok,Tree,Location1} ->
- case erl_syntax:revert(Tree) of
+ try erl_syntax:revert(Tree) of
{function,L,F,A,[_|C]} ->
Clauses = [{clause,CL} || {clause,CL,_,_,_} <- C],
[{atom_to_list(F),A,L} | Clauses] ++
parse_non_preprocessed_file(Epp, File, Location1);
_ ->
parse_non_preprocessed_file(Epp, File, Location1)
+ catch
+ _:_ -> parse_non_preprocessed_file(Epp, File, Location1)
end;
{error,_E,Location1} ->
parse_non_preprocessed_file(Epp, File, Location1);
diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl
index af8921f..488f38d 100644
--- a/lib/test_server/src/test_server_ctrl.erl
+++ b/lib/test_server/src/test_server_ctrl.erl
@@ -1927,15 +1927,20 @@ html_possibly_convert(Src, SrcInfo, Dest) ->
{ok,DestInfo} when DestInfo#file_info.mtime >= SrcInfo#file_info.mtime ->
ok; % dest file up to date
_ ->
+ InclPath = case application:get_env(test_server, include) of
+ {ok,Incls} -> Incls;
+ _ -> []
+ end,
+
OutDir = get(test_server_log_dir_base),
case test_server_sup:framework_call(get_html_wrapper,
["Module "++Src,false,
OutDir,undefined,
encoding(Src)], "") of
Empty when (Empty == "") ; (element(2,Empty) == "") ->
- erl2html2:convert(Src, Dest);
+ erl2html2:convert(Src, Dest, InclPath);
{_,Header,_} ->
- erl2html2:convert(Src, Dest, Header)
+ erl2html2:convert(Src, Dest, InclPath, Header)
end
end.
>From daa3c46d80435b0b790911095b34dc7255b3a6b8 Mon Sep 17 00:00:00 2001
From: Peter Andersson <peppe(a)erlang.org>
Date: Tue, 10 Feb 2015 11:54:01 +0100
Subject: [PATCH 2/2] Fix failing test case
---
lib/test_server/test/erl2html2_SUITE.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_server/test/erl2html2_SUITE.erl b/lib/test_server/test/erl2html2_SUITE.erl
index 37c2b74..908985c 100644
--- a/lib/test_server/test/erl2html2_SUITE.erl
+++ b/lib/test_server/test/erl2html2_SUITE.erl
@@ -161,7 +161,7 @@ convert_module(Mod,Config) ->
Src = filename:join(DataDir,Mod++".erl"),
Dst = filename:join(PrivDir,Mod++".erl.html"),
io:format("<a href=\"~s\">~s</a>\n",[Src,filename:basename(Src)]),
- ok = erl2html2:convert(Src, Dst, "<html><body>"),
+ ok = erl2html2:convert(Src, Dst, [], "<html><body>"),
io:format("<a href=\"~s\">~s</a>\n",[Dst,filename:basename(Dst)]),
{Src,Dst}.
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package MyODBC-unixODBC for openSUSE:Factory checked in at 2015-02-27 11:10:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/MyODBC-unixODBC (Old)
and /work/SRC/openSUSE:Factory/.MyODBC-unixODBC.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "MyODBC-unixODBC"
Changes:
--------
--- /work/SRC/openSUSE:Factory/MyODBC-unixODBC/MyODBC-unixODBC.changes 2014-03-04 13:56:14.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.MyODBC-unixODBC.new/MyODBC-unixODBC.changes 2015-02-27 11:10:23.000000000 +0100
@@ -1,0 +2,9 @@
+Fri Feb 20 21:32:37 UTC 2015 - kmroz(a)suse.com
+
+- Fix segfault in myodbc-install when freeing pointer (allocated with
+ basic malloc()) using x_free()/my_free(). my_free() accesses 8 bytes
+ before the pointer returned by malloc(), hence my_malloc() is needed.
+ (Bug#881624)
+ * added MyODBC-unixODBC-my_malloc_when_using_my_free.patch
+
+-------------------------------------------------------------------
New:
----
MyODBC-unixODBC-my_malloc_when_using_my_free.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ MyODBC-unixODBC.spec ++++++
--- /var/tmp/diff_new_pack.N1SzKc/_old 2015-02-27 11:10:24.000000000 +0100
+++ /var/tmp/diff_new_pack.N1SzKc/_new 2015-02-27 11:10:24.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package MyODBC-unixODBC
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 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
@@ -32,6 +32,7 @@
Patch1: MyODBC-unixODBC-my_free.patch
Patch3: MyODBC-unixODBC-64bit.patch
Patch4: MyODBC-unixODBC-my_init_dynamic_array_flags.patch
+Patch5: MyODBC-unixODBC-my_malloc_when_using_my_free.patch
BuildRequires: libtool
BuildRequires: mysql-devel
BuildRequires: unixODBC-devel
@@ -52,6 +53,7 @@
if grep -l 'my_init_dynamic_array(A,B,C,D,E)' /usr/include/mysql/my_sys.h; then
%patch4
fi
+%patch5 -p1
%build
# mysql 5.5.10 has stopped #define'ing THREAD in its exports, and has
++++++ MyODBC-unixODBC-my_malloc_when_using_my_free.patch ++++++
Index: mysql-connector-odbc-5.1.8/util/odbcinstw.c
===================================================================
--- mysql-connector-odbc-5.1.8.orig/util/odbcinstw.c
+++ mysql-connector-odbc-5.1.8/util/odbcinstw.c
@@ -68,7 +68,7 @@ MySQLGetPrivateProfileStringW(const LPWS
filename= (char *)sqlwchar_as_utf8(lpszFilename, &len);
if (lpszRetBuffer && cbRetBuffer)
- ret= malloc(cbRetBuffer + 1);
+ ret= my_malloc(cbRetBuffer + 1, MYF(0));
else
ret= NULL;
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python3-autopep8 for openSUSE:Factory checked in at 2015-02-27 11:10:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-autopep8 (Old)
and /work/SRC/openSUSE:Factory/.python3-autopep8.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-autopep8"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-autopep8/python3-autopep8.changes 2014-12-16 14:49:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-autopep8.new/python3-autopep8.changes 2015-02-27 11:10:21.000000000 +0100
@@ -1,0 +2,83 @@
+Thu Feb 26 16:53:50 UTC 2015 - arun(a)gmx.de
+
+- update to version 1.1.1:
+ * fix fail test when use sdist files
+ * ignore coverage data
+ * Update due to change in "pep8"
+ * Suppress false positive
+ * Test against "LANG="
+ * Fall back to "sys.getdefaultencoding()"
+ * Increment copyright date
+
+- changes from version 1.1:
+ * Add note
+ * Add for 5edb790ee5555e42992cb38885c9c72ad70a5918
+ * Fix exclude in recursive mode
+ * fix fix_e265 comment
+ * Clean up
+ * Add suppressions for Python 2
+ * Format
+ * Add future imports
+ * Remove untested code
+ * Remove broken and untested code
+ * Put "and" in the right place
+ * Format
+ * Add missing "r"
+ * Mention pep8
+ * cln expand long test to multiline string
+ * Add note
+ * pep8 failure (E501 not picked up by autopep8?)
+ * fix multi-line docstrings over range
+ * cln remove comment indentation first
+ * TST additional range comment test for comment followed by new line
+ * FIX comments in line range are indented to match subsequent line
+ * Simplify
+ * Format
+ * Use parentheses uniformly
+ * Remove user-dependent test
+ * Read configuration after filename normalization
+ * Find configuration file correctly
+ * Clean up
+ * Clean up
+ * Make tests safer
+ * Clean up
+ * Undo home directory expansion in documentation
+ * Allowing leading "--" in configuration
+ * Clean up
+ * Add back Python 2.6 support
+ * Add missing usage of "GLOBAL_CONFIG"
+ * Set development version
+ * Handle more errors
+ * Use non-deprecated import
+ * Document new options
+ * Format
+ * Remove unnecessary method
+ * Revert 1f782659f13adf63969fb3d41bdbdf6cb56d148a
+ * CLN remove _main
+ * CLN remove pragma: no cover as not needed with coveralls cc @myint
+ * CLN parse args twice, no manual arguments checking
+ * FIX autocomplete for --global-config arg and with space sep
+ * Use lowercase
+ * Generalize
+ * Remove bad backslash
+ * Avoid getting into bad state due to E901
+ * Remove flaky lib2to3 "import" fixer
+ * API use --global-config and --ignore-local-config arguments
+ * TST check passing arg overrides default/config
+ * ENH add --config argument
+ * Mention pep8 repository
+ * Remove bad-syntax inducing code
+ * Format
+ * Clean up
+ * Clean up
+ * Remove no-longer-working script
+ * include spaces in the 'class' or 'def' checks
+ * improve e302 fix code
+ * fix suite tests
+ * fix infinite loop in e501 experimental_decorator unit test
+ * extend E302 fix (comments before class definition)
+ * fix #145
+ * fix #161
+
+
+-------------------------------------------------------------------
Old:
----
autopep8-1.0.4.tar.gz
New:
----
autopep8-1.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-autopep8.spec ++++++
--- /var/tmp/diff_new_pack.uNNMcF/_old 2015-02-27 11:10:22.000000000 +0100
+++ /var/tmp/diff_new_pack.uNNMcF/_new 2015-02-27 11:10:22.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python3-autopep8
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 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
@@ -17,7 +17,7 @@
Name: python3-autopep8
-Version: 1.0.4
+Version: 1.1.1
Release: 0
Url: https://github.com/hhatto/autopep8
Summary: Automatic generated to pep8 checked code
++++++ autopep8-1.0.4.tar.gz -> autopep8-1.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/AUTHORS.rst new/autopep8-1.1.1/AUTHORS.rst
--- old/autopep8-1.0.4/AUTHORS.rst 2014-07-30 18:41:37.000000000 +0200
+++ new/autopep8-1.1.1/AUTHORS.rst 2014-12-25 03:20:09.000000000 +0100
@@ -20,3 +20,5 @@
- 小明 (https://github.com/dongweiming)
- Andy Hayden (https://github.com/hayd)
- Fabio Zadrozny (https://github.com/fabioz)
+- Alex Chernetz (https://github.com/achernet)
+- Marc Schlaich (https://github.com/schlamar)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/LICENSE new/autopep8-1.1.1/LICENSE
--- old/autopep8-1.0.4/LICENSE 2014-04-11 03:54:44.000000000 +0200
+++ new/autopep8-1.1.1/LICENSE 2015-02-26 06:48:37.000000000 +0100
@@ -1,6 +1,6 @@
Copyright (C) 2010-2011 Hideo Hattori
Copyright (C) 2011-2013 Hideo Hattori, Steven Myint
-Copyright (C) 2013-2014 Hideo Hattori, Steven Myint, Bill Wendling
+Copyright (C) 2013-2015 Hideo Hattori, Steven Myint, Bill Wendling
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/MANIFEST.in new/autopep8-1.1.1/MANIFEST.in
--- old/autopep8-1.0.4/MANIFEST.in 2014-05-08 16:31:05.000000000 +0200
+++ new/autopep8-1.1.1/MANIFEST.in 2015-02-26 06:35:07.000000000 +0100
@@ -10,6 +10,7 @@
include test/example_with_reduce.py
include test/example.py
include test/iso_8859_1.py
+include test/fake_configuration/.pep8
recursive-exclude test/suite *.py
recursive-exclude test/suite/out *.py
exclude .travis.yml
@@ -21,7 +22,6 @@
exclude install_hooks.bash
exclude test/.gitignore
exclude test/acid.py
-exclude test/acid_github.py
exclude test/acid_pypi.py
exclude test/suite
exclude test/suite/out
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/PKG-INFO new/autopep8-1.1.1/PKG-INFO
--- old/autopep8-1.0.4/PKG-INFO 2014-09-09 19:07:39.000000000 +0200
+++ new/autopep8-1.1.1/PKG-INFO 2015-02-26 06:58:32.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: autopep8
-Version: 1.0.4
+Version: 1.1.1
Summary: A tool that automatically formats Python code to conform to the PEP 8 style guide
Home-page: https://github.com/hhatto/autopep8
Author: Hideo Hattori
@@ -132,7 +132,8 @@
Options::
- usage: autopep8 [-h] [--version] [-v] [-d] [-i] [-r] [-j n] [-p n] [-a]
+ usage: autopep8 [-h] [--version] [-v] [-d] [-i] [--global-config filename]
+ [--ignore-local-config] [-r] [-j n] [-p n] [-a]
[--experimental] [--exclude globs] [--list-fixes]
[--ignore errors] [--select errors] [--max-line-length n]
[--range line line] [--indent-size n]
@@ -150,6 +151,14 @@
verbose messages
-d, --diff print the diff for the fixed source
-i, --in-place make changes to files in place
+ --global-config filename
+ path to a global pep8 config file; if this file does
+ not exist then this is ignored (default:
+ ~/.config/pep8)
+ --ignore-local-config
+ don't look for and apply local config files; if not
+ passed, defaults are updated with any config files in
+ the project's root directory
-r, --recursive run recursively over directories; must be used with
--in-place or --diff
-j n, --jobs n number of parallel jobs; match CPU count if value is
@@ -319,8 +328,7 @@
autopep8 against Python code and checks for correctness and completeness of the
code fixes. It can check that the bytecode remains identical.
``test/acid_pypi.py`` makes use of ``acid.py`` to test against the latest
- released packages on PyPI. In a similar fashion, ``test/acid_github.py`` tests
- against Python code in Github repositories.
+ released packages on PyPI.
Troubleshooting
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/README.rst new/autopep8-1.1.1/README.rst
--- old/autopep8-1.0.4/README.rst 2014-06-10 14:41:58.000000000 +0200
+++ new/autopep8-1.1.1/README.rst 2014-12-25 03:20:09.000000000 +0100
@@ -124,7 +124,8 @@
Options::
- usage: autopep8 [-h] [--version] [-v] [-d] [-i] [-r] [-j n] [-p n] [-a]
+ usage: autopep8 [-h] [--version] [-v] [-d] [-i] [--global-config filename]
+ [--ignore-local-config] [-r] [-j n] [-p n] [-a]
[--experimental] [--exclude globs] [--list-fixes]
[--ignore errors] [--select errors] [--max-line-length n]
[--range line line] [--indent-size n]
@@ -142,6 +143,14 @@
verbose messages
-d, --diff print the diff for the fixed source
-i, --in-place make changes to files in place
+ --global-config filename
+ path to a global pep8 config file; if this file does
+ not exist then this is ignored (default:
+ ~/.config/pep8)
+ --ignore-local-config
+ don't look for and apply local config files; if not
+ passed, defaults are updated with any config files in
+ the project's root directory
-r, --recursive run recursively over directories; must be used with
--in-place or --diff
-j n, --jobs n number of parallel jobs; match CPU count if value is
@@ -311,8 +320,7 @@
autopep8 against Python code and checks for correctness and completeness of the
code fixes. It can check that the bytecode remains identical.
``test/acid_pypi.py`` makes use of ``acid.py`` to test against the latest
-released packages on PyPI. In a similar fashion, ``test/acid_github.py`` tests
-against Python code in Github repositories.
+released packages on PyPI.
Troubleshooting
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/autopep8.egg-info/PKG-INFO new/autopep8-1.1.1/autopep8.egg-info/PKG-INFO
--- old/autopep8-1.0.4/autopep8.egg-info/PKG-INFO 2014-09-09 19:07:39.000000000 +0200
+++ new/autopep8-1.1.1/autopep8.egg-info/PKG-INFO 2015-02-26 06:58:32.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: autopep8
-Version: 1.0.4
+Version: 1.1.1
Summary: A tool that automatically formats Python code to conform to the PEP 8 style guide
Home-page: https://github.com/hhatto/autopep8
Author: Hideo Hattori
@@ -132,7 +132,8 @@
Options::
- usage: autopep8 [-h] [--version] [-v] [-d] [-i] [-r] [-j n] [-p n] [-a]
+ usage: autopep8 [-h] [--version] [-v] [-d] [-i] [--global-config filename]
+ [--ignore-local-config] [-r] [-j n] [-p n] [-a]
[--experimental] [--exclude globs] [--list-fixes]
[--ignore errors] [--select errors] [--max-line-length n]
[--range line line] [--indent-size n]
@@ -150,6 +151,14 @@
verbose messages
-d, --diff print the diff for the fixed source
-i, --in-place make changes to files in place
+ --global-config filename
+ path to a global pep8 config file; if this file does
+ not exist then this is ignored (default:
+ ~/.config/pep8)
+ --ignore-local-config
+ don't look for and apply local config files; if not
+ passed, defaults are updated with any config files in
+ the project's root directory
-r, --recursive run recursively over directories; must be used with
--in-place or --diff
-j n, --jobs n number of parallel jobs; match CPU count if value is
@@ -319,8 +328,7 @@
autopep8 against Python code and checks for correctness and completeness of the
code fixes. It can check that the bytecode remains identical.
``test/acid_pypi.py`` makes use of ``acid.py`` to test against the latest
- released packages on PyPI. In a similar fashion, ``test/acid_github.py`` tests
- against Python code in Github repositories.
+ released packages on PyPI.
Troubleshooting
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/autopep8.egg-info/SOURCES.txt new/autopep8-1.1.1/autopep8.egg-info/SOURCES.txt
--- old/autopep8-1.0.4/autopep8.egg-info/SOURCES.txt 2014-09-09 19:07:39.000000000 +0200
+++ new/autopep8-1.1.1/autopep8.egg-info/SOURCES.txt 2015-02-26 06:58:32.000000000 +0100
@@ -3,6 +3,7 @@
MANIFEST.in
README.rst
autopep8.py
+setup.cfg
setup.py
autopep8.egg-info/PKG-INFO
autopep8.egg-info/SOURCES.txt
@@ -19,4 +20,5 @@
test/example_with_reduce.py
test/iso_8859_1.py
test/test_autopep8.py
-test/test_suite.py
\ No newline at end of file
+test/test_suite.py
+test/fake_configuration/.pep8
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/autopep8.py new/autopep8-1.1.1/autopep8.py
--- old/autopep8-1.0.4/autopep8.py 2014-09-09 19:06:54.000000000 +0200
+++ new/autopep8-1.1.1/autopep8.py 2015-02-26 06:57:06.000000000 +0100
@@ -2,7 +2,7 @@
#
# Copyright (C) 2010-2011 Hideo Hattori
# Copyright (C) 2011-2013 Hideo Hattori, Steven Myint
-# Copyright (C) 2013-2014 Hideo Hattori, Steven Myint, Bill Wendling
+# Copyright (C) 2013-2015 Hideo Hattori, Steven Myint, Bill Wendling
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -67,7 +67,7 @@
unicode = str
-__version__ = '1.0.4'
+__version__ = '1.1.1'
CR = '\r'
@@ -103,7 +103,6 @@
'W690': ['apply',
'except',
'exitfunc',
- 'import',
'numliterals',
'operator',
'paren',
@@ -116,6 +115,14 @@
'xreadlines']}
+if sys.platform == 'win32': # pragma: no cover
+ DEFAULT_CONFIG = os.path.expanduser(r'~\.pep8')
+else:
+ DEFAULT_CONFIG = os.path.join(os.getenv('XDG_CONFIG_HOME') or
+ os.path.expanduser('~/.config'), 'pep8')
+PROJECT_CONFIG = ('setup.cfg', 'tox.ini', '.pep8')
+
+
def open_with_encoding(filename, encoding=None, mode='r'):
"""Return opened file with a specific encoding."""
if not encoding:
@@ -288,8 +295,11 @@
yield (start, '{0} {1}'.format(*error))
# Look for visual indenting.
- if (parens[row] and token_type not in (tokenize.NL, tokenize.COMMENT)
- and not indent[depth]):
+ if (
+ parens[row] and
+ token_type not in (tokenize.NL, tokenize.COMMENT) and
+ not indent[depth]
+ ):
indent[depth] = start[1]
indent_chances[start[1]] = True
# Deal with implicit string concatenation.
@@ -885,7 +895,15 @@
second = (_get_indentation(logical_lines[0]) +
target[offset:].lstrip(';').lstrip())
- self.source[line_index] = first + '\n' + second
+ # find inline commnet
+ inline_comment = None
+ if '# ' == target[offset:].lstrip(';').lstrip()[:2]:
+ inline_comment = target[offset:].lstrip(';')
+
+ if inline_comment:
+ self.source[line_index] = first + inline_comment
+ else:
+ self.source[line_index] = first + '\n' + second
return [line_index + 1]
def fix_e711(self, result):
@@ -1159,11 +1177,13 @@
# Normalize beginning if not a shebang.
if len(line) > 1:
+ pos = next((index for index, c in enumerate(line)
+ if c != '#'))
if (
# Leave multiple spaces like '# ' alone.
- (line.count('#') > 1 or line[1].isalnum())
+ (line[:pos].count('#') > 1 or line[1].isalnum()) and
# Leave stylistic outlined blocks alone.
- and not line.rstrip().endswith('#')
+ not line.rstrip().endswith('#')
):
line = '# ' + line.lstrip('# \t')
@@ -1571,7 +1591,7 @@
(self._prev_prev_item.is_name or
self._prev_prev_item.is_number or
self._prev_prev_item.is_string)) and
- prev_text in ('+', '-', '%', '*', '/', '//', '**')))))
+ prev_text in ('+', '-', '%', '*', '/', '//', '**', 'in')))))
):
self._lines.append(self._Space())
@@ -2642,6 +2662,8 @@
commented_out_code_line_numbers = commented_out_code_lines(source)
+ has_e901 = any(result['id'].lower() == 'e901' for result in results)
+
for r in results:
issue_id = r['id'].lower()
@@ -2673,6 +2695,13 @@
if issue_id.startswith(('e26', 'e501')):
continue
+ # Do not touch indentation if there is a token error caused by
+ # incomplete multi-line statement. Otherwise, we risk screwing up the
+ # indentation.
+ if has_e901:
+ if issue_id.startswith(('e1', 'e7')):
+ continue
+
yield r
@@ -2807,17 +2836,17 @@
return True
-def fix_code(source, options=None, encoding=None):
+def fix_code(source, options=None, encoding=None, apply_config=False):
"""Return fixed source code.
"encoding" will be used to decode "source" if it is a byte string.
"""
if not options:
- options = parse_args([''])
+ options = parse_args([''], apply_config=apply_config)
if not isinstance(source, unicode):
- source = source.decode(encoding or locale.getpreferredencoding())
+ source = source.decode(encoding or get_encoding())
sio = io.StringIO(source)
return fix_lines(sio.readlines(), options=options)
@@ -2864,9 +2893,9 @@
return ''.join(normalize_line_endings(sio.readlines(), original_newline))
-def fix_file(filename, options=None, output=None):
+def fix_file(filename, options=None, output=None, apply_config=False):
if not options:
- options = parse_args([filename])
+ options = parse_args([filename], apply_config=apply_config)
original_source = readlines_from_file(filename)
@@ -2956,15 +2985,15 @@
"""Find leftmost item greater than or equal to x."""
i = bisect.bisect_left(a, x)
if i != len(a):
- return i, a[i]
- return len(a) - 1, a[-1]
+ return (i, a[i])
+ return (len(a) - 1, a[-1])
def find_le(a, x):
"""Find rightmost value less than or equal to x."""
i = bisect.bisect_right(a, x)
if i:
- return i - 1, a[i - 1]
- return 0, a[0]
+ return (i - 1, a[i - 1])
+ return (0, a[0])
def local_fix(source, start_log, end_log,
start_lines, end_lines, indents, last_line):
@@ -2988,12 +3017,20 @@
sl = slice(start_lines[start_log], end_lines[end_log] + 1)
subsource = source[sl]
+ msl = multiline_string_lines(''.join(subsource),
+ include_docstrings=False)
# Remove indent from subsource.
if ind:
for line_no in start_lines[start_log:end_log + 1]:
pos = line_no - start_lines[start_log]
subsource[pos] = subsource[pos][ind:]
+ # Remove indent from comments.
+ for (i, line) in enumerate(subsource):
+ if i + 1 not in msl and re.match(r'\s*#', line):
+ if line.index('#') >= ind:
+ subsource[i] = line[ind:]
+
# Fix indentation of subsource.
fixed_subsource = apply_global_fixes(''.join(subsource),
options,
@@ -3003,7 +3040,7 @@
# Add back indent for non multi-line strings lines.
msl = multiline_string_lines(''.join(fixed_subsource),
include_docstrings=False)
- for i, line in enumerate(fixed_subsource):
+ for (i, line) in enumerate(fixed_subsource):
if not i + 1 in msl:
fixed_subsource[i] = indent + line if line != '\n' else line
@@ -3012,8 +3049,10 @@
# subset up until last_line, this assumes that the number of lines
# does not change in this multiline line.
changed_lines = len(fixed_subsource)
- if (start_lines[end_log] != end_lines[end_log]
- and end_lines[end_log] > last_line):
+ if (
+ start_lines[end_log] != end_lines[end_log] and
+ end_lines[end_log] > last_line
+ ):
after_end = end_lines[end_log] - last_line
fixed_subsource = (fixed_subsource[:-after_end] +
source[sl][-after_end:])
@@ -3032,7 +3071,7 @@
return re.split('[ :]', line.strip(), 1)[0] in continued_stmts
assert options.line_range
- start, end = options.line_range
+ (start, end) = options.line_range
start -= 1
end -= 1
last_line = end # We shouldn't modify lines after this cut-off.
@@ -3046,20 +3085,22 @@
# Just blank lines, this should imply that it will become '\n' ?
return apply_global_fixes(source, options)
- start_lines, indents = zip(*logical[0])
- end_lines, _ = zip(*logical[1])
+ (start_lines, indents) = zip(*logical[0])
+ (end_lines, _) = zip(*logical[1])
source = source.splitlines(True)
- start_log, start = find_ge(start_lines, start)
- end_log, end = find_le(start_lines, end)
+ (start_log, start) = find_ge(start_lines, start)
+ (end_log, end) = find_le(start_lines, end)
# Look behind one line, if it's indented less than current indent
# then we can move to this previous line knowing that its
# indentation level will not be changed.
- if (start_log > 0
- and indents[start_log - 1] < indents[start_log]
- and not is_continued_stmt(source[start_log - 1])):
+ if (
+ start_log > 0 and
+ indents[start_log - 1] < indents[start_log] and
+ not is_continued_stmt(source[start_log - 1])
+ ):
start_log -= 1
start = start_lines[start_log]
@@ -3073,7 +3114,7 @@
ind = indents[start_log]
for t in itertools.takewhile(lambda t: t[1][1] >= ind,
enumerate(logical[0][start_log:])):
- n_log, n = start_log + t[0], t[1][0]
+ (n_log, n) = start_log + t[0], t[1][0]
# Start shares indent up to n.
if n <= end:
@@ -3086,14 +3127,16 @@
else:
# Look at the line after end and see if allows us to reindent.
- after_end_log, after_end = find_ge(start_lines, end + 1)
+ (after_end_log, after_end) = find_ge(start_lines, end + 1)
if indents[after_end_log] > indents[start_log]:
- start_log, start = find_ge(start_lines, start + 1)
+ (start_log, start) = find_ge(start_lines, start + 1)
continue
- if (indents[after_end_log] == indents[start_log]
- and is_continued_stmt(source[after_end])):
+ if (
+ indents[after_end_log] == indents[start_log] and
+ is_continued_stmt(source[after_end])
+ ):
# Find n, the beginning of the last continued statement.
# Apply fix to previous block if there is one.
only_block = True
@@ -3108,7 +3151,7 @@
only_block = False
break
if only_block:
- end_log, end = find_le(start_lines, end - 1)
+ (end_log, end) = find_le(start_lines, end - 1)
continue
source = local_fix(source, start_log, end_log,
@@ -3149,45 +3192,54 @@
parser.add_argument('-v', '--verbose', action='count', dest='verbose',
default=0,
help='print verbose messages; '
- 'multiple -v result in more verbose messages')
+ 'multiple -v result in more verbose messages')
parser.add_argument('-d', '--diff', action='store_true', dest='diff',
help='print the diff for the fixed source')
parser.add_argument('-i', '--in-place', action='store_true',
help='make changes to files in place')
+ parser.add_argument('--global-config', metavar='filename',
+ default=DEFAULT_CONFIG,
+ help='path to a global pep8 config file; if this file '
+ 'does not exist then this is ignored '
+ '(default: {0})'.format(DEFAULT_CONFIG))
+ parser.add_argument('--ignore-local-config', action='store_true',
+ help="don't look for and apply local config files; "
+ 'if not passed, defaults are updated with any '
+ "config files in the project's root directory")
parser.add_argument('-r', '--recursive', action='store_true',
help='run recursively over directories; '
- 'must be used with --in-place or --diff')
+ 'must be used with --in-place or --diff')
parser.add_argument('-j', '--jobs', type=int, metavar='n', default=1,
help='number of parallel jobs; '
- 'match CPU count if value is less than 1')
+ 'match CPU count if value is less than 1')
parser.add_argument('-p', '--pep8-passes', metavar='n',
default=-1, type=int,
help='maximum number of additional pep8 passes '
- '(default: infinite)')
+ '(default: infinite)')
parser.add_argument('-a', '--aggressive', action='count', default=0,
help='enable non-whitespace changes; '
- 'multiple -a result in more aggressive changes')
+ 'multiple -a result in more aggressive changes')
parser.add_argument('--experimental', action='store_true',
help='enable experimental fixes')
parser.add_argument('--exclude', metavar='globs',
help='exclude file/directory names that match these '
- 'comma-separated globs')
+ 'comma-separated globs')
parser.add_argument('--list-fixes', action='store_true',
help='list codes for fixes; '
'used by --ignore and --select')
parser.add_argument('--ignore', metavar='errors', default='',
help='do not fix these errors/warnings '
- '(default: {0})'.format(DEFAULT_IGNORE))
+ '(default: {0})'.format(DEFAULT_IGNORE))
parser.add_argument('--select', metavar='errors', default='',
help='fix only these errors/warnings (e.g. E4,W)')
parser.add_argument('--max-line-length', metavar='n', default=79, type=int,
help='set maximum allowed line length '
- '(default: %(default)s)')
+ '(default: %(default)s)')
parser.add_argument('--range', metavar='line', dest='line_range',
default=None, type=int, nargs=2,
help='only fix errors found within this inclusive '
- 'range of line numbers (e.g. 1 99); '
- 'line numbers are indexed at 1')
+ 'range of line numbers (e.g. 1 99); '
+ 'line numbers are indexed at 1')
parser.add_argument('--indent-size', default=DEFAULT_INDENT_SIZE,
type=int, metavar='n',
help='number of spaces per indent level '
@@ -3198,7 +3250,7 @@
return parser
-def parse_args(arguments):
+def parse_args(arguments, apply_config=False):
"""Parse command-line options."""
parser = create_parser()
args = parser.parse_args(arguments)
@@ -3208,6 +3260,11 @@
args.files = [decode_filename(name) for name in args.files]
+ if apply_config:
+ parser = read_config(args, parser)
+ args = parser.parse_args(arguments)
+ args.files = [decode_filename(name) for name in args.files]
+
if '-' in args.files:
if len(args.files) > 1:
parser.error('cannot mix stdin and regular files')
@@ -3274,6 +3331,39 @@
return args
+def read_config(args, parser):
+ """Read both user configuration and local configuration."""
+ try:
+ from configparser import ConfigParser as SafeConfigParser
+ from configparser import Error
+ except ImportError:
+ from ConfigParser import SafeConfigParser
+ from ConfigParser import Error
+
+ config = SafeConfigParser()
+
+ try:
+ config.read(args.global_config)
+
+ if not args.ignore_local_config:
+ parent = tail = args.files and os.path.abspath(
+ os.path.commonprefix(args.files))
+ while tail:
+ if config.read([os.path.join(parent, fn)
+ for fn in PROJECT_CONFIG]):
+ break
+ (parent, tail) = os.path.split(parent)
+
+ defaults = dict((k.lstrip('-').replace('-', '_'), v)
+ for k, v in config.items('pep8'))
+ parser.set_defaults(**defaults)
+ except Error:
+ # Ignore for now.
+ pass
+
+ return parser
+
+
def _split_comma_separated(string):
"""Return a set of strings."""
return set(filter(None, string.split(',')))
@@ -3520,6 +3610,8 @@
for pattern in exclude:
if fnmatch.fnmatch(base_name, pattern):
return False
+ if fnmatch.fnmatch(filename, pattern):
+ return False
if not os.path.isdir(filename) and not is_python_file(filename):
return False
@@ -3608,7 +3700,12 @@
else output)
-def main():
+def get_encoding():
+ """Return preferred encoding."""
+ return locale.getpreferredencoding() or sys.getdefaultencoding()
+
+
+def main(apply_config=True):
"""Tool main."""
try:
# Exit on broken pipe.
@@ -3618,7 +3715,7 @@
pass
try:
- args = parse_args(sys.argv[1:])
+ args = parse_args(sys.argv[1:], apply_config=apply_config)
if args.list_fixes:
for code, description in sorted(supported_fixes()):
@@ -3629,7 +3726,7 @@
if args.files == ['-']:
assert not args.in_place
- encoding = sys.stdin.encoding or locale.getpreferredencoding()
+ encoding = sys.stdin.encoding or get_encoding()
# LineEndingWrapper is unnecessary here due to the symmetry between
# standard in and standard out.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/setup.cfg new/autopep8-1.1.1/setup.cfg
--- old/autopep8-1.0.4/setup.cfg 2014-09-09 19:07:39.000000000 +0200
+++ new/autopep8-1.1.1/setup.cfg 2015-02-26 06:58:32.000000000 +0100
@@ -1,3 +1,6 @@
+[bdist_wheel]
+universal = 1
+
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/test/fake_configuration/.pep8 new/autopep8-1.1.1/test/fake_configuration/.pep8
--- old/autopep8-1.0.4/test/fake_configuration/.pep8 1970-01-01 01:00:00.000000000 +0100
+++ new/autopep8-1.1.1/test/fake_configuration/.pep8 2014-12-25 03:20:09.000000000 +0100
@@ -0,0 +1,2 @@
+[pep8]
+indent-size=2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autopep8-1.0.4/test/test_autopep8.py new/autopep8-1.1.1/test/test_autopep8.py
--- old/autopep8-1.0.4/test/test_autopep8.py 2014-09-09 19:03:42.000000000 +0200
+++ new/autopep8-1.1.1/test/test_autopep8.py 2015-02-26 06:38:55.000000000 +0100
@@ -7,6 +7,9 @@
"""
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
from __future__ import unicode_literals
import os
@@ -38,6 +41,9 @@
import autopep8
+FAKE_CONFIGURATION = os.path.join(ROOT_DIR, 'test', 'fake_configuration')
+
+
if 'AUTOPEP8_COVERAGE' in os.environ and int(os.environ['AUTOPEP8_COVERAGE']):
AUTOPEP8_CMD_TUPLE = ('coverage', 'run', '--branch', '--parallel',
'--omit=*/site-packages/*',
@@ -207,6 +213,10 @@
'# abc',
autopep8.fix_e265('## # ##abc'))
+ self.assertEqual(
+ '# abc "# noqa"',
+ autopep8.fix_e265('# abc "# noqa"'))
+
def test_format_block_comments_should_leave_outline_alone(self):
line = """\
###################################################################
@@ -418,6 +428,41 @@
self.assertTrue(autopep8.match_file(filename, exclude=[]),
msg=filename)
+ def test_find_files(self):
+ temp_directory = tempfile.mkdtemp()
+ try:
+ target = os.path.join(temp_directory, 'dir')
+ os.mkdir(target)
+ with open(os.path.join(target, 'a.py'), 'w'):
+ pass
+
+ exclude = os.path.join(target, 'ex')
+ os.mkdir(exclude)
+ with open(os.path.join(exclude, 'b.py'), 'w'):
+ pass
+
+ sub = os.path.join(exclude, 'sub')
+ os.mkdir(sub)
+ with open(os.path.join(sub, 'c.py'), 'w'):
+ pass
+
+ # FIXME: Avoid changing directory. This may interfere with parallel
+ # test runs.
+ cwd = os.getcwd()
+ os.chdir(temp_directory)
+ try:
+ files = list(autopep8.find_files(
+ ['dir'], True, [os.path.join('dir', 'ex')]))
+ finally:
+ os.chdir(cwd)
+
+ file_names = [os.path.basename(f) for f in files]
+ self.assertIn('a.py', file_names)
+ self.assertNotIn('b.py', file_names)
+ self.assertNotIn('c.py', file_names)
+ finally:
+ shutil.rmtree(temp_directory)
+
def test_line_shortening_rank(self):
self.assertGreater(
autopep8.line_shortening_rank('(1\n+1)\n',
@@ -970,6 +1015,7 @@
# report properly, the below command will take a long time.
p = Popen(list(AUTOPEP8_CMD_TUPLE) +
['-vvv', '--select=E101', '--diff',
+ '--global-config={0}'.format(os.devnull),
os.path.join(ROOT_DIR, 'test', 'e101_example.py')],
stdout=PIPE, stderr=PIPE)
output = [x.decode('utf-8') for x in p.communicate()][0]
@@ -2064,6 +2110,17 @@
with autopep8_context(line) as result:
self.assertEqual(fixed, result)
+ def test_e302_bug(self):
+ """Avoid creating bad syntax."""
+ line = r"""def repeatable_expr(): return [bracketed_choice, simple_match, rule_ref],\
+ Optional(repeat_operator)
+# def match(): return [simple_match , mixin_rule_match] TODO
+def simple_match(): return [str_match, re_match]
+"""
+ self.assertTrue(autopep8.check_syntax(line))
+ with autopep8_context(line) as result:
+ self.assertTrue(autopep8.check_syntax(result))
+
def test_e303(self):
line = '\n\n\n# alpha\n\n1\n'
fixed = '\n\n# alpha\n\n1\n'
@@ -2169,6 +2226,34 @@
with autopep8_context(line) as result:
self.assertEqual(fixed, result)
+ def test_e501_with_in(self):
+ line = """\
+if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if k_left in ('any', k_curr) and k_right in ('any', k_curr):
+ pass
+"""
+ fixed = """\
+if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if k_left in ('any', k_curr) and k_right in ('any', k_curr):
+ pass
+"""
+ with autopep8_context(line) as result:
+ self.assertEqual(fixed, result)
+
def test_e501_with_commas_and_colons(self):
line = """\
foobar = {'aaaaaaaaaaaa': 'bbbbbbbbbbbbbbbb', 'dddddd': 'eeeeeeeeeeeeeeee', 'ffffffffffff': 'gggggggg'}
@@ -3488,6 +3573,12 @@
with autopep8_context(line) as result:
self.assertEqual(fixed, result)
+ def test_e703_with_inline_comment(self):
+ line = 'a = 5; # inline comment\n'
+ fixed = 'a = 5 # inline comment\n'
+ with autopep8_context(line) as result:
+ self.assertEqual(fixed, result)
+
def test_e711(self):
line = 'foo == None\n'
fixed = 'foo is None\n'
@@ -3583,6 +3674,19 @@
with autopep8_context(line, options=['--aggressive']) as result:
self.assertEqual(fixed, result)
+ def test_e901_should_cause_indentation_screw_up(self):
+ line = """\
+def tmp(g):
+ g(4)))
+
+ if not True:
+ pass
+ pass
+"""
+
+ with autopep8_context(line) as result:
+ self.assertEqual(line, result)
+
def test_should_preserve_vertical_tab(self):
line = """\
#Memory Bu\vffer Register:
@@ -3955,6 +4059,7 @@
with autopep8_context(line, options=['--aggressive']) as result:
self.assertEqual(line, result)
+ # FIXME: These tests should use multiline strings for readability.
def test_range(self):
line = 'print( 1 )\nprint( 2 )\n print( 3 )\n'
fixed = 'print( 1 )\nprint(2)\n print( 3 )\n'
@@ -4081,6 +4186,44 @@
with autopep8_context(line, options=['--range', '2', '7']) as result:
self.assertEqual(fixed_2_7, result)
+ def test_range_indent_multiline_strings_and_docstring(self):
+ code_ = '''
+def f():
+ """docstring
+ continued"""
+ a = """multi
+line
+string"""
+ #comment
+ a=1
+a=2
+'''
+ fixed_2_7 = '''
+def f():
+ """docstring
+ continued"""
+ a = """multi
+line
+string"""
+ # comment
+ a = 1
+a=2
+'''
+ with autopep8_context(code_, options=['--range', '2', '9']) as result:
+ self.assertEqual(fixed_2_7, result)
+
+ def test_range_with_indented_comments(self):
+ code_ = 'if True:\n if True:\n if True:\n # bah\n pass\n'
+ fixed = 'if True:\n if True:\n if True:\n # bah\n pass\n'
+ with autopep8_context(code_, options=['--range', '4', '5']) as result:
+ self.assertEqual(fixed, result)
+
+ def test_range_with_indented_comments_spaced(self):
+ code_ = 'if True:\n if True:\n if True:\n # bah\n\n pass\n'
+ fixed = 'if True:\n if True:\n if True:\n # bah\n\n pass\n'
+ with autopep8_context(code_, options=['--range', '4', '6']) as result:
+ self.assertEqual(fixed, result)
+
def test_range_with_broken_syntax(self):
line = """\
if True:
@@ -4377,6 +4520,77 @@
process.communicate(line.encode('utf-8'))[0].decode('utf-8'))
+class ConfigurationTests(unittest.TestCase):
+
+ def test_local_config(self):
+ args = autopep8.parse_args(
+ [os.path.join(FAKE_CONFIGURATION, 'foo.py'),
+ '--global-config={0}'.format(os.devnull)],
+ apply_config=True)
+ self.assertEqual(args.indent_size, 2)
+
+ def test_config_override(self):
+ args = autopep8.parse_args(
+ [os.path.join(FAKE_CONFIGURATION, 'foo.py'),
+ '--indent-size=7'],
+ apply_config=True)
+ self.assertEqual(args.indent_size, 7)
+
+ def test_config_false_with_local(self):
+ args = autopep8.parse_args(
+ [os.path.join(FAKE_CONFIGURATION, 'foo.py'),
+ '--global-config=False'],
+ apply_config=True)
+ self.assertEqual(args.global_config, 'False')
+ self.assertEqual(args.indent_size, 2)
+
+ def test_config_false_with_local_space(self):
+ args = autopep8.parse_args(
+ [os.path.join(FAKE_CONFIGURATION, 'foo.py'),
+ '--global-config', 'False'],
+ apply_config=True)
+ self.assertEqual(args.global_config, 'False')
+ self.assertEqual(args.indent_size, 2)
+
+ def test_config_false_with_local_autocomplete(self):
+ args = autopep8.parse_args(
+ [os.path.join(FAKE_CONFIGURATION, 'foo.py'),
+ '--g', 'False'],
+ apply_config=True)
+ self.assertEqual(args.global_config, 'False')
+ self.assertEqual(args.indent_size, 2)
+
+ def test_config_false_without_local(self):
+ args = autopep8.parse_args(['/nowhere/foo.py',
+ '--global-config={0}'.format(os.devnull)],
+ apply_config=True)
+ self.assertEqual(args.indent_size, 4)
+
+ def test_global_config_with_locals(self):
+ with temporary_file_context('[pep8]\nindent-size=3\n') as filename:
+ args = autopep8.parse_args(
+ [os.path.join(FAKE_CONFIGURATION, 'foo.py'),
+ '--global-config={0}'.format(filename)],
+ apply_config=True)
+ self.assertEqual(args.indent_size, 2)
+
+ def test_global_config_ignore_locals(self):
+ with temporary_file_context('[pep8]\nindent-size=3\n') as filename:
+ args = autopep8.parse_args(
+ [os.path.join(FAKE_CONFIGURATION, 'foo.py'),
+ '--global-config={0}'.format(filename),
+ '--ignore-local-config'],
+ apply_config=True)
+ self.assertEqual(args.indent_size, 3)
+
+ def test_global_config_without_locals(self):
+ with temporary_file_context('[pep8]\nindent-size=3\n') as filename:
+ args = autopep8.parse_args(
+ ['/nowhere/foo.py', '--global-config={0}'.format(filename)],
+ apply_config=True)
+ self.assertEqual(args.indent_size, 3)
+
+
class ExperimentalSystemTests(unittest.TestCase):
maxDiff = None
@@ -4421,7 +4635,8 @@
with autopep8_context(line, options=['--experimental']) as result:
self.assertEqual(fixed, result)
- def test_e501_experimental_with_inline_comments_should_skip_multiline(self):
+ def test_e501_experimental_with_inline_comments_should_skip_multiline(
+ self):
line = """\
'''This should be left alone. -----------------------------------------------------
@@ -4465,7 +4680,8 @@
with autopep8_context(line, options=['--experimental']) as result:
self.assertEqual(line, result)
- def test_e501_experimental_with_inline_comments_should_skip_edge_cases(self):
+ def test_e501_experimental_with_inline_comments_should_skip_edge_cases(
+ self):
line = """\
if True:
x = \\
@@ -4580,7 +4796,8 @@
'--experimental']) as result:
self.assertEqual(fixed, result)
- def test_e501_experimental_should_not_try_to_break_at_every_paren_in_arithmetic(self):
+ def test_e501_experimental_should_not_try_to_break_at_every_paren_in_arithmetic(
+ self):
line = """\
term3 = w6 * c5 * (8.0 * psi4 * (11.0 - 24.0 * t2) - 28 * psi3 * (1 - 6.0 * t2) + psi2 * (1 - 32 * t2) - psi * (2.0 * t2) + t4) / 720.0
this_should_be_shortened = (' ', ' ')
@@ -5218,7 +5435,8 @@
with autopep8_context(line, options=['--experimental']) as result:
self.assertEqual(fixed, result)
- def test_e501_experimental_avoid_breaking_at_empty_parentheses_if_possible(self):
+ def test_e501_experimental_avoid_breaking_at_empty_parentheses_if_possible(
+ self):
line = """\
someverylongindenttionwhatnot().foo().bar().baz("and here is a long string 123456789012345678901234567890")
"""
@@ -5642,6 +5860,36 @@
"""
with autopep8_context(line, options=['--experimental']) as result:
self.assertEqual(fixed, result)
+
+ def test_e501_experimental_with_in(self):
+ line = """\
+if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if k_left in ('any', k_curr) and k_right in ('any', k_curr):
+ pass
+"""
+ fixed = """\
+if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if True:
+ if k_left in (
+ 'any', k_curr) and k_right in (
+ 'any', k_curr):
+ pass
+"""
+ with autopep8_context(line, options=['--experimental']) as result:
+ self.assertEqual(fixed, result)
@contextlib.contextmanager
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package rubygem-highline for openSUSE:Factory checked in at 2015-02-27 11:10:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-highline (Old)
and /work/SRC/openSUSE:Factory/.rubygem-highline.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-highline"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-highline/rubygem-highline.changes 2015-02-20 13:51:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-highline.new/rubygem-highline.changes 2015-02-27 11:10:17.000000000 +0100
@@ -1,0 +2,14 @@
+Thu Feb 26 05:31:14 UTC 2015 - coolo(a)suse.com
+
+- updated to version 1.7.1
+ #### Enhancements
+ * Add travis CI configuration (Eli Young (@elyscape), #130)
+ * Add Rubinius to Build Matrix with Allowed Failure (Brandon Fish
+ (bjfish), #132)
+ * Make some adjustments on tests (Abinoam Marques Jr., #133, #134)
+ * Drop support for Ruby 1.8 (Abinoam Marques Jr., #134)
+
+ #### Bug fixes
+ * Fix IO.console.winsize returning reversed column and line values (Fission Xuiptz (@fissionxuiptz)), #131)
+
+-------------------------------------------------------------------
Old:
----
highline-1.7.0.gem
New:
----
highline-1.7.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-highline.spec ++++++
--- /var/tmp/diff_new_pack.OQZCsZ/_old 2015-02-27 11:10:18.000000000 +0100
+++ /var/tmp/diff_new_pack.OQZCsZ/_new 2015-02-27 11:10:18.000000000 +0100
@@ -24,14 +24,14 @@
#
Name: rubygem-highline
-Version: 1.7.0
+Version: 1.7.1
Release: 0
%define mod_name highline
%define mod_full_name %{mod_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: %{ruby >= 1.9.3}
BuildRequires: %{rubygem gem2rpm}
BuildRequires: %{rubygem rdoc > 3.10}
-BuildRequires: %{ruby}
BuildRequires: ruby-macros >= 5
Url: https://github.com/JEG2/highline
Source: http://rubygems.org/gems/%{mod_full_name}.gem
++++++ highline-1.7.0.gem -> highline-1.7.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/.travis.yml 2015-02-25 01:58:42.000000000 +0100
@@ -0,0 +1,15 @@
+---
+language: ruby
+sudo: false
+script: "bundle exec rake test"
+rvm:
+ - 1.9.3
+ - 2.0.0
+ - 2.1.5
+ - 2.2.0
+ - rbx-2
+notifications:
+ email: false
+matrix:
+ allow_failures:
+ - rvm: rbx-2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Changelog.md new/Changelog.md
--- old/Changelog.md 2015-02-19 20:45:34.000000000 +0100
+++ new/Changelog.md 2015-02-25 01:58:42.000000000 +0100
@@ -2,6 +2,18 @@
Below is a complete listing of changes for each revision of HighLine.
+### 1.7.1 / 2015-02-24
+
+#### Enhancements
+* Add travis CI configuration (Eli Young (@elyscape), #130)
+* Add Rubinius to Build Matrix with Allowed Failure (Brandon Fish
+(bjfish), #132)
+* Make some adjustments on tests (Abinoam Marques Jr., #133, #134)
+* Drop support for Ruby 1.8 (Abinoam Marques Jr., #134)
+
+#### Bug fixes
+* Fix IO.console.winsize returning reversed column and line values (Fission Xuiptz (@fissionxuiptz)), #131)
+
### 1.7.0 / 2015-02-18
#### Bug fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 1970-01-01 01:00:00.000000000 +0100
+++ new/Gemfile 2015-02-25 01:58:42.000000000 +0100
@@ -0,0 +1,9 @@
+source "https://rubygems.org"
+
+gem "rake", :require => false
+gem "rdoc", :require => false
+
+group(:development, :tests) do
+ gem "code_statistics", :require => false
+ gem "test-unit", :require => false
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/INSTALL new/INSTALL
--- old/INSTALL 2015-02-19 20:45:34.000000000 +0100
+++ new/INSTALL 2015-02-25 01:58:42.000000000 +0100
@@ -3,6 +3,10 @@
RubyGems is the preferred easy install method for HighLine. However, you can
install HighLine manually as described below.
+== Requirements
+
+HighLine from version >= 1.7.0 requires ruby >= 1.9.3
+
== Installing the Gem
HighLine is intended to be installed via the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc 2015-02-19 20:45:34.000000000 +0100
+++ new/README.rdoc 2015-02-25 01:58:42.000000000 +0100
@@ -1,7 +1,9 @@
-= Read Me
+= HighLine
by James Edward Gray II
+{<img src="https://travis-ci.org/JEG2/highline.svg" alt="Build Status" />}[https://travis-ci.org/JEG2/highline]
+
== Description
Welcome to HighLine.
@@ -57,6 +59,10 @@
For more examples see the examples/ directory of this project.
+== Requirements
+
+HighLine from version >= 1.7.0 requires ruby >= 1.9.3
+
== Installing
See the INSTALL file for instructions.
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/highline.gemspec new/highline.gemspec
--- old/highline.gemspec 2015-02-19 20:45:34.000000000 +0100
+++ new/highline.gemspec 2015-02-25 01:58:42.000000000 +0100
@@ -33,4 +33,5 @@
END_DESC
spec.add_development_dependency "code_statistics"
+ spec.required_ruby_version = '>= 1.9.3'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/highline/menu.rb new/lib/highline/menu.rb
--- old/lib/highline/menu.rb 2015-02-19 20:45:34.000000000 +0100
+++ new/lib/highline/menu.rb 2015-02-25 01:58:42.000000000 +0100
@@ -345,7 +345,7 @@
# Allows Menu to behave as a String, just like Question. Returns the
# _layout_ to be rendered, which is used by HighLine.say().
#
- def to_str( )
+ def to_s( )
case @layout
when :list
'<%= if @header.nil? then '' else "#{@header}:\n" end %>' +
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/highline/question.rb new/lib/highline/question.rb
--- old/lib/highline/question.rb 2015-02-19 20:45:34.000000000 +0100
+++ new/lib/highline/question.rb 2015-02-25 01:58:42.000000000 +0100
@@ -441,7 +441,7 @@
end
# Stringifies the question to be asked.
- def to_str( )
+ def to_s
@question
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/highline/system_extensions.rb new/lib/highline/system_extensions.rb
--- old/lib/highline/system_extensions.rb 2015-02-19 20:45:34.000000000 +0100
+++ new/lib/highline/system_extensions.rb 2015-02-25 01:58:42.000000000 +0100
@@ -6,7 +6,6 @@
# This is Free Software. See LICENSE and COPYING for details.
require "highline/compatibility"
-require "io/console"
class HighLine
module SystemExtensions
@@ -224,9 +223,14 @@
# A Unix savvy method using stty to fetch the console columns, and rows.
# ... stty does not work in JRuby
def terminal_size
- if (winsize = IO.console.winsize rescue nil)
- winsize
- elsif /solaris/ =~ RUBY_PLATFORM and
+ begin
+ require "io/console"
+ winsize = IO.console.winsize rescue nil
+ return winsize if winsize
+ rescue LoadError
+ end
+
+ if /solaris/ =~ RUBY_PLATFORM and
`stty` =~ /\brows = (\d+).*\bcolumns = (\d+)/
[$2, $1].map { |c| x.to_i }
elsif `stty size` =~ /^(\d+)\s(\d+)$/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/highline/version.rb new/lib/highline/version.rb
--- old/lib/highline/version.rb 2015-02-19 20:45:34.000000000 +0100
+++ new/lib/highline/version.rb 2015-02-25 01:58:42.000000000 +0100
@@ -1,4 +1,4 @@
class HighLine
# The version of the installed library.
- VERSION = "1.7.0".freeze
+ VERSION = "1.7.1".freeze
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/highline.rb new/lib/highline.rb
--- old/lib/highline.rb 2015-02-19 20:45:34.000000000 +0100
+++ new/lib/highline.rb 2015-02-25 01:58:42.000000000 +0100
@@ -1,3 +1,4 @@
+# coding: utf-8
# highline.rb
#
# Created by James Edward Gray II on 2005-04-26.
@@ -722,6 +723,10 @@
statement = wrap(statement) unless @wrap_at.nil?
statement = page_print(statement) unless @page_at.nil?
+ # 'statement' is encoded in US-ASCII when using ruby 1.9.3(-p551)
+ # 'indentation' is correctly encoded (same as default_external encoding)
+ statement = statement.force_encoding(Encoding.default_external)
+
statement = statement.gsub(/\n(?!$)/,"\n#{indentation}") if @multi_indent
statement
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-02-19 20:45:34.000000000 +0100
+++ new/metadata 2015-02-25 01:58:42.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: highline
version: !ruby/object:Gem::Version
- version: 1.7.0
+ version: 1.7.1
platform: ruby
authors:
- James Edward Gray II
autorequire:
bindir: bin
cert_chain: []
-date: 2015-02-19 00:00:00.000000000 Z
+date: 2015-02-25 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: code_statistics
@@ -40,9 +40,11 @@
- LICENSE
files:
- ".gitignore"
+- ".travis.yml"
- AUTHORS
- COPYING
- Changelog.md
+- Gemfile
- INSTALL
- LICENSE
- README.rdoc
@@ -103,7 +105,7 @@
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: '0'
+ version: 1.9.3
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/tc_highline.rb new/test/tc_highline.rb
--- old/test/tc_highline.rb 2015-02-19 20:45:34.000000000 +0100
+++ new/test/tc_highline.rb 2015-02-25 01:58:42.000000000 +0100
@@ -1,3 +1,4 @@
+# encoding: utf-8
# tc_highline.rb
#
# Created by James Edward Gray II on 2005-04-26.
@@ -248,14 +249,22 @@
end
def test_readline_mode
+ # Rubinius seems to be ignoring Readline input
+ # and output assignments. This ruins testing.
+ # but it doesn't mean readline is not working
+ # properly on rubinius.
+
+ return if RUBY_ENGINE == "rbx"
+
# Creating Tempfiles here because Readline.input
# and Readline.output only accepts a File object
# as argument (not any duck type as StringIO)
- temp_stdin = Tempfile.create "temp_stdin"
- temp_stdout = Tempfile.create "temp_stdout"
- Readline.input = @input = temp_stdin
- Readline.output = @output = temp_stdout
+ temp_stdin = Tempfile.new "temp_stdin"
+ temp_stdout = Tempfile.new "temp_stdout"
+
+ Readline.input = @input = File.open(temp_stdin.path, 'w+')
+ Readline.output = @output = File.open(temp_stdout.path, 'w+')
@terminal = HighLine.new(@input, @output)
@@ -270,7 +279,7 @@
output = @output.read
assert_equal "any input", answer
- assert_equal "Prompt: any input\n", output
+ assert_match "Prompt: any input\n", output
@input.close
@output.close
@@ -279,11 +288,11 @@
end
def test_readline_mode_with_limit_set
- temp_stdin = Tempfile.create "temp_stdin"
- temp_stdout = Tempfile.create "temp_stdout"
+ temp_stdin = Tempfile.new "temp_stdin"
+ temp_stdout = Tempfile.new "temp_stdout"
- Readline.input = @input = temp_stdin
- Readline.output = @output = temp_stdout
+ Readline.input = @input = File.open(temp_stdin.path, 'w+')
+ Readline.output = @output = File.open(temp_stdout.path, 'w+')
@terminal = HighLine.new(@input, @output)
@@ -578,7 +587,7 @@
q.glob = "*.rb"
end
assert_instance_of(File, file)
- assert_equal("# tc_highline.rb\n", file.gets)
+ assert_equal("# encoding: utf-8\n", file.gets)
file.close
@input.rewind
@@ -926,7 +935,7 @@
q.echo = false
end
- refute_equal("password", answer)
+ assert_not_equal("password", answer)
assert_equal("passwor", answer)
end
@@ -938,7 +947,7 @@
q.echo = false
end
- refute_equal("maçã", answer)
+ assert_not_equal("maçã", answer)
assert_equal("maç", answer)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/tc_menu.rb new/test/tc_menu.rb
--- old/test/tc_menu.rb 2015-02-19 20:45:34.000000000 +0100
+++ new/test/tc_menu.rb 2015-02-25 01:58:42.000000000 +0100
@@ -1,4 +1,4 @@
-# encoding: utf-8
+# coding: utf-8
# tc_menu.rb
#
# Created by Gregory Thomas Brown on 2005-05-10.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/tc_string_extension.rb new/test/tc_string_extension.rb
--- old/test/tc_string_extension.rb 2015-02-19 20:45:34.000000000 +0100
+++ new/test/tc_string_extension.rb 2015-02-25 01:58:42.000000000 +0100
@@ -20,13 +20,14 @@
def test_Highline_String_is_yaml_serializable
require 'yaml'
+ unless Gem::Version.new(YAML::VERSION) < Gem::Version.new("2.0.2")
+ highline_string = HighLine::String.new("Yaml didn't messed with HighLine::String")
+ yaml_highline_string = highline_string.to_yaml
+ yaml_loaded_string = YAML.load(yaml_highline_string)
- highline_string = HighLine::String.new("Yaml didn't messed with HighLine::String")
- yaml_highline_string = highline_string.to_yaml
- yaml_loaded_string = YAML.load(yaml_highline_string)
-
- assert_equal "Yaml didn't messed with HighLine::String", yaml_loaded_string
- assert_equal highline_string, yaml_loaded_string
- assert_instance_of HighLine::String, yaml_loaded_string
+ assert_equal "Yaml didn't messed with HighLine::String", yaml_loaded_string
+ assert_equal highline_string, yaml_loaded_string
+ assert_instance_of HighLine::String, yaml_loaded_string
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/tc_style.rb new/test/tc_style.rb
--- old/test/tc_style.rb 2015-02-19 20:45:34.000000000 +0100
+++ new/test/tc_style.rb 2015-02-25 01:58:42.000000000 +0100
@@ -569,7 +569,7 @@
bright_style = @style1.bright
light_style = @style1.light
- refute_equal bright_style, light_style
+ assert_not_equal bright_style, light_style
assert_equal :bright_foo, bright_style.name
assert_equal :light_foo, light_style.name
assert_equal bright_style.code, light_style.code
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package mksusecd for openSUSE:Factory checked in at 2015-02-27 11:10:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mksusecd (Old)
and /work/SRC/openSUSE:Factory/.mksusecd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mksusecd"
Changes:
--------
--- /work/SRC/openSUSE:Factory/mksusecd/mksusecd.changes 2015-02-25 02:18:30.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.mksusecd.new/mksusecd.changes 2015-02-27 11:10:16.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Feb 26 15:21:12 CET 2015 - snwint(a)suse.com
+
+- replace content.key with actual signing key used
+- handle duplicate filenames
+- 1.14
+
+-------------------------------------------------------------------
Old:
----
mksusecd-1.13.tar.xz
New:
----
mksusecd-1.14.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mksusecd.spec ++++++
--- /var/tmp/diff_new_pack.Ev9tXd/_old 2015-02-27 11:10:16.000000000 +0100
+++ /var/tmp/diff_new_pack.Ev9tXd/_new 2015-02-27 11:10:16.000000000 +0100
@@ -29,7 +29,7 @@
Summary: Create SUSE Linux installation ISOs
License: GPL-3.0+
Group: Hardware/Other
-Version: 1.13
+Version: 1.14
Release: 0
Source: %{name}-%{version}.tar.xz
Url: https://github.com/wfeldt/mksusecd
++++++ mksusecd-1.13.tar.xz -> mksusecd-1.14.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.13/VERSION new/mksusecd-1.14/VERSION
--- old/mksusecd-1.13/VERSION 2015-02-24 14:20:20.000000000 +0100
+++ new/mksusecd-1.14/VERSION 2015-02-26 15:18:26.000000000 +0100
@@ -1 +1 @@
-1.13
+1.14
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.13/changelog new/mksusecd-1.14/changelog
--- old/mksusecd-1.13/changelog 2015-02-24 14:20:20.000000000 +0100
+++ new/mksusecd-1.14/changelog 2015-02-26 15:18:26.000000000 +0100
@@ -1,3 +1,7 @@
+2015-02-26: 1.14
+ - replace content.key with actual signing key used
+ - handle duplicate filenames
+
2015-02-24: 1.13
- support initrds with pre-sle12 key management
- support adding driver updates to initrd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.13/mksusecd new/mksusecd-1.14/mksusecd
--- old/mksusecd-1.13/mksusecd 2015-02-24 14:20:20.000000000 +0100
+++ new/mksusecd-1.14/mksusecd 2015-02-26 15:18:26.000000000 +0100
@@ -593,7 +593,10 @@
for my $s (@sources) {
File::Find::find({
wanted => sub {
- $files->{$1} = $s->{dir} if m#^$s->{dir}/(.+)#;
+ if(m#^$s->{dir}/(.+)#) {
+ push @{$mkisofs->{exclude}}, "$files->{$1}/$1" if $files->{$1};
+ $files->{$1} = $s->{dir};
+ }
},
no_chdir => 1
}, $s->{dir});
@@ -707,7 +710,7 @@
my $f = fname($_[0]);
my $n;
- return unless defined $f;
+ return undef unless defined $f;
# we may already have a copy...
if($f eq "$tmp_new/$_[0]") {
@@ -1847,7 +1850,7 @@
%no-protection
%transient-key
Key-Type: default
-Name-Real: mksusecd
+Name-Real: mksusecd Signing Key
Name-Comment: transient key
%pubring mksusecd.pub
%secring mksusecd.sec
@@ -1942,8 +1945,15 @@
return if !$sign_key_dir;
my $c = copy_file "content";
+ return if !defined $c;
+
+ my $k = copy_file "content.key";
+ return if !defined $k;
+
copy_file "content.asc";
+ system "cp $sign_key_pub $k";
+
print "re-signing '/content'\n" if $opt_verbose >= 1;
system "gpg --homedir=$sign_key_dir --batch --yes --armor --detach-sign $c";
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0