Skip to content

Fix various v0.11.0 conformance issues #294

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 3 commits into from
Apr 29, 2025

Conversation

jchadwick-buf
Copy link
Member

@jchadwick-buf jchadwick-buf commented Apr 28, 2025

We still have the nanosecond granularity issues that we've always had, but this should fix everything else.

We still have the nanosecond granularity issues that we've always had, but this should fix everything else.
@jchadwick-buf jchadwick-buf requested a review from smaye81 April 28, 2025 20:40
@jchadwick-buf jchadwick-buf marked this pull request as ready for review April 28, 2025 20:44
@jchadwick-buf jchadwick-buf enabled auto-merge (squash) April 28, 2025 21:07
@@ -548,6 +548,8 @@ def get_bits(self) -> int:

# Handle double colon, fill pieces with 0
if self._double_colon_seen:
if len(p16) >= 7:
return 0
Copy link
Member

Choose a reason for hiding this comment

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

Why the return of 0?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is because get_bits is supposed to return 0 if the address is invalid.

    def get_bits(self) -> int:
        """Return the 128-bit value of an address parsed through address() or address_prefix().

        Return 0 if no address was parsed successfully.

        """

OTOH, though, it doesn't really matter, so I removed it.

@jchadwick-buf jchadwick-buf merged commit 12155fb into main Apr 29, 2025
12 checks passed
@jchadwick-buf jchadwick-buf deleted the jchadwick/conformance-fixes branch April 29, 2025 13:56
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.

2 participants