[Python-modules-commits] [astroid] 01/05: Import astroid_1.4.9.orig.tar.gz

Sandro Tosi morph at moszumanska.debian.org
Thu Jan 5 18:50:29 UTC 2017


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository astroid.

commit 809070c4cabba1876402ae620927394351313e8d
Author: Sandro Tosi <morph at debian.org>
Date:   Thu Jan 5 13:06:52 2017 -0500

    Import astroid_1.4.9.orig.tar.gz
---
 ChangeLog                       |  10 +++
 PKG-INFO                        | 158 ++++++++++++++++++++--------------------
 astroid.egg-info/PKG-INFO       | 158 ++++++++++++++++++++--------------------
 astroid/__pkginfo__.py          |   2 +-
 astroid/brain/brain_pytest.py   | 107 +++++++++++++++++++--------
 astroid/modutils.py             |   2 +-
 astroid/tests/unittest_brain.py |  13 ++--
 setup.cfg                       |  16 ++--
 8 files changed, 262 insertions(+), 204 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6009565..80c08c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,16 @@
 Change log for the astroid package (used to be astng)
 =====================================================
 
+2016-12-18 -- 1.4.9
+
+    * Cast __path__ to a list in _module_file
+
+      _path__ can be an '_frozen_importlib_external._NamespacePath'
+      object for a namespace module (declared by setuptools) with python 3.5+
+      This should prevent a crash ocurring when working with namespace packages.
+
+    * Add support for pytest 3.0.
+
 2016-07-27 -- 1.4.8
 
     * Add `returns` into the proper order in FunctionDef._astroid_fields
diff --git a/PKG-INFO b/PKG-INFO
index 029a131..a428e92 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,79 +1,79 @@
-Metadata-Version: 1.1
-Name: astroid
-Version: 1.4.8
-Summary: A abstract syntax tree for Python with inference support.
-Home-page: https://github.com/PyCQA/astroid
-Author: Python Code Quality Authority
-Author-email: code-quality at python.org
-License: LGPL
-Description: .. image:: https://drone.io/bitbucket.org/logilab/astroid/status.png
-            :alt: drone.io Build Status
-            :target: https://drone.io/bitbucket.org/logilab/astroid
-        
-        Astroid
-        =======
-        
-        What's this?
-        ------------
-        
-        The aim of this module is to provide a common base representation of
-        python source code for projects such as pychecker, pyreverse,
-        pylint... Well, actually the development of this library is essentially
-        governed by pylint's needs. It used to be called logilab-astng.
-        
-        It provides a compatible representation which comes from the `_ast`
-        module.  It rebuilds the tree generated by the builtin _ast module by
-        recursively walking down the AST and building an extended ast. The new
-        node classes have additional methods and attributes for different
-        usages.  They include some support for static inference and local name
-        scopes.  Furthermore, astroid builds partial trees by inspecting living
-        objects.
-        
-        Main modules are:
-        
-        * `bases`, `node_classses` and `scoped_nodes` contain the classes for the
-          different type of nodes of the tree.
-        
-        * the `manager` contains a high level object to get astroid trees from
-          source files and living objects. It maintains a cache of previously
-          constructed tree for quick access.
-        
-        
-        Installation
-        ------------
-        
-        Extract the tarball, jump into the created directory and run::
-        
-        	python setup.py install
-        
-        For installation options, see::
-        
-        	python setup.py install --help
-        
-        
-        If you have any questions, please mail the code-quality at python.org
-        mailing list for support. See
-        http://mail.python.org/mailman/listinfo/code-quality for subscription
-        information and archives. You may find older archives at
-        http://lists.logilab.org/mailman/listinfo/python-projects .
-        
-        Python Versions
-        ---------------
-        
-        astroid is compatible with Python 2.7 as well as 3.3 and later. astroid uses
-        the same code base for both Python versions, using six.
-        
-        Test
-        ----
-        
-        Tests are in the 'test' subdirectory. To launch the whole tests suite
-        at once, you can use unittest discover::
-        
-          python -m unittest discover -p "unittest*.py"
-        
-Platform: UNKNOWN
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Topic :: Software Development :: Quality Assurance
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 3
+Metadata-Version: 1.1
+Name: astroid
+Version: 1.4.9
+Summary: A abstract syntax tree for Python with inference support.
+Home-page: https://github.com/PyCQA/astroid
+Author: Python Code Quality Authority
+Author-email: code-quality at python.org
+License: LGPL
+Description: .. image:: https://drone.io/bitbucket.org/logilab/astroid/status.png
+            :alt: drone.io Build Status
+            :target: https://drone.io/bitbucket.org/logilab/astroid
+        
+        Astroid
+        =======
+        
+        What's this?
+        ------------
+        
+        The aim of this module is to provide a common base representation of
+        python source code for projects such as pychecker, pyreverse,
+        pylint... Well, actually the development of this library is essentially
+        governed by pylint's needs. It used to be called logilab-astng.
+        
+        It provides a compatible representation which comes from the `_ast`
+        module.  It rebuilds the tree generated by the builtin _ast module by
+        recursively walking down the AST and building an extended ast. The new
+        node classes have additional methods and attributes for different
+        usages.  They include some support for static inference and local name
+        scopes.  Furthermore, astroid builds partial trees by inspecting living
+        objects.
+        
+        Main modules are:
+        
+        * `bases`, `node_classses` and `scoped_nodes` contain the classes for the
+          different type of nodes of the tree.
+        
+        * the `manager` contains a high level object to get astroid trees from
+          source files and living objects. It maintains a cache of previously
+          constructed tree for quick access.
+        
+        
+        Installation
+        ------------
+        
+        Extract the tarball, jump into the created directory and run::
+        
+        	python setup.py install
+        
+        For installation options, see::
+        
+        	python setup.py install --help
+        
+        
+        If you have any questions, please mail the code-quality at python.org
+        mailing list for support. See
+        http://mail.python.org/mailman/listinfo/code-quality for subscription
+        information and archives. You may find older archives at
+        http://lists.logilab.org/mailman/listinfo/python-projects .
+        
+        Python Versions
+        ---------------
+        
+        astroid is compatible with Python 2.7 as well as 3.3 and later. astroid uses
+        the same code base for both Python versions, using six.
+        
+        Test
+        ----
+        
+        Tests are in the 'test' subdirectory. To launch the whole tests suite
+        at once, you can use unittest discover::
+        
+          python -m unittest discover -p "unittest*.py"
+        
+Platform: UNKNOWN
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Software Development :: Quality Assurance
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 3
diff --git a/astroid.egg-info/PKG-INFO b/astroid.egg-info/PKG-INFO
index 029a131..a428e92 100644
--- a/astroid.egg-info/PKG-INFO
+++ b/astroid.egg-info/PKG-INFO
@@ -1,79 +1,79 @@
-Metadata-Version: 1.1
-Name: astroid
-Version: 1.4.8
-Summary: A abstract syntax tree for Python with inference support.
-Home-page: https://github.com/PyCQA/astroid
-Author: Python Code Quality Authority
-Author-email: code-quality at python.org
-License: LGPL
-Description: .. image:: https://drone.io/bitbucket.org/logilab/astroid/status.png
-            :alt: drone.io Build Status
-            :target: https://drone.io/bitbucket.org/logilab/astroid
-        
-        Astroid
-        =======
-        
-        What's this?
-        ------------
-        
-        The aim of this module is to provide a common base representation of
-        python source code for projects such as pychecker, pyreverse,
-        pylint... Well, actually the development of this library is essentially
-        governed by pylint's needs. It used to be called logilab-astng.
-        
-        It provides a compatible representation which comes from the `_ast`
-        module.  It rebuilds the tree generated by the builtin _ast module by
-        recursively walking down the AST and building an extended ast. The new
-        node classes have additional methods and attributes for different
-        usages.  They include some support for static inference and local name
-        scopes.  Furthermore, astroid builds partial trees by inspecting living
-        objects.
-        
-        Main modules are:
-        
-        * `bases`, `node_classses` and `scoped_nodes` contain the classes for the
-          different type of nodes of the tree.
-        
-        * the `manager` contains a high level object to get astroid trees from
-          source files and living objects. It maintains a cache of previously
-          constructed tree for quick access.
-        
-        
-        Installation
-        ------------
-        
-        Extract the tarball, jump into the created directory and run::
-        
-        	python setup.py install
-        
-        For installation options, see::
-        
-        	python setup.py install --help
-        
-        
-        If you have any questions, please mail the code-quality at python.org
-        mailing list for support. See
-        http://mail.python.org/mailman/listinfo/code-quality for subscription
-        information and archives. You may find older archives at
-        http://lists.logilab.org/mailman/listinfo/python-projects .
-        
-        Python Versions
-        ---------------
-        
-        astroid is compatible with Python 2.7 as well as 3.3 and later. astroid uses
-        the same code base for both Python versions, using six.
-        
-        Test
-        ----
-        
-        Tests are in the 'test' subdirectory. To launch the whole tests suite
-        at once, you can use unittest discover::
-        
-          python -m unittest discover -p "unittest*.py"
-        
-Platform: UNKNOWN
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Topic :: Software Development :: Quality Assurance
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 3
+Metadata-Version: 1.1
+Name: astroid
+Version: 1.4.9
+Summary: A abstract syntax tree for Python with inference support.
+Home-page: https://github.com/PyCQA/astroid
+Author: Python Code Quality Authority
+Author-email: code-quality at python.org
+License: LGPL
+Description: .. image:: https://drone.io/bitbucket.org/logilab/astroid/status.png
+            :alt: drone.io Build Status
+            :target: https://drone.io/bitbucket.org/logilab/astroid
+        
+        Astroid
+        =======
+        
+        What's this?
+        ------------
+        
+        The aim of this module is to provide a common base representation of
+        python source code for projects such as pychecker, pyreverse,
+        pylint... Well, actually the development of this library is essentially
+        governed by pylint's needs. It used to be called logilab-astng.
+        
+        It provides a compatible representation which comes from the `_ast`
+        module.  It rebuilds the tree generated by the builtin _ast module by
+        recursively walking down the AST and building an extended ast. The new
+        node classes have additional methods and attributes for different
+        usages.  They include some support for static inference and local name
+        scopes.  Furthermore, astroid builds partial trees by inspecting living
+        objects.
+        
+        Main modules are:
+        
+        * `bases`, `node_classses` and `scoped_nodes` contain the classes for the
+          different type of nodes of the tree.
+        
+        * the `manager` contains a high level object to get astroid trees from
+          source files and living objects. It maintains a cache of previously
+          constructed tree for quick access.
+        
+        
+        Installation
+        ------------
+        
+        Extract the tarball, jump into the created directory and run::
+        
+        	python setup.py install
+        
+        For installation options, see::
+        
+        	python setup.py install --help
+        
+        
+        If you have any questions, please mail the code-quality at python.org
+        mailing list for support. See
+        http://mail.python.org/mailman/listinfo/code-quality for subscription
+        information and archives. You may find older archives at
+        http://lists.logilab.org/mailman/listinfo/python-projects .
+        
+        Python Versions
+        ---------------
+        
+        astroid is compatible with Python 2.7 as well as 3.3 and later. astroid uses
+        the same code base for both Python versions, using six.
+        
+        Test
+        ----
+        
+        Tests are in the 'test' subdirectory. To launch the whole tests suite
+        at once, you can use unittest discover::
+        
+          python -m unittest discover -p "unittest*.py"
+        
+Platform: UNKNOWN
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Software Development :: Quality Assurance
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 3
diff --git a/astroid/__pkginfo__.py b/astroid/__pkginfo__.py
index 9a78a37..7a5acfa 100644
--- a/astroid/__pkginfo__.py
+++ b/astroid/__pkginfo__.py
@@ -20,7 +20,7 @@ distname = 'astroid'
 
 modname = 'astroid'
 
-numversion = (1, 4, 8)
+numversion = (1, 4, 9)
 version = '.'.join([str(num) for num in numversion])
 
 install_requires = ['six', 'lazy_object_proxy', 'wrapt']
diff --git a/astroid/brain/brain_pytest.py b/astroid/brain/brain_pytest.py
index 4f615c1..1859b98 100644
--- a/astroid/brain/brain_pytest.py
+++ b/astroid/brain/brain_pytest.py
@@ -1,31 +1,76 @@
-"""Astroid hooks for pytest."""
-from __future__ import absolute_import
-from astroid import MANAGER, register_module_extender
-from astroid.builder import AstroidBuilder
-
-
-def pytest_transform():
-    return AstroidBuilder(MANAGER).string_build('''
-
-try:
-    import _pytest.mark
-    import _pytest.recwarn
-    import _pytest.runner
-    import _pytest.python
-except ImportError:
-    pass
-else:
-    deprecated_call = _pytest.recwarn.deprecated_call
-    exit = _pytest.runner.exit
-    fail = _pytest.runner.fail
-    fixture = _pytest.python.fixture
-    importorskip = _pytest.runner.importorskip
-    mark = _pytest.mark.MarkGenerator()
-    raises = _pytest.python.raises
-    skip = _pytest.runner.skip
-    yield_fixture = _pytest.python.yield_fixture
-
-''')
-
-register_module_extender(MANAGER, 'pytest', pytest_transform)
-register_module_extender(MANAGER, 'py.test', pytest_transform)
+"""Astroid hooks for pytest."""
+from __future__ import absolute_import
+from astroid import MANAGER, register_module_extender
+from astroid.builder import AstroidBuilder
+
+
+def pytest_transform():
+    return AstroidBuilder(MANAGER).string_build('''
+
+try:
+    import _pytest.mark
+    import _pytest.recwarn
+    import _pytest.runner
+    import _pytest.python
+    import _pytest.skipping
+    import _pytest.assertion
+except ImportError:
+    pass
+else:
+    deprecated_call = _pytest.recwarn.deprecated_call
+    warns = _pytest.recwarn.warns
+
+    exit = _pytest.runner.exit
+    fail = _pytest.runner.fail
+    skip = _pytest.runner.skip
+    importorskip = _pytest.runner.importorskip
+
+    xfail = _pytest.skipping.xfail
+    mark = _pytest.mark.MarkGenerator()
+    raises = _pytest.python.raises
+
+    # New in pytest 3.0
+    try:
+        approx = _pytest.python.approx
+        register_assert_rewrite = _pytest.assertion.register_assert_rewrite
+    except AttributeError:
+        pass
+
+
+# Moved in pytest 3.0
+
+try:
+    import _pytest.freeze_support
+    freeze_includes = _pytest.freeze_support.freeze_includes
+except ImportError:
+    try:
+        import _pytest.genscript
+        freeze_includes = _pytest.genscript.freeze_includes
+    except ImportError:
+        pass
+
+try:
+    import _pytest.debugging
+    set_trace = _pytest.debugging.pytestPDB().set_trace
+except ImportError:
+    try:
+        import _pytest.pdb
+        set_trace = _pytest.pdb.pytestPDB().set_trace
+    except ImportError:
+        pass
+
+try:
+    import _pytest.fixtures
+    fixture = _pytest.fixtures.fixture
+    yield_fixture = _pytest.fixtures.yield_fixture
+except ImportError:
+    try:
+        import _pytest.python
+        fixture = _pytest.python.fixture
+        yield_fixture = _pytest.python.yield_fixture
+    except ImportError:
+        pass
+''')
+
+register_module_extender(MANAGER, 'pytest', pytest_transform)
+register_module_extender(MANAGER, 'py.test', pytest_transform)
diff --git a/astroid/modutils.py b/astroid/modutils.py
index 45c96f7..31104cb 100644
--- a/astroid/modutils.py
+++ b/astroid/modutils.py
@@ -651,7 +651,7 @@ def _module_file(modpath, path=None):
         # setuptools has added into sys.modules a module object with proper
         # __path__, get back information from there
         module = sys.modules[modpath.pop(0)]
-        path = module.__path__
+        path = list(module.__path__)
         if not modpath:
             return imp.C_BUILTIN, None
     imported = []
diff --git a/astroid/tests/unittest_brain.py b/astroid/tests/unittest_brain.py
index 8710238..9dbbe1d 100644
--- a/astroid/tests/unittest_brain.py
+++ b/astroid/tests/unittest_brain.py
@@ -492,11 +492,14 @@ class PytestBrainTest(unittest.TestCase):
         pytest #@
         ''')
         module = next(ast_node.infer())
-        self.assertIn('deprecated_call', module)
-        self.assertIn('exit', module)
-        self.assertIn('fail', module)
-        self.assertIn('fixture', module)
-        self.assertIn('mark', module)
+        attrs = ['deprecated_call', 'warns', 'exit', 'fail', 'skip',
+                 'importorskip', 'xfail', 'mark', 'raises', 'freeze_includes',
+                 'set_trace', 'fixture', 'yield_fixture']
+        if pytest.__version__.split('.')[0] == '3':
+            attrs += ['approx', 'register_assert_rewrite']
+
+        for attr in attrs:
+            self.assertIn(attr, module)
 
 
 if __name__ == '__main__':
diff --git a/setup.cfg b/setup.cfg
index 57e1352..6c71b61 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,8 +1,8 @@
-[wheel]
-universal = 1
-
-[egg_info]
-tag_build = 
-tag_date = 0
-tag_svn_revision = 0
-
+[wheel]
+universal = 1
+
+[egg_info]
+tag_build = 
+tag_date = 0
+tag_svn_revision = 0
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/astroid.git



More information about the Python-modules-commits mailing list