Skip to content

Conversation

@jvansanten
Copy link
Contributor

#417 introduced some regressions with Python2. To whit:

  • add_property() attempts to add docstrings to functions passed to it. test.properties binds an existing instance method again as a getter, which works fine on Python3, where klass.member returns the underlying function object. On Python2, however, this returned an unbound instancemethod with an immutable __doc__ attribute. Work around this by skipping docstring generation on PyMethod objects.
  • test.nested exercises the __qualname__ attribute, which didn't exist before Python 3.3. Use doctest option flags to make examples conditional on the Python version.

__qualname__ didn't exist before python 3.3. Skip checks that depend on it if running in earlier Python versions
@stefanseefeld
Copy link
Member

Thanks @jvansanten , the develop branch is stable again. I intend to merge develop to master shortly, so all of that work should be part of the next boost release. Thanks again for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants