This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Saimadhav.Heblikar
Recipients Saimadhav.Heblikar, Todd.Rovito, taleinat, terry.reedy
Date 2014-03-16.13:22:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1394976133.41.0.636595831438.issue20827@psf.upfronthosting.co.za>
In-reply-to
Content
I have added a improved patch.
What this patch does:

1. resolves issue 1 of msg213193 - uses inspect. signature() instead of inspect.getargspec. 

2. resolves issue 2 of msg213193 - the module is imported only once per ClassBrowser instance.

3. resolves issue 2 of msg213333 - the classbrowser display is based on the current EditorWindow text and not based on whats on disk. All changes to reflect this have been made in ClassBrowser.py and pyclbr, therefore i did not create a new issue.

4. resolves issue 1 of msg213333 - though i feel there are better ways to do this than this patch - which manually close and create a new ClassBrowser instance


what this patch does NOT do:

1. the test_pyclbr fails after the proposed changes to pyclbr,(which is just adding a new keyword argument to _readmodule,readmodule_ex. i have circled it down to this.
the only other change to pyclbr is an extra "if" statement.)
i have tried to modify the tests to reflect the same, but to no avail. if you can give me some hints on how to move forward, i'll be quick to implement the tests.
here is the test error ->

test_decorators (test.test_pyclbr.PyclbrTest) ... *** B
FAIL
test_easy (test.test_pyclbr.PyclbrTest) ... ok
test_issue_14798 (test.test_pyclbr.PyclbrTest) ... ok
test_others (test.test_pyclbr.PyclbrTest) ... *** BytesHeaderParser
FAIL

======================================================================
FAIL: test_decorators (test.test_pyclbr.PyclbrTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/media/development/cpython/Lib/test/test_pyclbr.py", line 152, in test_decorators
    self.checkModule('test.pyclbr_input', ignore=['om'])
  File "/media/development/cpython/Lib/test/test_pyclbr.py", line 139, in checkModule
    self.assertHaskey(dict, name, ignore)
  File "/media/development/cpython/Lib/test/test_pyclbr.py", line 43, in assertHaskey
    self.assertIn(key, obj)
AssertionError: 'B' not found in {}

======================================================================
FAIL: test_others (test.test_pyclbr.PyclbrTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/media/development/cpython/Lib/test/test_pyclbr.py", line 167, in test_others
    cm('email.parser')
  File "/media/development/cpython/Lib/test/test_pyclbr.py", line 139, in checkModule
    self.assertHaskey(dict, name, ignore)
  File "/media/development/cpython/Lib/test/test_pyclbr.py", line 43, in assertHaskey
    self.assertIn(key, obj)
AssertionError: 'BytesHeaderParser' not found in {}

----------------------------------------------------------------------
Ran 4 tests in 15.437s
History
Date User Action Args
2014-03-16 13:22:13Saimadhav.Heblikarsetrecipients: + Saimadhav.Heblikar, terry.reedy, taleinat, Todd.Rovito
2014-03-16 13:22:13Saimadhav.Heblikarsetmessageid: <1394976133.41.0.636595831438.issue20827@psf.upfronthosting.co.za>
2014-03-16 13:22:13Saimadhav.Heblikarlinkissue20827 messages
2014-03-16 13:22:12Saimadhav.Heblikarcreate