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

Integrate traits-stubs into the traits package #1714

Merged
merged 3 commits into from
Aug 18, 2022
Merged

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented Aug 12, 2022

This PR (targeting Traits 7.0) integrates the separate traits-stubs package into the main traits package. This will remove the need to make a separate release of the traits-stubs package every time we release the traits package.

Notes:

  • The stubs tests fail when run from an editable install, but are happy when run for a non-editable install
  • This PR introduces a dependency on typing-extensions for Python 3.6 and Python 3.7

Closes #1254

@corranwebster
Copy link
Contributor

  • The stubs tests fail when run from an editable install, but are happy when run for a non-editable install

Do you know why?

@mdickinson
Copy link
Member Author

Do you know why?

No, haven't entirely figured it out. I suspect the C extension of being a factor, though.

Copy link
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

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

I think this looks good. Things seem to be being picked up when I try to use it in another package.

@mdickinson
Copy link
Member Author

I'll do a bit of digging into the editable install failures before merging; if I can't figure out what's going on, I'll open an issue.

@mdickinson
Copy link
Member Author

I'll do a bit of digging into the editable install failures before merging

The mypy complaints with the editable install all look legitimate, so the question now is: why is the editable install better at picking up the typing issues than the non-editable install.

Some of the problems being picked up are outside the direct stubs test files. Those should also eventually be fixed, but it may take us a while to get there.

I'll make a follow-up PR with the individual fixes needed.

@mdickinson mdickinson merged commit 3e6ea50 into main Aug 18, 2022
@mdickinson mdickinson deleted the integrate-stubs branch August 18, 2022 13:55
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.

Distribute typing stubs as part of Traits
2 participants