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

Add conformance tests for PEP 702's @deprecated #1822

Merged
merged 12 commits into from
Jul 28, 2024
Merged

Add conformance tests for PEP 702's @deprecated #1822

merged 12 commits into from
Jul 28, 2024

Conversation

InSyncWithFoo
Copy link
Contributor

@InSyncWithFoo InSyncWithFoo commented Jul 27, 2024

Fixes #1821.

I'm not sure how to make Pytype run properly (#1758), probably because I'm using Rye, so I'm skipping manual tests.

Copy link
Collaborator

@erictraut erictraut left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

This looks pretty good, but I think the three test files should be combined into one for the reasons I mention in the comment.

You should also run the test suite and manually score the four type checkers, update the corresponding toml files, and do a final run to generate the conformance summary report.

conformance/tests/directives_deprecated_pep702_example.py Outdated Show resolved Hide resolved
@InSyncWithFoo
Copy link
Contributor Author

InSyncWithFoo commented Jul 27, 2024

I'm not sure why, but Pyre's results changed drastically. Are the changes supposed to be committed?

conformance/results/pyre/aliases_explicit.toml Outdated Show resolved Hide resolved
conformance/results/pyright/directives_deprecated.toml Outdated Show resolved Hide resolved
conformance/results/pyright/directives_deprecated.toml Outdated Show resolved Hide resolved
conformance/results/pytype/directives_deprecated.toml Outdated Show resolved Hide resolved
conformance/results/mypy/directives_deprecated.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@erictraut erictraut left a comment

Choose a reason for hiding this comment

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

I'm not sure what to do about the pyre tests. I don't think we can commit the PR as is. Options:

  1. You find a way to run the pyre tests on your machine.
  2. Someone else runs the tests and updates the PR on your branch before you commit it.
  3. You revert all of the pyre test results, we merge your PR, and then I immediately follow it up with another PR that addresses the pyre results.

Option 1 is cleanest if you're able to do it. If that's not feasible, then option 3 might work the best.

conformance/tests/_directives_deprecated_library.py Outdated Show resolved Hide resolved
conformance/tests/directives_deprecated.py Outdated Show resolved Hide resolved
conformance/tests/directives_deprecated.py Show resolved Hide resolved
@JelleZijlstra
Copy link
Member

I'm running the script locally now and will update pyre.

Copy link
Collaborator

@erictraut erictraut left a comment

Choose a reason for hiding this comment

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

Thanks again for doing this! The latest draft looks good to me.

@erictraut erictraut merged commit cbf18f8 into python:main Jul 28, 2024
5 checks passed
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.

Conformance tests: PEP 702
3 participants