Your message dated Sun, 06 Sep 2015 22:19:24 +0000
with message-id <e1zyihu-0006a1...@franck.debian.org>
and subject line Bug#795910: fixed in python-yaql 0.2.3-2+deb8u1
has caused the Debian Bug report #795910,
regarding python3-yaql: yaql not working: ImportError: No module named 'context'
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
795910: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795910
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python3-yaql
Version: 0.2.3-2
Severity: grave
Tags: patch
Justification: renders package unusable

yaql (python 3 package) fails to launch or import because uses python 2 syntax.

2to3 seams to fix the issue.


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-updates'), (500, 'stable-
updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=es_UY.UTF-8, LC_CTYPE=es_UY.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-yaql depends on:
ii  dpkg         1.18.2
ii  python3-ply  3.4-5
ii  python3.4    3.4.3-7
pn  python3:any  <none>

python3-yaql recommends no packages.

python3-yaql suggests no packages.
--- yaql/__init__.py	(original)
+++ yaql/__init__.py	(refactored)
@@ -12,8 +12,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import parser
-import context
+from . import parser
+from . import context
 from yaql.functions import builtin, extended
 
 __versioninfo__ = (0, 2, 3)
--- yaql/context.py	(original)
+++ yaql/context.py	(refactored)
@@ -14,7 +14,7 @@
 
 from functools import wraps
 import inspect
-from exceptions import NoArgumentFound
+from .exceptions import NoArgumentFound
 
 
 class Context():
--- yaql/exceptions.py	(original)
+++ yaql/exceptions.py	(refactored)
@@ -20,9 +20,9 @@
 
 class NoFunctionRegisteredException(YaqlException):
     def __init__(self, func_name, arg_num=None):
-        self.func_name = func_name
+        self.__name__ = func_name
         self.arg_num = arg_num
-        msg = "No function called '{0}' is registered".format(self.func_name)
+        msg = "No function called '{0}' is registered".format(self.__name__)
         if self.arg_num:
             msg += " which has {0} arguments".format(self.arg_num)
         super(NoFunctionRegisteredException, self).__init__(msg)
--- yaql/expressions.py	(original)
+++ yaql/expressions.py	(refactored)
@@ -13,8 +13,8 @@
 #    under the License.
 
 import types
-from context import *
-from exceptions import YaqlExecutionException, NoFunctionRegisteredException
+from .context import *
+from .exceptions import YaqlExecutionException, NoFunctionRegisteredException
 import yaql
 
 
@@ -87,7 +87,7 @@
                         fs = self._try_invoke(
                             resolvers,
                             [self.function_name, this], context) or []
-                        if not isinstance(fs, types.ListType):
+                        if not isinstance(fs, list):
                             fs = [fs]
                     except YaqlExecutionException:
                         fs = []
@@ -223,7 +223,7 @@
             ok = True
             if arg_type:
                 ok = ok and isinstance(arg_val, arg_type)
-                if type(arg_val) == types.BooleanType:
+                if type(arg_val) == bool:
                     ok = ok and type(arg_val) == arg_type
             if custom_validator:
                 ok = ok and custom_validator(arg_val)
--- yaql/parser.py	(original)
+++ yaql/parser.py	(refactored)
@@ -14,9 +14,9 @@
 
 import types
 import ply.yacc as yacc
-import expressions
-import exceptions
-import lexer
+from . import expressions
+from . import exceptions
+from . import lexer
 import tempfile
 
 
@@ -96,7 +96,7 @@
     """
     func : value '.' FUNC arg ')'
     """
-    if isinstance(p[4], types.ListType):
+    if isinstance(p[4], list):
         arg = p[4]
     else:
         arg = [p[4]]
@@ -114,7 +114,7 @@
     """
     func : FUNC arg ')'
     """
-    if isinstance(p[2], types.ListType):
+    if isinstance(p[2], list):
         arg = p[2]
     else:
         arg = [p[2]]
@@ -126,11 +126,11 @@
     arg : arg ',' arg
     """
     val_list = []
-    if isinstance(p[1], types.ListType):
+    if isinstance(p[1], list):
         val_list += p[1]
     else:
         val_list.append(p[1])
-    if isinstance(p[3], types.ListType):
+    if isinstance(p[3], list):
         val_list += p[3]
     else:
         val_list.append(p[3])
--- yaql/utils.py	(original)
+++ yaql/utils.py	(refactored)
@@ -18,9 +18,9 @@
 
 def limit(generator, limit=MAX_GENERATOR_ITEMS):
     res = []
-    for i in xrange(limit):
+    for i in range(limit):
         try:
-            res.append(generator.next())
+            res.append(next(generator))
         except StopIteration:
             return res
     raise YaqlSequenceException(limit)
--- yaql/cli/cli_functions.py	(original)
+++ yaql/cli/cli_functions.py	(refactored)
@@ -31,7 +31,7 @@
 @ContextAware()
 def main(context):
     print("Yet Another Query Language - command-line query tool")
-    print("Version {0}".format(version))
+    print(("Version {0}".format(version)))
     print("Copyright (c) 2013 Mirantis, Inc")
     print("")
     if not context.get_data():
@@ -44,7 +44,7 @@
     comm = True
     while comm != 'exit':
         try:
-            comm = raw_input(PROMPT)
+            comm = input(PROMPT)
         except EOFError:
             return
         if not comm:
@@ -52,7 +52,7 @@
         if comm[0] == '@':
             funcName, args = parse_service_command(comm)
             if funcName not in SERVICE_FUNCTIONS:
-                print("Unknown command " + funcName)
+                print(("Unknown command " + funcName))
             else:
                 SERVICE_FUNCTIONS[funcName](args, context)
             continue
@@ -62,17 +62,17 @@
             if ex.position:
                 pointer_string = (" " * (ex.position + len(PROMPT))) + '^'
                 print(pointer_string)
-            print(ex.message)
+            print((ex.message))
             continue
         try:
             res = expr.evaluate(context=Context(context))
             if isinstance(res, types.GeneratorType):
                 res = limit(res)
-            print(json.dumps(res, indent=4))
+            print((json.dumps(res, indent=4)))
         except Exception as ex:
             print("Execution exception:")
             if hasattr(ex, 'message'):
-                print(ex.message)
+                print((ex.message))
             else:
                 print("Unknown")
 
@@ -81,17 +81,17 @@
     try:
         json_str = open(os.path.expanduser(data_file)).read()
     except IOError as e:
-        print("Unable to read data file '{0}': {1}".format(data_file,
-                                                           e.strerror))
+        print(("Unable to read data file '{0}': {1}".format(data_file,
+                                                           e.strerror)))
         return
     try:
         decoder = JSONDecoder()
         data = decoder.decode(json_str)
     except Exception as e:
-        print("Unable to parse data: " + e.message)
+        print(("Unable to parse data: " + e.message))
         return
     context.set_data(data)
-    print("Data from file '{0}' loaded into context".format(data_file))
+    print(("Data from file '{0}' loaded into context".format(data_file)))
 
 
 
--- yaql/cli/run.py	(original)
+++ yaql/cli/run.py	(refactored)
@@ -30,7 +30,7 @@
             decoder = JSONDecoder()
             data = decoder.decode(json_str)
         except:
-            print("Unable to load data from "+options.data)
+            print(("Unable to load data from "+options.data))
             return
     else:
         data = None
--- yaql/functions/builtin.py	(original)
+++ yaql/functions/builtin.py	(refactored)
@@ -21,7 +21,7 @@
 
 
 def _get_att_or_key(item, value):
-    if isinstance(item, types.DictionaryType):
+    if isinstance(item, dict):
         return item.get(value)
     return getattr(item, value)
 
@@ -35,20 +35,20 @@
 
 
 @EvalArg('self', arg_type=collections.Iterable,
-         custom_validator=lambda v: not isinstance(v, types.DictionaryType)
-         and not isinstance(v, types.StringTypes))
+         custom_validator=lambda v: not isinstance(v, dict)
+         and not isinstance(v, str))
 def collection_attribution(self, att_name):
     for item in self:
         val = _get_att_or_key(item, att_name())
         if isinstance(val, collections.Iterable) and \
-                not isinstance(val, types.StringTypes):
+                not isinstance(val, str):
             for v in val:
                 yield v
         else:
             yield val
 
 
-@EvalArg('self', arg_type=types.DictionaryType)
+@EvalArg('self', arg_type=dict)
 def dict_attribution(self, arg_name):
     return self.get(arg_name())
 
@@ -63,7 +63,7 @@
 
 # Collection filtering
 
-@EvalArg("index", types.IntType)
+@EvalArg("index", int)
 def get_by_index(this, index):
     this = this()
     if isinstance(this, types.GeneratorType):
@@ -72,11 +72,11 @@
 
 
 @EvalArg("self", arg_type=collections.Iterable,
-         custom_validator=lambda v: not isinstance(v, types.StringTypes))
+         custom_validator=lambda v: not isinstance(v, str))
 def filter_by_predicate(self, predicate):
     for item in self:
         r = predicate(item)
-        if not isinstance(r, types.BooleanType):
+        if not isinstance(r, bool):
             raise YaqlExecutionException()
         if r is True:
             yield item
@@ -132,19 +132,19 @@
 
 # Boolean operations
 
-@EvalArg('a', arg_type=types.BooleanType)
-@EvalArg('b', arg_type=types.BooleanType)
+@EvalArg('a', arg_type=bool)
+@EvalArg('b', arg_type=bool)
 def _and(a, b):
     return a and b
 
 
-@EvalArg('a', arg_type=types.BooleanType)
-@EvalArg('b', arg_type=types.BooleanType)
+@EvalArg('a', arg_type=bool)
+@EvalArg('b', arg_type=bool)
 def _or(a, b):
     return a or b
 
 
-@EvalArg('self', arg_type=types.BooleanType)
+@EvalArg('self', arg_type=bool)
 def _not(self):
     return not self
 
@@ -186,7 +186,7 @@
 
 @EvalArg('value')
 def to_bool(value):
-    if isinstance(value, types.StringTypes):
+    if isinstance(value, str):
         if value.lower() == 'false':
             return False
     return bool(value)
--- yaql/functions/extended.py	(original)
+++ yaql/functions/extended.py	(refactored)
@@ -38,7 +38,7 @@
 
 
 def _range_limited(start, end):
-    for i in xrange(int(start()), int(end())):
+    for i in range(int(start()), int(end())):
         yield i
 
 
@@ -66,7 +66,7 @@
 
 
 @ContextAware()
-@EvalArg('levels', types.IntType)
+@EvalArg('levels', int)
 def parent(context, levels, func):
     con = context
     traversed = 0
@@ -113,7 +113,7 @@
     self = self()
     for cond in conditions:
         res = cond(self)
-        if not isinstance(res, types.TupleType):
+        if not isinstance(res, tuple):
             raise YaqlExecutionException("Switch must have tuple parameters")
         if len(res) != 2:
             raise YaqlExecutionException("Switch tuples must be of size 2")

--- End Message ---
--- Begin Message ---
Source: python-yaql
Source-Version: 0.2.3-2+deb8u1

We believe that the bug you reported is fixed in the latest version of
python-yaql, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 795...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Thomas Goirand <z...@debian.org> (supplier of updated python-yaql package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 28 Aug 2015 10:46:10 +0200
Source: python-yaql
Binary: python-yaql
Architecture: source all
Version: 0.2.3-2+deb8u1
Distribution: jessie-proposed-updates
Urgency: medium
Maintainer: PKG OpenStack <openstack-de...@lists.alioth.debian.org>
Changed-By: Thomas Goirand <z...@debian.org>
Description:
 python-yaql - Yet Another Query Language - Python 2.x
Closes: 795910
Changes:
 python-yaql (0.2.3-2+deb8u1) jessie-proposed-updates; urgency=medium
 .
   * Removed python3-yaql package: it's not working, and nothing depends on it
     (Closes: #795910).
Checksums-Sha1:
 de826234d984dbc486c6206ed6d2dbe6d02da9c8 2009 python-yaql_0.2.3-2+deb8u1.dsc
 347cd06bdb471c4b55f58228b1875419b4ea249a 4324 
python-yaql_0.2.3-2+deb8u1.debian.tar.xz
 fd162b613b9e25e5f56c9879cecde0fc8a64acf1 12006 
python-yaql_0.2.3-2+deb8u1_all.deb
Checksums-Sha256:
 c0c095bad2e32bdd72afb2b738bb12fcc6eea4f09123974d5e20f3c2711e2057 2009 
python-yaql_0.2.3-2+deb8u1.dsc
 8cff2e80df24e2c47063c07acecc219e4739447f4cad7c9714e28eb65f8273ed 4324 
python-yaql_0.2.3-2+deb8u1.debian.tar.xz
 c5bec7551797ab995714170fb7dc747a461611f58f81c6eb0fcad490593bc085 12006 
python-yaql_0.2.3-2+deb8u1_all.deb
Files:
 c4f0f3fa1fb97e8cc3a488077a9616df 2009 python optional 
python-yaql_0.2.3-2+deb8u1.dsc
 32fcefc2cf85e96e0b05dc0ff920f0af 4324 python optional 
python-yaql_0.2.3-2+deb8u1.debian.tar.xz
 86a4435884854cc8e9b87a707fe6e0b2 12006 python optional 
python-yaql_0.2.3-2+deb8u1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJV4CE6AAoJENQWrRWsa0P+vdQP/3vBlA59f9NSN6BrQWz1ALTw
WnuVuiOl2mxlw/mVek29teNWB3A1ZeKMwGVq6UXyzYRDooHkuQCsaVjXXB4eKH6I
7Ptz2xcyxLMrpoAPmQYxOsq4icKRmZxLs6WmHqv41sVOW658dRlH+tQ9OFRLf8nf
cmQtLfn0Iylev7aMsv/ErMs9kYciWNts0WO0QTPkDR/9dmqCrhds65DlBP6mlWpa
qioozRL6sqzx+8hxFJOGgxhqgTVArUELZRR9iJwbC8rH0k/viGqRVCTV1wnPVdll
qRo9ih2jicV8FQkhRa4BRbnujW+k0q916dROqBq5pekXJqMD/CvI5I8n6WoQ3xBN
ixh3RJx+tOnSH3uszaaGVB1+iFKES1JPqQT9VCmN/tklK4iY9XGK/z8MpoGQut6j
FSiPI+Ae/6NkR+3fs0GuVeBC+YYczlyvhYC9eGZxC4Ws/iCE/k11bWDEuz7OBF6I
pLc+Y3twB8aye0o/Va0Z5CCXdq0a+Y18To7s1CI/VfmeOxKeYKMlzQMDy/W7Mz3M
owQMTBa25hwLaXPYIPBrBI6tsg8etqKpRsxdxeu6qgLs5rWYX8rRpIz69L6tTqdA
1Rc/cYZT5hTAvZuSpZOFiU5EXkB78bDA17PmImIwmj2/fH6bGvKl/QMa8/akkTfH
hqB8yOschczCiUaqVvge
=8tMS
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to