lp:~cjwatson/storm/py3-mocker-inspect
Created by
Colin Watson
and last modified
- Get this branch:
- bzr branch lp:~cjwatson/storm/py3-mocker-inspect
Only
Colin Watson
can upload to this branch. If you are
Colin Watson
please log in for upload directions.
Branch merges
Propose for merging
No branches
dependent on this one.
- Simon Poirier (community): Approve
-
Diff: 96 lines (+49/-22)1 file modifiedstorm/tests/mocker.py (+49/-22)
Branch information
Recent revisions
- 512. By Colin Watson
-
Add Python 3 support to tests.mocker.
SpecChecker. inspect.getargspec is deprecated on Python 3, and in any case causes us
problems because it includes the bound first argument (self or similar) for
bound methods. The modern inspect.signature API is for the most part much
easier to use and doesn't have this problem.There is one wrinkle which requires special handling: method descriptors
don't have the first argument already bound as far as their signature is
concerned, but for the purposes of a mock spec we want to skip it anyway.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:storm