Git Product home page Git Product logo

Comments (10)

pylint-bot avatar pylint-bot commented on May 28, 2024

Original comment by BitBucket: idella5:


On the assumption that you can actually replicate, it appears to me that the missing ancestors in pylint/checkers/logging.py and infer from pylint/checkers/utils.py, on this system at least it appears that they are missing the imports from astng.

logilab.astng.scoped_nodes.Class.ancestors for ancestors() for one. I'm sure you can polish it off from here, I wouldn't want to steal yr thunder.

from pylint.

pylint-bot avatar pylint-bot commented on May 28, 2024

Original comment by Sylvain Thénault (BitBucket: sthenault, GitHub: @sthenault?):


IIRC this has been fixed in astng. You should try using the latest release or a mercurial checkout and it should disappear.

from pylint.

pylint-bot avatar pylint-bot commented on May 28, 2024

Original comment by BitBucket: idella5:


~/cvsPortage/gentoo-x86/dev-python/pylint $ ebuild pylint-0.27.0-r1.ebuild clean test


Ran 856 test cases in 23.65s (23.07s CPU), 3 skipped
All 11 modules OK

dev-python/pylint $ eix astng
[D] dev-python/astng
Available versions: 0.20.3

yep, good thx

from pylint.

pylint-bot avatar pylint-bot commented on May 28, 2024

Original comment by Sylvain Thénault (BitBucket: sthenault, GitHub: @sthenault?):


bad astng version

from pylint.

pylint-bot avatar pylint-bot commented on May 28, 2024

Original comment by BitBucket: idella5:


a half hour is more than long enough to look for something so well hidden as an issue maker for astng. On BOTH the logilab site and here @ bitbucket at the astng sites there was NEVER a cmd button to add / make an issue. Is there something special with astng???
Feel free to copy paste it at leisure to the apt location since you have a tie to things logilab.

========================  unittest_utils.py  =========================
...
=====================  unittest_scoped_nodes.py  =====================
................................S....F......
======================================================================
FAIL: test_getattr (unittest_scoped_nodes.ModuleNodeTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_scoped_nodes.py", line 78, in test_getattr
    self.assertIsInstance(spawn, nodes.Class)
  File "/usr/lib64/python3.2/site-packages/logilab/common/testlib.py", line 1102, in assertIsInstance
    self.assertTrue(isinstance(obj, klass), msg)
  File "/usr/lib64/python3.2/unittest/case.py", line 506, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true : YES is not an instance of <class 'logilab.astng.scoped_nodes.Class'> but of <class 'logilab.astng.bases._Yes'>

                              no stdout                               
                              no stderr                               

........E............
======================================================================
ERROR: test_generator_attributes (unittest_lookup.LookupTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_lookup.py", line 228, in test_generator_attributes
    self.assertIsInstance(gener.getattr('next')[0], Function)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/bases.py", line 160, in getattr
    return self._proxied.getattr(name, context)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/scoped_nodes.py", line 886, in getattr
    raise NotFoundError(name)
logilab.astng.exceptions.NotFoundError: next

                              no stdout                               
                              no stderr                               

..S.F.F
======================================================================
FAIL: test_numpy_crash (unittest_regrtest.NonRegressionTC)
test don't crash on numpy
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_regrtest.py", line 136, in test_numpy_crash
    self.assertIsInstance(infered[0], Instance)
  File "/usr/lib64/python3.2/site-packages/logilab/common/testlib.py", line 1102, in assertIsInstance
    self.assertTrue(isinstance(obj, klass), msg)
  File "/usr/lib64/python3.2/unittest/case.py", line 506, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true : YES is not an instance of <class 'logilab.astng.bases.Instance'> but of <class 'logilab.astng.bases._Yes'>

                              no stdout                               
                              no stderr                               
======================================================================
FAIL: test_pylint_config_attr (unittest_regrtest.NonRegressionTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_regrtest.py", line 111, in test_pylint_config_attr
    expect)
  File "/usr/lib64/python3.2/unittest/case.py", line 831, in assertListEqual
    self.assertSequenceEqual(list1, list2, msg, seq_type=list)
  File "/usr/lib64/python3.2/unittest/case.py", line 813, in assertSequenceEqual
    self.fail(msg)
  File "/usr/lib64/python3.2/unittest/case.py", line 494, in fail
    raise self.failureException(msg)
AssertionError: Lists differ: ['MessagesHandlerMixIn', 'Repo... != ['OptionsManagerMixIn', 'objec...

First differing element 0:
MessagesHandlerMixIn
OptionsManagerMixIn

Second list contains 3 additional elements.
First extra element 5:
BaseChecker

+ ['OptionsManagerMixIn',
+  'object',
- ['MessagesHandlerMixIn',
? ^

+  'MessagesHandlerMixIn',
? ^

   'ReportsHandlerMixIn',
   'BaseRawChecker',
   'BaseChecker',
+  'OptionsProviderMixIn',
   'ASTWalker']

                              no stdout                               
                              no stderr                               

.......................F......................S.....S............FF.........S..
======================================================================
FAIL: test_builtin_help (unittest_inference.InferenceTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_inference.py", line 701, in test_builtin_help
    self.assertIsInstance(infered[0], Instance)
  File "/usr/lib64/python3.2/site-packages/logilab/common/testlib.py", line 1102, in assertIsInstance
    self.assertTrue(isinstance(obj, klass), msg)
  File "/usr/lib64/python3.2/unittest/case.py", line 506, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true : YES is not an instance of <class 'logilab.astng.bases.Instance'> but of <class 'logilab.astng.bases._Yes'>

                              no stdout                               
                              no stderr                               
======================================================================
FAIL: test_python25_relative_import (unittest_inference.InferenceTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_inference.py", line 939, in test_python25_relative_import
    self.assertIsInstance(infered, nodes.Module)
  File "/usr/lib64/python3.2/site-packages/logilab/common/testlib.py", line 1102, in assertIsInstance
    self.assertTrue(isinstance(obj, klass), msg)
  File "/usr/lib64/python3.2/unittest/case.py", line 506, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true : YES is not an instance of <class 'logilab.astng.scoped_nodes.Module'> but of <class 'logilab.astng.bases._Yes'>

                              no stdout                               
                              no stderr                               
======================================================================
FAIL: test_qqch (unittest_inference.InferenceTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_inference.py", line 501, in test_qqch
    set([nodes.Const, YES.__class__]))
  File "/usr/lib64/python3.2/unittest/case.py", line 885, in assertSetEqual
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib64/python3.2/unittest/case.py", line 494, in fail
    raise self.failureException(msg)
AssertionError: Items in the second set but not the first:
<class 'logilab.astng.node_classes.Const'>

                              no stdout                               
                              no stderr                               
S....................F.....S....
======================================================================
FAIL: test_from_self_resolve (unittest_nodes.ImportNodeTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_nodes.py", line 233, in test_from_self_resolve
    self.assertTrue(isinstance(spawn, nodes.Class), spawn)
  File "/usr/lib64/python3.2/unittest/case.py", line 506, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true : YES

                              no stdout                               
                              no stderr                               
======================================================================
SKIPPED: test_linenumbering (unittest_nodes.ArgumentsNodeTC)
    FIXME  http://bugs.python.org/issue10445 (no line number on function args)
======================================================================
SKIPPED: test_tuple_attribute (unittest_nodes.TryExcept2xNodeTC)
    syntax removed from py3.x
*******************************************************************************
Ran 245 test cases in 1.56s (1.55s CPU), 1 errors, 7 failures, 11 skipped
5 modules OK (5 failed)
failures: /mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_scoped_nodes [1/43], /mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_lookup [1/21], /mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_regrtest [2/6], /mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_inference [3/76], /mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_nodes [1/30]
 * ERROR: dev-python/astng-0.24.3 failed (test phase):
 *   Tests fail with python3.2

I found a testrun from you possibly in a debian system about mid May. These ones appear to be quite a different set.
I am rather puzzled by
FAIL: test_python25_relative_import (unittest_inference.InferenceTC)
in a py3 run!!

from pylint.

pylint-bot avatar pylint-bot commented on May 28, 2024

Original comment by BitBucket: idella5:


How odd. It's nowhere near that bad. From the ebuild you actually need unset PYTHONPATH to run pytest. First time for everything.

........E............
======================================================================
ERROR: test_generator_attributes (unittest_lookup.LookupTC)
----------------------------------------------------------------------
   File "/usr/lib64/python3.2/site-packages/logilab/astng/scoped_nodes.py", line 886, in getattr
    raise NotFoundError(name)
logilab.astng.exceptions.NotFoundError: next

                              no stdout                               
                              no stderr                               

..S.F..
======================================================================
FAIL: test_numpy_crash (unittest_regrtest.NonRegressionTC)
test don't crash on numpy
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/mnt/gen2/TmpDir/portage/dev-python/astng-0.24.3/work/logilab-astng-0.24.3-python3_2/test/lib/logilab_astng-0.24.3-py3.2.egg/logilab/astng/test/unittest_regrtest.py", line 136, in test_numpy_crash

    raise self.failureException(msg)
AssertionError: False is not true : YES is not an instance of <class 'logilab.astng.bases.Instance'> but of <class 'logilab.astng.bases._Yes'>

                              no stdout                               
                              no stderr                               

Ran 245 test cases in 1.87s (1.85s CPU), 1 errors, 1 failures, 11 skipped
8 modules OK (2 failed)

Only 2. run from the source for py3 gets around 6. py2 passes. pypy2 fails the same 2 as py3.

from pylint.

pylint-bot avatar pylint-bot commented on May 28, 2024

Original comment by Sylvain Thénault (BitBucket: sthenault, GitHub: @sthenault?):


we're currently running during the pylint 1.0 sprint. There we've been renamed astng to astroid: https://bitbucket.org/logilab/astroid. You should be able to submit issue there.

We're also working on python3 support and I think this problem has been fixed

from pylint.

pylint-bot avatar pylint-bot commented on May 28, 2024

Original comment by BitBucket: idella5:


pk good thx for that info. I shall get to it soonish

from pylint.

pylint-bot avatar pylint-bot commented on May 28, 2024

Original comment by BitBucket: idella5:


for what it's worth the fix I declared was actually pertinent in version 0.27.0
The oft repeated

'Function' object has no attribute 'ancestors' AttributeError: 'tuple' object has no attribute 'infer' && 'ancestors' has indeed disappeared. On revisiting from athose 3 days ago, the first mentioned

TypeError: coercing to Unicode: need string or buffer, NoneType found AttributeError:

still occurs 4 times, the test named test_functionality in fact belongs to both
class LintTestUsingModule(testlib.TestCase):
and
class LintTestUsingFile(LintTestUsingModule):

the 2 tests of the same name or called twice, once each by
test_format.py && test_func.py

from pylint.

pylint-bot avatar pylint-bot commented on May 28, 2024

Original comment by Sylvain Thénault (BitBucket: sthenault, GitHub: @sthenault?):


Removing version: 1.0 (automated comment)

from pylint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.