MAINT: adding python3.13 to CI and fix any incompatibilities#260
MAINT: adding python3.13 to CI and fix any incompatibilities#260bsipocz merged 3 commits intoscientific-python:mainfrom
Conversation
|
The only test failures are coming from the diff generation; however, I also see some whitespace issues in astroquery that may be doctestplus related: |
|
Astroquery failure is unrelated to doctestplus, I commented on the Astroquery PR. Should we ping seberg about the diff generation? Thanks! |
|
Yeap, @seberg, would you mind having a look? |
|
I suspect the failures will be due to the whitespace thing we run into with astroquery, too. First item under this ancor: |
|
Hmmm, I suppose we have to read the actual indentation from the file then? Maybe something like: diff --git a/pytest_doctestplus/plugin.py b/pytest_doctestplus/plugin.py
index f9c3a0c..5538c53 100644
--- a/pytest_doctestplus/plugin.py
+++ b/pytest_doctestplus/plugin.py
@@ -900,7 +900,8 @@ def write_modified_file(fname, new_fname, changes):
lineno = change["test_lineno"] + change["example_lineno"]
lineno += change["source"].count("\n")
- indentation = " " * change["nindent"]
+ indentation = len(text[lineno-1]) - len(text[lineno-1].lstrip())
+ indentation = text[lineno-1][:indentation]
want = indent(change["want"], indentation, lambda x: True)
# Replace fully blank lines with the required `<BLANKLINE>`
# (May need to do this also if line contains only whitespace)EDIT: Sorry, first diff had a bug, this one should work. |
|
Thank you @seberg, it works like a dream. |
pllim
left a comment
There was a problem hiding this comment.
Looks great. Thanks, all! I'll let you merge. :)
I see test failures locally, but there is also a puzzling one for older pythons that I see in my dev environment, but not when I run the tests from tox, so ultimately we may run into some new cross incompatibility with some other plugin.
(This will need a changelog once some actual code changes are needed for incompatibility fixes, but not until all the diff stays within the territory of the tests)