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

Filter DeprecationWarning in failing test for python 3.12 #523

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

cmarmo
Copy link
Contributor

@cmarmo cmarmo commented Jan 9, 2024

Dear maintainers,

it seems to me that the failing test in #522 and #512 is generated by a DeprecationWarning new in python 3.12.
This pull request fixes the test filtering DeprecationWarnings in that specific test.

Closes #512.
Closes #522.

Thank you for considering it.

@larsoner
Copy link
Collaborator

larsoner commented Jan 9, 2024

@cmarmo could you git cherry-pick 4deb459 or similar so we get 3.12 CIs running in this PR as well? #522 shows that they fail on main so we can close that PR and then merge this one when green.

.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
@cmarmo
Copy link
Contributor Author

cmarmo commented Jan 9, 2024

Thanks @larsoner , indeed I wasn't sure about the project policies about python versions.

@larsoner
Copy link
Collaborator

larsoner commented Jan 9, 2024

I think we can properly fix this rather than by filtering the DeprecationWarning using ast.Constant in place of ast.NameConstant in our code (assuming I'm reading the ast stuff right). @cmarmo do you want to do it in this PR? If not I'm happy to merge this then open a quick PR myself to try it.

@cmarmo
Copy link
Contributor Author

cmarmo commented Jan 9, 2024

I'm afraid I probably need a deeper look at the code to understand what you are proposing... I was hoping to be helpful , but if you can offer a better fix you are likely to be more efficient than me ... :)

@larsoner larsoner merged commit 2431739 into numpy:main Jan 9, 2024
31 checks passed
@stefanv stefanv added this to the 1.7.0 milestone Jan 9, 2024
@larsoner
Copy link
Collaborator

larsoner commented Jan 9, 2024

Thanks @cmarmo !

@cmarmo cmarmo deleted the fixvalidate312 branch January 9, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure with python3.12 in TestValidator::test_bad_docstrings[BadReturns-return_not_documented-msgs31]
3 participants