Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up Python2 regressions in PR 417 #452

Merged
merged 2 commits into from
Sep 18, 2024

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 stefanseefeld merged commit 95e5301 into boostorg:develop Sep 18, 2024
16 of 20 checks passed
@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