-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support Python3.13 #2054
Support Python3.13 #2054
Conversation
…k workarounds Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Note It appears that this Pull Request modifies the On inspection, the No further action is required. |
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this trigger the advanced tests? Let's see.
It does. nice.
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
It looks as though there are changes to the ways that docstrings are parsed in Python3.13: https://docs.python.org/3.13/whatsnew/3.13.html#other-language-changes This is breaking a lot of docstring tests. Will see what I can do. Update: This looks like it's going to be complicated. Here's the PR that added the changes: python/cpython#81283 |
@Zeitsperre This commit pushed a very simple fix to the indentation issue. I have looked at |
I'm not keen to add a new requirement (though maybe that library will find use elsewhere), even if it's a transitory one (until we no longer support Python3.12 and lower, so years, I suppose). If we can extract the parsing logic that we currently have to python version-dependent functions, we'll probably be much better off. I'll see what I can do with your approach. Thanks! |
The new code dedents the docstrings before parsing them, which assumes that all lines of the docstrings have a common indent. This is broken when multi-line docstrings start on the first line : this was the case in In linting speak, this means we want to enforce rule D213 and not D212:
|
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
@aulemahal I think I've managed to clear up a few docstring issues (and some formatting errors that have been present for a long time, too!). The remaining warnings I'm seeing arise from the docstring for We might need to revisit the logic of: robustness_fractions.__doc__ = robustness_fractions.__doc__.format(
tests_list="{" + ", ".join(list(SIGNIFICANCE_TESTS.keys()) + ["threshold"]) + "}",
tests_doc="\n".join(map(_gen_test_entry, SIGNIFICANCE_TESTS.items()))[
4: # strip first 4 chars
],
) |
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
…fixes Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
I'm reluctant to merge this until our documentation builds on Python3.13. The last issue is the parsing of docstrings needed for the If I have time on Monday, I imagine the fix is quite simple (dedenting for all entries before constructing the section). |
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Co-authored-by: Éric Dupuis <71575674+coxipi@users.noreply.github.com>
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
sphinx-codeautolink
/pygments
workaroundsruff
rule D213 (docstring titles start on second line)Does this PR introduce a breaking change?
No, but once this is passing, we should prepare to drop support for Python3.10. This is mentioned in
CHANGELOG.rst
.Other information:
numba
v0.61.0 was released earlier today: https://numba.readthedocs.io/en/stable/release/0.61.0-notes.html