Skip to content

Use attrs and @attrs.define in tests#15152

Merged
JelleZijlstra merged 3 commits intopython:masterfrom
ikonst:attrs-define-in-tests
May 18, 2023
Merged

Use attrs and @attrs.define in tests#15152
JelleZijlstra merged 3 commits intopython:masterfrom
ikonst:attrs-define-in-tests

Conversation

@ikonst
Copy link
Copy Markdown
Contributor

@ikonst ikonst commented Apr 27, 2023

"attrs" namespace, "attrs.define" and "attrs.field" are the recommended new namespace and API of the attrs library (see https://www.attrs.org/en/stable/names.html) so we should modernize the bulk of our tests to use the current API.

@ikonst
Copy link
Copy Markdown
Contributor Author

ikonst commented May 18, 2023

👋 @JelleZijlstra

@JelleZijlstra
Copy link
Copy Markdown
Member

Are there any tests that specifically check that we still support the old names?

@ikonst
Copy link
Copy Markdown
Contributor Author

ikonst commented May 18, 2023

Good call @JelleZijlstra, I meant to do it and forgot 😅

e5d8da0 replaces testAttrsNewPackage with testAttrsOldPackage.

Copy link
Copy Markdown
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Will merge when CI passes, feel free to ping me if I forget.

@JelleZijlstra JelleZijlstra merged commit 24b585f into python:master May 18, 2023
@ikonst ikonst deleted the attrs-define-in-tests branch May 18, 2023 19:13
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