aliles / funcsigs

Python function signatures package for Python 2.6, 2.7 and 3.2+
http://pypi.python.org/pypi/funcsigs
Other
48 stars 33 forks source link

Fixed unbound methods getting their first parameter curried #3

Closed epsy closed 10 years ago

epsy commented 10 years ago

Tests and fixes issue #2.

coveralls commented 10 years ago

Coverage Status

Coverage decreased (-18.22%) when pulling e9822685f7d0f653e49b639b1b88cd196cf5fd48 on epsy:unbound into 59ab8ac5ea71d5b5163be0b12d5447969b252c43 on aliles:master.

coveralls commented 10 years ago

Coverage Status

Coverage decreased (-17.98%) when pulling 3614c9efcc4702be0682453ed3405bd07e0830c1 on epsy:unbound into 59ab8ac5ea71d5b5163be0b12d5447969b252c43 on aliles:master.

coveralls commented 10 years ago

Coverage Status

Coverage decreased (-0.23%) when pulling 50d63cb7c57677d25b2b621f36ab6677c8876251 on epsy:unbound into 59ab8ac5ea71d5b5163be0b12d5447969b252c43 on aliles:master.

aliles commented 10 years ago

Just clarifying I understand what is being fixed here.

The change from the unbound method type for methods on uninstantiated classes in Python2 to ordinary function objects in Python3 results in the self argument being present in the funcsigs.Signature object of Python3 but not Python2. This pull request fixes that.

Is this accurate?

epsy commented 10 years ago

Yes.

It also makes self a positional-only parameter on Python 2 unbound method, which might be surprising at first, but as they cannot receive self as a named argument, unlike on regular functions as returned in the equivalent Python 3 function, it really does become a positional-only parameter like inspect defines it.

aliles commented 10 years ago

Terrific, thank you for the patch. I will publish a new release to PyPI in the next couple of days, if that is ok.

epsy commented 10 years ago

Great, thanks.

epsy commented 10 years ago

Hello again, do you think you could schedule a release on PyPI soon?

aliles commented 10 years ago

Oh my, well that's embarrassing. This had completely fallen of my todo list.

I have just published the 0.4 release to PyPI. I have also published wheel packages in addition to source bundles, which will hopefully speed your deployments.

Very sorry for the time this has taken, this has been a bit of a fail as a project maintainer.