Skip to content

Re-organize directory structure #4971

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

Merged
merged 18 commits into from
Jan 27, 2021
Merged

Conversation

ilevkivskyi
Copy link
Member

See discussion in #2491

This PR needs a mypy commit that supports new directory structure (including --custom-typeshed-dir for standard library) landed in mypy master, which may take another day or two.

cc @JukkaL

@ilevkivskyi ilevkivskyi changed the title [WIP] Re-organize directory structure Re-organize directory structure Jan 26, 2021
@ilevkivskyi
Copy link
Member Author

ilevkivskyi commented Jan 26, 2021

OK, here is the situation: all tests pass, but I temporarily disabled two tests:

  • Test stubs with pytype
  • Run stubtest on stubs

Somehow mypy_primer passes, but it will still needs to be updated to support this.

This is now ready for review, I am aiming to land this tomorrow morning.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM, with one question.

if name == PY2_NAMESPACE:
continue
mod, _ = os.path.splitext(name)
if mod not in supported_versions or supported_versions[mod] > (major, minor):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we print a warning or even fail the test if mod is not in supported_versions?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think we should, I was thinking about allowing some unrelated files in that directory (like some scripts etc). But we actually should keep directory structure clean. I will update this and will also add in a separate PR later a test that ensures stdlib and stubs have strict directory structure.

@rchen152
Copy link
Collaborator

rchen152 commented Jan 27, 2021

I believe I have pytype_test working again; it requires first a change to pytype itself (google/pytype#821), then an update to the test (26862d4). (It'll take at least a day for the pytype change to be reviewed and merged, so it still makes sense to disable pytype_test first and re-enable it later.)

@ilevkivskyi
Copy link
Member Author

@rchen152 Great, thanks! I will then merge this now with pytype test disabled, and you can re-enable it whenever ready.

@ilevkivskyi ilevkivskyi merged commit 16ae4c6 into python:master Jan 27, 2021
@ilevkivskyi ilevkivskyi deleted the big-reshuffle branch January 27, 2021 12:00
@Akuli
Copy link
Collaborator

Akuli commented Jan 27, 2021

Each stub now shows up with "1 contributor" on github, but if I look at the blame (by pressing b), I can see all contributors.

@ilevkivskyi
Copy link
Member Author

Each stub now shows up with "1 contributor" on github, but if I look at the blame (by pressing b), I can see all contributors.

This is a GitHub bug I think git blame works correctly in this case (since these are pure file renames).

ilevkivskyi added a commit that referenced this pull request Jan 29, 2021
Follow up fo #4971

Co-authored-by: Ivan Levkivskyi <[email protected]>
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.

6 participants