Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 937203 Details for
Bug 1141440
[PATCH] pylint has broken glib detection on f21
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Patch against python-astroid
0001-brain-gi-fix-glib-detection.patch (text/plain), 2.24 KB, created by
Cole Robinson
on 2014-09-13 12:41:30 UTC
(
hide
)
Description:
Patch against python-astroid
Filename:
MIME Type:
Creator:
Cole Robinson
Created:
2014-09-13 12:41:30 UTC
Size:
2.24 KB
patch
obsolete
>From c6d5b3e4cda0d7b803a50652503405087860737e Mon Sep 17 00:00:00 2001 >Message-Id: <c6d5b3e4cda0d7b803a50652503405087860737e.1410612067.git.crobinso@redhat.com> >From: Cole Robinson <crobinso@redhat.com> >Date: Sat, 13 Sep 2014 07:56:42 -0400 >Subject: [PATCH] brain: gi: fix glib detection > >pygobject has some special hidden modules that we need to inspect >for glib and gobject. However, on latest pygobject, the hidden glib >module has been removed, which caused pylint to fail to detect >glib whatsoever. > >Tread errors in processing these hidden modules as non-fatal. > >Closes astroid issue #49 >--- > brain/py2gi.py | 23 ++++++++++++++++------- > 1 file changed, 16 insertions(+), 7 deletions(-) > >diff --git a/brain/py2gi.py b/brain/py2gi.py >index dd9868d..3b74cb2 100644 >--- a/brain/py2gi.py >+++ b/brain/py2gi.py >@@ -134,17 +134,26 @@ def _new_import_module(self, modname, relative_only=False, level=None): > # build astroid representation unless we already tried so > if modname not in _inspected_modules: > modnames = [modname] >- # GLib and GObject have some special case handling >- # in pygobject that we need to cope with >+ optional_modnames = [] >+ >+ # GLib and GObject may have some special case handling >+ # in pygobject that we need to cope with. However at >+ # least as of pygobject3-3.13.91 the _glib module doesn't >+ # exist anymore, so if treat these modules as optional. > if modname == 'gi.repository.GLib': >- modnames.append('gi._glib') >+ optional_modnames.append('gi._glib') > elif modname == 'gi.repository.GObject': >- modnames.append('gi._gobject') >+ optional_modnames.append('gi._gobject') >+ > try: > modcode = '' >- for m in modnames: >- __import__(m) >- modcode += _gi_build_stub(sys.modules[m]) >+ for m in modnames + optional_modnames: >+ try: >+ __import__(m) >+ modcode += _gi_build_stub(sys.modules[m]) >+ except ImportError: >+ if m not in optional_modnames: >+ raise > except ImportError: > astng = _inspected_modules[modname] = None > else: >-- >2.1.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1141440
: 937203