Skip to content

Commit

Permalink
Add setuptools dependence and related guard
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilGirdhar authored and Pierre-Sassoulas committed Jul 19, 2021
1 parent b25c6d8 commit 40629ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Release date: TBA

Closes PyCQA/pylint#4715

* Add dependency on setuptools and a guard to prevent related exceptions.


What's New in astroid 2.6.2?
============================
Expand Down
6 changes: 5 additions & 1 deletion astroid/interpreter/_import/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@


def is_namespace(modname):
return pkg_resources is not None and modname in pkg_resources._namespace_packages
return (
pkg_resources is not None
and hasattr(pkg_resources, "_namespace_packages")
and modname in pkg_resources._namespace_packages
)
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ packages = find:
install_requires =
lazy_object_proxy>=1.4.0
wrapt>=1.11,<1.13
setuptools>=56.0
typed-ast>=1.4.0,<1.5;implementation_name=="cpython" and python_version<"3.8"
typing-extensions>=3.7.4;python_version<"3.8"
python_requires = ~=3.6
Expand Down

0 comments on commit 40629ba

Please sign in to comment.