Treat 0.0.0 as invalid version in get_version_info#46549
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates get_version_info to treat 0.0.0 (and currently any version string beginning with 0.0.0) as an invalid “previous release” so downstream tooling doesn’t consider it a real prior PyPI version.
Changes:
- Add a guard in
get_version_infoto return("", "")when the computedlast_versionstarts with0.0.0.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/4ebec9df-c06c-4b15-a0a9-97e80d6dc045 Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/4ebec9df-c06c-4b15-a0a9-97e80d6dc045 Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Contributor
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
ChenxiJiang333
approved these changes
Apr 27, 2026
fafhrd91
pushed a commit
to fafhrd91/azure-sdk-for-python
that referenced
this pull request
Apr 28, 2026
* Treat 0.0.0 as invalid version in get_version_info * Update eng/tools/azure-sdk-tools/packaging_tools/package_utils.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Use packaging.version.Version for 0.0.0 check; add unit tests Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/4ebec9df-c06c-4b15-a0a9-97e80d6dc045 Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Improve assertion in 0.0.0.1 test to check specific return value Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/4ebec9df-c06c-4b15-a0a9-97e80d6dc045 Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Although
0.0.0may exist as a published version on PyPI for some packages, it is not a valid release version for our purposes. This change updatesget_version_infoinpackage_utils.pyto return empty strings when the latest version returned from PyPI starts with0.0.0, so downstream logic does not treat it as a real previous release.Changes
("", "")whenlast_versionstarts with0.0.0.