Skip to content

Finish changing versioning scheme #60

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 1 commit into from
Sep 28, 2022

Conversation

hauntsaninja
Copy link
Contributor

This change was removed from #57, so as to make that PR more a refactoring. The changes here accomplish two things:

First, allows us to change the specificity of how we pin versions in typeshed while ensuring that users who install without pinning versions still get the latest stub.

Second, incrementing the fourth position helps disambiguate "upstream version" from "types version", reducing user confusion. See my comment
here: #57 (comment)

We can wait longer if we're suspicious of #57, but there have been a half dozen stub uploads since then. Please let me know if there are any tests I could add that would be worthwhile.

This change was removed from typeshed-internal#57, so as to make that PR more a
refactoring. The changes here accomplish two things:

First, allows us to change the specificity of how we pin versions in
typeshed while ensuring that users who install without pinning versions
still get the latest stub.

Second, incrementing the fourth position helps disambiguate "upstream
version" from "types version", reducing user confusion. See my comment
here: typeshed-internal#57 (comment)
hauntsaninja added a commit to hauntsaninja/typeshed that referenced this pull request Sep 26, 2022
stub_uploader is developing a bunch of validation, a lot of which must
live in that repo for security reasons. We don't want to find out about
this validation failing when stub uploading fails.

We also run it in the daily test since there are some checks that
(unfortunately, albeit unlikely) can be broken by new upstream releases.

This is blocked on typeshed-internal/stub_uploader#60
Copy link
Member

@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.

Please make sure it doesn't break any of the packages that don't follow this scheme yet before merging.

@hauntsaninja
Copy link
Contributor Author

hauntsaninja commented Sep 27, 2022

I don't have permissions on this repo to merge, so one of you two would need to do it :-)

We test that all of the asserts hold when incrementing all currently existing package versions here:

def test_version_increment(distribution: str) -> None:

I also just locally added:

diff --git a/stub_uploader/get_version.py b/stub_uploader/get_version.py
index 9c5bfd1..c2c4bd7 100644
--- a/stub_uploader/get_version.py
+++ b/stub_uploader/get_version.py
@@ -139,4 +139,5 @@ def determine_incremented_version(metadata: Metadata) -> str:
     version = compute_incremented_version(
         metadata.version_spec, published_stub_versions
     )
+    print(f"{metadata.stub_distribution:<40}\t{str(version):<12} {str(metadata.version_spec):<10} {max(published_stub_versions)}")
     return str(version)

and ran pytest -s -k test_version_increment and the results all look expected to me

@srittau srittau merged commit 8b2ce8f into typeshed-internal:main Sep 28, 2022
@hauntsaninja hauntsaninja deleted the vers branch September 28, 2022 07:20
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.

3 participants